From 4dc491fbd24b0fb044488c1f8a83c7f08b324e63 Mon Sep 17 00:00:00 2001 From: Lubo Slivka Date: Thu, 5 Aug 2021 13:14:43 +0200 Subject: [PATCH 1/4] Add generated API clients --- README.md | 73 +- generate_afm_client.sh | 32 + generate_metadata_client.sh | 30 + gooddata-afm-client/.gitignore | 66 + gooddata-afm-client/.openapi-generator-ignore | 23 + gooddata-afm-client/.openapi-generator/FILES | 325 + .../.openapi-generator/VERSION | 1 + gooddata-afm-client/README.md | 280 + gooddata-afm-client/docs/AFM.md | 16 + .../docs/AbsoluteDateFilter.md | 13 + .../docs/AbsoluteDateFilterBody.md | 15 + .../docs/AbsoluteDateFilterBodyAllOf.md | 13 + .../docs/AbstractMeasureValueFilter.md | 13 + .../docs/AbstractMeasureValueFilterAllOf.md | 12 + gooddata-afm-client/docs/AfmControllerApi.md | 150 + gooddata-afm-client/docs/AfmExecution.md | 14 + .../docs/AfmExecutionResponse.md | 12 + .../docs/AfmExplainControllerApi.md | 147 + .../docs/AfmObjectIdentifier.md | 13 + .../docs/AfmValidObjectsQuery.md | 14 + .../docs/AfmValidObjectsResponse.md | 13 + .../docs/ArithmeticMeasureDefinition.md | 13 + ...meticMeasureDefinitionArithmeticMeasure.md | 13 + .../docs/AttributeExecutionResultHeader.md | 12 + gooddata-afm-client/docs/AttributeFilter.md | 14 + .../docs/AttributeFilterElements.md | 13 + gooddata-afm-client/docs/AttributeHeader.md | 12 + .../docs/AttributeHeaderAttributeHeader.md | 18 + gooddata-afm-client/docs/AttributeItem.md | 13 + .../docs/AttributeResultHeader.md | 14 + .../docs/CommonAttributeFilter.md | 13 + .../docs/CommonAttributeFilterAllOf.md | 12 + gooddata-afm-client/docs/CommonDateFilter.md | 13 + .../docs/CommonDateFilterAllOf.md | 12 + gooddata-afm-client/docs/CommonFilter.md | 12 + .../docs/CommonMeasureValueFilter.md | 15 + .../docs/CommonMeasureValueFilterAllOf.md | 13 + .../docs/ComparisonMeasureValueFilter.md | 13 + .../docs/ComparisonMeasureValueFilterBody.md | 17 + .../ComparisonMeasureValueFilterBodyAllOf.md | 13 + gooddata-afm-client/docs/DataColumnLocator.md | 12 + gooddata-afm-client/docs/DateFilter.md | 14 + gooddata-afm-client/docs/Dimension.md | 15 + gooddata-afm-client/docs/DimensionHeader.md | 13 + gooddata-afm-client/docs/Element.md | 14 + .../docs/ElementsControllerApi.md | 101 + gooddata-afm-client/docs/ElementsResponse.md | 16 + gooddata-afm-client/docs/ErrorMessage.md | 17 + gooddata-afm-client/docs/ExecutionLinks.md | 12 + gooddata-afm-client/docs/ExecutionResponse.md | 13 + gooddata-afm-client/docs/ExecutionResult.md | 16 + .../docs/ExecutionResultGrandTotal.md | 14 + .../docs/ExecutionResultHeader.md | 14 + .../docs/ExecutionResultPaging.md | 15 + gooddata-afm-client/docs/ExecutionSettings.md | 13 + gooddata-afm-client/docs/FilterDefinition.md | 20 + .../docs/FilterDefinitionForSimpleMeasure.md | 16 + gooddata-afm-client/docs/GrandTotal.md | 15 + gooddata-afm-client/docs/HeaderGroup.md | 13 + gooddata-afm-client/docs/Identifier.md | 14 + .../docs/IncludedDimensionProps.md | 12 + .../docs/InlineFilterDefinition.md | 13 + .../docs/InlineFilterDefinitionBody.md | 13 + .../docs/InlineFilterDefinitionBodyAllOf.md | 12 + .../docs/InlineMeasureDefinition.md | 13 + .../docs/InlineMeasureDefinitionInline.md | 12 + gooddata-afm-client/docs/LocalIdentifier.md | 13 + gooddata-afm-client/docs/MeasureDefinition.md | 17 + .../docs/MeasureExecutionResultHeader.md | 12 + .../docs/MeasureGroupHeader.md | 12 + gooddata-afm-client/docs/MeasureHeaderOut.md | 14 + gooddata-afm-client/docs/MeasureItem.md | 13 + .../docs/MeasureResultHeader.md | 13 + .../docs/MeasureValueFilter.md | 14 + .../docs/NegativeAttributeFilter.md | 13 + .../docs/NegativeAttributeFilterBody.md | 14 + .../docs/NegativeAttributeFilterBodyAllOf.md | 12 + gooddata-afm-client/docs/ObjectIdentifier.md | 14 + gooddata-afm-client/docs/Paging.md | 16 + gooddata-afm-client/docs/PopDataset.md | 13 + .../docs/PopDatasetMeasureDefinition.md | 13 + ...tMeasureDefinitionPreviousPeriodMeasure.md | 13 + gooddata-afm-client/docs/PopDate.md | 13 + .../docs/PopDateMeasureDefinition.md | 13 + ...pDateMeasureDefinitionOverPeriodMeasure.md | 13 + .../docs/PositiveAttributeFilter.md | 13 + .../docs/PositiveAttributeFilterBody.md | 14 + .../docs/PositiveAttributeFilterBodyAllOf.md | 12 + .../docs/RangeMeasureValueFilter.md | 13 + .../docs/RangeMeasureValueFilterBody.md | 18 + .../docs/RangeMeasureValueFilterBodyAllOf.md | 14 + gooddata-afm-client/docs/RankingFilter.md | 13 + gooddata-afm-client/docs/RankingFilterBody.md | 16 + .../docs/RankingFilterBodyAllOf.md | 14 + .../docs/RelativeDateFilter.md | 12 + .../docs/RelativeDateFilterBody.md | 16 + .../docs/RelativeDateFilterBodyAllOf.md | 15 + .../docs/ResultControllerApi.md | 97 + gooddata-afm-client/docs/ResultDimension.md | 12 + gooddata-afm-client/docs/ResultSpec.md | 14 + .../docs/SimpleMeasureDefinition.md | 12 + .../docs/SimpleMeasureDefinitionMeasure.md | 15 + gooddata-afm-client/docs/SortDirection.md | 13 + gooddata-afm-client/docs/SortKeyAttribute.md | 13 + .../docs/SortKeyAttributeAttribute.md | 13 + gooddata-afm-client/docs/SortKeyValue.md | 12 + gooddata-afm-client/docs/SortKeyValueValue.md | 13 + gooddata-afm-client/docs/TotalFunction.md | 13 + .../docs/ValidObjectsControllerApi.md | 109 + .../gooddata_afm_client/__init__.py | 27 + .../gooddata_afm_client/api/__init__.py | 3 + .../api/afm_controller_api.py | 185 + .../api/afm_explain_controller_api.py | 178 + .../api/elements_controller_api.py | 231 + .../api/result_controller_api.py | 186 + .../api/valid_objects_controller_api.py | 173 + .../gooddata_afm_client/api_client.py | 849 +++ .../gooddata_afm_client/apis/__init__.py | 21 + .../gooddata_afm_client/configuration.py | 443 ++ .../gooddata_afm_client/exceptions.py | 159 + .../gooddata_afm_client/model/__init__.py | 5 + .../model/absolute_date_filter.py | 267 + .../model/absolute_date_filter_body.py | 328 + .../model/absolute_date_filter_body_all_of.py | 267 + .../model/abstract_measure_value_filter.py | 320 + .../abstract_measure_value_filter_all_of.py | 261 + .../gooddata_afm_client/model/afm.py | 287 + .../model/afm_execution.py | 281 + .../model/afm_execution_response.py | 267 + .../model/afm_object_identifier.py | 267 + .../model/afm_valid_objects_query.py | 281 + .../model/afm_valid_objects_response.py | 267 + .../model/arithmetic_measure_definition.py | 267 + ...c_measure_definition_arithmetic_measure.py | 280 + .../attribute_execution_result_header.py | 267 + .../model/attribute_filter.py | 322 + .../model/attribute_filter_elements.py | 263 + .../model/attribute_header.py | 267 + .../attribute_header_attribute_header.py | 323 + .../model/attribute_item.py | 278 + .../model/attribute_result_header.py | 267 + .../model/common_attribute_filter.py | 320 + .../model/common_attribute_filter_all_of.py | 267 + .../model/common_date_filter.py | 320 + .../model/common_date_filter_all_of.py | 267 + .../model/common_filter.py | 255 + .../model/common_measure_value_filter.py | 328 + .../common_measure_value_filter_all_of.py | 271 + .../model/comparison_measure_value_filter.py | 267 + .../comparison_measure_value_filter_body.py | 344 + ...arison_measure_value_filter_body_all_of.py | 275 + .../model/data_column_locator.py | 251 + .../gooddata_afm_client/model/date_filter.py | 322 + .../gooddata_afm_client/model/dimension.py | 274 + .../model/dimension_header.py | 267 + .../gooddata_afm_client/model/element.py | 267 + .../model/elements_response.py | 287 + .../model/error_message.py | 285 + .../model/execution_links.py | 261 + .../model/execution_response.py | 275 + .../model/execution_result.py | 289 + .../model/execution_result_grand_total.py | 267 + .../model/execution_result_header.py | 322 + .../model/execution_result_paging.py | 273 + .../model/execution_settings.py | 259 + .../model/filter_definition.py | 367 ++ .../filter_definition_for_simple_measure.py | 334 + .../gooddata_afm_client/model/grand_total.py | 279 + .../gooddata_afm_client/model/header_group.py | 267 + .../gooddata_afm_client/model/identifier.py | 325 + .../model/included_dimension_props.py | 261 + .../model/inline_filter_definition.py | 267 + .../model/inline_filter_definition_body.py | 318 + .../inline_filter_definition_body_all_of.py | 261 + .../model/inline_measure_definition.py | 267 + .../model/inline_measure_definition_inline.py | 261 + .../model/local_identifier.py | 266 + .../model/measure_definition.py | 349 + .../model/measure_execution_result_header.py | 267 + .../model/measure_group_header.py | 267 + .../model/measure_header_out.py | 269 + .../gooddata_afm_client/model/measure_item.py | 278 + .../model/measure_result_header.py | 261 + .../model/measure_value_filter.py | 322 + .../model/negative_attribute_filter.py | 267 + .../model/negative_attribute_filter_body.py | 326 + .../negative_attribute_filter_body_all_of.py | 267 + .../model/object_identifier.py | 272 + .../gooddata_afm_client/model/paging.py | 277 + .../gooddata_afm_client/model/pop_dataset.py | 273 + .../model/pop_dataset_measure_definition.py | 267 + ...sure_definition_previous_period_measure.py | 275 + .../gooddata_afm_client/model/pop_date.py | 273 + .../model/pop_date_measure_definition.py | 267 + ..._measure_definition_over_period_measure.py | 275 + .../model/positive_attribute_filter.py | 267 + .../model/positive_attribute_filter_body.py | 326 + .../positive_attribute_filter_body_all_of.py | 267 + .../model/range_measure_value_filter.py | 267 + .../model/range_measure_value_filter_body.py | 344 + .../range_measure_value_filter_body_all_of.py | 277 + .../model/ranking_filter.py | 267 + .../model/ranking_filter_body.py | 336 + .../model/ranking_filter_body_all_of.py | 283 + .../model/relative_date_filter.py | 267 + .../model/relative_date_filter_body.py | 349 + .../model/relative_date_filter_body_all_of.py | 290 + .../model/result_dimension.py | 261 + .../gooddata_afm_client/model/result_spec.py | 273 + .../model/simple_measure_definition.py | 267 + .../simple_measure_definition_measure.py | 291 + .../model/sort_direction.py | 288 + .../model/sort_key_attribute.py | 267 + .../model/sort_key_attribute_attribute.py | 271 + .../model/sort_key_value.py | 267 + .../model/sort_key_value_value.py | 273 + .../model/total_function.py | 291 + .../gooddata_afm_client/model_utils.py | 1992 ++++++ .../gooddata_afm_client/models/__init__.py | 107 + .../gooddata_afm_client/rest.py | 292 + gooddata-afm-client/requirements.txt | 3 + gooddata-afm-client/setup.cfg | 2 + gooddata-afm-client/setup.py | 42 + gooddata-afm-client/test-requirements.txt | 1 + gooddata-afm-client/tox.ini | 9 + gooddata-metadata-client/.gitignore | 66 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 735 +++ .../.openapi-generator/VERSION | 1 + gooddata-metadata-client/README.md | 453 ++ .../docs/DataSourceActionsControllerApi.md | 156 + .../docs/DataSourceEntitiesControllerApi.md | 168 + .../docs/DataSourceLayoutControllerApi.md | 160 + .../docs/DataSourceTableIdentifier.md | 15 + .../docs/DatasetReferenceIdentifier.md | 13 + .../docs/DeclarativeAnalyticalDashboard.md | 16 + .../docs/DeclarativeAnalytics.md | 13 + .../docs/DeclarativeAnalyticsLayer.md | 15 + .../docs/DeclarativeAttribute.md | 17 + .../docs/DeclarativeColumn.md | 17 + .../docs/DeclarativeDataSource.md | 21 + .../docs/DeclarativeDataSources.md | 13 + .../docs/DeclarativeDataset.md | 21 + .../docs/DeclarativeDateDataset.md | 18 + .../docs/DeclarativeFact.md | 17 + .../docs/DeclarativeFilterContext.md | 16 + .../docs/DeclarativeLabel.md | 18 + .../docs/DeclarativeLayoutControllerApi.md | 1835 ++++++ .../docs/DeclarativeLdm.md | 14 + .../docs/DeclarativeMetric.md | 16 + .../docs/DeclarativeModel.md | 13 + .../docs/DeclarativeOrganization.md | 18 + .../docs/DeclarativeOrganizationInfo.md | 18 + .../docs/DeclarativePdm.md | 13 + .../docs/DeclarativeReference.md | 15 + .../docs/DeclarativeTable.md | 16 + .../docs/DeclarativeTables.md | 13 + .../docs/DeclarativeUser.md | 15 + .../docs/DeclarativeUserGroup.md | 14 + .../docs/DeclarativeUserGroups.md | 13 + .../docs/DeclarativeUsers.md | 13 + .../docs/DeclarativeVisualizationObject.md | 16 + .../docs/DeclarativeWorkspace.md | 16 + .../docs/DeclarativeWorkspaceDataFilter.md | 19 + .../DeclarativeWorkspaceDataFilterSetting.md | 17 + .../docs/DeclarativeWorkspaceDataFilters.md | 13 + .../docs/DeclarativeWorkspaceModel.md | 14 + .../docs/DeclarativeWorkspaces.md | 14 + .../docs/GenerateLdmRequest.md | 24 + .../docs/GrainIdentifier.md | 14 + .../docs/GranularitiesFormatting.md | 14 + gooddata-metadata-client/docs/JsonApiACLIn.md | 16 + .../docs/JsonApiACLInDocument.md | 12 + .../docs/JsonApiACLOut.md | 16 + .../docs/JsonApiACLOutAttributes.md | 14 + .../docs/JsonApiACLOutDocument.md | 14 + .../docs/JsonApiACLOutList.md | 15 + .../docs/JsonApiACLOutRelationships.md | 13 + .../docs/JsonApiACLOutRelationshipsObjects.md | 12 + .../JsonApiACLOutRelationshipsSubjects.md | 12 + .../docs/JsonApiACLOutWithLinks.md | 16 + .../docs/JsonApiAnalyticalDashboardIn.md | 15 + .../JsonApiAnalyticalDashboardInDocument.md | 12 + .../docs/JsonApiAnalyticalDashboardLinkage.md | 14 + .../docs/JsonApiAnalyticalDashboardOut.md | 16 + ...JsonApiAnalyticalDashboardOutAttributes.md | 16 + .../JsonApiAnalyticalDashboardOutDocument.md | 14 + .../docs/JsonApiAnalyticalDashboardOutList.md | 15 + ...nApiAnalyticalDashboardOutRelationships.md | 17 + ...ardOutRelationshipsAnalyticalDashboards.md | 12 + ...yticalDashboardOutRelationshipsDatasets.md | 12 + ...DashboardOutRelationshipsFilterContexts.md | 12 + ...alyticalDashboardOutRelationshipsLabels.md | 12 + ...lyticalDashboardOutRelationshipsMetrics.md | 12 + ...ardOutRelationshipsVisualizationObjects.md | 12 + .../JsonApiAnalyticalDashboardOutWithLinks.md | 16 + ...JsonApiAnalyticalDashboardToManyLinkage.md | 13 + .../docs/JsonApiApiTokenIn.md | 15 + .../docs/JsonApiApiTokenInDocument.md | 12 + .../docs/JsonApiApiTokenOut.md | 15 + .../docs/JsonApiApiTokenOutAttributes.md | 12 + .../docs/JsonApiApiTokenOutDocument.md | 13 + .../docs/JsonApiApiTokenOutList.md | 14 + .../docs/JsonApiApiTokenOutWithLinks.md | 15 + .../docs/JsonApiAttributeLinkage.md | 14 + .../docs/JsonApiAttributeOut.md | 16 + .../docs/JsonApiAttributeOutAttributes.md | 16 + .../docs/JsonApiAttributeOutDocument.md | 14 + .../docs/JsonApiAttributeOutList.md | 15 + .../docs/JsonApiAttributeOutRelationships.md | 13 + ...JsonApiAttributeOutRelationshipsDataset.md | 12 + .../docs/JsonApiAttributeOutWithLinks.md | 16 + .../docs/JsonApiAttributeToManyLinkage.md | 13 + .../docs/JsonApiAttributeToOneLinkage.md | 14 + .../JsonApiCookieSecurityConfigurationIn.md | 15 + ...piCookieSecurityConfigurationInDocument.md | 12 + .../JsonApiCookieSecurityConfigurationOut.md | 15 + ...ookieSecurityConfigurationOutAttributes.md | 13 + ...iCookieSecurityConfigurationOutDocument.md | 13 + .../docs/JsonApiDataSourceIn.md | 15 + .../docs/JsonApiDataSourceInAttributes.md | 18 + .../docs/JsonApiDataSourceInDocument.md | 12 + .../docs/JsonApiDataSourceOut.md | 15 + .../docs/JsonApiDataSourceOutAttributes.md | 16 + .../docs/JsonApiDataSourceOutDocument.md | 13 + .../docs/JsonApiDataSourceOutList.md | 14 + .../docs/JsonApiDataSourceOutWithLinks.md | 15 + .../docs/JsonApiDataSourceTableOut.md | 15 + .../JsonApiDataSourceTableOutAttributes.md | 14 + ...nApiDataSourceTableOutAttributesColumns.md | 17 + .../docs/JsonApiDataSourceTableOutDocument.md | 13 + .../docs/JsonApiDataSourceTableOutList.md | 14 + .../JsonApiDataSourceTableOutWithLinks.md | 15 + .../docs/JsonApiDatasetLinkage.md | 14 + .../docs/JsonApiDatasetOut.md | 16 + .../docs/JsonApiDatasetOutAttributes.md | 19 + .../docs/JsonApiDatasetOutAttributesGrain.md | 13 + ...DatasetOutAttributesReferenceProperties.md | 14 + .../docs/JsonApiDatasetOutDocument.md | 14 + .../docs/JsonApiDatasetOutList.md | 15 + .../docs/JsonApiDatasetOutRelationships.md | 14 + ...sonApiDatasetOutRelationshipsAttributes.md | 12 + .../JsonApiDatasetOutRelationshipsFacts.md | 12 + .../docs/JsonApiDatasetOutWithLinks.md | 16 + .../docs/JsonApiDatasetToManyLinkage.md | 13 + .../docs/JsonApiDatasetToOneLinkage.md | 14 + .../docs/JsonApiFactLinkage.md | 14 + .../docs/JsonApiFactOut.md | 16 + .../docs/JsonApiFactOutAttributes.md | 16 + .../docs/JsonApiFactOutDocument.md | 14 + .../docs/JsonApiFactOutList.md | 15 + .../docs/JsonApiFactOutRelationships.md | 12 + .../docs/JsonApiFactOutWithLinks.md | 16 + .../docs/JsonApiFactToManyLinkage.md | 13 + .../docs/JsonApiFilterContextIn.md | 15 + .../docs/JsonApiFilterContextInDocument.md | 12 + .../docs/JsonApiFilterContextLinkage.md | 14 + .../docs/JsonApiFilterContextOut.md | 16 + .../docs/JsonApiFilterContextOutDocument.md | 14 + .../docs/JsonApiFilterContextOutList.md | 15 + .../JsonApiFilterContextOutRelationships.md | 14 + .../docs/JsonApiFilterContextOutWithLinks.md | 16 + .../docs/JsonApiFilterContextToManyLinkage.md | 13 + .../docs/JsonApiLabelLinkage.md | 14 + .../docs/JsonApiLabelOut.md | 16 + .../docs/JsonApiLabelOutAttributes.md | 17 + .../docs/JsonApiLabelOutDocument.md | 14 + .../docs/JsonApiLabelOutList.md | 15 + .../docs/JsonApiLabelOutRelationships.md | 12 + .../JsonApiLabelOutRelationshipsAttribute.md | 12 + .../docs/JsonApiLabelOutWithLinks.md | 16 + .../docs/JsonApiLabelToManyLinkage.md | 13 + .../docs/JsonApiMetricIn.md | 15 + .../docs/JsonApiMetricInDocument.md | 12 + .../docs/JsonApiMetricLinkage.md | 14 + .../docs/JsonApiMetricOut.md | 16 + .../docs/JsonApiMetricOutAttributes.md | 16 + .../docs/JsonApiMetricOutAttributesContent.md | 13 + .../docs/JsonApiMetricOutDocument.md | 14 + .../docs/JsonApiMetricOutList.md | 15 + .../docs/JsonApiMetricOutRelationships.md | 15 + .../docs/JsonApiMetricOutWithLinks.md | 16 + .../docs/JsonApiMetricToManyLinkage.md | 13 + .../docs/JsonApiOrganizationIn.md | 15 + .../docs/JsonApiOrganizationInAttributes.md | 16 + .../docs/JsonApiOrganizationInDocument.md | 12 + .../docs/JsonApiOrganizationOut.md | 16 + .../docs/JsonApiOrganizationOutAttributes.md | 15 + .../docs/JsonApiOrganizationOutDocument.md | 14 + .../JsonApiOrganizationOutRelationships.md | 13 + ...ganizationOutRelationshipsBootstrapUser.md | 12 + ...ationOutRelationshipsBootstrapUserGroup.md | 12 + .../docs/JsonApiUserGroupIn.md | 16 + .../docs/JsonApiUserGroupInDocument.md | 12 + .../docs/JsonApiUserGroupLinkage.md | 14 + .../docs/JsonApiUserGroupOut.md | 16 + .../docs/JsonApiUserGroupOutDocument.md | 14 + .../docs/JsonApiUserGroupOutList.md | 15 + .../docs/JsonApiUserGroupOutRelationships.md | 12 + .../docs/JsonApiUserGroupOutWithLinks.md | 16 + .../docs/JsonApiUserGroupToManyLinkage.md | 13 + .../docs/JsonApiUserGroupToOneLinkage.md | 14 + .../docs/JsonApiUserIn.md | 16 + .../docs/JsonApiUserInDocument.md | 12 + .../docs/JsonApiUserLinkage.md | 14 + .../docs/JsonApiUserOut.md | 16 + .../docs/JsonApiUserOutAttributes.md | 12 + .../docs/JsonApiUserOutDocument.md | 14 + .../docs/JsonApiUserOutList.md | 15 + .../docs/JsonApiUserOutRelationships.md | 12 + .../docs/JsonApiUserOutWithLinks.md | 16 + .../docs/JsonApiUserToManyLinkage.md | 13 + .../docs/JsonApiUserToOneLinkage.md | 14 + .../docs/JsonApiVisualizationObjectIn.md | 15 + .../JsonApiVisualizationObjectInDocument.md | 12 + .../docs/JsonApiVisualizationObjectLinkage.md | 14 + .../docs/JsonApiVisualizationObjectOut.md | 16 + .../JsonApiVisualizationObjectOutDocument.md | 14 + .../docs/JsonApiVisualizationObjectOutList.md | 15 + ...nApiVisualizationObjectOutRelationships.md | 16 + .../JsonApiVisualizationObjectOutWithLinks.md | 16 + ...JsonApiVisualizationObjectToManyLinkage.md | 13 + .../docs/JsonApiWorkspaceDataFilterIn.md | 16 + .../JsonApiWorkspaceDataFilterInDocument.md | 12 + .../docs/JsonApiWorkspaceDataFilterLinkage.md | 14 + .../docs/JsonApiWorkspaceDataFilterOut.md | 16 + ...JsonApiWorkspaceDataFilterOutAttributes.md | 15 + .../JsonApiWorkspaceDataFilterOutDocument.md | 14 + .../docs/JsonApiWorkspaceDataFilterOutList.md | 15 + ...nApiWorkspaceDataFilterOutRelationships.md | 12 + ...ataFilterOutRelationshipsFilterSettings.md | 12 + .../JsonApiWorkspaceDataFilterOutWithLinks.md | 16 + ...sonApiWorkspaceDataFilterSettingLinkage.md | 14 + .../JsonApiWorkspaceDataFilterSettingOut.md | 16 + ...WorkspaceDataFilterSettingOutAttributes.md | 14 + ...piWorkspaceDataFilterSettingOutDocument.md | 14 + ...sonApiWorkspaceDataFilterSettingOutList.md | 15 + ...kspaceDataFilterSettingOutRelationships.md | 12 + ...tingOutRelationshipsWorkspaceDataFilter.md | 12 + ...iWorkspaceDataFilterSettingOutWithLinks.md | 16 + ...WorkspaceDataFilterSettingToManyLinkage.md | 13 + .../JsonApiWorkspaceDataFilterToOneLinkage.md | 14 + .../docs/JsonApiWorkspaceIn.md | 16 + .../docs/JsonApiWorkspaceInDocument.md | 12 + .../docs/JsonApiWorkspaceLinkage.md | 14 + .../docs/JsonApiWorkspaceOut.md | 17 + .../docs/JsonApiWorkspaceOutAttributes.md | 12 + .../docs/JsonApiWorkspaceOutDocument.md | 14 + .../docs/JsonApiWorkspaceOutList.md | 15 + .../docs/JsonApiWorkspaceOutMeta.md | 12 + .../docs/JsonApiWorkspaceOutMetaConfig.md | 13 + .../docs/JsonApiWorkspaceOutRelationships.md | 12 + .../JsonApiWorkspaceOutRelationshipsParent.md | 12 + .../docs/JsonApiWorkspaceOutWithLinks.md | 17 + .../docs/JsonApiWorkspaceToOneLinkage.md | 14 + gooddata-metadata-client/docs/ListLinks.md | 13 + .../docs/ListLinksAllOf.md | 12 + gooddata-metadata-client/docs/ObjectLinks.md | 12 + .../docs/ObjectLinksContainer.md | 12 + .../docs/OptionsControllerApi.md | 128 + .../docs/OrganizationControllerApi.md | 343 + .../docs/OrganizationModelControllerApi.md | 2105 ++++++ .../docs/OrganizationRedirectControllerApi.md | 68 + .../docs/ReferenceIdentifier.md | 14 + .../docs/UserGroupIdentifier.md | 14 + .../docs/UserModelControllerApi.md | 314 + .../docs/WorkspaceIdentifier.md | 14 + .../docs/WorkspaceObjectControllerApi.md | 3088 +++++++++ .../gooddata_metadata_client/__init__.py | 27 + .../gooddata_metadata_client/api/__init__.py | 3 + .../api/data_source_actions_controller_api.py | 281 + .../data_source_entities_controller_api.py | 330 + .../api/data_source_layout_controller_api.py | 280 + .../api/declarative_layout_controller_api.py | 2100 ++++++ .../api/options_controller_api.py | 246 + .../api/organization_controller_api.py | 634 ++ .../api/organization_model_controller_api.py | 3659 +++++++++++ .../organization_redirect_controller_api.py | 139 + .../api/user_model_controller_api.py | 601 ++ .../api/workspace_object_controller_api.py | 5617 +++++++++++++++++ .../gooddata_metadata_client/api_client.py | 849 +++ .../gooddata_metadata_client/apis/__init__.py | 26 + .../gooddata_metadata_client/configuration.py | 443 ++ .../gooddata_metadata_client/exceptions.py | 159 + .../model/__init__.py | 5 + .../model/data_source_table_identifier.py | 278 + .../model/dataset_reference_identifier.py | 272 + .../model/declarative_analytical_dashboard.py | 283 + .../model/declarative_analytics.py | 267 + .../model/declarative_analytics_layer.py | 291 + .../model/declarative_attribute.py | 289 + .../model/declarative_column.py | 287 + .../model/declarative_data_source.py | 319 + .../model/declarative_data_sources.py | 267 + .../model/declarative_dataset.py | 319 + .../model/declarative_date_dataset.py | 312 + .../model/declarative_fact.py | 283 + .../model/declarative_filter_context.py | 283 + .../model/declarative_label.py | 289 + .../model/declarative_ldm.py | 275 + .../model/declarative_metric.py | 283 + .../model/declarative_model.py | 267 + .../model/declarative_organization.py | 307 + .../model/declarative_organization_info.py | 285 + .../model/declarative_pdm.py | 267 + .../model/declarative_reference.py | 279 + .../model/declarative_table.py | 285 + .../model/declarative_tables.py | 267 + .../model/declarative_user.py | 275 + .../model/declarative_user_group.py | 271 + .../model/declarative_user_groups.py | 267 + .../model/declarative_users.py | 267 + .../model/declarative_visualization_object.py | 283 + .../model/declarative_workspace.py | 285 + .../declarative_workspace_data_filter.py | 301 + ...clarative_workspace_data_filter_setting.py | 289 + .../declarative_workspace_data_filters.py | 267 + .../model/declarative_workspace_model.py | 275 + .../model/declarative_workspaces.py | 275 + .../model/generate_ldm_request.py | 305 + .../model/grain_identifier.py | 271 + .../model/granularities_formatting.py | 267 + .../model/json_api_acl_out.py | 293 + .../model/json_api_acl_out_attributes.py | 270 + .../model/json_api_acl_out_document.py | 279 + .../model/json_api_acl_out_list.py | 281 + .../model/json_api_acl_out_relationships.py | 267 + .../json_api_acl_out_relationships_objects.py | 267 + ...json_api_acl_out_relationships_subjects.py | 267 + .../model/json_api_acl_out_with_links.py | 346 + .../model/json_api_aclin.py | 293 + .../model/json_api_aclin_document.py | 267 + .../model/json_api_analytical_dashboard_in.py | 287 + ...on_api_analytical_dashboard_in_document.py | 267 + .../json_api_analytical_dashboard_linkage.py | 272 + .../json_api_analytical_dashboard_out.py | 293 + ...api_analytical_dashboard_out_attributes.py | 271 + ...n_api_analytical_dashboard_out_document.py | 279 + .../json_api_analytical_dashboard_out_list.py | 281 + ..._analytical_dashboard_out_relationships.py | 291 + ...out_relationships_analytical_dashboards.py | 267 + ...al_dashboard_out_relationships_datasets.py | 267 + ...board_out_relationships_filter_contexts.py | 267 + ...ical_dashboard_out_relationships_labels.py | 267 + ...cal_dashboard_out_relationships_metrics.py | 267 + ...out_relationships_visualization_objects.py | 267 + ...api_analytical_dashboard_out_with_links.py | 346 + ...pi_analytical_dashboard_to_many_linkage.py | 290 + .../model/json_api_api_token_in.py | 281 + .../model/json_api_api_token_in_document.py | 267 + .../model/json_api_api_token_out.py | 287 + .../json_api_api_token_out_attributes.py | 255 + .../model/json_api_api_token_out_document.py | 273 + .../model/json_api_api_token_out_list.py | 275 + .../json_api_api_token_out_with_links.py | 340 + .../model/json_api_attribute_linkage.py | 272 + .../model/json_api_attribute_out.py | 293 + .../json_api_attribute_out_attributes.py | 288 + .../model/json_api_attribute_out_document.py | 279 + .../model/json_api_attribute_out_list.py | 281 + .../json_api_attribute_out_relationships.py | 267 + ...api_attribute_out_relationships_dataset.py | 267 + .../json_api_attribute_out_with_links.py | 346 + .../json_api_attribute_to_many_linkage.py | 290 + .../json_api_attribute_to_one_linkage.py | 318 + ...on_api_cookie_security_configuration_in.py | 287 + ...okie_security_configuration_in_document.py | 267 + ...n_api_cookie_security_configuration_out.py | 287 + ...e_security_configuration_out_attributes.py | 259 + ...kie_security_configuration_out_document.py | 273 + .../model/json_api_data_source_in.py | 289 + .../json_api_data_source_in_attributes.py | 301 + .../model/json_api_data_source_in_document.py | 267 + .../model/json_api_data_source_out.py | 289 + .../json_api_data_source_out_attributes.py | 293 + .../json_api_data_source_out_document.py | 273 + .../model/json_api_data_source_out_list.py | 275 + .../json_api_data_source_out_with_links.py | 340 + .../model/json_api_data_source_table_out.py | 287 + ...on_api_data_source_table_out_attributes.py | 273 + ...ata_source_table_out_attributes_columns.py | 287 + ...json_api_data_source_table_out_document.py | 273 + .../json_api_data_source_table_out_list.py | 275 + ...on_api_data_source_table_out_with_links.py | 340 + .../model/json_api_dataset_linkage.py | 272 + .../model/json_api_dataset_out.py | 295 + .../model/json_api_dataset_out_attributes.py | 301 + .../json_api_dataset_out_attributes_grain.py | 271 + ...set_out_attributes_reference_properties.py | 279 + .../model/json_api_dataset_out_document.py | 279 + .../model/json_api_dataset_out_list.py | 281 + .../json_api_dataset_out_relationships.py | 273 + ...pi_dataset_out_relationships_attributes.py | 267 + ...son_api_dataset_out_relationships_facts.py | 267 + .../model/json_api_dataset_out_with_links.py | 346 + .../model/json_api_dataset_to_many_linkage.py | 290 + .../model/json_api_dataset_to_one_linkage.py | 318 + .../model/json_api_fact_linkage.py | 272 + .../model/json_api_fact_out.py | 293 + .../model/json_api_fact_out_attributes.py | 271 + .../model/json_api_fact_out_document.py | 279 + .../model/json_api_fact_out_list.py | 281 + .../model/json_api_fact_out_relationships.py | 261 + .../model/json_api_fact_out_with_links.py | 346 + .../model/json_api_fact_to_many_linkage.py | 290 + .../model/json_api_filter_context_in.py | 287 + .../json_api_filter_context_in_document.py | 267 + .../model/json_api_filter_context_linkage.py | 272 + .../model/json_api_filter_context_out.py | 293 + .../json_api_filter_context_out_document.py | 279 + .../model/json_api_filter_context_out_list.py | 281 + ...on_api_filter_context_out_relationships.py | 273 + .../json_api_filter_context_out_with_links.py | 346 + ...json_api_filter_context_to_many_linkage.py | 290 + .../model/json_api_label_linkage.py | 272 + .../model/json_api_label_out.py | 293 + .../model/json_api_label_out_attributes.py | 275 + .../model/json_api_label_out_document.py | 279 + .../model/json_api_label_out_list.py | 281 + .../model/json_api_label_out_relationships.py | 261 + ...n_api_label_out_relationships_attribute.py | 267 + .../model/json_api_label_out_with_links.py | 346 + .../model/json_api_label_to_many_linkage.py | 290 + .../model/json_api_metric_in.py | 289 + .../model/json_api_metric_in_document.py | 267 + .../model/json_api_metric_linkage.py | 272 + .../model/json_api_metric_out.py | 295 + .../model/json_api_metric_out_attributes.py | 283 + .../json_api_metric_out_attributes_content.py | 265 + .../model/json_api_metric_out_document.py | 279 + .../model/json_api_metric_out_list.py | 281 + .../json_api_metric_out_relationships.py | 279 + .../model/json_api_metric_out_with_links.py | 346 + .../model/json_api_metric_to_many_linkage.py | 290 + .../model/json_api_organization_in.py | 287 + .../json_api_organization_in_attributes.py | 271 + .../json_api_organization_in_document.py | 267 + .../model/json_api_organization_out.py | 293 + .../json_api_organization_out_attributes.py | 267 + .../json_api_organization_out_document.py | 279 + ...json_api_organization_out_relationships.py | 267 + ...zation_out_relationships_bootstrap_user.py | 267 + ..._out_relationships_bootstrap_user_group.py | 267 + .../model/json_api_user_group_in.py | 291 + .../model/json_api_user_group_in_document.py | 267 + .../model/json_api_user_group_linkage.py | 272 + .../model/json_api_user_group_out.py | 291 + .../model/json_api_user_group_out_document.py | 279 + .../model/json_api_user_group_out_list.py | 281 + .../json_api_user_group_out_relationships.py | 261 + .../json_api_user_group_out_with_links.py | 344 + .../json_api_user_group_to_many_linkage.py | 290 + .../json_api_user_group_to_one_linkage.py | 318 + .../model/json_api_user_in.py | 293 + .../model/json_api_user_in_document.py | 267 + .../model/json_api_user_linkage.py | 272 + .../model/json_api_user_out.py | 293 + .../model/json_api_user_out_attributes.py | 255 + .../model/json_api_user_out_document.py | 279 + .../model/json_api_user_out_list.py | 281 + .../model/json_api_user_out_relationships.py | 261 + .../model/json_api_user_out_with_links.py | 346 + .../model/json_api_user_to_many_linkage.py | 290 + .../model/json_api_user_to_one_linkage.py | 318 + .../model/json_api_visualization_object_in.py | 287 + ...on_api_visualization_object_in_document.py | 267 + .../json_api_visualization_object_linkage.py | 272 + .../json_api_visualization_object_out.py | 293 + ...n_api_visualization_object_out_document.py | 279 + .../json_api_visualization_object_out_list.py | 281 + ..._visualization_object_out_relationships.py | 285 + ...api_visualization_object_out_with_links.py | 346 + ...pi_visualization_object_to_many_linkage.py | 290 + .../json_api_workspace_data_filter_in.py | 293 + ...n_api_workspace_data_filter_in_document.py | 267 + .../json_api_workspace_data_filter_linkage.py | 272 + .../json_api_workspace_data_filter_out.py | 293 + ...pi_workspace_data_filter_out_attributes.py | 267 + ..._api_workspace_data_filter_out_document.py | 279 + ...json_api_workspace_data_filter_out_list.py | 281 + ...workspace_data_filter_out_relationships.py | 261 + ...ilter_out_relationships_filter_settings.py | 267 + ...pi_workspace_data_filter_out_with_links.py | 346 + ...i_workspace_data_filter_setting_linkage.py | 272 + ...n_api_workspace_data_filter_setting_out.py | 293 + ...pace_data_filter_setting_out_attributes.py | 263 + ...kspace_data_filter_setting_out_document.py | 279 + ..._workspace_data_filter_setting_out_list.py | 281 + ...e_data_filter_setting_out_relationships.py | 261 + ...out_relationships_workspace_data_filter.py | 267 + ...pace_data_filter_setting_out_with_links.py | 346 + ...ace_data_filter_setting_to_many_linkage.py | 290 + ...pi_workspace_data_filter_to_one_linkage.py | 318 + .../model/json_api_workspace_in.py | 293 + .../model/json_api_workspace_in_document.py | 267 + .../model/json_api_workspace_linkage.py | 272 + .../model/json_api_workspace_out.py | 299 + .../json_api_workspace_out_attributes.py | 255 + .../model/json_api_workspace_out_document.py | 279 + .../model/json_api_workspace_out_list.py | 281 + .../model/json_api_workspace_out_meta.py | 261 + .../json_api_workspace_out_meta_config.py | 271 + .../json_api_workspace_out_relationships.py | 261 + ..._api_workspace_out_relationships_parent.py | 267 + .../json_api_workspace_out_with_links.py | 352 ++ .../json_api_workspace_to_one_linkage.py | 318 + .../model/list_links.py | 318 + .../model/list_links_all_of.py | 255 + .../model/object_links.py | 261 + .../model/object_links_container.py | 261 + .../model/reference_identifier.py | 272 + .../model/user_group_identifier.py | 272 + .../model/workspace_identifier.py | 272 + .../gooddata_metadata_client/model_utils.py | 1992 ++++++ .../models/__init__.py | 239 + .../gooddata_metadata_client/rest.py | 292 + gooddata-metadata-client/requirements.txt | 3 + gooddata-metadata-client/setup.cfg | 2 + gooddata-metadata-client/setup.py | 42 + .../test-requirements.txt | 1 + gooddata-metadata-client/tox.ini | 9 + 721 files changed, 130606 insertions(+), 2 deletions(-) create mode 100755 generate_afm_client.sh create mode 100755 generate_metadata_client.sh create mode 100644 gooddata-afm-client/.gitignore create mode 100644 gooddata-afm-client/.openapi-generator-ignore create mode 100644 gooddata-afm-client/.openapi-generator/FILES create mode 100644 gooddata-afm-client/.openapi-generator/VERSION create mode 100644 gooddata-afm-client/README.md create mode 100644 gooddata-afm-client/docs/AFM.md create mode 100644 gooddata-afm-client/docs/AbsoluteDateFilter.md create mode 100644 gooddata-afm-client/docs/AbsoluteDateFilterBody.md create mode 100644 gooddata-afm-client/docs/AbsoluteDateFilterBodyAllOf.md create mode 100644 gooddata-afm-client/docs/AbstractMeasureValueFilter.md create mode 100644 gooddata-afm-client/docs/AbstractMeasureValueFilterAllOf.md create mode 100644 gooddata-afm-client/docs/AfmControllerApi.md create mode 100644 gooddata-afm-client/docs/AfmExecution.md create mode 100644 gooddata-afm-client/docs/AfmExecutionResponse.md create mode 100644 gooddata-afm-client/docs/AfmExplainControllerApi.md create mode 100644 gooddata-afm-client/docs/AfmObjectIdentifier.md create mode 100644 gooddata-afm-client/docs/AfmValidObjectsQuery.md create mode 100644 gooddata-afm-client/docs/AfmValidObjectsResponse.md create mode 100644 gooddata-afm-client/docs/ArithmeticMeasureDefinition.md create mode 100644 gooddata-afm-client/docs/ArithmeticMeasureDefinitionArithmeticMeasure.md create mode 100644 gooddata-afm-client/docs/AttributeExecutionResultHeader.md create mode 100644 gooddata-afm-client/docs/AttributeFilter.md create mode 100644 gooddata-afm-client/docs/AttributeFilterElements.md create mode 100644 gooddata-afm-client/docs/AttributeHeader.md create mode 100644 gooddata-afm-client/docs/AttributeHeaderAttributeHeader.md create mode 100644 gooddata-afm-client/docs/AttributeItem.md create mode 100644 gooddata-afm-client/docs/AttributeResultHeader.md create mode 100644 gooddata-afm-client/docs/CommonAttributeFilter.md create mode 100644 gooddata-afm-client/docs/CommonAttributeFilterAllOf.md create mode 100644 gooddata-afm-client/docs/CommonDateFilter.md create mode 100644 gooddata-afm-client/docs/CommonDateFilterAllOf.md create mode 100644 gooddata-afm-client/docs/CommonFilter.md create mode 100644 gooddata-afm-client/docs/CommonMeasureValueFilter.md create mode 100644 gooddata-afm-client/docs/CommonMeasureValueFilterAllOf.md create mode 100644 gooddata-afm-client/docs/ComparisonMeasureValueFilter.md create mode 100644 gooddata-afm-client/docs/ComparisonMeasureValueFilterBody.md create mode 100644 gooddata-afm-client/docs/ComparisonMeasureValueFilterBodyAllOf.md create mode 100644 gooddata-afm-client/docs/DataColumnLocator.md create mode 100644 gooddata-afm-client/docs/DateFilter.md create mode 100644 gooddata-afm-client/docs/Dimension.md create mode 100644 gooddata-afm-client/docs/DimensionHeader.md create mode 100644 gooddata-afm-client/docs/Element.md create mode 100644 gooddata-afm-client/docs/ElementsControllerApi.md create mode 100644 gooddata-afm-client/docs/ElementsResponse.md create mode 100644 gooddata-afm-client/docs/ErrorMessage.md create mode 100644 gooddata-afm-client/docs/ExecutionLinks.md create mode 100644 gooddata-afm-client/docs/ExecutionResponse.md create mode 100644 gooddata-afm-client/docs/ExecutionResult.md create mode 100644 gooddata-afm-client/docs/ExecutionResultGrandTotal.md create mode 100644 gooddata-afm-client/docs/ExecutionResultHeader.md create mode 100644 gooddata-afm-client/docs/ExecutionResultPaging.md create mode 100644 gooddata-afm-client/docs/ExecutionSettings.md create mode 100644 gooddata-afm-client/docs/FilterDefinition.md create mode 100644 gooddata-afm-client/docs/FilterDefinitionForSimpleMeasure.md create mode 100644 gooddata-afm-client/docs/GrandTotal.md create mode 100644 gooddata-afm-client/docs/HeaderGroup.md create mode 100644 gooddata-afm-client/docs/Identifier.md create mode 100644 gooddata-afm-client/docs/IncludedDimensionProps.md create mode 100644 gooddata-afm-client/docs/InlineFilterDefinition.md create mode 100644 gooddata-afm-client/docs/InlineFilterDefinitionBody.md create mode 100644 gooddata-afm-client/docs/InlineFilterDefinitionBodyAllOf.md create mode 100644 gooddata-afm-client/docs/InlineMeasureDefinition.md create mode 100644 gooddata-afm-client/docs/InlineMeasureDefinitionInline.md create mode 100644 gooddata-afm-client/docs/LocalIdentifier.md create mode 100644 gooddata-afm-client/docs/MeasureDefinition.md create mode 100644 gooddata-afm-client/docs/MeasureExecutionResultHeader.md create mode 100644 gooddata-afm-client/docs/MeasureGroupHeader.md create mode 100644 gooddata-afm-client/docs/MeasureHeaderOut.md create mode 100644 gooddata-afm-client/docs/MeasureItem.md create mode 100644 gooddata-afm-client/docs/MeasureResultHeader.md create mode 100644 gooddata-afm-client/docs/MeasureValueFilter.md create mode 100644 gooddata-afm-client/docs/NegativeAttributeFilter.md create mode 100644 gooddata-afm-client/docs/NegativeAttributeFilterBody.md create mode 100644 gooddata-afm-client/docs/NegativeAttributeFilterBodyAllOf.md create mode 100644 gooddata-afm-client/docs/ObjectIdentifier.md create mode 100644 gooddata-afm-client/docs/Paging.md create mode 100644 gooddata-afm-client/docs/PopDataset.md create mode 100644 gooddata-afm-client/docs/PopDatasetMeasureDefinition.md create mode 100644 gooddata-afm-client/docs/PopDatasetMeasureDefinitionPreviousPeriodMeasure.md create mode 100644 gooddata-afm-client/docs/PopDate.md create mode 100644 gooddata-afm-client/docs/PopDateMeasureDefinition.md create mode 100644 gooddata-afm-client/docs/PopDateMeasureDefinitionOverPeriodMeasure.md create mode 100644 gooddata-afm-client/docs/PositiveAttributeFilter.md create mode 100644 gooddata-afm-client/docs/PositiveAttributeFilterBody.md create mode 100644 gooddata-afm-client/docs/PositiveAttributeFilterBodyAllOf.md create mode 100644 gooddata-afm-client/docs/RangeMeasureValueFilter.md create mode 100644 gooddata-afm-client/docs/RangeMeasureValueFilterBody.md create mode 100644 gooddata-afm-client/docs/RangeMeasureValueFilterBodyAllOf.md create mode 100644 gooddata-afm-client/docs/RankingFilter.md create mode 100644 gooddata-afm-client/docs/RankingFilterBody.md create mode 100644 gooddata-afm-client/docs/RankingFilterBodyAllOf.md create mode 100644 gooddata-afm-client/docs/RelativeDateFilter.md create mode 100644 gooddata-afm-client/docs/RelativeDateFilterBody.md create mode 100644 gooddata-afm-client/docs/RelativeDateFilterBodyAllOf.md create mode 100644 gooddata-afm-client/docs/ResultControllerApi.md create mode 100644 gooddata-afm-client/docs/ResultDimension.md create mode 100644 gooddata-afm-client/docs/ResultSpec.md create mode 100644 gooddata-afm-client/docs/SimpleMeasureDefinition.md create mode 100644 gooddata-afm-client/docs/SimpleMeasureDefinitionMeasure.md create mode 100644 gooddata-afm-client/docs/SortDirection.md create mode 100644 gooddata-afm-client/docs/SortKeyAttribute.md create mode 100644 gooddata-afm-client/docs/SortKeyAttributeAttribute.md create mode 100644 gooddata-afm-client/docs/SortKeyValue.md create mode 100644 gooddata-afm-client/docs/SortKeyValueValue.md create mode 100644 gooddata-afm-client/docs/TotalFunction.md create mode 100644 gooddata-afm-client/docs/ValidObjectsControllerApi.md create mode 100644 gooddata-afm-client/gooddata_afm_client/__init__.py create mode 100644 gooddata-afm-client/gooddata_afm_client/api/__init__.py create mode 100644 gooddata-afm-client/gooddata_afm_client/api/afm_controller_api.py create mode 100644 gooddata-afm-client/gooddata_afm_client/api/afm_explain_controller_api.py create mode 100644 gooddata-afm-client/gooddata_afm_client/api/elements_controller_api.py create mode 100644 gooddata-afm-client/gooddata_afm_client/api/result_controller_api.py create mode 100644 gooddata-afm-client/gooddata_afm_client/api/valid_objects_controller_api.py create mode 100644 gooddata-afm-client/gooddata_afm_client/api_client.py create mode 100644 gooddata-afm-client/gooddata_afm_client/apis/__init__.py create mode 100644 gooddata-afm-client/gooddata_afm_client/configuration.py create mode 100644 gooddata-afm-client/gooddata_afm_client/exceptions.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/__init__.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter_body.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter_body_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/abstract_measure_value_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/abstract_measure_value_filter_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/afm.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/afm_execution.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/afm_execution_response.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/afm_object_identifier.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/afm_valid_objects_query.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/afm_valid_objects_response.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/arithmetic_measure_definition.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/arithmetic_measure_definition_arithmetic_measure.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/attribute_execution_result_header.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/attribute_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/attribute_filter_elements.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/attribute_header.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/attribute_header_attribute_header.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/attribute_item.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/attribute_result_header.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/common_attribute_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/common_attribute_filter_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/common_date_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/common_date_filter_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/common_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/common_measure_value_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/common_measure_value_filter_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter_body.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter_body_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/data_column_locator.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/date_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/dimension.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/dimension_header.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/element.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/elements_response.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/error_message.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/execution_links.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/execution_response.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/execution_result.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/execution_result_grand_total.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/execution_result_header.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/execution_result_paging.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/execution_settings.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/filter_definition.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/filter_definition_for_simple_measure.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/grand_total.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/header_group.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/identifier.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/included_dimension_props.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition_body.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition_body_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/inline_measure_definition.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/inline_measure_definition_inline.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/local_identifier.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/measure_definition.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/measure_execution_result_header.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/measure_group_header.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/measure_header_out.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/measure_item.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/measure_result_header.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/measure_value_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter_body.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter_body_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/object_identifier.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/paging.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/pop_dataset.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/pop_dataset_measure_definition.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/pop_dataset_measure_definition_previous_period_measure.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/pop_date.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/pop_date_measure_definition.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/pop_date_measure_definition_over_period_measure.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter_body.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter_body_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter_body.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter_body_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/ranking_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/ranking_filter_body.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/ranking_filter_body_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/relative_date_filter.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/relative_date_filter_body.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/relative_date_filter_body_all_of.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/result_dimension.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/result_spec.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/simple_measure_definition.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/simple_measure_definition_measure.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/sort_direction.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/sort_key_attribute.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/sort_key_attribute_attribute.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/sort_key_value.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/sort_key_value_value.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model/total_function.py create mode 100644 gooddata-afm-client/gooddata_afm_client/model_utils.py create mode 100644 gooddata-afm-client/gooddata_afm_client/models/__init__.py create mode 100644 gooddata-afm-client/gooddata_afm_client/rest.py create mode 100644 gooddata-afm-client/requirements.txt create mode 100644 gooddata-afm-client/setup.cfg create mode 100644 gooddata-afm-client/setup.py create mode 100644 gooddata-afm-client/test-requirements.txt create mode 100644 gooddata-afm-client/tox.ini create mode 100644 gooddata-metadata-client/.gitignore create mode 100644 gooddata-metadata-client/.openapi-generator-ignore create mode 100644 gooddata-metadata-client/.openapi-generator/FILES create mode 100644 gooddata-metadata-client/.openapi-generator/VERSION create mode 100644 gooddata-metadata-client/README.md create mode 100644 gooddata-metadata-client/docs/DataSourceActionsControllerApi.md create mode 100644 gooddata-metadata-client/docs/DataSourceEntitiesControllerApi.md create mode 100644 gooddata-metadata-client/docs/DataSourceLayoutControllerApi.md create mode 100644 gooddata-metadata-client/docs/DataSourceTableIdentifier.md create mode 100644 gooddata-metadata-client/docs/DatasetReferenceIdentifier.md create mode 100644 gooddata-metadata-client/docs/DeclarativeAnalyticalDashboard.md create mode 100644 gooddata-metadata-client/docs/DeclarativeAnalytics.md create mode 100644 gooddata-metadata-client/docs/DeclarativeAnalyticsLayer.md create mode 100644 gooddata-metadata-client/docs/DeclarativeAttribute.md create mode 100644 gooddata-metadata-client/docs/DeclarativeColumn.md create mode 100644 gooddata-metadata-client/docs/DeclarativeDataSource.md create mode 100644 gooddata-metadata-client/docs/DeclarativeDataSources.md create mode 100644 gooddata-metadata-client/docs/DeclarativeDataset.md create mode 100644 gooddata-metadata-client/docs/DeclarativeDateDataset.md create mode 100644 gooddata-metadata-client/docs/DeclarativeFact.md create mode 100644 gooddata-metadata-client/docs/DeclarativeFilterContext.md create mode 100644 gooddata-metadata-client/docs/DeclarativeLabel.md create mode 100644 gooddata-metadata-client/docs/DeclarativeLayoutControllerApi.md create mode 100644 gooddata-metadata-client/docs/DeclarativeLdm.md create mode 100644 gooddata-metadata-client/docs/DeclarativeMetric.md create mode 100644 gooddata-metadata-client/docs/DeclarativeModel.md create mode 100644 gooddata-metadata-client/docs/DeclarativeOrganization.md create mode 100644 gooddata-metadata-client/docs/DeclarativeOrganizationInfo.md create mode 100644 gooddata-metadata-client/docs/DeclarativePdm.md create mode 100644 gooddata-metadata-client/docs/DeclarativeReference.md create mode 100644 gooddata-metadata-client/docs/DeclarativeTable.md create mode 100644 gooddata-metadata-client/docs/DeclarativeTables.md create mode 100644 gooddata-metadata-client/docs/DeclarativeUser.md create mode 100644 gooddata-metadata-client/docs/DeclarativeUserGroup.md create mode 100644 gooddata-metadata-client/docs/DeclarativeUserGroups.md create mode 100644 gooddata-metadata-client/docs/DeclarativeUsers.md create mode 100644 gooddata-metadata-client/docs/DeclarativeVisualizationObject.md create mode 100644 gooddata-metadata-client/docs/DeclarativeWorkspace.md create mode 100644 gooddata-metadata-client/docs/DeclarativeWorkspaceDataFilter.md create mode 100644 gooddata-metadata-client/docs/DeclarativeWorkspaceDataFilterSetting.md create mode 100644 gooddata-metadata-client/docs/DeclarativeWorkspaceDataFilters.md create mode 100644 gooddata-metadata-client/docs/DeclarativeWorkspaceModel.md create mode 100644 gooddata-metadata-client/docs/DeclarativeWorkspaces.md create mode 100644 gooddata-metadata-client/docs/GenerateLdmRequest.md create mode 100644 gooddata-metadata-client/docs/GrainIdentifier.md create mode 100644 gooddata-metadata-client/docs/GranularitiesFormatting.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLOutRelationshipsObjects.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLOutRelationshipsSubjects.md create mode 100644 gooddata-metadata-client/docs/JsonApiACLOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsDatasets.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsFilterContexts.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsLabels.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsMetrics.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiAnalyticalDashboardToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiApiTokenIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiApiTokenInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiApiTokenOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiApiTokenOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiApiTokenOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiApiTokenOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiApiTokenOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeOutRelationshipsDataset.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiAttributeToOneLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceInAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceTableOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceTableOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceTableOutAttributesColumns.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceTableOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceTableOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiDataSourceTableOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOutAttributesGrain.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOutAttributesReferenceProperties.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOutRelationshipsAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOutRelationshipsFacts.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiDatasetToOneLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiFactLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiFactOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiFactOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiFactOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiFactOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiFactOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiFactOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiFactToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiFilterContextIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiFilterContextInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiFilterContextLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiFilterContextOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiFilterContextOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiFilterContextOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiFilterContextOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiFilterContextOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiFilterContextToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiLabelLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiLabelOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiLabelOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiLabelOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiLabelOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiLabelOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiLabelOutRelationshipsAttribute.md create mode 100644 gooddata-metadata-client/docs/JsonApiLabelOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiLabelToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricOutAttributesContent.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiMetricToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiOrganizationIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiOrganizationInAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiOrganizationInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiOrganizationOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiOrganizationOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiOrganizationOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiOrganizationOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiOrganizationOutRelationshipsBootstrapUser.md create mode 100644 gooddata-metadata-client/docs/JsonApiOrganizationOutRelationshipsBootstrapUserGroup.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserGroupToOneLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiUserToOneLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiVisualizationObjectIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiVisualizationObjectInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiVisualizationObjectLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiVisualizationObjectOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiVisualizationObjectOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiVisualizationObjectOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiVisualizationObjectOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiVisualizationObjectOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiVisualizationObjectToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingToManyLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterToOneLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceIn.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceInDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceLinkage.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceOut.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceOutAttributes.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceOutDocument.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceOutList.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceOutMeta.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceOutMetaConfig.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceOutRelationships.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceOutRelationshipsParent.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceOutWithLinks.md create mode 100644 gooddata-metadata-client/docs/JsonApiWorkspaceToOneLinkage.md create mode 100644 gooddata-metadata-client/docs/ListLinks.md create mode 100644 gooddata-metadata-client/docs/ListLinksAllOf.md create mode 100644 gooddata-metadata-client/docs/ObjectLinks.md create mode 100644 gooddata-metadata-client/docs/ObjectLinksContainer.md create mode 100644 gooddata-metadata-client/docs/OptionsControllerApi.md create mode 100644 gooddata-metadata-client/docs/OrganizationControllerApi.md create mode 100644 gooddata-metadata-client/docs/OrganizationModelControllerApi.md create mode 100644 gooddata-metadata-client/docs/OrganizationRedirectControllerApi.md create mode 100644 gooddata-metadata-client/docs/ReferenceIdentifier.md create mode 100644 gooddata-metadata-client/docs/UserGroupIdentifier.md create mode 100644 gooddata-metadata-client/docs/UserModelControllerApi.md create mode 100644 gooddata-metadata-client/docs/WorkspaceIdentifier.md create mode 100644 gooddata-metadata-client/docs/WorkspaceObjectControllerApi.md create mode 100644 gooddata-metadata-client/gooddata_metadata_client/__init__.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/__init__.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/data_source_actions_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/data_source_entities_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/data_source_layout_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/declarative_layout_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/options_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/organization_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/organization_model_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/organization_redirect_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/user_model_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api/workspace_object_controller_api.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/api_client.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/apis/__init__.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/configuration.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/exceptions.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/__init__.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/data_source_table_identifier.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/dataset_reference_identifier.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytical_dashboard.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytics.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytics_layer.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_attribute.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_column.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_data_source.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_data_sources.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_dataset.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_date_dataset.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_fact.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_filter_context.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_label.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_ldm.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_metric.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_model.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_organization.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_organization_info.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_pdm.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_reference.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_table.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_tables.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_user.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_user_group.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_user_groups.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_users.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_visualization_object.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filter.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filter_setting.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filters.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_model.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspaces.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/generate_ldm_request.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/grain_identifier.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/granularities_formatting.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships_objects.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships_subjects.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_aclin.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_aclin_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_analytical_dashboards.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_datasets.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_filter_contexts.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_labels.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_metrics.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_visualization_objects.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_relationships_dataset.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_to_one_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_attributes_columns.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes_grain.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes_reference_properties.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships_facts.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_to_one_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_relationships_attribute.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_attributes_content.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user_group.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_to_one_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_to_one_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships_filter_settings.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships_workspace_data_filter.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_to_many_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_to_one_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_in.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_in_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_attributes.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_document.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_list.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_meta.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_meta_config.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships_parent.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_with_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_to_one_linkage.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/list_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/list_links_all_of.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/object_links.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/object_links_container.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/reference_identifier.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/user_group_identifier.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model/workspace_identifier.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/model_utils.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/models/__init__.py create mode 100644 gooddata-metadata-client/gooddata_metadata_client/rest.py create mode 100644 gooddata-metadata-client/requirements.txt create mode 100644 gooddata-metadata-client/setup.cfg create mode 100644 gooddata-metadata-client/setup.py create mode 100644 gooddata-metadata-client/test-requirements.txt create mode 100644 gooddata-metadata-client/tox.ini diff --git a/README.md b/README.md index 73fcab703..7ed4654cf 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,71 @@ -# gooddata-python-sdk -GoodData.CN Python SDK +# GoodData.CN Python Foundations + +This repository contains Python packages useful for integration with GoodData.CN: + +- gooddata-afm-client, gooddata-metadata-client: low-level API clients generated from GD.CN Open API specifications +- gooddata-sdk: a Python SDK providing added value functions and convenience layers on top of the clients +- gooddata-fdw: a GD.CN Foreign Data Wrapper for PostgreSQL + +## API Clients + +These are generated using the openapi-generator. The generated clients are fairly convoluted and can be tricky +to use. They do work with some known issues and allow you to call any metadata or computation API in your GoodData.CN +installation. + +### Known issues + +The complexity of some of the GD.CN API schemas combined with the bugs in the generated code mean you may need to +disable return type checking and/or type checking when creating model objects. + +Use the `_check_return_type=False` keyword parameter when calling generated API client methods to disable return +type checking. For example: + +```python +import gooddata_metadata_client.apis as metadata_apis + +api = metadata_apis.WorkspaceObjectControllerApi() +metrics = api.get_all_entities_metrics('workspace_id', size=500, _check_return_type=False) +``` + +Use the `_check_type=False` keyword parameter when creating objects from generated models. For example: + +```python +import gooddata_afm_client.models as afm_models + +afm_models.RelativeDateFilterBody(dataset=..., granularity=..., _from=..., to=..., _check_type=False) +``` + +## Python SDK + +The Python SDK aims to provide cleaner APIs and convenience layers on top of the generated clients. + +For instance behold how it is possible to read an Insight from GD.CN server, trigger its computation and then +read the data: + +```python +import gooddata_sdk + +sdk = gooddata_sdk.GoodDataSdk(HOST, TOKEN) + +# reads insight from workspace +insight = sdk.insights.get_insight(workspace_id, insight_id) + +# triggers computation for the insight. the result will be returned in a tabular form +table = sdk.tables.for_insight(workspace_id, insight) + +# and this is how you can read data row-by-row and do something with it +for row in table.read_all(): + print(row) +``` + +## GoodData.CN Foreign Data Wrapper for PostgreSQL + +Foreign Data Wrapper (FDW) presents a way to map GoodData.CN semantic layer and/or insights stored in your GoodData.CN +into PostgreSQL as foreign tables that you can then query using SQL. + +Check out the [gooddata-fdw package](./gooddata-fdw) documentation to learn more and get started. + +## GoodData to pandas adapters + +The [gooddata-pandas](./gooddata-pandas) is a thin layer that utilizes Python SDK and allows you to conveniently +create pandas series and data frames. diff --git a/generate_afm_client.sh b/generate_afm_client.sh new file mode 100755 index 000000000..c51a1b44d --- /dev/null +++ b/generate_afm_client.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +rm -rf gooddata_afm_client + +# +# https://openapi-generator.tech/docs/generators/python/ +# --additional-properties=packageName=gooddata_afm_client \ +# + +docker run --rm \ + -v "${PWD}:/local" \ + -u $(id -u ${USER}):$(id -g ${USER}) \ + openapitools/openapi-generator-cli generate \ + -g python \ + --package-name gooddata_afm_client \ + -i https://staging.anywhere.gooddata.com/api/schemas/afm \ + -o /local/gooddata-afm-client + +cd gooddata_afm_client +rm -rf .gitlab-ci.yml .travis.yml git_push.sh test +cd .. + +# +# this here function in model_utils.py: convert_js_args_to_python_args +# +# gets messed up when our ObjectLinks are being parsed. that is because: +# +# - it uses _self as named parameter to a decorator function it creates; this function also has **kwargs +# - our ObjectLinks contain self (as in links.self); the generator for some of its internal workings also generates '_self' as key of some dict +# - the decorator function eventually gets called with this '_self' thing.. and things bomb because there are multiple values of a named argument +# +sed -i 's/_self/_self_loathing_/g' gooddata-afm-client/gooddata_afm_client/model_utils.py \ No newline at end of file diff --git a/generate_metadata_client.sh b/generate_metadata_client.sh new file mode 100755 index 000000000..cb2ed8fe1 --- /dev/null +++ b/generate_metadata_client.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# +# https://openapi-generator.tech/docs/generators/python/ +# --additional-properties=packageName=gooddata_afm_client \ +# + +docker run --rm \ + -v "${PWD}:/local" \ + -u $(id -u ${USER}):$(id -g ${USER}) \ + openapitools/openapi-generator-cli generate \ + -g python \ + --additional-properties=packageName=gooddata_metadata_client \ + -i https://staging.anywhere.gooddata.com/api/schemas/metadata \ + -o /local/gooddata_metadata_client + +cd gooddata-metadata-client +rm -rf .gitlab-ci.yml .travis.yml git_push.sh test +cd .. + +# +# this here function in model_utils.py: convert_js_args_to_python_args +# +# gets messed up when our ObjectLinks are being parsed. that is because: +# +# - it uses _self as named parameter to a decorator function it creates; this function also has **kwargs +# - our ObjectLinks contain self (as in links.self); the generator for some of its internal workings also generates '_self' as key of some dict +# - the decorator function eventually gets called with this '_self' thing.. and things bomb because there are multiple values of a named argument +# +sed -i 's/_self/_self_loathing_/g' gooddata-metadata-client/gooddata_metadata_client/model_utils.py diff --git a/gooddata-afm-client/.gitignore b/gooddata-afm-client/.gitignore new file mode 100644 index 000000000..43995bd42 --- /dev/null +++ b/gooddata-afm-client/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/gooddata-afm-client/.openapi-generator-ignore b/gooddata-afm-client/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/gooddata-afm-client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/gooddata-afm-client/.openapi-generator/FILES b/gooddata-afm-client/.openapi-generator/FILES new file mode 100644 index 000000000..97ac5daf4 --- /dev/null +++ b/gooddata-afm-client/.openapi-generator/FILES @@ -0,0 +1,325 @@ +.gitignore +.gitlab-ci.yml +.openapi-generator-ignore +.travis.yml +README.md +docs/AFM.md +docs/AbsoluteDateFilter.md +docs/AbsoluteDateFilterBody.md +docs/AbsoluteDateFilterBodyAllOf.md +docs/AbstractMeasureValueFilter.md +docs/AbstractMeasureValueFilterAllOf.md +docs/AfmControllerApi.md +docs/AfmExecution.md +docs/AfmExecutionResponse.md +docs/AfmExplainControllerApi.md +docs/AfmObjectIdentifier.md +docs/AfmValidObjectsQuery.md +docs/AfmValidObjectsResponse.md +docs/ArithmeticMeasureDefinition.md +docs/ArithmeticMeasureDefinitionArithmeticMeasure.md +docs/AttributeExecutionResultHeader.md +docs/AttributeFilter.md +docs/AttributeFilterElements.md +docs/AttributeHeader.md +docs/AttributeHeaderAttributeHeader.md +docs/AttributeItem.md +docs/AttributeResultHeader.md +docs/CommonAttributeFilter.md +docs/CommonAttributeFilterAllOf.md +docs/CommonDateFilter.md +docs/CommonDateFilterAllOf.md +docs/CommonFilter.md +docs/CommonMeasureValueFilter.md +docs/CommonMeasureValueFilterAllOf.md +docs/ComparisonMeasureValueFilter.md +docs/ComparisonMeasureValueFilterBody.md +docs/ComparisonMeasureValueFilterBodyAllOf.md +docs/DataColumnLocator.md +docs/DateFilter.md +docs/Dimension.md +docs/DimensionHeader.md +docs/Element.md +docs/ElementsControllerApi.md +docs/ElementsResponse.md +docs/ErrorMessage.md +docs/ExecutionLinks.md +docs/ExecutionResponse.md +docs/ExecutionResult.md +docs/ExecutionResultGrandTotal.md +docs/ExecutionResultHeader.md +docs/ExecutionResultPaging.md +docs/ExecutionSettings.md +docs/FilterDefinition.md +docs/FilterDefinitionForSimpleMeasure.md +docs/GrandTotal.md +docs/HeaderGroup.md +docs/Identifier.md +docs/IncludedDimensionProps.md +docs/InlineFilterDefinition.md +docs/InlineFilterDefinitionBody.md +docs/InlineFilterDefinitionBodyAllOf.md +docs/InlineMeasureDefinition.md +docs/InlineMeasureDefinitionInline.md +docs/LocalIdentifier.md +docs/MeasureDefinition.md +docs/MeasureExecutionResultHeader.md +docs/MeasureGroupHeader.md +docs/MeasureHeaderOut.md +docs/MeasureItem.md +docs/MeasureResultHeader.md +docs/MeasureValueFilter.md +docs/NegativeAttributeFilter.md +docs/NegativeAttributeFilterBody.md +docs/NegativeAttributeFilterBodyAllOf.md +docs/ObjectIdentifier.md +docs/Paging.md +docs/PopDataset.md +docs/PopDatasetMeasureDefinition.md +docs/PopDatasetMeasureDefinitionPreviousPeriodMeasure.md +docs/PopDate.md +docs/PopDateMeasureDefinition.md +docs/PopDateMeasureDefinitionOverPeriodMeasure.md +docs/PositiveAttributeFilter.md +docs/PositiveAttributeFilterBody.md +docs/PositiveAttributeFilterBodyAllOf.md +docs/RangeMeasureValueFilter.md +docs/RangeMeasureValueFilterBody.md +docs/RangeMeasureValueFilterBodyAllOf.md +docs/RankingFilter.md +docs/RankingFilterBody.md +docs/RankingFilterBodyAllOf.md +docs/RelativeDateFilter.md +docs/RelativeDateFilterBody.md +docs/RelativeDateFilterBodyAllOf.md +docs/ResultControllerApi.md +docs/ResultDimension.md +docs/ResultSpec.md +docs/SimpleMeasureDefinition.md +docs/SimpleMeasureDefinitionMeasure.md +docs/SortDirection.md +docs/SortKeyAttribute.md +docs/SortKeyAttributeAttribute.md +docs/SortKeyValue.md +docs/SortKeyValueValue.md +docs/TotalFunction.md +docs/ValidObjectsControllerApi.md +git_push.sh +gooddata_afm_client/__init__.py +gooddata_afm_client/api/__init__.py +gooddata_afm_client/api/afm_controller_api.py +gooddata_afm_client/api/afm_explain_controller_api.py +gooddata_afm_client/api/elements_controller_api.py +gooddata_afm_client/api/result_controller_api.py +gooddata_afm_client/api/valid_objects_controller_api.py +gooddata_afm_client/api_client.py +gooddata_afm_client/apis/__init__.py +gooddata_afm_client/configuration.py +gooddata_afm_client/exceptions.py +gooddata_afm_client/model/__init__.py +gooddata_afm_client/model/absolute_date_filter.py +gooddata_afm_client/model/absolute_date_filter_body.py +gooddata_afm_client/model/absolute_date_filter_body_all_of.py +gooddata_afm_client/model/abstract_measure_value_filter.py +gooddata_afm_client/model/abstract_measure_value_filter_all_of.py +gooddata_afm_client/model/afm.py +gooddata_afm_client/model/afm_execution.py +gooddata_afm_client/model/afm_execution_response.py +gooddata_afm_client/model/afm_object_identifier.py +gooddata_afm_client/model/afm_valid_objects_query.py +gooddata_afm_client/model/afm_valid_objects_response.py +gooddata_afm_client/model/arithmetic_measure_definition.py +gooddata_afm_client/model/arithmetic_measure_definition_arithmetic_measure.py +gooddata_afm_client/model/attribute_execution_result_header.py +gooddata_afm_client/model/attribute_filter.py +gooddata_afm_client/model/attribute_filter_elements.py +gooddata_afm_client/model/attribute_header.py +gooddata_afm_client/model/attribute_header_attribute_header.py +gooddata_afm_client/model/attribute_item.py +gooddata_afm_client/model/attribute_result_header.py +gooddata_afm_client/model/common_attribute_filter.py +gooddata_afm_client/model/common_attribute_filter_all_of.py +gooddata_afm_client/model/common_date_filter.py +gooddata_afm_client/model/common_date_filter_all_of.py +gooddata_afm_client/model/common_filter.py +gooddata_afm_client/model/common_measure_value_filter.py +gooddata_afm_client/model/common_measure_value_filter_all_of.py +gooddata_afm_client/model/comparison_measure_value_filter.py +gooddata_afm_client/model/comparison_measure_value_filter_body.py +gooddata_afm_client/model/comparison_measure_value_filter_body_all_of.py +gooddata_afm_client/model/data_column_locator.py +gooddata_afm_client/model/date_filter.py +gooddata_afm_client/model/dimension.py +gooddata_afm_client/model/dimension_header.py +gooddata_afm_client/model/element.py +gooddata_afm_client/model/elements_response.py +gooddata_afm_client/model/error_message.py +gooddata_afm_client/model/execution_links.py +gooddata_afm_client/model/execution_response.py +gooddata_afm_client/model/execution_result.py +gooddata_afm_client/model/execution_result_grand_total.py +gooddata_afm_client/model/execution_result_header.py +gooddata_afm_client/model/execution_result_paging.py +gooddata_afm_client/model/execution_settings.py +gooddata_afm_client/model/filter_definition.py +gooddata_afm_client/model/filter_definition_for_simple_measure.py +gooddata_afm_client/model/grand_total.py +gooddata_afm_client/model/header_group.py +gooddata_afm_client/model/identifier.py +gooddata_afm_client/model/included_dimension_props.py +gooddata_afm_client/model/inline_filter_definition.py +gooddata_afm_client/model/inline_filter_definition_body.py +gooddata_afm_client/model/inline_filter_definition_body_all_of.py +gooddata_afm_client/model/inline_measure_definition.py +gooddata_afm_client/model/inline_measure_definition_inline.py +gooddata_afm_client/model/local_identifier.py +gooddata_afm_client/model/measure_definition.py +gooddata_afm_client/model/measure_execution_result_header.py +gooddata_afm_client/model/measure_group_header.py +gooddata_afm_client/model/measure_header_out.py +gooddata_afm_client/model/measure_item.py +gooddata_afm_client/model/measure_result_header.py +gooddata_afm_client/model/measure_value_filter.py +gooddata_afm_client/model/negative_attribute_filter.py +gooddata_afm_client/model/negative_attribute_filter_body.py +gooddata_afm_client/model/negative_attribute_filter_body_all_of.py +gooddata_afm_client/model/object_identifier.py +gooddata_afm_client/model/paging.py +gooddata_afm_client/model/pop_dataset.py +gooddata_afm_client/model/pop_dataset_measure_definition.py +gooddata_afm_client/model/pop_dataset_measure_definition_previous_period_measure.py +gooddata_afm_client/model/pop_date.py +gooddata_afm_client/model/pop_date_measure_definition.py +gooddata_afm_client/model/pop_date_measure_definition_over_period_measure.py +gooddata_afm_client/model/positive_attribute_filter.py +gooddata_afm_client/model/positive_attribute_filter_body.py +gooddata_afm_client/model/positive_attribute_filter_body_all_of.py +gooddata_afm_client/model/range_measure_value_filter.py +gooddata_afm_client/model/range_measure_value_filter_body.py +gooddata_afm_client/model/range_measure_value_filter_body_all_of.py +gooddata_afm_client/model/ranking_filter.py +gooddata_afm_client/model/ranking_filter_body.py +gooddata_afm_client/model/ranking_filter_body_all_of.py +gooddata_afm_client/model/relative_date_filter.py +gooddata_afm_client/model/relative_date_filter_body.py +gooddata_afm_client/model/relative_date_filter_body_all_of.py +gooddata_afm_client/model/result_dimension.py +gooddata_afm_client/model/result_spec.py +gooddata_afm_client/model/simple_measure_definition.py +gooddata_afm_client/model/simple_measure_definition_measure.py +gooddata_afm_client/model/sort_direction.py +gooddata_afm_client/model/sort_key_attribute.py +gooddata_afm_client/model/sort_key_attribute_attribute.py +gooddata_afm_client/model/sort_key_value.py +gooddata_afm_client/model/sort_key_value_value.py +gooddata_afm_client/model/total_function.py +gooddata_afm_client/model_utils.py +gooddata_afm_client/models/__init__.py +gooddata_afm_client/rest.py +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_absolute_date_filter.py +test/test_absolute_date_filter_body.py +test/test_absolute_date_filter_body_all_of.py +test/test_abstract_measure_value_filter.py +test/test_abstract_measure_value_filter_all_of.py +test/test_afm.py +test/test_afm_controller_api.py +test/test_afm_execution.py +test/test_afm_execution_response.py +test/test_afm_explain_controller_api.py +test/test_afm_object_identifier.py +test/test_afm_valid_objects_query.py +test/test_afm_valid_objects_response.py +test/test_arithmetic_measure_definition.py +test/test_arithmetic_measure_definition_arithmetic_measure.py +test/test_attribute_execution_result_header.py +test/test_attribute_filter.py +test/test_attribute_filter_elements.py +test/test_attribute_header.py +test/test_attribute_header_attribute_header.py +test/test_attribute_item.py +test/test_attribute_result_header.py +test/test_common_attribute_filter.py +test/test_common_attribute_filter_all_of.py +test/test_common_date_filter.py +test/test_common_date_filter_all_of.py +test/test_common_filter.py +test/test_common_measure_value_filter.py +test/test_common_measure_value_filter_all_of.py +test/test_comparison_measure_value_filter.py +test/test_comparison_measure_value_filter_body.py +test/test_comparison_measure_value_filter_body_all_of.py +test/test_data_column_locator.py +test/test_date_filter.py +test/test_dimension.py +test/test_dimension_header.py +test/test_element.py +test/test_elements_controller_api.py +test/test_elements_response.py +test/test_error_message.py +test/test_execution_links.py +test/test_execution_response.py +test/test_execution_result.py +test/test_execution_result_grand_total.py +test/test_execution_result_header.py +test/test_execution_result_paging.py +test/test_execution_settings.py +test/test_filter_definition.py +test/test_filter_definition_for_simple_measure.py +test/test_grand_total.py +test/test_header_group.py +test/test_identifier.py +test/test_included_dimension_props.py +test/test_inline_filter_definition.py +test/test_inline_filter_definition_body.py +test/test_inline_filter_definition_body_all_of.py +test/test_inline_measure_definition.py +test/test_inline_measure_definition_inline.py +test/test_local_identifier.py +test/test_measure_definition.py +test/test_measure_execution_result_header.py +test/test_measure_group_header.py +test/test_measure_header_out.py +test/test_measure_item.py +test/test_measure_result_header.py +test/test_measure_value_filter.py +test/test_negative_attribute_filter.py +test/test_negative_attribute_filter_body.py +test/test_negative_attribute_filter_body_all_of.py +test/test_object_identifier.py +test/test_paging.py +test/test_pop_dataset.py +test/test_pop_dataset_measure_definition.py +test/test_pop_dataset_measure_definition_previous_period_measure.py +test/test_pop_date.py +test/test_pop_date_measure_definition.py +test/test_pop_date_measure_definition_over_period_measure.py +test/test_positive_attribute_filter.py +test/test_positive_attribute_filter_body.py +test/test_positive_attribute_filter_body_all_of.py +test/test_range_measure_value_filter.py +test/test_range_measure_value_filter_body.py +test/test_range_measure_value_filter_body_all_of.py +test/test_ranking_filter.py +test/test_ranking_filter_body.py +test/test_ranking_filter_body_all_of.py +test/test_relative_date_filter.py +test/test_relative_date_filter_body.py +test/test_relative_date_filter_body_all_of.py +test/test_result_controller_api.py +test/test_result_dimension.py +test/test_result_spec.py +test/test_simple_measure_definition.py +test/test_simple_measure_definition_measure.py +test/test_sort_direction.py +test/test_sort_key_attribute.py +test/test_sort_key_attribute_attribute.py +test/test_sort_key_value.py +test/test_sort_key_value_value.py +test/test_total_function.py +test/test_valid_objects_controller_api.py +tox.ini diff --git a/gooddata-afm-client/.openapi-generator/VERSION b/gooddata-afm-client/.openapi-generator/VERSION new file mode 100644 index 000000000..862529f8c --- /dev/null +++ b/gooddata-afm-client/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.2.1-SNAPSHOT \ No newline at end of file diff --git a/gooddata-afm-client/README.md b/gooddata-afm-client/README.md new file mode 100644 index 000000000..d61bb03d9 --- /dev/null +++ b/gooddata-afm-client/README.md @@ -0,0 +1,280 @@ +# gooddata-afm-client +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: v0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen + +## Requirements. + +Python >= 3.6 + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import gooddata_afm_client +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import gooddata_afm_client +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import time +import gooddata_afm_client +from pprint import pprint +from gooddata_afm_client.api import afm_controller_api +from gooddata_afm_client.model.afm_execution import AfmExecution +from gooddata_afm_client.model.afm_execution_response import AfmExecutionResponse +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_afm_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + + +# Enter a context with an instance of the API client +with gooddata_afm_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = afm_controller_api.AfmControllerApi(api_client) + workspace_id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | Workspace identifier +afm_execution = AfmExecution( + execution=AFM( + attributes=[ + AttributeItem( + local_identifier="2", + label=AfmObjectIdentifier( + identifier=ObjectIdentifier( + id="sample_item.price", + type="fact", + ), + ), + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + local_identifier="sampleAutoGenerated0123_ID", + definition=MeasureDefinition(), + ), + ], + aux_measures=[ + MeasureItem( + local_identifier="sampleAutoGenerated0123_ID", + definition=MeasureDefinition(), + ), + ], + ), + result_spec=ResultSpec( + dimensions=[ + Dimension( + item_identifiers=[ + "[ "attribute1", "measureGroup"]", + ], + local_identifier="firstDimension", + sorting=[ + , + ], + ), + ], + grand_totals=[ + GrandTotal( + local_identifier="firstGrandTotal", + function="SUM", + included_dimensions={ + "key": IncludedDimensionProps( + dimension_attributes_values={ + "key": [ + "key_example", + ], + }, + ), + }, + ), + ], + ), + settings=ExecutionSettings( + data_sampling_percentage=0, + ), + ) # AfmExecution | +skip_cache = False # bool | Ignore all caches during execution of current request. (optional) (default to False) +timestamp = "2020-06-03T10:15:30+01:00" # str | (optional) + + try: + # Executes analytical request and returns link to the result + api_response = api_instance.compute_report(workspace_id, afm_execution, skip_cache=skip_cache, timestamp=timestamp) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling AfmControllerApi->compute_report: %s\n" % e) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AfmControllerApi* | [**compute_report**](docs/AfmControllerApi.md#compute_report) | **POST** /api/actions/workspaces/{workspaceId}/execution/afm/execute | Executes analytical request and returns link to the result +*AfmExplainControllerApi* | [**explain_afm**](docs/AfmExplainControllerApi.md#explain_afm) | **POST** /api/actions/workspaces/{workspaceId}/execution/afm/explain | AFM explain resource. +*ElementsControllerApi* | [**compute_label_elements**](docs/ElementsControllerApi.md#compute_label_elements) | **GET** /api/actions/workspaces/{workspaceId}/execution/collectLabelElements | Listing of label values. +*ResultControllerApi* | [**retrieve_result**](docs/ResultControllerApi.md#retrieve_result) | **GET** /api/actions/workspaces/{workspaceId}/execution/afm/execute/result/{resultId} | Get a single execution result +*ValidObjectsControllerApi* | [**compute_valid_objects**](docs/ValidObjectsControllerApi.md#compute_valid_objects) | **POST** /api/actions/workspaces/{workspaceId}/execution/afm/computeValidObjects | Valid objects + + +## Documentation For Models + + - [AFM](docs/AFM.md) + - [AbsoluteDateFilter](docs/AbsoluteDateFilter.md) + - [AbsoluteDateFilterBody](docs/AbsoluteDateFilterBody.md) + - [AbsoluteDateFilterBodyAllOf](docs/AbsoluteDateFilterBodyAllOf.md) + - [AbstractMeasureValueFilter](docs/AbstractMeasureValueFilter.md) + - [AbstractMeasureValueFilterAllOf](docs/AbstractMeasureValueFilterAllOf.md) + - [AfmExecution](docs/AfmExecution.md) + - [AfmExecutionResponse](docs/AfmExecutionResponse.md) + - [AfmObjectIdentifier](docs/AfmObjectIdentifier.md) + - [AfmValidObjectsQuery](docs/AfmValidObjectsQuery.md) + - [AfmValidObjectsResponse](docs/AfmValidObjectsResponse.md) + - [ArithmeticMeasureDefinition](docs/ArithmeticMeasureDefinition.md) + - [ArithmeticMeasureDefinitionArithmeticMeasure](docs/ArithmeticMeasureDefinitionArithmeticMeasure.md) + - [AttributeExecutionResultHeader](docs/AttributeExecutionResultHeader.md) + - [AttributeFilter](docs/AttributeFilter.md) + - [AttributeFilterElements](docs/AttributeFilterElements.md) + - [AttributeHeader](docs/AttributeHeader.md) + - [AttributeHeaderAttributeHeader](docs/AttributeHeaderAttributeHeader.md) + - [AttributeItem](docs/AttributeItem.md) + - [AttributeResultHeader](docs/AttributeResultHeader.md) + - [CommonAttributeFilter](docs/CommonAttributeFilter.md) + - [CommonAttributeFilterAllOf](docs/CommonAttributeFilterAllOf.md) + - [CommonDateFilter](docs/CommonDateFilter.md) + - [CommonDateFilterAllOf](docs/CommonDateFilterAllOf.md) + - [CommonFilter](docs/CommonFilter.md) + - [CommonMeasureValueFilter](docs/CommonMeasureValueFilter.md) + - [CommonMeasureValueFilterAllOf](docs/CommonMeasureValueFilterAllOf.md) + - [ComparisonMeasureValueFilter](docs/ComparisonMeasureValueFilter.md) + - [ComparisonMeasureValueFilterBody](docs/ComparisonMeasureValueFilterBody.md) + - [ComparisonMeasureValueFilterBodyAllOf](docs/ComparisonMeasureValueFilterBodyAllOf.md) + - [DataColumnLocator](docs/DataColumnLocator.md) + - [DateFilter](docs/DateFilter.md) + - [Dimension](docs/Dimension.md) + - [DimensionHeader](docs/DimensionHeader.md) + - [Element](docs/Element.md) + - [ElementsResponse](docs/ElementsResponse.md) + - [ErrorMessage](docs/ErrorMessage.md) + - [ExecutionLinks](docs/ExecutionLinks.md) + - [ExecutionResponse](docs/ExecutionResponse.md) + - [ExecutionResult](docs/ExecutionResult.md) + - [ExecutionResultGrandTotal](docs/ExecutionResultGrandTotal.md) + - [ExecutionResultHeader](docs/ExecutionResultHeader.md) + - [ExecutionResultPaging](docs/ExecutionResultPaging.md) + - [ExecutionSettings](docs/ExecutionSettings.md) + - [FilterDefinition](docs/FilterDefinition.md) + - [FilterDefinitionForSimpleMeasure](docs/FilterDefinitionForSimpleMeasure.md) + - [GrandTotal](docs/GrandTotal.md) + - [HeaderGroup](docs/HeaderGroup.md) + - [Identifier](docs/Identifier.md) + - [IncludedDimensionProps](docs/IncludedDimensionProps.md) + - [InlineFilterDefinition](docs/InlineFilterDefinition.md) + - [InlineFilterDefinitionBody](docs/InlineFilterDefinitionBody.md) + - [InlineFilterDefinitionBodyAllOf](docs/InlineFilterDefinitionBodyAllOf.md) + - [InlineMeasureDefinition](docs/InlineMeasureDefinition.md) + - [InlineMeasureDefinitionInline](docs/InlineMeasureDefinitionInline.md) + - [LocalIdentifier](docs/LocalIdentifier.md) + - [MeasureDefinition](docs/MeasureDefinition.md) + - [MeasureExecutionResultHeader](docs/MeasureExecutionResultHeader.md) + - [MeasureGroupHeader](docs/MeasureGroupHeader.md) + - [MeasureHeaderOut](docs/MeasureHeaderOut.md) + - [MeasureItem](docs/MeasureItem.md) + - [MeasureResultHeader](docs/MeasureResultHeader.md) + - [MeasureValueFilter](docs/MeasureValueFilter.md) + - [NegativeAttributeFilter](docs/NegativeAttributeFilter.md) + - [NegativeAttributeFilterBody](docs/NegativeAttributeFilterBody.md) + - [NegativeAttributeFilterBodyAllOf](docs/NegativeAttributeFilterBodyAllOf.md) + - [ObjectIdentifier](docs/ObjectIdentifier.md) + - [Paging](docs/Paging.md) + - [PopDataset](docs/PopDataset.md) + - [PopDatasetMeasureDefinition](docs/PopDatasetMeasureDefinition.md) + - [PopDatasetMeasureDefinitionPreviousPeriodMeasure](docs/PopDatasetMeasureDefinitionPreviousPeriodMeasure.md) + - [PopDate](docs/PopDate.md) + - [PopDateMeasureDefinition](docs/PopDateMeasureDefinition.md) + - [PopDateMeasureDefinitionOverPeriodMeasure](docs/PopDateMeasureDefinitionOverPeriodMeasure.md) + - [PositiveAttributeFilter](docs/PositiveAttributeFilter.md) + - [PositiveAttributeFilterBody](docs/PositiveAttributeFilterBody.md) + - [PositiveAttributeFilterBodyAllOf](docs/PositiveAttributeFilterBodyAllOf.md) + - [RangeMeasureValueFilter](docs/RangeMeasureValueFilter.md) + - [RangeMeasureValueFilterBody](docs/RangeMeasureValueFilterBody.md) + - [RangeMeasureValueFilterBodyAllOf](docs/RangeMeasureValueFilterBodyAllOf.md) + - [RankingFilter](docs/RankingFilter.md) + - [RankingFilterBody](docs/RankingFilterBody.md) + - [RankingFilterBodyAllOf](docs/RankingFilterBodyAllOf.md) + - [RelativeDateFilter](docs/RelativeDateFilter.md) + - [RelativeDateFilterBody](docs/RelativeDateFilterBody.md) + - [RelativeDateFilterBodyAllOf](docs/RelativeDateFilterBodyAllOf.md) + - [ResultDimension](docs/ResultDimension.md) + - [ResultSpec](docs/ResultSpec.md) + - [SimpleMeasureDefinition](docs/SimpleMeasureDefinition.md) + - [SimpleMeasureDefinitionMeasure](docs/SimpleMeasureDefinitionMeasure.md) + - [SortDirection](docs/SortDirection.md) + - [SortKeyAttribute](docs/SortKeyAttribute.md) + - [SortKeyAttributeAttribute](docs/SortKeyAttributeAttribute.md) + - [SortKeyValue](docs/SortKeyValue.md) + - [SortKeyValueValue](docs/SortKeyValueValue.md) + - [TotalFunction](docs/TotalFunction.md) + + +## Documentation For Authorization + + All endpoints do not require authorization. + +## Author + + + + +## Notes for Large OpenAPI documents +If the OpenAPI document is large, imports in gooddata_afm_client.apis and gooddata_afm_client.models may fail with a +RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: + +Solution 1: +Use specific imports for apis and models like: +- `from gooddata_afm_client.api.default_api import DefaultApi` +- `from gooddata_afm_client.model.pet import Pet` + +Solution 2: +Before importing the package, adjust the maximum recursion limit as shown below: +``` +import sys +sys.setrecursionlimit(1500) +import gooddata_afm_client +from gooddata_afm_client.apis import * +from gooddata_afm_client.models import * +``` + diff --git a/gooddata-afm-client/docs/AFM.md b/gooddata-afm-client/docs/AFM.md new file mode 100644 index 000000000..80e74b941 --- /dev/null +++ b/gooddata-afm-client/docs/AFM.md @@ -0,0 +1,16 @@ +# AFM + +Top level executable entity. Combination of [A]ttributes, [F]ilters & [M]etrics. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | [**[AttributeItem]**](AttributeItem.md) | | +**filters** | [**[FilterDefinition]**](FilterDefinition.md) | Various filter types to filter execution result. | +**measures** | [**[MeasureItem]**](MeasureItem.md) | Measures to be computed. | +**aux_measures** | [**[MeasureItem]**](MeasureItem.md) | Measures to be referenced from other AFM objects (e.g. filters) but not included in the result. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/AbsoluteDateFilter.md b/gooddata-afm-client/docs/AbsoluteDateFilter.md new file mode 100644 index 000000000..a5d4e98bb --- /dev/null +++ b/gooddata-afm-client/docs/AbsoluteDateFilter.md @@ -0,0 +1,13 @@ +# AbsoluteDateFilter + +A date filter specifying exact from and to dates. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**absolute_date_filter** | [**AbsoluteDateFilterBody**](AbsoluteDateFilterBody.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/AbsoluteDateFilterBody.md b/gooddata-afm-client/docs/AbsoluteDateFilterBody.md new file mode 100644 index 000000000..87be74ec7 --- /dev/null +++ b/gooddata-afm-client/docs/AbsoluteDateFilterBody.md @@ -0,0 +1,15 @@ +# AbsoluteDateFilterBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dataset** | [**AfmObjectIdentifier**](AfmObjectIdentifier.md) | | +**_from** | **date** | | +**to** | **date** | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [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-afm-client/docs/AbsoluteDateFilterBodyAllOf.md b/gooddata-afm-client/docs/AbsoluteDateFilterBodyAllOf.md new file mode 100644 index 000000000..f5bb1d6f2 --- /dev/null +++ b/gooddata-afm-client/docs/AbsoluteDateFilterBodyAllOf.md @@ -0,0 +1,13 @@ +# AbsoluteDateFilterBodyAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **date** | | +**to** | **date** | | +**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-afm-client/docs/AbstractMeasureValueFilter.md b/gooddata-afm-client/docs/AbstractMeasureValueFilter.md new file mode 100644 index 000000000..99d55aadb --- /dev/null +++ b/gooddata-afm-client/docs/AbstractMeasureValueFilter.md @@ -0,0 +1,13 @@ +# AbstractMeasureValueFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [optional] +**dimensionality** | [**[Identifier]**](Identifier.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-afm-client/docs/AbstractMeasureValueFilterAllOf.md b/gooddata-afm-client/docs/AbstractMeasureValueFilterAllOf.md new file mode 100644 index 000000000..eed422128 --- /dev/null +++ b/gooddata-afm-client/docs/AbstractMeasureValueFilterAllOf.md @@ -0,0 +1,12 @@ +# AbstractMeasureValueFilterAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensionality** | [**[Identifier]**](Identifier.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-afm-client/docs/AfmControllerApi.md b/gooddata-afm-client/docs/AfmControllerApi.md new file mode 100644 index 000000000..9ed45f37f --- /dev/null +++ b/gooddata-afm-client/docs/AfmControllerApi.md @@ -0,0 +1,150 @@ +# gooddata_afm_client.AfmControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**compute_report**](AfmControllerApi.md#compute_report) | **POST** /api/actions/workspaces/{workspaceId}/execution/afm/execute | Executes analytical request and returns link to the result + + +# **compute_report** +> AfmExecutionResponse compute_report(workspace_id, afm_execution) + +Executes analytical request and returns link to the result + +AFM is a combination of attributes, measures and filters that describe a query you want to execute. + +### Example + +```python +import time +import gooddata_afm_client +from gooddata_afm_client.api import afm_controller_api +from gooddata_afm_client.model.afm_execution_response import AfmExecutionResponse +from gooddata_afm_client.model.afm_execution import AfmExecution +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_afm_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_afm_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = afm_controller_api.AfmControllerApi(api_client) + workspace_id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | Workspace identifier + afm_execution = AfmExecution( + execution=AFM( + attributes=[ + AttributeItem( + local_identifier="2", + label=AfmObjectIdentifier( + identifier=ObjectIdentifier( + id="sample_item.price", + type="fact", + ), + ), + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + local_identifier="sampleAutoGenerated0123_ID", + definition=MeasureDefinition(), + ), + ], + aux_measures=[ + MeasureItem( + local_identifier="sampleAutoGenerated0123_ID", + definition=MeasureDefinition(), + ), + ], + ), + result_spec=ResultSpec( + dimensions=[ + Dimension( + item_identifiers=[ + "[ "attribute1", "measureGroup"]", + ], + local_identifier="firstDimension", + sorting=[ + , + ], + ), + ], + grand_totals=[ + GrandTotal( + local_identifier="firstGrandTotal", + function="SUM", + included_dimensions={ + "key": IncludedDimensionProps( + dimension_attributes_values={ + "key": [ + "key_example", + ], + }, + ), + }, + ), + ], + ), + settings=ExecutionSettings( + data_sampling_percentage=0, + ), + ) # AfmExecution | + skip_cache = False # bool | Ignore all caches during execution of current request. (optional) if omitted the server will use the default value of False + timestamp = "2020-06-03T10:15:30+01:00" # str | (optional) + + # example passing only required values which don't have defaults set + try: + # Executes analytical request and returns link to the result + api_response = api_instance.compute_report(workspace_id, afm_execution) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling AfmControllerApi->compute_report: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Executes analytical request and returns link to the result + api_response = api_instance.compute_report(workspace_id, afm_execution, skip_cache=skip_cache, timestamp=timestamp) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling AfmControllerApi->compute_report: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| Workspace identifier | + **afm_execution** | [**AfmExecution**](AfmExecution.md)| | + **skip_cache** | **bool**| Ignore all caches during execution of current request. | [optional] if omitted the server will use the default value of False + **timestamp** | **str**| | [optional] + +### Return type + +[**AfmExecutionResponse**](AfmExecutionResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | AFM Execution response with links to the result and server-enhanced dimensions from the original request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-afm-client/docs/AfmExecution.md b/gooddata-afm-client/docs/AfmExecution.md new file mode 100644 index 000000000..5428f8861 --- /dev/null +++ b/gooddata-afm-client/docs/AfmExecution.md @@ -0,0 +1,14 @@ +# AfmExecution + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**execution** | [**AFM**](AFM.md) | | +**result_spec** | [**ResultSpec**](ResultSpec.md) | | +**settings** | [**ExecutionSettings**](ExecutionSettings.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-afm-client/docs/AfmExecutionResponse.md b/gooddata-afm-client/docs/AfmExecutionResponse.md new file mode 100644 index 000000000..33ab4e5f0 --- /dev/null +++ b/gooddata-afm-client/docs/AfmExecutionResponse.md @@ -0,0 +1,12 @@ +# AfmExecutionResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**execution_response** | [**ExecutionResponse**](ExecutionResponse.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/AfmExplainControllerApi.md b/gooddata-afm-client/docs/AfmExplainControllerApi.md new file mode 100644 index 000000000..e677df820 --- /dev/null +++ b/gooddata-afm-client/docs/AfmExplainControllerApi.md @@ -0,0 +1,147 @@ +# gooddata_afm_client.AfmExplainControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**explain_afm**](AfmExplainControllerApi.md#explain_afm) | **POST** /api/actions/workspaces/{workspaceId}/execution/afm/explain | AFM explain resource. + + +# **explain_afm** +> file_type explain_afm(workspace_id, afm_execution) + +AFM explain resource. + +The resource provides static structures needed for investigation of a problem with given AFM. The structures are MAQL (internal form of AFM), and logical and physical models (LDM and PDM) of corresponding workspace. + +### Example + +```python +import time +import gooddata_afm_client +from gooddata_afm_client.api import afm_explain_controller_api +from gooddata_afm_client.model.afm_execution import AfmExecution +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_afm_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_afm_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = afm_explain_controller_api.AfmExplainControllerApi(api_client) + workspace_id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | Workspace identifier + afm_execution = AfmExecution( + execution=AFM( + attributes=[ + AttributeItem( + local_identifier="2", + label=AfmObjectIdentifier( + identifier=ObjectIdentifier( + id="sample_item.price", + type="fact", + ), + ), + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + local_identifier="sampleAutoGenerated0123_ID", + definition=MeasureDefinition(), + ), + ], + aux_measures=[ + MeasureItem( + local_identifier="sampleAutoGenerated0123_ID", + definition=MeasureDefinition(), + ), + ], + ), + result_spec=ResultSpec( + dimensions=[ + Dimension( + item_identifiers=[ + "[ "attribute1", "measureGroup"]", + ], + local_identifier="firstDimension", + sorting=[ + , + ], + ), + ], + grand_totals=[ + GrandTotal( + local_identifier="firstGrandTotal", + function="SUM", + included_dimensions={ + "key": IncludedDimensionProps( + dimension_attributes_values={ + "key": [ + "key_example", + ], + }, + ), + }, + ), + ], + ), + settings=ExecutionSettings( + data_sampling_percentage=0, + ), + ) # AfmExecution | + explain_type = "explainType_example" # str | Requested explain type (LDM, PDM or MAQL). If not specified all types are bundled in a ZIP archive. (optional) + + # example passing only required values which don't have defaults set + try: + # AFM explain resource. + api_response = api_instance.explain_afm(workspace_id, afm_execution) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling AfmExplainControllerApi->explain_afm: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # AFM explain resource. + api_response = api_instance.explain_afm(workspace_id, afm_execution, explain_type=explain_type) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling AfmExplainControllerApi->explain_afm: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| Workspace identifier | + **afm_execution** | [**AfmExecution**](AfmExecution.md)| | + **explain_type** | **str**| Requested explain type (LDM, PDM or MAQL). If not specified all types are bundled in a ZIP archive. | [optional] + +### Return type + +**file_type** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/zip + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ZIP archive with MAQL, LDM and PDM files. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-afm-client/docs/AfmObjectIdentifier.md b/gooddata-afm-client/docs/AfmObjectIdentifier.md new file mode 100644 index 000000000..992dc3bbc --- /dev/null +++ b/gooddata-afm-client/docs/AfmObjectIdentifier.md @@ -0,0 +1,13 @@ +# AfmObjectIdentifier + +ObjectIdentifier with `identifier` wrapper. This serves to distinguish MD object identifiers in AFM request from local identifiers. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | [**ObjectIdentifier**](ObjectIdentifier.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/AfmValidObjectsQuery.md b/gooddata-afm-client/docs/AfmValidObjectsQuery.md new file mode 100644 index 000000000..b91075aef --- /dev/null +++ b/gooddata-afm-client/docs/AfmValidObjectsQuery.md @@ -0,0 +1,14 @@ +# AfmValidObjectsQuery + +Entity holding AFM and list of object types whose validity should be computed. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**types** | **[str]** | | +**afm** | [**AFM**](AFM.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/AfmValidObjectsResponse.md b/gooddata-afm-client/docs/AfmValidObjectsResponse.md new file mode 100644 index 000000000..64a14ff5d --- /dev/null +++ b/gooddata-afm-client/docs/AfmValidObjectsResponse.md @@ -0,0 +1,13 @@ +# AfmValidObjectsResponse + +All objects of specified types valid with respect to given AFM. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**[ObjectIdentifier]**](ObjectIdentifier.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/ArithmeticMeasureDefinition.md b/gooddata-afm-client/docs/ArithmeticMeasureDefinition.md new file mode 100644 index 000000000..a9d0b5b06 --- /dev/null +++ b/gooddata-afm-client/docs/ArithmeticMeasureDefinition.md @@ -0,0 +1,13 @@ +# ArithmeticMeasureDefinition + +Measure representing arithmetics between measures. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arithmetic_measure** | [**ArithmeticMeasureDefinitionArithmeticMeasure**](ArithmeticMeasureDefinitionArithmeticMeasure.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/ArithmeticMeasureDefinitionArithmeticMeasure.md b/gooddata-afm-client/docs/ArithmeticMeasureDefinitionArithmeticMeasure.md new file mode 100644 index 000000000..1900c8d87 --- /dev/null +++ b/gooddata-afm-client/docs/ArithmeticMeasureDefinitionArithmeticMeasure.md @@ -0,0 +1,13 @@ +# ArithmeticMeasureDefinitionArithmeticMeasure + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure_identifiers** | [**[LocalIdentifier]**](LocalIdentifier.md) | List of measures to apply arithmetic operation by chosen operator. | +**operator** | **str** | Arithmetic operator describing operation between measures. | +**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-afm-client/docs/AttributeExecutionResultHeader.md b/gooddata-afm-client/docs/AttributeExecutionResultHeader.md new file mode 100644 index 000000000..c337ca4ce --- /dev/null +++ b/gooddata-afm-client/docs/AttributeExecutionResultHeader.md @@ -0,0 +1,12 @@ +# AttributeExecutionResultHeader + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_header** | [**AttributeResultHeader**](AttributeResultHeader.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/AttributeFilter.md b/gooddata-afm-client/docs/AttributeFilter.md new file mode 100644 index 000000000..e3482a8ec --- /dev/null +++ b/gooddata-afm-client/docs/AttributeFilter.md @@ -0,0 +1,14 @@ +# AttributeFilter + +Abstract filter definition type attributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**positive_attribute_filter** | [**PositiveAttributeFilterBody**](PositiveAttributeFilterBody.md) | | [optional] +**negative_attribute_filter** | [**NegativeAttributeFilterBody**](NegativeAttributeFilterBody.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-afm-client/docs/AttributeFilterElements.md b/gooddata-afm-client/docs/AttributeFilterElements.md new file mode 100644 index 000000000..4dd9c679c --- /dev/null +++ b/gooddata-afm-client/docs/AttributeFilterElements.md @@ -0,0 +1,13 @@ +# AttributeFilterElements + +Filter on specific set of label values. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | **[str]** | Set of label values. | +**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-afm-client/docs/AttributeHeader.md b/gooddata-afm-client/docs/AttributeHeader.md new file mode 100644 index 000000000..ef93870a2 --- /dev/null +++ b/gooddata-afm-client/docs/AttributeHeader.md @@ -0,0 +1,12 @@ +# AttributeHeader + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_header** | [**AttributeHeaderAttributeHeader**](AttributeHeaderAttributeHeader.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/AttributeHeaderAttributeHeader.md b/gooddata-afm-client/docs/AttributeHeaderAttributeHeader.md new file mode 100644 index 000000000..74c861706 --- /dev/null +++ b/gooddata-afm-client/docs/AttributeHeaderAttributeHeader.md @@ -0,0 +1,18 @@ +# AttributeHeaderAttributeHeader + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local_identifier** | **str** | | +**attribute** | [**ObjectIdentifier**](ObjectIdentifier.md) | | +**attribute_name** | **str** | | +**label** | [**ObjectIdentifier**](ObjectIdentifier.md) | | +**label_name** | **str** | | +**primary_label** | [**ObjectIdentifier**](ObjectIdentifier.md) | | +**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-afm-client/docs/AttributeItem.md b/gooddata-afm-client/docs/AttributeItem.md new file mode 100644 index 000000000..d1448c82b --- /dev/null +++ b/gooddata-afm-client/docs/AttributeItem.md @@ -0,0 +1,13 @@ +# AttributeItem + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local_identifier** | **str** | | +**label** | [**AfmObjectIdentifier**](AfmObjectIdentifier.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/AttributeResultHeader.md b/gooddata-afm-client/docs/AttributeResultHeader.md new file mode 100644 index 000000000..d6502435c --- /dev/null +++ b/gooddata-afm-client/docs/AttributeResultHeader.md @@ -0,0 +1,14 @@ +# AttributeResultHeader + +Header containing the information related to attributes. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label_value** | **str** | A value of the current attribute label. | +**primary_label_value** | **str** | A value of the primary attribute label. | +**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-afm-client/docs/CommonAttributeFilter.md b/gooddata-afm-client/docs/CommonAttributeFilter.md new file mode 100644 index 000000000..e06d05946 --- /dev/null +++ b/gooddata-afm-client/docs/CommonAttributeFilter.md @@ -0,0 +1,13 @@ +# CommonAttributeFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | [**Identifier**](Identifier.md) | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [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-afm-client/docs/CommonAttributeFilterAllOf.md b/gooddata-afm-client/docs/CommonAttributeFilterAllOf.md new file mode 100644 index 000000000..48f086437 --- /dev/null +++ b/gooddata-afm-client/docs/CommonAttributeFilterAllOf.md @@ -0,0 +1,12 @@ +# CommonAttributeFilterAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | [**Identifier**](Identifier.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/CommonDateFilter.md b/gooddata-afm-client/docs/CommonDateFilter.md new file mode 100644 index 000000000..6c0358b70 --- /dev/null +++ b/gooddata-afm-client/docs/CommonDateFilter.md @@ -0,0 +1,13 @@ +# CommonDateFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dataset** | [**AfmObjectIdentifier**](AfmObjectIdentifier.md) | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [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-afm-client/docs/CommonDateFilterAllOf.md b/gooddata-afm-client/docs/CommonDateFilterAllOf.md new file mode 100644 index 000000000..319110e93 --- /dev/null +++ b/gooddata-afm-client/docs/CommonDateFilterAllOf.md @@ -0,0 +1,12 @@ +# CommonDateFilterAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dataset** | [**AfmObjectIdentifier**](AfmObjectIdentifier.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/CommonFilter.md b/gooddata-afm-client/docs/CommonFilter.md new file mode 100644 index 000000000..2259bbee2 --- /dev/null +++ b/gooddata-afm-client/docs/CommonFilter.md @@ -0,0 +1,12 @@ +# CommonFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [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-afm-client/docs/CommonMeasureValueFilter.md b/gooddata-afm-client/docs/CommonMeasureValueFilter.md new file mode 100644 index 000000000..50b744938 --- /dev/null +++ b/gooddata-afm-client/docs/CommonMeasureValueFilter.md @@ -0,0 +1,15 @@ +# CommonMeasureValueFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure** | [**Identifier**](Identifier.md) | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [optional] +**dimensionality** | [**[Identifier]**](Identifier.md) | | [optional] +**treat_null_values_as** | **float** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/CommonMeasureValueFilterAllOf.md b/gooddata-afm-client/docs/CommonMeasureValueFilterAllOf.md new file mode 100644 index 000000000..a2e07a400 --- /dev/null +++ b/gooddata-afm-client/docs/CommonMeasureValueFilterAllOf.md @@ -0,0 +1,13 @@ +# CommonMeasureValueFilterAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure** | [**Identifier**](Identifier.md) | | +**treat_null_values_as** | **float** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/ComparisonMeasureValueFilter.md b/gooddata-afm-client/docs/ComparisonMeasureValueFilter.md new file mode 100644 index 000000000..e178a80be --- /dev/null +++ b/gooddata-afm-client/docs/ComparisonMeasureValueFilter.md @@ -0,0 +1,13 @@ +# ComparisonMeasureValueFilter + +Filter the result by comparing specified measure to given constant value, using given comparison operator. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comparison_measure_value_filter** | [**ComparisonMeasureValueFilterBody**](ComparisonMeasureValueFilterBody.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/ComparisonMeasureValueFilterBody.md b/gooddata-afm-client/docs/ComparisonMeasureValueFilterBody.md new file mode 100644 index 000000000..853e4e225 --- /dev/null +++ b/gooddata-afm-client/docs/ComparisonMeasureValueFilterBody.md @@ -0,0 +1,17 @@ +# ComparisonMeasureValueFilterBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure** | [**Identifier**](Identifier.md) | | +**operator** | **str** | | +**value** | **float** | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [optional] +**dimensionality** | [**[Identifier]**](Identifier.md) | | [optional] +**treat_null_values_as** | **float** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/ComparisonMeasureValueFilterBodyAllOf.md b/gooddata-afm-client/docs/ComparisonMeasureValueFilterBodyAllOf.md new file mode 100644 index 000000000..947c491de --- /dev/null +++ b/gooddata-afm-client/docs/ComparisonMeasureValueFilterBodyAllOf.md @@ -0,0 +1,13 @@ +# ComparisonMeasureValueFilterBodyAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operator** | **str** | | +**value** | **float** | | +**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-afm-client/docs/DataColumnLocator.md b/gooddata-afm-client/docs/DataColumnLocator.md new file mode 100644 index 000000000..de24aefba --- /dev/null +++ b/gooddata-afm-client/docs/DataColumnLocator.md @@ -0,0 +1,12 @@ +# DataColumnLocator + +Mapping from dimension items (either 'localIdentifier' from 'AttributeItem', or \"measureGroup\") to their respective values. This effectively specifies the path (location) of the data column used for sorting. Therefore values for all dimension items must be specified. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **str** | 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-afm-client/docs/DateFilter.md b/gooddata-afm-client/docs/DateFilter.md new file mode 100644 index 000000000..6f00fe88e --- /dev/null +++ b/gooddata-afm-client/docs/DateFilter.md @@ -0,0 +1,14 @@ +# DateFilter + +Abstract filter definition type for dates + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**absolute_date_filter** | [**AbsoluteDateFilterBody**](AbsoluteDateFilterBody.md) | | [optional] +**relative_date_filter** | [**RelativeDateFilterBody**](RelativeDateFilterBody.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-afm-client/docs/Dimension.md b/gooddata-afm-client/docs/Dimension.md new file mode 100644 index 000000000..621983893 --- /dev/null +++ b/gooddata-afm-client/docs/Dimension.md @@ -0,0 +1,15 @@ +# Dimension + +Single dimension description. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item_identifiers** | **[str]** | List of items in current dimension. Can reference 'localIdentifier' from 'AttributeItem', or special pseudo attribute \"measureGroup\" representing list of measures. | +**local_identifier** | **str** | Dimension identification within requests. Other entities can reference this dimension by this value. | [optional] +**sorting** | **[dict]** | List of sorting rules. From most relevant to least relevant (less relevant rule is applied, when more relevant rule compares items as equal). | [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-afm-client/docs/DimensionHeader.md b/gooddata-afm-client/docs/DimensionHeader.md new file mode 100644 index 000000000..03281794e --- /dev/null +++ b/gooddata-afm-client/docs/DimensionHeader.md @@ -0,0 +1,13 @@ +# DimensionHeader + +Contains the dimension-specific header information. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**header_groups** | [**[HeaderGroup]**](HeaderGroup.md) | An array containing header groups. | +**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-afm-client/docs/Element.md b/gooddata-afm-client/docs/Element.md new file mode 100644 index 000000000..6f560be78 --- /dev/null +++ b/gooddata-afm-client/docs/Element.md @@ -0,0 +1,14 @@ +# Element + +List of returned elements. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_title** | **str** | Title of primary label of attribute owning requested label. | +**title** | **str** | Title of requested label. | +**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-afm-client/docs/ElementsControllerApi.md b/gooddata-afm-client/docs/ElementsControllerApi.md new file mode 100644 index 000000000..e06d80482 --- /dev/null +++ b/gooddata-afm-client/docs/ElementsControllerApi.md @@ -0,0 +1,101 @@ +# gooddata_afm_client.ElementsControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**compute_label_elements**](ElementsControllerApi.md#compute_label_elements) | **GET** /api/actions/workspaces/{workspaceId}/execution/collectLabelElements | Listing of label values. + + +# **compute_label_elements** +> ElementsResponse compute_label_elements(workspace_id, label) + +Listing of label values. + +Returns paged list of elements (values) of given label satisfying given filtering criteria. + +### Example + +```python +import time +import gooddata_afm_client +from gooddata_afm_client.api import elements_controller_api +from gooddata_afm_client.model.elements_response import ElementsResponse +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_afm_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_afm_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = elements_controller_api.ElementsControllerApi(api_client) + workspace_id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | Workspace identifier + label = "label_example" # str | Requested label. + sort_order = "ASC" # str | Sort order of returned items. Items are sorted by ```label``` title. (optional) if omitted the server will use the default value of "ASC" + include_total_without_filters = False # bool | Specify if ```totalCountWithoutFilters``` should be returned. (optional) if omitted the server will use the default value of False + complement_filter = False # bool | Inverse filter: * ```false``` - return items matching ```patternFilter``` * ```true``` - return items not matching ```patternFilter``` (optional) if omitted the server will use the default value of False + pattern_filter = "patternFilter_example" # str | Return only items, whose ```label``` title case insensitively contains ```filter``` as substring. (optional) + offset = 0 # int | Request page with this offset. (optional) if omitted the server will use the default value of 0 + limit = 1000 # int | Return only this number of items. (optional) if omitted the server will use the default value of 1000 + data_sampling_percentage = 0 # float | Specifies the percentage of rows from fact datasets to use during computation. This feature is available only for workspaces that use a Vertica Data Source without table views. (optional) + skip_cache = True # bool | Ignore all caches during execution of current request. (optional) + + # example passing only required values which don't have defaults set + try: + # Listing of label values. + api_response = api_instance.compute_label_elements(workspace_id, label) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling ElementsControllerApi->compute_label_elements: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Listing of label values. + api_response = api_instance.compute_label_elements(workspace_id, label, sort_order=sort_order, include_total_without_filters=include_total_without_filters, complement_filter=complement_filter, pattern_filter=pattern_filter, offset=offset, limit=limit, data_sampling_percentage=data_sampling_percentage, skip_cache=skip_cache) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling ElementsControllerApi->compute_label_elements: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| Workspace identifier | + **label** | **str**| Requested label. | + **sort_order** | **str**| Sort order of returned items. Items are sorted by ```label``` title. | [optional] if omitted the server will use the default value of "ASC" + **include_total_without_filters** | **bool**| Specify if ```totalCountWithoutFilters``` should be returned. | [optional] if omitted the server will use the default value of False + **complement_filter** | **bool**| Inverse filter: * ```false``` - return items matching ```patternFilter``` * ```true``` - return items not matching ```patternFilter``` | [optional] if omitted the server will use the default value of False + **pattern_filter** | **str**| Return only items, whose ```label``` title case insensitively contains ```filter``` as substring. | [optional] + **offset** | **int**| Request page with this offset. | [optional] if omitted the server will use the default value of 0 + **limit** | **int**| Return only this number of items. | [optional] if omitted the server will use the default value of 1000 + **data_sampling_percentage** | **float**| Specifies the percentage of rows from fact datasets to use during computation. This feature is available only for workspaces that use a Vertica Data Source without table views. | [optional] + **skip_cache** | **bool**| Ignore all caches during execution of current request. | [optional] + +### Return type + +[**ElementsResponse**](ElementsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of label values. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-afm-client/docs/ElementsResponse.md b/gooddata-afm-client/docs/ElementsResponse.md new file mode 100644 index 000000000..3dbde1902 --- /dev/null +++ b/gooddata-afm-client/docs/ElementsResponse.md @@ -0,0 +1,16 @@ +# ElementsResponse + +Entity holding list of sorted & filtered label elements, related primary label of attribute owning requested label and paging. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_label** | [**ObjectIdentifier**](ObjectIdentifier.md) | | +**elements** | [**[Element]**](Element.md) | List of returned elements. | +**paging** | [**Paging**](Paging.md) | | +**total_count_without_filters** | **int** | Total count of items ignoring all filters (using on ```project``` and ```label``` from request). | [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-afm-client/docs/ErrorMessage.md b/gooddata-afm-client/docs/ErrorMessage.md new file mode 100644 index 000000000..4185ace37 --- /dev/null +++ b/gooddata-afm-client/docs/ErrorMessage.md @@ -0,0 +1,17 @@ +# ErrorMessage + +Contains information about the error. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **str** | Error timestamp in ISO 8601. | +**status** | **int** | HTTP error response status code. | +**error** | **str** | HTTP error message like: Bad Request, Not Found, etc. | +**message** | **str** | Error message returned by the server application. | +**path** | **str** | Path of the failed request. | +**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-afm-client/docs/ExecutionLinks.md b/gooddata-afm-client/docs/ExecutionLinks.md new file mode 100644 index 000000000..26be39a1a --- /dev/null +++ b/gooddata-afm-client/docs/ExecutionLinks.md @@ -0,0 +1,12 @@ +# ExecutionLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**execution_result** | **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-afm-client/docs/ExecutionResponse.md b/gooddata-afm-client/docs/ExecutionResponse.md new file mode 100644 index 000000000..2d4847e27 --- /dev/null +++ b/gooddata-afm-client/docs/ExecutionResponse.md @@ -0,0 +1,13 @@ +# ExecutionResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensions** | [**[ResultDimension]**](ResultDimension.md) | | +**links** | [**ExecutionLinks**](ExecutionLinks.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/ExecutionResult.md b/gooddata-afm-client/docs/ExecutionResult.md new file mode 100644 index 000000000..d79d7194b --- /dev/null +++ b/gooddata-afm-client/docs/ExecutionResult.md @@ -0,0 +1,16 @@ +# ExecutionResult + +Contains the result of an AFM execution. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | A multi-dimensional array of computed results. The most common one being a 2-dimensional array. The arrays can be composed of Double or null values. | +**dimension_headers** | [**[DimensionHeader]**](DimensionHeader.md) | An array containing dimension headers. The size of the array corresponds to dimension size. Their order corresponds to the dimension order in the execution result spec. | +**grand_totals** | [**[ExecutionResultGrandTotal]**](ExecutionResultGrandTotal.md) | An array with grand totals data corresponding to grand totals definition in result spec. | +**paging** | [**ExecutionResultPaging**](ExecutionResultPaging.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/ExecutionResultGrandTotal.md b/gooddata-afm-client/docs/ExecutionResultGrandTotal.md new file mode 100644 index 000000000..8feed13d1 --- /dev/null +++ b/gooddata-afm-client/docs/ExecutionResultGrandTotal.md @@ -0,0 +1,14 @@ +# ExecutionResultGrandTotal + +Contains the data related to a grand total, including the reference to localIdentifier as specified in result spec. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | +**local_identifier** | **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-afm-client/docs/ExecutionResultHeader.md b/gooddata-afm-client/docs/ExecutionResultHeader.md new file mode 100644 index 000000000..87ab8e260 --- /dev/null +++ b/gooddata-afm-client/docs/ExecutionResultHeader.md @@ -0,0 +1,14 @@ +# ExecutionResultHeader + +Abstract execution result header + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_header** | [**AttributeResultHeader**](AttributeResultHeader.md) | | [optional] +**measure_header** | [**MeasureResultHeader**](MeasureResultHeader.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-afm-client/docs/ExecutionResultPaging.md b/gooddata-afm-client/docs/ExecutionResultPaging.md new file mode 100644 index 000000000..6e9746b7d --- /dev/null +++ b/gooddata-afm-client/docs/ExecutionResultPaging.md @@ -0,0 +1,15 @@ +# ExecutionResultPaging + +A paging information related to the data presented in the execution result. These paging information are multi-dimensional. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **[int]** | A count of the returned results in every dimension. | +**offset** | **[int]** | The offset of the results returned in every dimension. | +**total** | **[int]** | A total count of the results in every dimension. | +**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-afm-client/docs/ExecutionSettings.md b/gooddata-afm-client/docs/ExecutionSettings.md new file mode 100644 index 000000000..6b4bca5c8 --- /dev/null +++ b/gooddata-afm-client/docs/ExecutionSettings.md @@ -0,0 +1,13 @@ +# ExecutionSettings + +Various setting affecting the process of ADM execution or its result + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_sampling_percentage** | **float** | Specifies the percentage of rows from fact datasets to use during computation. This feature is available only for workspaces that use a Vertica Data Source without table views. | [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-afm-client/docs/FilterDefinition.md b/gooddata-afm-client/docs/FilterDefinition.md new file mode 100644 index 000000000..361612a40 --- /dev/null +++ b/gooddata-afm-client/docs/FilterDefinition.md @@ -0,0 +1,20 @@ +# FilterDefinition + +Abstract filter definition type + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**positive_attribute_filter** | [**PositiveAttributeFilterBody**](PositiveAttributeFilterBody.md) | | [optional] +**negative_attribute_filter** | [**NegativeAttributeFilterBody**](NegativeAttributeFilterBody.md) | | [optional] +**comparison_measure_value_filter** | [**ComparisonMeasureValueFilterBody**](ComparisonMeasureValueFilterBody.md) | | [optional] +**range_measure_value_filter** | [**RangeMeasureValueFilterBody**](RangeMeasureValueFilterBody.md) | | [optional] +**ranking_filter** | [**RankingFilterBody**](RankingFilterBody.md) | | [optional] +**absolute_date_filter** | [**AbsoluteDateFilterBody**](AbsoluteDateFilterBody.md) | | [optional] +**relative_date_filter** | [**RelativeDateFilterBody**](RelativeDateFilterBody.md) | | [optional] +**inline** | [**InlineFilterDefinitionBody**](InlineFilterDefinitionBody.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-afm-client/docs/FilterDefinitionForSimpleMeasure.md b/gooddata-afm-client/docs/FilterDefinitionForSimpleMeasure.md new file mode 100644 index 000000000..6bbd349be --- /dev/null +++ b/gooddata-afm-client/docs/FilterDefinitionForSimpleMeasure.md @@ -0,0 +1,16 @@ +# FilterDefinitionForSimpleMeasure + +Abstract filter definition type for simple measure. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**absolute_date_filter** | [**AbsoluteDateFilterBody**](AbsoluteDateFilterBody.md) | | [optional] +**relative_date_filter** | [**RelativeDateFilterBody**](RelativeDateFilterBody.md) | | [optional] +**positive_attribute_filter** | [**PositiveAttributeFilterBody**](PositiveAttributeFilterBody.md) | | [optional] +**negative_attribute_filter** | [**NegativeAttributeFilterBody**](NegativeAttributeFilterBody.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-afm-client/docs/GrandTotal.md b/gooddata-afm-client/docs/GrandTotal.md new file mode 100644 index 000000000..8635a9397 --- /dev/null +++ b/gooddata-afm-client/docs/GrandTotal.md @@ -0,0 +1,15 @@ +# GrandTotal + +Definition of a grand total. Grand total data will be computed into a separate section of the result structure so that client has more options how to visualize them. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local_identifier** | **str** | Grand total identification within this request. The corresponding data in the result are expected to be matched using this identifier. | +**function** | **str** | Aggregation function for grand total computation. | +**included_dimensions** | [**{str: (IncludedDimensionProps,)}**](IncludedDimensionProps.md) | Mapping specifying dimensions on which this grand total will be computed. Dimensions are referenced via their localIdentifiers. Optionally one can specify also the values (properties) of the dimensions' attributes (see ```dimensionAttributesValues```). | +**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-afm-client/docs/HeaderGroup.md b/gooddata-afm-client/docs/HeaderGroup.md new file mode 100644 index 000000000..a735e0aeb --- /dev/null +++ b/gooddata-afm-client/docs/HeaderGroup.md @@ -0,0 +1,13 @@ +# HeaderGroup + +Contains the information specific for a group of headers. These groups correlate to attributes and measure groups. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**headers** | [**[ExecutionResultHeader]**](ExecutionResultHeader.md) | An array containing headers. | +**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-afm-client/docs/Identifier.md b/gooddata-afm-client/docs/Identifier.md new file mode 100644 index 000000000..91d5faefe --- /dev/null +++ b/gooddata-afm-client/docs/Identifier.md @@ -0,0 +1,14 @@ +# Identifier + +Abstract identifier type + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | [**ObjectIdentifier**](ObjectIdentifier.md) | | [optional] +**local_identifier** | **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-afm-client/docs/IncludedDimensionProps.md b/gooddata-afm-client/docs/IncludedDimensionProps.md new file mode 100644 index 000000000..72e23d38f --- /dev/null +++ b/gooddata-afm-client/docs/IncludedDimensionProps.md @@ -0,0 +1,12 @@ +# IncludedDimensionProps + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimension_attributes_values** | **{str: ([str],)}** | Allows to customize for which attribute values the grand total will be computed. If the values for particular attribute are not specified then the totals for all values are computed. Note that this also covers the case of individual measures (treated as values of the \"measureGroup\" pseudo attribute). | +**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-afm-client/docs/InlineFilterDefinition.md b/gooddata-afm-client/docs/InlineFilterDefinition.md new file mode 100644 index 000000000..4a898ae34 --- /dev/null +++ b/gooddata-afm-client/docs/InlineFilterDefinition.md @@ -0,0 +1,13 @@ +# InlineFilterDefinition + +Filter in form of direct MAQL query. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inline** | [**InlineFilterDefinitionBody**](InlineFilterDefinitionBody.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/InlineFilterDefinitionBody.md b/gooddata-afm-client/docs/InlineFilterDefinitionBody.md new file mode 100644 index 000000000..7d36529b8 --- /dev/null +++ b/gooddata-afm-client/docs/InlineFilterDefinitionBody.md @@ -0,0 +1,13 @@ +# InlineFilterDefinitionBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | **str** | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [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-afm-client/docs/InlineFilterDefinitionBodyAllOf.md b/gooddata-afm-client/docs/InlineFilterDefinitionBodyAllOf.md new file mode 100644 index 000000000..16e0ca99f --- /dev/null +++ b/gooddata-afm-client/docs/InlineFilterDefinitionBodyAllOf.md @@ -0,0 +1,12 @@ +# InlineFilterDefinitionBodyAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | **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-afm-client/docs/InlineMeasureDefinition.md b/gooddata-afm-client/docs/InlineMeasureDefinition.md new file mode 100644 index 000000000..dfad1fbfa --- /dev/null +++ b/gooddata-afm-client/docs/InlineMeasureDefinition.md @@ -0,0 +1,13 @@ +# InlineMeasureDefinition + +Measure defined by the raw MAQL query. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inline** | [**InlineMeasureDefinitionInline**](InlineMeasureDefinitionInline.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/InlineMeasureDefinitionInline.md b/gooddata-afm-client/docs/InlineMeasureDefinitionInline.md new file mode 100644 index 000000000..9c4103ada --- /dev/null +++ b/gooddata-afm-client/docs/InlineMeasureDefinitionInline.md @@ -0,0 +1,12 @@ +# InlineMeasureDefinitionInline + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maql** | **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-afm-client/docs/LocalIdentifier.md b/gooddata-afm-client/docs/LocalIdentifier.md new file mode 100644 index 000000000..1bd42ad88 --- /dev/null +++ b/gooddata-afm-client/docs/LocalIdentifier.md @@ -0,0 +1,13 @@ +# LocalIdentifier + +String that uniquely identifies the measure in the context of the current AFM. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local_identifier** | **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-afm-client/docs/MeasureDefinition.md b/gooddata-afm-client/docs/MeasureDefinition.md new file mode 100644 index 000000000..c5e1d04b8 --- /dev/null +++ b/gooddata-afm-client/docs/MeasureDefinition.md @@ -0,0 +1,17 @@ +# MeasureDefinition + +Abstract measure definition type + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inline** | [**InlineMeasureDefinitionInline**](InlineMeasureDefinitionInline.md) | | [optional] +**arithmetic_measure** | [**ArithmeticMeasureDefinitionArithmeticMeasure**](ArithmeticMeasureDefinitionArithmeticMeasure.md) | | [optional] +**measure** | [**SimpleMeasureDefinitionMeasure**](SimpleMeasureDefinitionMeasure.md) | | [optional] +**over_period_measure** | [**PopDateMeasureDefinitionOverPeriodMeasure**](PopDateMeasureDefinitionOverPeriodMeasure.md) | | [optional] +**previous_period_measure** | [**PopDatasetMeasureDefinitionPreviousPeriodMeasure**](PopDatasetMeasureDefinitionPreviousPeriodMeasure.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-afm-client/docs/MeasureExecutionResultHeader.md b/gooddata-afm-client/docs/MeasureExecutionResultHeader.md new file mode 100644 index 000000000..df25c5e8f --- /dev/null +++ b/gooddata-afm-client/docs/MeasureExecutionResultHeader.md @@ -0,0 +1,12 @@ +# MeasureExecutionResultHeader + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure_header** | [**MeasureResultHeader**](MeasureResultHeader.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/MeasureGroupHeader.md b/gooddata-afm-client/docs/MeasureGroupHeader.md new file mode 100644 index 000000000..15766e83b --- /dev/null +++ b/gooddata-afm-client/docs/MeasureGroupHeader.md @@ -0,0 +1,12 @@ +# MeasureGroupHeader + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure_group_headers** | [**[MeasureHeaderOut]**](MeasureHeaderOut.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/MeasureHeaderOut.md b/gooddata-afm-client/docs/MeasureHeaderOut.md new file mode 100644 index 000000000..325e64c2e --- /dev/null +++ b/gooddata-afm-client/docs/MeasureHeaderOut.md @@ -0,0 +1,14 @@ +# MeasureHeaderOut + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local_identifier** | **str** | | +**format** | **str** | | [optional] +**name** | **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-afm-client/docs/MeasureItem.md b/gooddata-afm-client/docs/MeasureItem.md new file mode 100644 index 000000000..c4ff6feb2 --- /dev/null +++ b/gooddata-afm-client/docs/MeasureItem.md @@ -0,0 +1,13 @@ +# MeasureItem + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**local_identifier** | **str** | | +**definition** | [**MeasureDefinition**](MeasureDefinition.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/MeasureResultHeader.md b/gooddata-afm-client/docs/MeasureResultHeader.md new file mode 100644 index 000000000..a001e56d2 --- /dev/null +++ b/gooddata-afm-client/docs/MeasureResultHeader.md @@ -0,0 +1,13 @@ +# MeasureResultHeader + +Header containing the information related to measures. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure_index** | **int** | Measure index. Starts at 0. | +**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-afm-client/docs/MeasureValueFilter.md b/gooddata-afm-client/docs/MeasureValueFilter.md new file mode 100644 index 000000000..5ad45e9e1 --- /dev/null +++ b/gooddata-afm-client/docs/MeasureValueFilter.md @@ -0,0 +1,14 @@ +# MeasureValueFilter + +Abstract filter definition type filtering by the value of the measure. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comparison_measure_value_filter** | [**ComparisonMeasureValueFilterBody**](ComparisonMeasureValueFilterBody.md) | | [optional] +**range_measure_value_filter** | [**RangeMeasureValueFilterBody**](RangeMeasureValueFilterBody.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-afm-client/docs/NegativeAttributeFilter.md b/gooddata-afm-client/docs/NegativeAttributeFilter.md new file mode 100644 index 000000000..639690a5b --- /dev/null +++ b/gooddata-afm-client/docs/NegativeAttributeFilter.md @@ -0,0 +1,13 @@ +# NegativeAttributeFilter + +Filter able to limit element values by label and related selected negated elements. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**negative_attribute_filter** | [**NegativeAttributeFilterBody**](NegativeAttributeFilterBody.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/NegativeAttributeFilterBody.md b/gooddata-afm-client/docs/NegativeAttributeFilterBody.md new file mode 100644 index 000000000..e738f32e0 --- /dev/null +++ b/gooddata-afm-client/docs/NegativeAttributeFilterBody.md @@ -0,0 +1,14 @@ +# NegativeAttributeFilterBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | [**Identifier**](Identifier.md) | | +**not_in** | [**AttributeFilterElements**](AttributeFilterElements.md) | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [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-afm-client/docs/NegativeAttributeFilterBodyAllOf.md b/gooddata-afm-client/docs/NegativeAttributeFilterBodyAllOf.md new file mode 100644 index 000000000..e6629dbfe --- /dev/null +++ b/gooddata-afm-client/docs/NegativeAttributeFilterBodyAllOf.md @@ -0,0 +1,12 @@ +# NegativeAttributeFilterBodyAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**not_in** | [**AttributeFilterElements**](AttributeFilterElements.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/ObjectIdentifier.md b/gooddata-afm-client/docs/ObjectIdentifier.md new file mode 100644 index 000000000..3dd072e1a --- /dev/null +++ b/gooddata-afm-client/docs/ObjectIdentifier.md @@ -0,0 +1,14 @@ +# ObjectIdentifier + +Identifier of LDM object determined by ID & type. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/Paging.md b/gooddata-afm-client/docs/Paging.md new file mode 100644 index 000000000..dceaac0dc --- /dev/null +++ b/gooddata-afm-client/docs/Paging.md @@ -0,0 +1,16 @@ +# Paging + +Current page description. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Count of returnable items ignoring paging. | +**count** | **int** | Count of items in this page. | +**offset** | **int** | Offset of this page. | +**next** | **str** | Link to next page, or null if this is last page. | [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-afm-client/docs/PopDataset.md b/gooddata-afm-client/docs/PopDataset.md new file mode 100644 index 000000000..43de79f81 --- /dev/null +++ b/gooddata-afm-client/docs/PopDataset.md @@ -0,0 +1,13 @@ +# PopDataset + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dataset** | [**AfmObjectIdentifier**](AfmObjectIdentifier.md) | | +**periods_ago** | **int** | | +**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-afm-client/docs/PopDatasetMeasureDefinition.md b/gooddata-afm-client/docs/PopDatasetMeasureDefinition.md new file mode 100644 index 000000000..f908e9dfa --- /dev/null +++ b/gooddata-afm-client/docs/PopDatasetMeasureDefinition.md @@ -0,0 +1,13 @@ +# PopDatasetMeasureDefinition + +Previous period type of measure. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous_period_measure** | [**PopDatasetMeasureDefinitionPreviousPeriodMeasure**](PopDatasetMeasureDefinitionPreviousPeriodMeasure.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/PopDatasetMeasureDefinitionPreviousPeriodMeasure.md b/gooddata-afm-client/docs/PopDatasetMeasureDefinitionPreviousPeriodMeasure.md new file mode 100644 index 000000000..1aac548cf --- /dev/null +++ b/gooddata-afm-client/docs/PopDatasetMeasureDefinitionPreviousPeriodMeasure.md @@ -0,0 +1,13 @@ +# PopDatasetMeasureDefinitionPreviousPeriodMeasure + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure_identifier** | [**LocalIdentifier**](LocalIdentifier.md) | | +**date_datasets** | [**[PopDataset]**](PopDataset.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/PopDate.md b/gooddata-afm-client/docs/PopDate.md new file mode 100644 index 000000000..caecded35 --- /dev/null +++ b/gooddata-afm-client/docs/PopDate.md @@ -0,0 +1,13 @@ +# PopDate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute** | [**AfmObjectIdentifier**](AfmObjectIdentifier.md) | | +**periods_ago** | **int** | | +**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-afm-client/docs/PopDateMeasureDefinition.md b/gooddata-afm-client/docs/PopDateMeasureDefinition.md new file mode 100644 index 000000000..7678d0380 --- /dev/null +++ b/gooddata-afm-client/docs/PopDateMeasureDefinition.md @@ -0,0 +1,13 @@ +# PopDateMeasureDefinition + +Period over period type of measure. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**over_period_measure** | [**PopDateMeasureDefinitionOverPeriodMeasure**](PopDateMeasureDefinitionOverPeriodMeasure.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/PopDateMeasureDefinitionOverPeriodMeasure.md b/gooddata-afm-client/docs/PopDateMeasureDefinitionOverPeriodMeasure.md new file mode 100644 index 000000000..d3adccb28 --- /dev/null +++ b/gooddata-afm-client/docs/PopDateMeasureDefinitionOverPeriodMeasure.md @@ -0,0 +1,13 @@ +# PopDateMeasureDefinitionOverPeriodMeasure + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure_identifier** | [**LocalIdentifier**](LocalIdentifier.md) | | +**date_attributes** | [**[PopDate]**](PopDate.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/PositiveAttributeFilter.md b/gooddata-afm-client/docs/PositiveAttributeFilter.md new file mode 100644 index 000000000..8d193f97a --- /dev/null +++ b/gooddata-afm-client/docs/PositiveAttributeFilter.md @@ -0,0 +1,13 @@ +# PositiveAttributeFilter + +Filter able to limit element values by label and related selected elements. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**positive_attribute_filter** | [**PositiveAttributeFilterBody**](PositiveAttributeFilterBody.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/PositiveAttributeFilterBody.md b/gooddata-afm-client/docs/PositiveAttributeFilterBody.md new file mode 100644 index 000000000..ac8ebd061 --- /dev/null +++ b/gooddata-afm-client/docs/PositiveAttributeFilterBody.md @@ -0,0 +1,14 @@ +# PositiveAttributeFilterBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | [**Identifier**](Identifier.md) | | +**_in** | [**AttributeFilterElements**](AttributeFilterElements.md) | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [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-afm-client/docs/PositiveAttributeFilterBodyAllOf.md b/gooddata-afm-client/docs/PositiveAttributeFilterBodyAllOf.md new file mode 100644 index 000000000..ffdadd671 --- /dev/null +++ b/gooddata-afm-client/docs/PositiveAttributeFilterBodyAllOf.md @@ -0,0 +1,12 @@ +# PositiveAttributeFilterBodyAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_in** | [**AttributeFilterElements**](AttributeFilterElements.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/RangeMeasureValueFilter.md b/gooddata-afm-client/docs/RangeMeasureValueFilter.md new file mode 100644 index 000000000..a677036e9 --- /dev/null +++ b/gooddata-afm-client/docs/RangeMeasureValueFilter.md @@ -0,0 +1,13 @@ +# RangeMeasureValueFilter + +Filter the result by comparing specified measure to given range of values. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**range_measure_value_filter** | [**RangeMeasureValueFilterBody**](RangeMeasureValueFilterBody.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/RangeMeasureValueFilterBody.md b/gooddata-afm-client/docs/RangeMeasureValueFilterBody.md new file mode 100644 index 000000000..74db9832f --- /dev/null +++ b/gooddata-afm-client/docs/RangeMeasureValueFilterBody.md @@ -0,0 +1,18 @@ +# RangeMeasureValueFilterBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure** | [**Identifier**](Identifier.md) | | +**operator** | **str** | | +**_from** | **float** | | +**to** | **float** | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [optional] +**dimensionality** | [**[Identifier]**](Identifier.md) | | [optional] +**treat_null_values_as** | **float** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/RangeMeasureValueFilterBodyAllOf.md b/gooddata-afm-client/docs/RangeMeasureValueFilterBodyAllOf.md new file mode 100644 index 000000000..c2f18d0e8 --- /dev/null +++ b/gooddata-afm-client/docs/RangeMeasureValueFilterBodyAllOf.md @@ -0,0 +1,14 @@ +# RangeMeasureValueFilterBodyAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operator** | **str** | | +**_from** | **float** | | +**to** | **float** | | +**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-afm-client/docs/RankingFilter.md b/gooddata-afm-client/docs/RankingFilter.md new file mode 100644 index 000000000..a70c4702d --- /dev/null +++ b/gooddata-afm-client/docs/RankingFilter.md @@ -0,0 +1,13 @@ +# RankingFilter + +Filter the result on top/bottom N values according to given measure(s). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ranking_filter** | [**RankingFilterBody**](RankingFilterBody.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/RankingFilterBody.md b/gooddata-afm-client/docs/RankingFilterBody.md new file mode 100644 index 000000000..e4ce7ed8b --- /dev/null +++ b/gooddata-afm-client/docs/RankingFilterBody.md @@ -0,0 +1,16 @@ +# RankingFilterBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measures** | [**[Identifier]**](Identifier.md) | | +**operator** | **str** | | +**value** | **int** | | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [optional] +**dimensionality** | [**[Identifier]**](Identifier.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-afm-client/docs/RankingFilterBodyAllOf.md b/gooddata-afm-client/docs/RankingFilterBodyAllOf.md new file mode 100644 index 000000000..d0686846e --- /dev/null +++ b/gooddata-afm-client/docs/RankingFilterBodyAllOf.md @@ -0,0 +1,14 @@ +# RankingFilterBodyAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measures** | [**[Identifier]**](Identifier.md) | | +**operator** | **str** | | +**value** | **int** | | +**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-afm-client/docs/RelativeDateFilter.md b/gooddata-afm-client/docs/RelativeDateFilter.md new file mode 100644 index 000000000..810c48a4c --- /dev/null +++ b/gooddata-afm-client/docs/RelativeDateFilter.md @@ -0,0 +1,12 @@ +# RelativeDateFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**relative_date_filter** | [**RelativeDateFilterBody**](RelativeDateFilterBody.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/RelativeDateFilterBody.md b/gooddata-afm-client/docs/RelativeDateFilterBody.md new file mode 100644 index 000000000..b92188ed6 --- /dev/null +++ b/gooddata-afm-client/docs/RelativeDateFilterBody.md @@ -0,0 +1,16 @@ +# RelativeDateFilterBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dataset** | [**AfmObjectIdentifier**](AfmObjectIdentifier.md) | | +**granularity** | **str** | Date granularity specifying particular date attribute in given dimension. | +**_from** | **int** | Start of the filtering interval. Specified by number of periods (with respect to given granularity). Typically negative (historical time interval like -2 for '2 days/weeks, ... ago'). | +**to** | **int** | End of the filtering interval. Specified by number of periods (with respect to given granularity). Value 'O' is representing current time-interval (current day, week, ...). | +**apply_on_result** | **bool** | Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used. | [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-afm-client/docs/RelativeDateFilterBodyAllOf.md b/gooddata-afm-client/docs/RelativeDateFilterBodyAllOf.md new file mode 100644 index 000000000..c9d033a6d --- /dev/null +++ b/gooddata-afm-client/docs/RelativeDateFilterBodyAllOf.md @@ -0,0 +1,15 @@ +# RelativeDateFilterBodyAllOf + +A date filter specifying a time interval that is relative to the current date. For example, last week, next month, and so on. Field dataset is representing qualifier of date dimension. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**granularity** | **str** | Date granularity specifying particular date attribute in given dimension. | +**_from** | **int** | Start of the filtering interval. Specified by number of periods (with respect to given granularity). Typically negative (historical time interval like -2 for '2 days/weeks, ... ago'). | +**to** | **int** | End of the filtering interval. Specified by number of periods (with respect to given granularity). Value 'O' is representing current time-interval (current day, week, ...). | +**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-afm-client/docs/ResultControllerApi.md b/gooddata-afm-client/docs/ResultControllerApi.md new file mode 100644 index 000000000..cb5330c10 --- /dev/null +++ b/gooddata-afm-client/docs/ResultControllerApi.md @@ -0,0 +1,97 @@ +# gooddata_afm_client.ResultControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**retrieve_result**](ResultControllerApi.md#retrieve_result) | **GET** /api/actions/workspaces/{workspaceId}/execution/afm/execute/result/{resultId} | Get a single execution result + + +# **retrieve_result** +> ExecutionResult retrieve_result(workspace_id, result_id) + +Get a single execution result + +Gets a single execution result. + +### Example + +```python +import time +import gooddata_afm_client +from gooddata_afm_client.api import result_controller_api +from gooddata_afm_client.model.execution_result import ExecutionResult +from gooddata_afm_client.model.error_message import ErrorMessage +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_afm_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_afm_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = result_controller_api.ResultControllerApi(api_client) + workspace_id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | Workspace identifier + result_id = "a9b28f9dc55f37ea9f4a5fb0c76895923591e781" # str | Result ID + offset = [ + offset=1,10, + ] # [int] | Request page with these offsets. Format is offset=1,2,3,... - one offset for each dimensions in ResultSpec from originating AFM. (optional) if omitted the server will use the default value of [] + limit = [ + limit=1,10, + ] # [int] | Return only this number of items. Format is limit=1,2,3,... - one limit for each dimensions in ResultSpec from originating AFM. (optional) if omitted the server will use the default value of [] + + # example passing only required values which don't have defaults set + try: + # Get a single execution result + api_response = api_instance.retrieve_result(workspace_id, result_id) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling ResultControllerApi->retrieve_result: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Get a single execution result + api_response = api_instance.retrieve_result(workspace_id, result_id, offset=offset, limit=limit) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling ResultControllerApi->retrieve_result: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| Workspace identifier | + **result_id** | **str**| Result ID | + **offset** | **[int]**| Request page with these offsets. Format is offset=1,2,3,... - one offset for each dimensions in ResultSpec from originating AFM. | [optional] if omitted the server will use the default value of [] + **limit** | **[int]**| Return only this number of items. Format is limit=1,2,3,... - one limit for each dimensions in ResultSpec from originating AFM. | [optional] if omitted the server will use the default value of [] + +### Return type + +[**ExecutionResult**](ExecutionResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Execution result was found and returned. | - | +**400** | Limit and/or offset query parameters (paging) were invalid. | - | +**404** | Execution result was not found. | - | +**500** | The result processing has failed unexpectedly. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-afm-client/docs/ResultDimension.md b/gooddata-afm-client/docs/ResultDimension.md new file mode 100644 index 000000000..8965fc679 --- /dev/null +++ b/gooddata-afm-client/docs/ResultDimension.md @@ -0,0 +1,12 @@ +# ResultDimension + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**headers** | **[dict]** | | +**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-afm-client/docs/ResultSpec.md b/gooddata-afm-client/docs/ResultSpec.md new file mode 100644 index 000000000..d5eb2f9ef --- /dev/null +++ b/gooddata-afm-client/docs/ResultSpec.md @@ -0,0 +1,14 @@ +# ResultSpec + +Specifies how the result data will formatted (```dimensions```) and which additional data shall be computed (```grandTotals```). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensions** | [**[Dimension]**](Dimension.md) | | +**grand_totals** | [**[GrandTotal]**](GrandTotal.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-afm-client/docs/SimpleMeasureDefinition.md b/gooddata-afm-client/docs/SimpleMeasureDefinition.md new file mode 100644 index 000000000..a7d9c7c9c --- /dev/null +++ b/gooddata-afm-client/docs/SimpleMeasureDefinition.md @@ -0,0 +1,12 @@ +# SimpleMeasureDefinition + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measure** | [**SimpleMeasureDefinitionMeasure**](SimpleMeasureDefinitionMeasure.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/SimpleMeasureDefinitionMeasure.md b/gooddata-afm-client/docs/SimpleMeasureDefinitionMeasure.md new file mode 100644 index 000000000..69e7cc09e --- /dev/null +++ b/gooddata-afm-client/docs/SimpleMeasureDefinitionMeasure.md @@ -0,0 +1,15 @@ +# SimpleMeasureDefinitionMeasure + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**item** | [**AfmObjectIdentifier**](AfmObjectIdentifier.md) | | +**aggregation** | **str** | Definition of aggregation type of the measure. | [optional] +**compute_ratio** | **bool** | If true compute the percentage of given measure values (broken down by AFM attributes) to the total (not broken down). | [optional] if omitted the server will use the default value of False +**filters** | [**[FilterDefinitionForSimpleMeasure]**](FilterDefinitionForSimpleMeasure.md) | Measure can be filtered by attribute filters with the same interface as ones for global AFM. Note that only one DateFilter is allowed. | [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-afm-client/docs/SortDirection.md b/gooddata-afm-client/docs/SortDirection.md new file mode 100644 index 000000000..3e4abf16d --- /dev/null +++ b/gooddata-afm-client/docs/SortDirection.md @@ -0,0 +1,13 @@ +# SortDirection + +Sorting elements - ascending/descending order. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Sorting elements - ascending/descending order. | must be one of ["ASC", "DESC", ] +**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-afm-client/docs/SortKeyAttribute.md b/gooddata-afm-client/docs/SortKeyAttribute.md new file mode 100644 index 000000000..b063eec36 --- /dev/null +++ b/gooddata-afm-client/docs/SortKeyAttribute.md @@ -0,0 +1,13 @@ +# SortKeyAttribute + +Sorting rule for sorting by attribute value in current dimension. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute** | [**SortKeyAttributeAttribute**](SortKeyAttributeAttribute.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/SortKeyAttributeAttribute.md b/gooddata-afm-client/docs/SortKeyAttributeAttribute.md new file mode 100644 index 000000000..160b229cf --- /dev/null +++ b/gooddata-afm-client/docs/SortKeyAttributeAttribute.md @@ -0,0 +1,13 @@ +# SortKeyAttributeAttribute + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute_identifier** | **str** | One of the 'Dimension.itemIdentifiers' referencing the attribute which should be used for sorting the dimension.s | +**direction** | [**SortDirection**](SortDirection.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-afm-client/docs/SortKeyValue.md b/gooddata-afm-client/docs/SortKeyValue.md new file mode 100644 index 000000000..1ad8d9263 --- /dev/null +++ b/gooddata-afm-client/docs/SortKeyValue.md @@ -0,0 +1,12 @@ +# SortKeyValue + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**SortKeyValueValue**](SortKeyValueValue.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-afm-client/docs/SortKeyValueValue.md b/gooddata-afm-client/docs/SortKeyValueValue.md new file mode 100644 index 000000000..6f685850f --- /dev/null +++ b/gooddata-afm-client/docs/SortKeyValueValue.md @@ -0,0 +1,13 @@ +# SortKeyValueValue + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_column_locators** | [**{str: (DataColumnLocator,)}**](DataColumnLocator.md) | Mapping from dimensions to data column locators. Locators for each dimension opposite to the sorted one must be specified. | +**direction** | [**SortDirection**](SortDirection.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-afm-client/docs/TotalFunction.md b/gooddata-afm-client/docs/TotalFunction.md new file mode 100644 index 000000000..feeb4bdae --- /dev/null +++ b/gooddata-afm-client/docs/TotalFunction.md @@ -0,0 +1,13 @@ +# TotalFunction + +Sorting elements - ascending/descending order. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Sorting elements - ascending/descending order. | must be one of ["SUM", "MIN", "MAX", "AVG", "MED", ] +**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-afm-client/docs/ValidObjectsControllerApi.md b/gooddata-afm-client/docs/ValidObjectsControllerApi.md new file mode 100644 index 000000000..1905c8d7f --- /dev/null +++ b/gooddata-afm-client/docs/ValidObjectsControllerApi.md @@ -0,0 +1,109 @@ +# gooddata_afm_client.ValidObjectsControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**compute_valid_objects**](ValidObjectsControllerApi.md#compute_valid_objects) | **POST** /api/actions/workspaces/{workspaceId}/execution/afm/computeValidObjects | Valid objects + + +# **compute_valid_objects** +> AfmValidObjectsResponse compute_valid_objects(workspace_id, afm_valid_objects_query) + +Valid objects + +Returns list containing attributes, facts, or measures, which can be added to given AFM while still keeping it computable. + +### Example + +```python +import time +import gooddata_afm_client +from gooddata_afm_client.api import valid_objects_controller_api +from gooddata_afm_client.model.afm_valid_objects_query import AfmValidObjectsQuery +from gooddata_afm_client.model.afm_valid_objects_response import AfmValidObjectsResponse +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_afm_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_afm_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = valid_objects_controller_api.ValidObjectsControllerApi(api_client) + workspace_id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | Workspace identifier + afm_valid_objects_query = AfmValidObjectsQuery( + types=[ + "facts", + ], + afm=AFM( + attributes=[ + AttributeItem( + local_identifier="2", + label=AfmObjectIdentifier( + identifier=ObjectIdentifier( + id="sample_item.price", + type="fact", + ), + ), + ), + ], + filters=[ + FilterDefinition(), + ], + measures=[ + MeasureItem( + local_identifier="sampleAutoGenerated0123_ID", + definition=MeasureDefinition(), + ), + ], + aux_measures=[ + MeasureItem( + local_identifier="sampleAutoGenerated0123_ID", + definition=MeasureDefinition(), + ), + ], + ), + ) # AfmValidObjectsQuery | + + # example passing only required values which don't have defaults set + try: + # Valid objects + api_response = api_instance.compute_valid_objects(workspace_id, afm_valid_objects_query) + pprint(api_response) + except gooddata_afm_client.ApiException as e: + print("Exception when calling ValidObjectsControllerApi->compute_valid_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| Workspace identifier | + **afm_valid_objects_query** | [**AfmValidObjectsQuery**](AfmValidObjectsQuery.md)| | + +### Return type + +[**AfmValidObjectsResponse**](AfmValidObjectsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of attributes, facts and measures valid with respect to given AFM. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-afm-client/gooddata_afm_client/__init__.py b/gooddata-afm-client/gooddata_afm_client/__init__.py new file mode 100644 index 000000000..f4e15f872 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/__init__.py @@ -0,0 +1,27 @@ +# flake8: noqa + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +__version__ = "1.0.0" + +# import ApiClient +from gooddata_afm_client.api_client import ApiClient + +# import Configuration +from gooddata_afm_client.configuration import Configuration + +# import exceptions +from gooddata_afm_client.exceptions import OpenApiException +from gooddata_afm_client.exceptions import ApiAttributeError +from gooddata_afm_client.exceptions import ApiTypeError +from gooddata_afm_client.exceptions import ApiValueError +from gooddata_afm_client.exceptions import ApiKeyError +from gooddata_afm_client.exceptions import ApiException diff --git a/gooddata-afm-client/gooddata_afm_client/api/__init__.py b/gooddata-afm-client/gooddata_afm_client/api/__init__.py new file mode 100644 index 000000000..638c7c370 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/api/__init__.py @@ -0,0 +1,3 @@ +# do not import all apis into this module because that uses a lot of memory and stack frames +# if you need the ability to import all apis from one package, import them with +# from gooddata_afm_client.apis import AfmControllerApi diff --git a/gooddata-afm-client/gooddata_afm_client/api/afm_controller_api.py b/gooddata-afm-client/gooddata_afm_client/api/afm_controller_api.py new file mode 100644 index 000000000..2ac3ea499 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/api/afm_controller_api.py @@ -0,0 +1,185 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_afm_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_afm_client.model.afm_execution import AfmExecution +from gooddata_afm_client.model.afm_execution_response import AfmExecutionResponse + + +class AfmControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __compute_report( + self, + workspace_id, + afm_execution, + **kwargs + ): + """Executes analytical request and returns link to the result # noqa: E501 + + AFM is a combination of attributes, measures and filters that describe a query you want to execute. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.compute_report(workspace_id, afm_execution, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): Workspace identifier + afm_execution (AfmExecution): + + Keyword Args: + skip_cache (bool): Ignore all caches during execution of current request.. [optional] if omitted the server will use the default value of False + timestamp (str): [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AfmExecutionResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['afm_execution'] = \ + afm_execution + return self.call_with_http_info(**kwargs) + + self.compute_report = _Endpoint( + settings={ + 'response_type': (AfmExecutionResponse,), + 'auth': [], + 'endpoint_path': '/api/actions/workspaces/{workspaceId}/execution/afm/execute', + 'operation_id': 'compute_report', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'afm_execution', + 'skip_cache', + 'timestamp', + ], + 'required': [ + 'workspace_id', + 'afm_execution', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'workspace_id', + ] + }, + root_map={ + 'validations': { + ('workspace_id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'afm_execution': + (AfmExecution,), + 'skip_cache': + (bool,), + 'timestamp': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'skip_cache': 'skip-cache', + 'timestamp': 'timestamp', + }, + 'location_map': { + 'workspace_id': 'path', + 'afm_execution': 'body', + 'skip_cache': 'header', + 'timestamp': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__compute_report + ) diff --git a/gooddata-afm-client/gooddata_afm_client/api/afm_explain_controller_api.py b/gooddata-afm-client/gooddata_afm_client/api/afm_explain_controller_api.py new file mode 100644 index 000000000..42ec6c7d3 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/api/afm_explain_controller_api.py @@ -0,0 +1,178 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_afm_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_afm_client.model.afm_execution import AfmExecution + + +class AfmExplainControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __explain_afm( + self, + workspace_id, + afm_execution, + **kwargs + ): + """AFM explain resource. # noqa: E501 + + The resource provides static structures needed for investigation of a problem with given AFM. The structures are MAQL (internal form of AFM), and logical and physical models (LDM and PDM) of corresponding workspace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.explain_afm(workspace_id, afm_execution, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): Workspace identifier + afm_execution (AfmExecution): + + Keyword Args: + explain_type (str): Requested explain type (LDM, PDM or MAQL). If not specified all types are bundled in a ZIP archive.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + file_type + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['afm_execution'] = \ + afm_execution + return self.call_with_http_info(**kwargs) + + self.explain_afm = _Endpoint( + settings={ + 'response_type': (file_type,), + 'auth': [], + 'endpoint_path': '/api/actions/workspaces/{workspaceId}/execution/afm/explain', + 'operation_id': 'explain_afm', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'afm_execution', + 'explain_type', + ], + 'required': [ + 'workspace_id', + 'afm_execution', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'workspace_id', + ] + }, + root_map={ + 'validations': { + ('workspace_id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'afm_execution': + (AfmExecution,), + 'explain_type': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'explain_type': 'explainType', + }, + 'location_map': { + 'workspace_id': 'path', + 'afm_execution': 'body', + 'explain_type': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/zip' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__explain_afm + ) diff --git a/gooddata-afm-client/gooddata_afm_client/api/elements_controller_api.py b/gooddata-afm-client/gooddata_afm_client/api/elements_controller_api.py new file mode 100644 index 000000000..fb5a44945 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/api/elements_controller_api.py @@ -0,0 +1,231 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_afm_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_afm_client.model.elements_response import ElementsResponse + + +class ElementsControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __compute_label_elements( + self, + workspace_id, + label, + **kwargs + ): + """Listing of label values. # noqa: E501 + + Returns paged list of elements (values) of given label satisfying given filtering criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.compute_label_elements(workspace_id, label, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): Workspace identifier + label (str): Requested label. + + Keyword Args: + sort_order (str): Sort order of returned items. Items are sorted by ```label``` title.. [optional] if omitted the server will use the default value of "ASC" + include_total_without_filters (bool): Specify if ```totalCountWithoutFilters``` should be returned.. [optional] if omitted the server will use the default value of False + complement_filter (bool): Inverse filter: * ```false``` - return items matching ```patternFilter``` * ```true``` - return items not matching ```patternFilter```. [optional] if omitted the server will use the default value of False + pattern_filter (str): Return only items, whose ```label``` title case insensitively contains ```filter``` as substring.. [optional] + offset (int): Request page with this offset.. [optional] if omitted the server will use the default value of 0 + limit (int): Return only this number of items.. [optional] if omitted the server will use the default value of 1000 + data_sampling_percentage (float): Specifies the percentage of rows from fact datasets to use during computation. This feature is available only for workspaces that use a Vertica Data Source without table views.. [optional] + skip_cache (bool): Ignore all caches during execution of current request.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ElementsResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['label'] = \ + label + return self.call_with_http_info(**kwargs) + + self.compute_label_elements = _Endpoint( + settings={ + 'response_type': (ElementsResponse,), + 'auth': [], + 'endpoint_path': '/api/actions/workspaces/{workspaceId}/execution/collectLabelElements', + 'operation_id': 'compute_label_elements', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'label', + 'sort_order', + 'include_total_without_filters', + 'complement_filter', + 'pattern_filter', + 'offset', + 'limit', + 'data_sampling_percentage', + 'skip_cache', + ], + 'required': [ + 'workspace_id', + 'label', + ], + 'nullable': [ + ], + 'enum': [ + 'sort_order', + ], + 'validation': [ + 'workspace_id', + 'data_sampling_percentage', + ] + }, + root_map={ + 'validations': { + ('workspace_id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + ('data_sampling_percentage',): { + + 'exclusive_maximum': 100, + 'exclusive_minimum': 0, + }, + }, + 'allowed_values': { + ('sort_order',): { + + "ASC": "ASC", + "DESC": "DESC" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'label': + (str,), + 'sort_order': + (str,), + 'include_total_without_filters': + (bool,), + 'complement_filter': + (bool,), + 'pattern_filter': + (str,), + 'offset': + (int,), + 'limit': + (int,), + 'data_sampling_percentage': + (float,), + 'skip_cache': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'label': 'label', + 'sort_order': 'sortOrder', + 'include_total_without_filters': 'includeTotalWithoutFilters', + 'complement_filter': 'complementFilter', + 'pattern_filter': 'patternFilter', + 'offset': 'offset', + 'limit': 'limit', + 'data_sampling_percentage': 'dataSamplingPercentage', + 'skip_cache': 'skip-cache', + }, + 'location_map': { + 'workspace_id': 'path', + 'label': 'query', + 'sort_order': 'query', + 'include_total_without_filters': 'query', + 'complement_filter': 'query', + 'pattern_filter': 'query', + 'offset': 'query', + 'limit': 'query', + 'data_sampling_percentage': 'query', + 'skip_cache': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__compute_label_elements + ) diff --git a/gooddata-afm-client/gooddata_afm_client/api/result_controller_api.py b/gooddata-afm-client/gooddata_afm_client/api/result_controller_api.py new file mode 100644 index 000000000..a8943e924 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/api/result_controller_api.py @@ -0,0 +1,186 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_afm_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_afm_client.model.error_message import ErrorMessage +from gooddata_afm_client.model.execution_result import ExecutionResult + + +class ResultControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __retrieve_result( + self, + workspace_id, + result_id, + **kwargs + ): + """Get a single execution result # noqa: E501 + + Gets a single execution result. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.retrieve_result(workspace_id, result_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): Workspace identifier + result_id (str): Result ID + + Keyword Args: + offset ([int]): Request page with these offsets. Format is offset=1,2,3,... - one offset for each dimensions in ResultSpec from originating AFM.. [optional] if omitted the server will use the default value of [] + limit ([int]): Return only this number of items. Format is limit=1,2,3,... - one limit for each dimensions in ResultSpec from originating AFM.. [optional] if omitted the server will use the default value of [] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + ExecutionResult + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['result_id'] = \ + result_id + return self.call_with_http_info(**kwargs) + + self.retrieve_result = _Endpoint( + settings={ + 'response_type': (ExecutionResult,), + 'auth': [], + 'endpoint_path': '/api/actions/workspaces/{workspaceId}/execution/afm/execute/result/{resultId}', + 'operation_id': 'retrieve_result', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'result_id', + 'offset', + 'limit', + ], + 'required': [ + 'workspace_id', + 'result_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'workspace_id', + ] + }, + root_map={ + 'validations': { + ('workspace_id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'result_id': + (str,), + 'offset': + ([int],), + 'limit': + ([int],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'result_id': 'resultId', + 'offset': 'offset', + 'limit': 'limit', + }, + 'location_map': { + 'workspace_id': 'path', + 'result_id': 'path', + 'offset': 'query', + 'limit': 'query', + }, + 'collection_format_map': { + 'offset': 'csv', + 'limit': 'csv', + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__retrieve_result + ) diff --git a/gooddata-afm-client/gooddata_afm_client/api/valid_objects_controller_api.py b/gooddata-afm-client/gooddata_afm_client/api/valid_objects_controller_api.py new file mode 100644 index 000000000..5f42973ac --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/api/valid_objects_controller_api.py @@ -0,0 +1,173 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_afm_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_afm_client.model.afm_valid_objects_query import AfmValidObjectsQuery +from gooddata_afm_client.model.afm_valid_objects_response import AfmValidObjectsResponse + + +class ValidObjectsControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __compute_valid_objects( + self, + workspace_id, + afm_valid_objects_query, + **kwargs + ): + """Valid objects # noqa: E501 + + Returns list containing attributes, facts, or measures, which can be added to given AFM while still keeping it computable. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.compute_valid_objects(workspace_id, afm_valid_objects_query, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): Workspace identifier + afm_valid_objects_query (AfmValidObjectsQuery): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + AfmValidObjectsResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['afm_valid_objects_query'] = \ + afm_valid_objects_query + return self.call_with_http_info(**kwargs) + + self.compute_valid_objects = _Endpoint( + settings={ + 'response_type': (AfmValidObjectsResponse,), + 'auth': [], + 'endpoint_path': '/api/actions/workspaces/{workspaceId}/execution/afm/computeValidObjects', + 'operation_id': 'compute_valid_objects', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'afm_valid_objects_query', + ], + 'required': [ + 'workspace_id', + 'afm_valid_objects_query', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'workspace_id', + ] + }, + root_map={ + 'validations': { + ('workspace_id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'afm_valid_objects_query': + (AfmValidObjectsQuery,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + }, + 'location_map': { + 'workspace_id': 'path', + 'afm_valid_objects_query': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__compute_valid_objects + ) diff --git a/gooddata-afm-client/gooddata_afm_client/api_client.py b/gooddata-afm-client/gooddata_afm_client/api_client.py new file mode 100644 index 000000000..f91913b96 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/api_client.py @@ -0,0 +1,849 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import json +import atexit +import mimetypes +from multiprocessing.pool import ThreadPool +import io +import os +import re +import typing +from urllib.parse import quote +from urllib3.fields import RequestField + + +from gooddata_afm_client import rest +from gooddata_afm_client.configuration import Configuration +from gooddata_afm_client.exceptions import ApiTypeError, ApiValueError, ApiException +from gooddata_afm_client.model_utils import ( + ModelNormal, + ModelSimple, + ModelComposed, + check_allowed_values, + check_validations, + date, + datetime, + deserialize_file, + file_type, + model_to_dict, + none_type, + validate_and_convert_types +) + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + if configuration is None: + configuration = Configuration.get_default_copy() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None + ): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + if header_params['Content-Type'].startswith("multipart"): + post_params = self.parameters_to_multipart(post_params, + (dict) ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # auth setting + self.update_params_for_auth(header_params, query_params, + auth_settings, resource_path, method, body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = response_data + + if not _preload_content: + return (return_data) + return return_data + + # deserialize response data + if response_type: + if response_type != (file_type,): + encoding = "utf-8" + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + if match: + encoding = match.group(1) + response_data.data = response_data.data.decode(encoding) + + return_data = self.deserialize( + response_data, + response_type, + _check_type + ) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def parameters_to_multipart(self, params, collection_types): + """Get parameters as list of tuples, formatting as json if value is collection_types + + :param params: Parameters as list of two-tuples + :param dict collection_types: Parameter collection types + :return: Parameters as list of tuple or urllib3.fields.RequestField + """ + new_params = [] + if collection_types is None: + collection_types = (dict) + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json + v = json.dumps(v, ensure_ascii=False).encode("utf-8") + field = RequestField(k, v) + field.make_multipart(content_type="application/json; charset=utf-8") + new_params.append(field) + else: + new_params.append((k, v)) + return new_params + + @classmethod + def sanitize_for_serialization(cls, obj): + """Prepares data for transmission before it is sent with the rest client + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + If obj is io.IOBase, return the bytes + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if isinstance(obj, (ModelNormal, ModelComposed)): + return { + key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() + } + elif isinstance(obj, io.IOBase): + return cls.get_file_data_and_close_file(obj) + elif isinstance(obj, (str, int, float, none_type, bool)): + return obj + elif isinstance(obj, (datetime, date)): + return obj.isoformat() + elif isinstance(obj, ModelSimple): + return cls.sanitize_for_serialization(obj.value) + elif isinstance(obj, (list, tuple)): + return [cls.sanitize_for_serialization(item) for item in obj] + if isinstance(obj, dict): + return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} + raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + def deserialize(self, response, response_type, _check_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param _check_type: boolean, whether to check the types of the data + received from the server + :type _check_type: bool + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == (file_type,): + content_disposition = response.getheader("Content-Disposition") + return deserialize_file(response.data, self.configuration, + content_disposition=content_disposition) + + # fetch data from response object + try: + received_data = json.loads(response.data) + except ValueError: + received_data = response.data + + # store our data under the key of 'received_data' so users have some + # context if they are deserializing a string and the data type is wrong + deserialized_data = validate_and_convert_types( + received_data, + response_type, + ['received_data'], + True, + _check_type, + configuration=self.configuration + ) + return deserialized_data + + def call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + async_req: typing.Optional[bool] = None, + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None + ): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param files: key -> field name, value -> a list of open file + objects for `multipart/form-data`. + :type files: dict + :param async_req bool: execute request asynchronously + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :type collection_formats: dict, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _check_type: boolean describing if the data back from the server + should have its type checked. + :type _check_type: bool, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _check_type) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _check_type)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + @staticmethod + def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: + file_data = file_instance.read() + file_instance.close() + return file_data + + def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None): + """Builds form parameters. + + :param files: None or a dict with key=param_name and + value is a list of open file objects + :return: List of tuples of form parameters with file data + """ + if files is None: + return [] + + params = [] + for param_name, file_instances in files.items(): + if file_instances is None: + # if the file field is nullable, skip None values + continue + for file_instance in file_instances: + if file_instance is None: + # if the file field is nullable, skip None values + continue + if file_instance.closed is True: + raise ApiValueError( + "Cannot read a closed file. The passed in file_type " + "for %s must be open." % param_name + ) + filename = os.path.basename(file_instance.name) + filedata = self.get_file_data_and_close_file(file_instance) + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([param_name, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings, + resource_path, method, body): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + +class Endpoint(object): + def __init__(self, settings=None, params_map=None, root_map=None, + headers_map=None, api_client=None, callable=None): + """Creates an endpoint + + Args: + settings (dict): see below key value pairs + 'response_type' (tuple/None): response type + 'auth' (list): a list of auth type keys + 'endpoint_path' (str): the endpoint path + 'operation_id' (str): endpoint string identifier + 'http_method' (str): POST/PUT/PATCH/GET etc + 'servers' (list): list of str servers that this endpoint is at + params_map (dict): see below key value pairs + 'all' (list): list of str endpoint parameter names + 'required' (list): list of required parameter names + 'nullable' (list): list of nullable parameter names + 'enum' (list): list of parameters with enum values + 'validation' (list): list of parameters with validations + root_map + 'validations' (dict): the dict mapping endpoint parameter tuple + paths to their validation dictionaries + 'allowed_values' (dict): the dict mapping endpoint parameter + tuple paths to their allowed_values (enum) dictionaries + 'openapi_types' (dict): param_name to openapi type + 'attribute_map' (dict): param_name to camelCase name + 'location_map' (dict): param_name to 'body', 'file', 'form', + 'header', 'path', 'query' + collection_format_map (dict): param_name to `csv` etc. + headers_map (dict): see below key value pairs + 'accept' (list): list of Accept header strings + 'content_type' (list): list of Content-Type header strings + api_client (ApiClient) api client instance + callable (function): the function which is invoked when the + Endpoint is called + """ + self.settings = settings + self.params_map = params_map + self.params_map['all'].extend([ + 'async_req', + '_host_index', + '_preload_content', + '_request_timeout', + '_return_http_data_only', + '_check_input_type', + '_check_return_type' + ]) + self.params_map['nullable'].extend(['_request_timeout']) + self.validations = root_map['validations'] + self.allowed_values = root_map['allowed_values'] + self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (none_type, int), + '_preload_content': (bool,), + '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) + self.attribute_map = root_map['attribute_map'] + self.location_map = root_map['location_map'] + self.collection_format_map = root_map['collection_format_map'] + self.headers_map = headers_map + self.api_client = api_client + self.callable = callable + + def __validate_inputs(self, kwargs): + for param in self.params_map['enum']: + if param in kwargs: + check_allowed_values( + self.allowed_values, + (param,), + kwargs[param] + ) + + for param in self.params_map['validation']: + if param in kwargs: + check_validations( + self.validations, + (param,), + kwargs[param], + configuration=self.api_client.configuration + ) + + if kwargs['_check_input_type'] is False: + return + + for key, value in kwargs.items(): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + + def __gather_params(self, kwargs): + params = { + 'body': None, + 'collection_format': {}, + 'file': {}, + 'form': [], + 'header': {}, + 'path': {}, + 'query': [] + } + + for param_name, param_value in kwargs.items(): + param_location = self.location_map.get(param_name) + if param_location is None: + continue + if param_location: + if param_location == 'body': + params['body'] = param_value + continue + base_name = self.attribute_map[param_name] + if (param_location == 'form' and + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value + elif param_location in {'form', 'query'}: + param_value_full = (base_name, param_value) + params[param_location].append(param_value_full) + if param_location not in {'form', 'query'}: + params[param_location][base_name] = param_value + collection_format = self.collection_format_map.get(param_name) + if collection_format: + params['collection_format'][base_name] = collection_format + + return params + + def __call__(self, *args, **kwargs): + """ This method is invoked when endpoints are called + Example: + + api_instance = AfmControllerApi() + api_instance.compute_report # this is an instance of the class Endpoint + api_instance.compute_report() # this invokes api_instance.compute_report.__call__() + which then invokes the callable functions stored in that endpoint at + api_instance.compute_report.callable or self.callable in this class + + """ + return self.callable(self, *args, **kwargs) + + def call_with_http_info(self, **kwargs): + + try: + index = self.api_client.configuration.server_operation_index.get( + self.settings['operation_id'], self.api_client.configuration.server_index + ) if kwargs['_host_index'] is None else kwargs['_host_index'] + server_variables = self.api_client.configuration.server_operation_variables.get( + self.settings['operation_id'], self.api_client.configuration.server_variables + ) + _host = self.api_client.configuration.get_host_from_settings( + index, variables=server_variables, servers=self.settings['servers'] + ) + except IndexError: + if self.settings['servers']: + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(self.settings['servers']) + ) + _host = None + + for key, value in kwargs.items(): + if key not in self.params_map['all']: + raise ApiTypeError( + "Got an unexpected parameter '%s'" + " to method `%s`" % + (key, self.settings['operation_id']) + ) + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): + raise ApiValueError( + "Value may not be None for non-nullable parameter `%s`" + " when calling `%s`" % + (key, self.settings['operation_id']) + ) + + for key in self.params_map['required']: + if key not in kwargs.keys(): + raise ApiValueError( + "Missing the required parameter `%s` when calling " + "`%s`" % (key, self.settings['operation_id']) + ) + + self.__validate_inputs(kwargs) + + params = self.__gather_params(kwargs) + + accept_headers_list = self.headers_map['accept'] + if accept_headers_list: + params['header']['Accept'] = self.api_client.select_header_accept( + accept_headers_list) + + content_type_headers_list = self.headers_map['content_type'] + if content_type_headers_list: + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list + + return self.api_client.call_api( + self.settings['endpoint_path'], self.settings['http_method'], + params['path'], + params['query'], + params['header'], + body=params['body'], + post_params=params['form'], + files=params['file'], + response_type=self.settings['response_type'], + auth_settings=self.settings['auth'], + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], + _host=_host, + collection_formats=params['collection_format']) diff --git a/gooddata-afm-client/gooddata_afm_client/apis/__init__.py b/gooddata-afm-client/gooddata_afm_client/apis/__init__.py new file mode 100644 index 000000000..8a41c56cb --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/apis/__init__.py @@ -0,0 +1,21 @@ + +# flake8: noqa + +# Import all APIs into this package. +# If you have many APIs here with many many models used in each API this may +# raise a `RecursionError`. +# In order to avoid this, import only the API that you directly need like: +# +# from .api.afm_controller_api import AfmControllerApi +# +# or import this package, but before doing it, use: +# +# import sys +# sys.setrecursionlimit(n) + +# Import APIs into API package: +from gooddata_afm_client.api.afm_controller_api import AfmControllerApi +from gooddata_afm_client.api.afm_explain_controller_api import AfmExplainControllerApi +from gooddata_afm_client.api.elements_controller_api import ElementsControllerApi +from gooddata_afm_client.api.result_controller_api import ResultControllerApi +from gooddata_afm_client.api.valid_objects_controller_api import ValidObjectsControllerApi diff --git a/gooddata-afm-client/gooddata_afm_client/configuration.py b/gooddata-afm-client/gooddata_afm_client/configuration.py new file mode 100644 index 000000000..b34ee9eb2 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/configuration.py @@ -0,0 +1,443 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +from http import client as http_client +from gooddata_afm_client.exceptions import ApiValueError + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format + + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + access_token=None, + username=None, password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://staging.anywhere.gooddata.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.access_token = access_token + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.disabled_client_side_validations = disabled_client_side_validations + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("gooddata_afm_client") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + self._disabled_client_side_validations = s + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: v0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://staging.anywhere.gooddata.com", + 'description': "GoodData.CN endpoint", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/gooddata-afm-client/gooddata_afm_client/exceptions.py b/gooddata-afm-client/gooddata_afm_client/exceptions.py new file mode 100644 index 000000000..b2ac2507e --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/exceptions.py @@ -0,0 +1,159 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/gooddata-afm-client/gooddata_afm_client/model/__init__.py b/gooddata-afm-client/gooddata_afm_client/model/__init__.py new file mode 100644 index 000000000..cfe32b784 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from {{packageName}.models import ModelA, ModelB diff --git a/gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter.py b/gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter.py new file mode 100644 index 000000000..d6de430b4 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.absolute_date_filter_body import AbsoluteDateFilterBody + globals()['AbsoluteDateFilterBody'] = AbsoluteDateFilterBody + + +class AbsoluteDateFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'absolute_date_filter': (AbsoluteDateFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'absolute_date_filter': 'absoluteDateFilter', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, absolute_date_filter, *args, **kwargs): # noqa: E501 + """AbsoluteDateFilter - a model defined in OpenAPI + + Args: + absolute_date_filter (AbsoluteDateFilterBody): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.absolute_date_filter = absolute_date_filter + 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, absolute_date_filter, *args, **kwargs): # noqa: E501 + """AbsoluteDateFilter - a model defined in OpenAPI + + Args: + absolute_date_filter (AbsoluteDateFilterBody): + + 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: + 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.absolute_date_filter = absolute_date_filter + 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-afm-client/gooddata_afm_client/model/absolute_date_filter_body.py b/gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter_body.py new file mode 100644 index 000000000..0b27d054b --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter_body.py @@ -0,0 +1,328 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.absolute_date_filter_body_all_of import AbsoluteDateFilterBodyAllOf + from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier + from gooddata_afm_client.model.common_date_filter import CommonDateFilter + globals()['AbsoluteDateFilterBodyAllOf'] = AbsoluteDateFilterBodyAllOf + globals()['AfmObjectIdentifier'] = AfmObjectIdentifier + globals()['CommonDateFilter'] = CommonDateFilter + + +class AbsoluteDateFilterBody(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 { + 'dataset': (AfmObjectIdentifier,), # noqa: E501 + '_from': (date,), # noqa: E501 + 'to': (date,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dataset': 'dataset', # noqa: E501 + '_from': 'from', # noqa: E501 + 'to': 'to', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AbsoluteDateFilterBody - a model defined in OpenAPI + + Keyword Args: + dataset (AfmObjectIdentifier): + _from (date): + to (date): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 + """AbsoluteDateFilterBody - a model defined in OpenAPI + + Keyword Args: + dataset (AfmObjectIdentifier): + _from (date): + to (date): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 beause 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': [ + AbsoluteDateFilterBodyAllOf, + CommonDateFilter, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter_body_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter_body_all_of.py new file mode 100644 index 000000000..e8fa93e66 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/absolute_date_filter_body_all_of.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class AbsoluteDateFilterBodyAllOf(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': (date,), # noqa: E501 + 'to': (date,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_from': 'from', # noqa: E501 + 'to': 'to', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, _from, to, *args, **kwargs): # noqa: E501 + """AbsoluteDateFilterBodyAllOf - a model defined in OpenAPI + + Args: + _from (date): + to (date): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self._from = _from + self.to = to + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, _from, to, *args, **kwargs): # noqa: E501 + """AbsoluteDateFilterBodyAllOf - a model defined in OpenAPI + + Args: + _from (date): + to (date): + + 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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self._from = _from + self.to = to + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-afm-client/gooddata_afm_client/model/abstract_measure_value_filter.py b/gooddata-afm-client/gooddata_afm_client/model/abstract_measure_value_filter.py new file mode 100644 index 000000000..d496ec1c1 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/abstract_measure_value_filter.py @@ -0,0 +1,320 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.abstract_measure_value_filter_all_of import AbstractMeasureValueFilterAllOf + from gooddata_afm_client.model.common_filter import CommonFilter + from gooddata_afm_client.model.identifier import Identifier + globals()['AbstractMeasureValueFilterAllOf'] = AbstractMeasureValueFilterAllOf + globals()['CommonFilter'] = CommonFilter + globals()['Identifier'] = Identifier + + +class AbstractMeasureValueFilter(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 { + 'apply_on_result': (bool,), # noqa: E501 + 'dimensionality': ([Identifier],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'apply_on_result': 'applyOnResult', # noqa: E501 + 'dimensionality': 'dimensionality', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AbstractMeasureValueFilter - 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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [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: + 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 + """AbstractMeasureValueFilter - 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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [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: + 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 beause 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': [ + AbstractMeasureValueFilterAllOf, + CommonFilter, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/abstract_measure_value_filter_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/abstract_measure_value_filter_all_of.py new file mode 100644 index 000000000..24334d873 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/abstract_measure_value_filter_all_of.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.identifier import Identifier + globals()['Identifier'] = Identifier + + +class AbstractMeasureValueFilterAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dimensionality': ([Identifier],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dimensionality': 'dimensionality', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AbstractMeasureValueFilterAllOf - 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,) + dimensionality ([Identifier]): [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: + 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 + """AbstractMeasureValueFilterAllOf - 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,) + dimensionality ([Identifier]): [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: + 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-afm-client/gooddata_afm_client/model/afm.py b/gooddata-afm-client/gooddata_afm_client/model/afm.py new file mode 100644 index 000000000..5885a3ec4 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/afm.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.attribute_item import AttributeItem + from gooddata_afm_client.model.filter_definition import FilterDefinition + from gooddata_afm_client.model.measure_item import MeasureItem + globals()['AttributeItem'] = AttributeItem + globals()['FilterDefinition'] = FilterDefinition + globals()['MeasureItem'] = MeasureItem + + +class AFM(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attributes': ([AttributeItem],), # noqa: E501 + 'filters': ([FilterDefinition],), # noqa: E501 + 'measures': ([MeasureItem],), # noqa: E501 + 'aux_measures': ([MeasureItem],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attributes': 'attributes', # noqa: E501 + 'filters': 'filters', # noqa: E501 + 'measures': 'measures', # noqa: E501 + 'aux_measures': 'auxMeasures', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, attributes, filters, measures, *args, **kwargs): # noqa: E501 + """AFM - a model defined in OpenAPI + + Args: + attributes ([AttributeItem]): + filters ([FilterDefinition]): Various filter types to filter execution result. + measures ([MeasureItem]): Measures to be computed. + + 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,) + aux_measures ([MeasureItem]): Measures to be referenced from other AFM objects (e.g. filters) but not included in the result.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.attributes = attributes + self.filters = filters + self.measures = measures + 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, attributes, filters, measures, *args, **kwargs): # noqa: E501 + """AFM - a model defined in OpenAPI + + Args: + attributes ([AttributeItem]): + filters ([FilterDefinition]): Various filter types to filter execution result. + measures ([MeasureItem]): Measures to be computed. + + 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,) + aux_measures ([MeasureItem]): Measures to be referenced from other AFM objects (e.g. filters) but not included in the result.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.attributes = attributes + self.filters = filters + self.measures = measures + 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-afm-client/gooddata_afm_client/model/afm_execution.py b/gooddata-afm-client/gooddata_afm_client/model/afm_execution.py new file mode 100644 index 000000000..aa65e66ec --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/afm_execution.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm import AFM + from gooddata_afm_client.model.execution_settings import ExecutionSettings + from gooddata_afm_client.model.result_spec import ResultSpec + globals()['AFM'] = AFM + globals()['ExecutionSettings'] = ExecutionSettings + globals()['ResultSpec'] = ResultSpec + + +class AfmExecution(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'execution': (AFM,), # noqa: E501 + 'result_spec': (ResultSpec,), # noqa: E501 + 'settings': (ExecutionSettings,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'execution': 'execution', # noqa: E501 + 'result_spec': 'resultSpec', # noqa: E501 + 'settings': 'settings', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, execution, result_spec, *args, **kwargs): # noqa: E501 + """AfmExecution - a model defined in OpenAPI + + Args: + execution (AFM): + result_spec (ResultSpec): + + 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,) + settings (ExecutionSettings): [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: + 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.execution = execution + self.result_spec = result_spec + 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, execution, result_spec, *args, **kwargs): # noqa: E501 + """AfmExecution - a model defined in OpenAPI + + Args: + execution (AFM): + result_spec (ResultSpec): + + 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,) + settings (ExecutionSettings): [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: + 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.execution = execution + self.result_spec = result_spec + 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-afm-client/gooddata_afm_client/model/afm_execution_response.py b/gooddata-afm-client/gooddata_afm_client/model/afm_execution_response.py new file mode 100644 index 000000000..de09e0971 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/afm_execution_response.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.execution_response import ExecutionResponse + globals()['ExecutionResponse'] = ExecutionResponse + + +class AfmExecutionResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'execution_response': (ExecutionResponse,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'execution_response': 'executionResponse', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, execution_response, *args, **kwargs): # noqa: E501 + """AfmExecutionResponse - a model defined in OpenAPI + + Args: + execution_response (ExecutionResponse): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.execution_response = execution_response + 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, execution_response, *args, **kwargs): # noqa: E501 + """AfmExecutionResponse - a model defined in OpenAPI + + Args: + execution_response (ExecutionResponse): + + 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: + 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.execution_response = execution_response + 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-afm-client/gooddata_afm_client/model/afm_object_identifier.py b/gooddata-afm-client/gooddata_afm_client/model/afm_object_identifier.py new file mode 100644 index 000000000..d668f780c --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/afm_object_identifier.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.object_identifier import ObjectIdentifier + globals()['ObjectIdentifier'] = ObjectIdentifier + + +class AfmObjectIdentifier(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'identifier': (ObjectIdentifier,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'identifier': 'identifier', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, identifier, *args, **kwargs): # noqa: E501 + """AfmObjectIdentifier - a model defined in OpenAPI + + Args: + identifier (ObjectIdentifier): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.identifier = identifier + 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, identifier, *args, **kwargs): # noqa: E501 + """AfmObjectIdentifier - a model defined in OpenAPI + + Args: + identifier (ObjectIdentifier): + + 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: + 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.identifier = identifier + 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-afm-client/gooddata_afm_client/model/afm_valid_objects_query.py b/gooddata-afm-client/gooddata_afm_client/model/afm_valid_objects_query.py new file mode 100644 index 000000000..0431260b6 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/afm_valid_objects_query.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm import AFM + globals()['AFM'] = AFM + + +class AfmValidObjectsQuery(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 = { + ('types',): { + 'FACTS': "facts", + 'ATTRIBUTES': "attributes", + 'MEASURES': "measures", + 'UNRECOGNIZED': "UNRECOGNIZED", + }, + } + + validations = { + ('types',): { + }, + } + + @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 { + 'types': ([str],), # noqa: E501 + 'afm': (AFM,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'types': 'types', # noqa: E501 + 'afm': 'afm', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, types, afm, *args, **kwargs): # noqa: E501 + """AfmValidObjectsQuery - a model defined in OpenAPI + + Args: + types ([str]): + afm (AFM): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.types = types + self.afm = afm + 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, types, afm, *args, **kwargs): # noqa: E501 + """AfmValidObjectsQuery - a model defined in OpenAPI + + Args: + types ([str]): + afm (AFM): + + 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: + 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.types = types + self.afm = afm + 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-afm-client/gooddata_afm_client/model/afm_valid_objects_response.py b/gooddata-afm-client/gooddata_afm_client/model/afm_valid_objects_response.py new file mode 100644 index 000000000..fc05c951a --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/afm_valid_objects_response.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.object_identifier import ObjectIdentifier + globals()['ObjectIdentifier'] = ObjectIdentifier + + +class AfmValidObjectsResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'items': ([ObjectIdentifier],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'items': 'items', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, items, *args, **kwargs): # noqa: E501 + """AfmValidObjectsResponse - a model defined in OpenAPI + + Args: + items ([ObjectIdentifier]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.items = items + 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, items, *args, **kwargs): # noqa: E501 + """AfmValidObjectsResponse - a model defined in OpenAPI + + Args: + items ([ObjectIdentifier]): + + 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: + 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.items = items + 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-afm-client/gooddata_afm_client/model/arithmetic_measure_definition.py b/gooddata-afm-client/gooddata_afm_client/model/arithmetic_measure_definition.py new file mode 100644 index 000000000..1acfe10aa --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/arithmetic_measure_definition.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.arithmetic_measure_definition_arithmetic_measure import ArithmeticMeasureDefinitionArithmeticMeasure + globals()['ArithmeticMeasureDefinitionArithmeticMeasure'] = ArithmeticMeasureDefinitionArithmeticMeasure + + +class ArithmeticMeasureDefinition(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'arithmetic_measure': (ArithmeticMeasureDefinitionArithmeticMeasure,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'arithmetic_measure': 'arithmeticMeasure', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, arithmetic_measure, *args, **kwargs): # noqa: E501 + """ArithmeticMeasureDefinition - a model defined in OpenAPI + + Args: + arithmetic_measure (ArithmeticMeasureDefinitionArithmeticMeasure): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.arithmetic_measure = arithmetic_measure + 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, arithmetic_measure, *args, **kwargs): # noqa: E501 + """ArithmeticMeasureDefinition - a model defined in OpenAPI + + Args: + arithmetic_measure (ArithmeticMeasureDefinitionArithmeticMeasure): + + 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: + 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.arithmetic_measure = arithmetic_measure + 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-afm-client/gooddata_afm_client/model/arithmetic_measure_definition_arithmetic_measure.py b/gooddata-afm-client/gooddata_afm_client/model/arithmetic_measure_definition_arithmetic_measure.py new file mode 100644 index 000000000..20be71174 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/arithmetic_measure_definition_arithmetic_measure.py @@ -0,0 +1,280 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.local_identifier import LocalIdentifier + globals()['LocalIdentifier'] = LocalIdentifier + + +class ArithmeticMeasureDefinitionArithmeticMeasure(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 = { + ('operator',): { + 'SUM': "SUM", + 'DIFFERENCE': "DIFFERENCE", + 'MULTIPLICATION': "MULTIPLICATION", + 'RATIO': "RATIO", + 'CHANGE': "CHANGE", + }, + } + + 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 { + 'measure_identifiers': ([LocalIdentifier],), # noqa: E501 + 'operator': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure_identifiers': 'measureIdentifiers', # noqa: E501 + 'operator': 'operator', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, measure_identifiers, operator, *args, **kwargs): # noqa: E501 + """ArithmeticMeasureDefinitionArithmeticMeasure - a model defined in OpenAPI + + Args: + measure_identifiers ([LocalIdentifier]): List of measures to apply arithmetic operation by chosen operator. + operator (str): Arithmetic operator describing operation between measures. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.measure_identifiers = measure_identifiers + self.operator = operator + 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, measure_identifiers, operator, *args, **kwargs): # noqa: E501 + """ArithmeticMeasureDefinitionArithmeticMeasure - a model defined in OpenAPI + + Args: + measure_identifiers ([LocalIdentifier]): List of measures to apply arithmetic operation by chosen operator. + operator (str): Arithmetic operator describing operation between measures. + + 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: + 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.measure_identifiers = measure_identifiers + self.operator = operator + 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-afm-client/gooddata_afm_client/model/attribute_execution_result_header.py b/gooddata-afm-client/gooddata_afm_client/model/attribute_execution_result_header.py new file mode 100644 index 000000000..e679bb574 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/attribute_execution_result_header.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.attribute_result_header import AttributeResultHeader + globals()['AttributeResultHeader'] = AttributeResultHeader + + +class AttributeExecutionResultHeader(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attribute_header': (AttributeResultHeader,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attribute_header': 'attributeHeader', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, attribute_header, *args, **kwargs): # noqa: E501 + """AttributeExecutionResultHeader - a model defined in OpenAPI + + Args: + attribute_header (AttributeResultHeader): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.attribute_header = attribute_header + 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, attribute_header, *args, **kwargs): # noqa: E501 + """AttributeExecutionResultHeader - a model defined in OpenAPI + + Args: + attribute_header (AttributeResultHeader): + + 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: + 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.attribute_header = attribute_header + 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-afm-client/gooddata_afm_client/model/attribute_filter.py b/gooddata-afm-client/gooddata_afm_client/model/attribute_filter.py new file mode 100644 index 000000000..2cdebe9a2 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/attribute_filter.py @@ -0,0 +1,322 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.negative_attribute_filter import NegativeAttributeFilter + from gooddata_afm_client.model.negative_attribute_filter_body import NegativeAttributeFilterBody + from gooddata_afm_client.model.positive_attribute_filter import PositiveAttributeFilter + from gooddata_afm_client.model.positive_attribute_filter_body import PositiveAttributeFilterBody + globals()['NegativeAttributeFilter'] = NegativeAttributeFilter + globals()['NegativeAttributeFilterBody'] = NegativeAttributeFilterBody + globals()['PositiveAttributeFilter'] = PositiveAttributeFilter + globals()['PositiveAttributeFilterBody'] = PositiveAttributeFilterBody + + +class AttributeFilter(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 { + 'positive_attribute_filter': (PositiveAttributeFilterBody,), # noqa: E501 + 'negative_attribute_filter': (NegativeAttributeFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'positive_attribute_filter': 'positiveAttributeFilter', # noqa: E501 + 'negative_attribute_filter': 'negativeAttributeFilter', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AttributeFilter - 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,) + positive_attribute_filter (PositiveAttributeFilterBody): [optional] # noqa: E501 + negative_attribute_filter (NegativeAttributeFilterBody): [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: + 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 + """AttributeFilter - 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,) + positive_attribute_filter (PositiveAttributeFilterBody): [optional] # noqa: E501 + negative_attribute_filter (NegativeAttributeFilterBody): [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: + 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 beause 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': [ + NegativeAttributeFilter, + PositiveAttributeFilter, + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/attribute_filter_elements.py b/gooddata-afm-client/gooddata_afm_client/model/attribute_filter_elements.py new file mode 100644 index 000000000..9816abe3a --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/attribute_filter_elements.py @@ -0,0 +1,263 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class AttributeFilterElements(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 = { + ('values',): { + }, + } + + @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 { + 'values': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'values': 'values', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, values, *args, **kwargs): # noqa: E501 + """AttributeFilterElements - a model defined in OpenAPI + + Args: + values ([str]): Set of label values. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.values = values + 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, values, *args, **kwargs): # noqa: E501 + """AttributeFilterElements - a model defined in OpenAPI + + Args: + values ([str]): Set of label values. + + 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: + 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.values = values + 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-afm-client/gooddata_afm_client/model/attribute_header.py b/gooddata-afm-client/gooddata_afm_client/model/attribute_header.py new file mode 100644 index 000000000..6c7bb2276 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/attribute_header.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.attribute_header_attribute_header import AttributeHeaderAttributeHeader + globals()['AttributeHeaderAttributeHeader'] = AttributeHeaderAttributeHeader + + +class AttributeHeader(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attribute_header': (AttributeHeaderAttributeHeader,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attribute_header': 'attributeHeader', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, attribute_header, *args, **kwargs): # noqa: E501 + """AttributeHeader - a model defined in OpenAPI + + Args: + attribute_header (AttributeHeaderAttributeHeader): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.attribute_header = attribute_header + 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, attribute_header, *args, **kwargs): # noqa: E501 + """AttributeHeader - a model defined in OpenAPI + + Args: + attribute_header (AttributeHeaderAttributeHeader): + + 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: + 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.attribute_header = attribute_header + 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-afm-client/gooddata_afm_client/model/attribute_header_attribute_header.py b/gooddata-afm-client/gooddata_afm_client/model/attribute_header_attribute_header.py new file mode 100644 index 000000000..569dfbe5c --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/attribute_header_attribute_header.py @@ -0,0 +1,323 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.object_identifier import ObjectIdentifier + globals()['ObjectIdentifier'] = ObjectIdentifier + + +class AttributeHeaderAttributeHeader(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',): { + 'YEAR': "YEAR", + 'DAY': "DAY", + 'HOUR': "HOUR", + 'MINUTE': "MINUTE", + 'QUARTER': "QUARTER", + 'MONTH': "MONTH", + 'WEEK': "WEEK", + 'QUARTER_OF_YEAR': "QUARTER_OF_YEAR", + 'MONTH_OF_YEAR': "MONTH_OF_YEAR", + 'DAY_OF_YEAR': "DAY_OF_YEAR", + 'DAY_OF_WEEK': "DAY_OF_WEEK", + 'DAY_OF_MONTH': "DAY_OF_MONTH", + 'HOUR_OF_DAY': "HOUR_OF_DAY", + 'MINUTE_OF_HOUR': "MINUTE_OF_HOUR", + 'WEEK_OF_YEAR': "WEEK_OF_YEAR", + }, + } + + validations = { + ('local_identifier',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]+$', # noqa: E501 + }, + }, + } + + @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 { + 'local_identifier': (str,), # noqa: E501 + 'attribute': (ObjectIdentifier,), # noqa: E501 + 'attribute_name': (str,), # noqa: E501 + 'label': (ObjectIdentifier,), # noqa: E501 + 'label_name': (str,), # noqa: E501 + 'primary_label': (ObjectIdentifier,), # noqa: E501 + 'granularity': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'local_identifier': 'localIdentifier', # noqa: E501 + 'attribute': 'attribute', # noqa: E501 + 'attribute_name': 'attributeName', # noqa: E501 + 'label': 'label', # noqa: E501 + 'label_name': 'labelName', # noqa: E501 + 'primary_label': 'primaryLabel', # noqa: E501 + 'granularity': 'granularity', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, local_identifier, attribute, attribute_name, label, label_name, primary_label, *args, **kwargs): # noqa: E501 + """AttributeHeaderAttributeHeader - a model defined in OpenAPI + + Args: + local_identifier (str): + attribute (ObjectIdentifier): + attribute_name (str): + label (ObjectIdentifier): + label_name (str): + primary_label (ObjectIdentifier): + + 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,) + 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: + 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.local_identifier = local_identifier + self.attribute = attribute + self.attribute_name = attribute_name + self.label = label + self.label_name = label_name + self.primary_label = primary_label + 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, local_identifier, attribute, attribute_name, label, label_name, primary_label, *args, **kwargs): # noqa: E501 + """AttributeHeaderAttributeHeader - a model defined in OpenAPI + + Args: + local_identifier (str): + attribute (ObjectIdentifier): + attribute_name (str): + label (ObjectIdentifier): + label_name (str): + primary_label (ObjectIdentifier): + + 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,) + 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: + 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.local_identifier = local_identifier + self.attribute = attribute + self.attribute_name = attribute_name + self.label = label + self.label_name = label_name + self.primary_label = primary_label + 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-afm-client/gooddata_afm_client/model/attribute_item.py b/gooddata-afm-client/gooddata_afm_client/model/attribute_item.py new file mode 100644 index 000000000..2ded966bf --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/attribute_item.py @@ -0,0 +1,278 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier + globals()['AfmObjectIdentifier'] = AfmObjectIdentifier + + +class AttributeItem(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 = { + ('local_identifier',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]+$', # noqa: E501 + }, + }, + } + + @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 { + 'local_identifier': (str,), # noqa: E501 + 'label': (AfmObjectIdentifier,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'local_identifier': 'localIdentifier', # noqa: E501 + 'label': 'label', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, local_identifier, label, *args, **kwargs): # noqa: E501 + """AttributeItem - a model defined in OpenAPI + + Args: + local_identifier (str): + label (AfmObjectIdentifier): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.local_identifier = local_identifier + self.label = label + 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, local_identifier, label, *args, **kwargs): # noqa: E501 + """AttributeItem - a model defined in OpenAPI + + Args: + local_identifier (str): + label (AfmObjectIdentifier): + + 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: + 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.local_identifier = local_identifier + self.label = label + 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-afm-client/gooddata_afm_client/model/attribute_result_header.py b/gooddata-afm-client/gooddata_afm_client/model/attribute_result_header.py new file mode 100644 index 000000000..d4c57cd95 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/attribute_result_header.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class AttributeResultHeader(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 { + 'label_value': (str,), # noqa: E501 + 'primary_label_value': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'label_value': 'labelValue', # noqa: E501 + 'primary_label_value': 'primaryLabelValue', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, label_value, primary_label_value, *args, **kwargs): # noqa: E501 + """AttributeResultHeader - a model defined in OpenAPI + + Args: + label_value (str): A value of the current attribute label. + primary_label_value (str): A value of the primary attribute label. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.label_value = label_value + self.primary_label_value = primary_label_value + 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, label_value, primary_label_value, *args, **kwargs): # noqa: E501 + """AttributeResultHeader - a model defined in OpenAPI + + Args: + label_value (str): A value of the current attribute label. + primary_label_value (str): A value of the primary attribute label. + + 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: + 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.label_value = label_value + self.primary_label_value = primary_label_value + 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-afm-client/gooddata_afm_client/model/common_attribute_filter.py b/gooddata-afm-client/gooddata_afm_client/model/common_attribute_filter.py new file mode 100644 index 000000000..959d3954e --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/common_attribute_filter.py @@ -0,0 +1,320 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.common_attribute_filter_all_of import CommonAttributeFilterAllOf + from gooddata_afm_client.model.common_filter import CommonFilter + from gooddata_afm_client.model.identifier import Identifier + globals()['CommonAttributeFilterAllOf'] = CommonAttributeFilterAllOf + globals()['CommonFilter'] = CommonFilter + globals()['Identifier'] = Identifier + + +class CommonAttributeFilter(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 { + 'label': (Identifier,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'label': 'label', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CommonAttributeFilter - a model defined in OpenAPI + + Keyword Args: + label (Identifier): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 + """CommonAttributeFilter - a model defined in OpenAPI + + Keyword Args: + label (Identifier): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 beause 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': [ + CommonAttributeFilterAllOf, + CommonFilter, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/common_attribute_filter_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/common_attribute_filter_all_of.py new file mode 100644 index 000000000..e64d639e4 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/common_attribute_filter_all_of.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.identifier import Identifier + globals()['Identifier'] = Identifier + + +class CommonAttributeFilterAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'label': (Identifier,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'label': 'label', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 + """CommonAttributeFilterAllOf - a model defined in OpenAPI + + Args: + label (Identifier): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.label = label + 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, label, *args, **kwargs): # noqa: E501 + """CommonAttributeFilterAllOf - a model defined in OpenAPI + + Args: + label (Identifier): + + 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: + 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.label = label + 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-afm-client/gooddata_afm_client/model/common_date_filter.py b/gooddata-afm-client/gooddata_afm_client/model/common_date_filter.py new file mode 100644 index 000000000..719d16ab0 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/common_date_filter.py @@ -0,0 +1,320 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier + from gooddata_afm_client.model.common_date_filter_all_of import CommonDateFilterAllOf + from gooddata_afm_client.model.common_filter import CommonFilter + globals()['AfmObjectIdentifier'] = AfmObjectIdentifier + globals()['CommonDateFilterAllOf'] = CommonDateFilterAllOf + globals()['CommonFilter'] = CommonFilter + + +class CommonDateFilter(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 { + 'dataset': (AfmObjectIdentifier,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dataset': 'dataset', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CommonDateFilter - a model defined in OpenAPI + + Keyword Args: + dataset (AfmObjectIdentifier): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 + """CommonDateFilter - a model defined in OpenAPI + + Keyword Args: + dataset (AfmObjectIdentifier): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 beause 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': [ + CommonDateFilterAllOf, + CommonFilter, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/common_date_filter_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/common_date_filter_all_of.py new file mode 100644 index 000000000..92cc100f2 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/common_date_filter_all_of.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier + globals()['AfmObjectIdentifier'] = AfmObjectIdentifier + + +class CommonDateFilterAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dataset': (AfmObjectIdentifier,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dataset': 'dataset', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, dataset, *args, **kwargs): # noqa: E501 + """CommonDateFilterAllOf - a model defined in OpenAPI + + Args: + dataset (AfmObjectIdentifier): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.dataset = dataset + 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, dataset, *args, **kwargs): # noqa: E501 + """CommonDateFilterAllOf - a model defined in OpenAPI + + Args: + dataset (AfmObjectIdentifier): + + 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: + 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.dataset = dataset + 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-afm-client/gooddata_afm_client/model/common_filter.py b/gooddata-afm-client/gooddata_afm_client/model/common_filter.py new file mode 100644 index 000000000..e393c2e9a --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/common_filter.py @@ -0,0 +1,255 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class CommonFilter(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 { + 'apply_on_result': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'apply_on_result': 'applyOnResult', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CommonFilter - 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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 + """CommonFilter - 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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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-afm-client/gooddata_afm_client/model/common_measure_value_filter.py b/gooddata-afm-client/gooddata_afm_client/model/common_measure_value_filter.py new file mode 100644 index 000000000..6427d1e6f --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/common_measure_value_filter.py @@ -0,0 +1,328 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.abstract_measure_value_filter import AbstractMeasureValueFilter + from gooddata_afm_client.model.common_measure_value_filter_all_of import CommonMeasureValueFilterAllOf + from gooddata_afm_client.model.identifier import Identifier + globals()['AbstractMeasureValueFilter'] = AbstractMeasureValueFilter + globals()['CommonMeasureValueFilterAllOf'] = CommonMeasureValueFilterAllOf + globals()['Identifier'] = Identifier + + +class CommonMeasureValueFilter(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 { + 'measure': (Identifier,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + 'dimensionality': ([Identifier],), # noqa: E501 + 'treat_null_values_as': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure': 'measure', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + 'dimensionality': 'dimensionality', # noqa: E501 + 'treat_null_values_as': 'treatNullValuesAs', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CommonMeasureValueFilter - a model defined in OpenAPI + + Keyword Args: + measure (Identifier): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [optional] # noqa: E501 + treat_null_values_as (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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 + """CommonMeasureValueFilter - a model defined in OpenAPI + + Keyword Args: + measure (Identifier): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [optional] # noqa: E501 + treat_null_values_as (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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 beause 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': [ + AbstractMeasureValueFilter, + CommonMeasureValueFilterAllOf, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/common_measure_value_filter_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/common_measure_value_filter_all_of.py new file mode 100644 index 000000000..9b53d09eb --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/common_measure_value_filter_all_of.py @@ -0,0 +1,271 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.identifier import Identifier + globals()['Identifier'] = Identifier + + +class CommonMeasureValueFilterAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'measure': (Identifier,), # noqa: E501 + 'treat_null_values_as': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure': 'measure', # noqa: E501 + 'treat_null_values_as': 'treatNullValuesAs', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, measure, *args, **kwargs): # noqa: E501 + """CommonMeasureValueFilterAllOf - a model defined in OpenAPI + + Args: + measure (Identifier): + + 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,) + treat_null_values_as (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.measure = measure + 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, measure, *args, **kwargs): # noqa: E501 + """CommonMeasureValueFilterAllOf - a model defined in OpenAPI + + Args: + measure (Identifier): + + 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,) + treat_null_values_as (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.measure = measure + 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-afm-client/gooddata_afm_client/model/comparison_measure_value_filter.py b/gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter.py new file mode 100644 index 000000000..2693b2f1b --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.comparison_measure_value_filter_body import ComparisonMeasureValueFilterBody + globals()['ComparisonMeasureValueFilterBody'] = ComparisonMeasureValueFilterBody + + +class ComparisonMeasureValueFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'comparison_measure_value_filter': (ComparisonMeasureValueFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'comparison_measure_value_filter': 'comparisonMeasureValueFilter', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, comparison_measure_value_filter, *args, **kwargs): # noqa: E501 + """ComparisonMeasureValueFilter - a model defined in OpenAPI + + Args: + comparison_measure_value_filter (ComparisonMeasureValueFilterBody): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.comparison_measure_value_filter = comparison_measure_value_filter + 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, comparison_measure_value_filter, *args, **kwargs): # noqa: E501 + """ComparisonMeasureValueFilter - a model defined in OpenAPI + + Args: + comparison_measure_value_filter (ComparisonMeasureValueFilterBody): + + 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: + 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.comparison_measure_value_filter = comparison_measure_value_filter + 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-afm-client/gooddata_afm_client/model/comparison_measure_value_filter_body.py b/gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter_body.py new file mode 100644 index 000000000..85b1078f0 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter_body.py @@ -0,0 +1,344 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.common_measure_value_filter import CommonMeasureValueFilter + from gooddata_afm_client.model.comparison_measure_value_filter_body_all_of import ComparisonMeasureValueFilterBodyAllOf + from gooddata_afm_client.model.identifier import Identifier + globals()['CommonMeasureValueFilter'] = CommonMeasureValueFilter + globals()['ComparisonMeasureValueFilterBodyAllOf'] = ComparisonMeasureValueFilterBodyAllOf + globals()['Identifier'] = Identifier + + +class ComparisonMeasureValueFilterBody(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 = { + ('operator',): { + 'GREATER_THAN': "GREATER_THAN", + 'GREATER_THAN_OR_EQUAL_TO': "GREATER_THAN_OR_EQUAL_TO", + 'LESS_THAN': "LESS_THAN", + 'LESS_THAN_OR_EQUAL_TO': "LESS_THAN_OR_EQUAL_TO", + 'EQUAL_TO': "EQUAL_TO", + 'NOT_EQUAL_TO': "NOT_EQUAL_TO", + }, + } + + 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 { + 'measure': (Identifier,), # noqa: E501 + 'operator': (str,), # noqa: E501 + 'value': (float,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + 'dimensionality': ([Identifier],), # noqa: E501 + 'treat_null_values_as': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure': 'measure', # noqa: E501 + 'operator': 'operator', # noqa: E501 + 'value': 'value', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + 'dimensionality': 'dimensionality', # noqa: E501 + 'treat_null_values_as': 'treatNullValuesAs', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ComparisonMeasureValueFilterBody - a model defined in OpenAPI + + Keyword Args: + measure (Identifier): + operator (str): + value (float): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [optional] # noqa: E501 + treat_null_values_as (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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 + """ComparisonMeasureValueFilterBody - a model defined in OpenAPI + + Keyword Args: + measure (Identifier): + operator (str): + value (float): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [optional] # noqa: E501 + treat_null_values_as (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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 beause 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': [ + CommonMeasureValueFilter, + ComparisonMeasureValueFilterBodyAllOf, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter_body_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter_body_all_of.py new file mode 100644 index 000000000..86a2fe1ec --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/comparison_measure_value_filter_body_all_of.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class ComparisonMeasureValueFilterBodyAllOf(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 = { + ('operator',): { + 'GREATER_THAN': "GREATER_THAN", + 'GREATER_THAN_OR_EQUAL_TO': "GREATER_THAN_OR_EQUAL_TO", + 'LESS_THAN': "LESS_THAN", + 'LESS_THAN_OR_EQUAL_TO': "LESS_THAN_OR_EQUAL_TO", + 'EQUAL_TO': "EQUAL_TO", + 'NOT_EQUAL_TO': "NOT_EQUAL_TO", + }, + } + + 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 { + 'operator': (str,), # noqa: E501 + 'value': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'operator': 'operator', # noqa: E501 + 'value': 'value', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, operator, value, *args, **kwargs): # noqa: E501 + """ComparisonMeasureValueFilterBodyAllOf - a model defined in OpenAPI + + Args: + operator (str): + value (float): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.operator = operator + self.value = value + 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, operator, value, *args, **kwargs): # noqa: E501 + """ComparisonMeasureValueFilterBodyAllOf - a model defined in OpenAPI + + Args: + operator (str): + value (float): + + 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: + 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.operator = operator + self.value = value + 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-afm-client/gooddata_afm_client/model/data_column_locator.py b/gooddata-afm-client/gooddata_afm_client/model/data_column_locator.py new file mode 100644 index 000000000..9fc7302ee --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/data_column_locator.py @@ -0,0 +1,251 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class DataColumnLocator(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 (str,) # 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 + """DataColumnLocator - 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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 + """DataColumnLocator - 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: + 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-afm-client/gooddata_afm_client/model/date_filter.py b/gooddata-afm-client/gooddata_afm_client/model/date_filter.py new file mode 100644 index 000000000..511e9d407 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/date_filter.py @@ -0,0 +1,322 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.absolute_date_filter import AbsoluteDateFilter + from gooddata_afm_client.model.absolute_date_filter_body import AbsoluteDateFilterBody + from gooddata_afm_client.model.relative_date_filter import RelativeDateFilter + from gooddata_afm_client.model.relative_date_filter_body import RelativeDateFilterBody + globals()['AbsoluteDateFilter'] = AbsoluteDateFilter + globals()['AbsoluteDateFilterBody'] = AbsoluteDateFilterBody + globals()['RelativeDateFilter'] = RelativeDateFilter + globals()['RelativeDateFilterBody'] = RelativeDateFilterBody + + +class DateFilter(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 { + 'absolute_date_filter': (AbsoluteDateFilterBody,), # noqa: E501 + 'relative_date_filter': (RelativeDateFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'absolute_date_filter': 'absoluteDateFilter', # noqa: E501 + 'relative_date_filter': 'relativeDateFilter', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DateFilter - 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,) + absolute_date_filter (AbsoluteDateFilterBody): [optional] # noqa: E501 + relative_date_filter (RelativeDateFilterBody): [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: + 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 + """DateFilter - 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,) + absolute_date_filter (AbsoluteDateFilterBody): [optional] # noqa: E501 + relative_date_filter (RelativeDateFilterBody): [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: + 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 beause 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': [ + AbsoluteDateFilter, + RelativeDateFilter, + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/dimension.py b/gooddata-afm-client/gooddata_afm_client/model/dimension.py new file mode 100644 index 000000000..5278e4e05 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/dimension.py @@ -0,0 +1,274 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class Dimension(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 = { + ('local_identifier',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]+$', # noqa: E501 + }, + }, + } + + @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 { + 'item_identifiers': ([str],), # noqa: E501 + 'local_identifier': (str,), # noqa: E501 + 'sorting': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item_identifiers': 'itemIdentifiers', # noqa: E501 + 'local_identifier': 'localIdentifier', # noqa: E501 + 'sorting': 'sorting', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item_identifiers, *args, **kwargs): # noqa: E501 + """Dimension - a model defined in OpenAPI + + Args: + item_identifiers ([str]): List of items in current dimension. Can reference 'localIdentifier' from 'AttributeItem', or special pseudo attribute \"measureGroup\" representing list of measures. + + 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,) + local_identifier (str): Dimension identification within requests. Other entities can reference this dimension by this value.. [optional] # noqa: E501 + sorting ([dict]): List of sorting rules. From most relevant to least relevant (less relevant rule is applied, when more relevant rule compares items as equal).. [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: + 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.item_identifiers = item_identifiers + 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, item_identifiers, *args, **kwargs): # noqa: E501 + """Dimension - a model defined in OpenAPI + + Args: + item_identifiers ([str]): List of items in current dimension. Can reference 'localIdentifier' from 'AttributeItem', or special pseudo attribute \"measureGroup\" representing list of measures. + + 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,) + local_identifier (str): Dimension identification within requests. Other entities can reference this dimension by this value.. [optional] # noqa: E501 + sorting ([dict]): List of sorting rules. From most relevant to least relevant (less relevant rule is applied, when more relevant rule compares items as equal).. [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: + 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.item_identifiers = item_identifiers + 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-afm-client/gooddata_afm_client/model/dimension_header.py b/gooddata-afm-client/gooddata_afm_client/model/dimension_header.py new file mode 100644 index 000000000..b1a9e8926 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/dimension_header.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.header_group import HeaderGroup + globals()['HeaderGroup'] = HeaderGroup + + +class DimensionHeader(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'header_groups': ([HeaderGroup],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'header_groups': 'headerGroups', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, header_groups, *args, **kwargs): # noqa: E501 + """DimensionHeader - a model defined in OpenAPI + + Args: + header_groups ([HeaderGroup]): An array containing header groups. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.header_groups = header_groups + 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, header_groups, *args, **kwargs): # noqa: E501 + """DimensionHeader - a model defined in OpenAPI + + Args: + header_groups ([HeaderGroup]): An array containing header groups. + + 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: + 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.header_groups = header_groups + 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-afm-client/gooddata_afm_client/model/element.py b/gooddata-afm-client/gooddata_afm_client/model/element.py new file mode 100644 index 000000000..97a25b6c0 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/element.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class Element(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 { + 'primary_title': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'primary_title': 'primaryTitle', # noqa: E501 + 'title': 'title', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, primary_title, title, *args, **kwargs): # noqa: E501 + """Element - a model defined in OpenAPI + + Args: + primary_title (str): Title of primary label of attribute owning requested label. + title (str): Title of requested label. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.primary_title = primary_title + self.title = title + 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, primary_title, title, *args, **kwargs): # noqa: E501 + """Element - a model defined in OpenAPI + + Args: + primary_title (str): Title of primary label of attribute owning requested label. + title (str): Title of requested label. + + 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: + 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.primary_title = primary_title + self.title = title + 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-afm-client/gooddata_afm_client/model/elements_response.py b/gooddata-afm-client/gooddata_afm_client/model/elements_response.py new file mode 100644 index 000000000..524494908 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/elements_response.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.element import Element + from gooddata_afm_client.model.object_identifier import ObjectIdentifier + from gooddata_afm_client.model.paging import Paging + globals()['Element'] = Element + globals()['ObjectIdentifier'] = ObjectIdentifier + globals()['Paging'] = Paging + + +class ElementsResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'primary_label': (ObjectIdentifier,), # noqa: E501 + 'elements': ([Element],), # noqa: E501 + 'paging': (Paging,), # noqa: E501 + 'total_count_without_filters': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'primary_label': 'primaryLabel', # noqa: E501 + 'elements': 'elements', # noqa: E501 + 'paging': 'paging', # noqa: E501 + 'total_count_without_filters': 'totalCountWithoutFilters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, primary_label, elements, paging, *args, **kwargs): # noqa: E501 + """ElementsResponse - a model defined in OpenAPI + + Args: + primary_label (ObjectIdentifier): + elements ([Element]): List of returned elements. + paging (Paging): + + 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,) + total_count_without_filters (int): Total count of items ignoring all filters (using on ```project``` and ```label``` from request).. [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: + 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.primary_label = primary_label + self.elements = elements + self.paging = paging + 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, primary_label, elements, paging, *args, **kwargs): # noqa: E501 + """ElementsResponse - a model defined in OpenAPI + + Args: + primary_label (ObjectIdentifier): + elements ([Element]): List of returned elements. + paging (Paging): + + 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,) + total_count_without_filters (int): Total count of items ignoring all filters (using on ```project``` and ```label``` from request).. [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: + 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.primary_label = primary_label + self.elements = elements + self.paging = paging + 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-afm-client/gooddata_afm_client/model/error_message.py b/gooddata-afm-client/gooddata_afm_client/model/error_message.py new file mode 100644 index 000000000..340d3bd7f --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/error_message.py @@ -0,0 +1,285 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class ErrorMessage(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 { + 'timestamp': (str,), # noqa: E501 + 'status': (int,), # noqa: E501 + 'error': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 + 'path': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'timestamp': 'timestamp', # noqa: E501 + 'status': 'status', # noqa: E501 + 'error': 'error', # noqa: E501 + 'message': 'message', # noqa: E501 + 'path': 'path', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, timestamp, status, error, message, path, *args, **kwargs): # noqa: E501 + """ErrorMessage - a model defined in OpenAPI + + Args: + timestamp (str): Error timestamp in ISO 8601. + status (int): HTTP error response status code. + error (str): HTTP error message like: Bad Request, Not Found, etc. + message (str): Error message returned by the server application. + path (str): Path of the failed request. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.timestamp = timestamp + self.status = status + self.error = error + self.message = message + self.path = path + 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, timestamp, status, error, message, path, *args, **kwargs): # noqa: E501 + """ErrorMessage - a model defined in OpenAPI + + Args: + timestamp (str): Error timestamp in ISO 8601. + status (int): HTTP error response status code. + error (str): HTTP error message like: Bad Request, Not Found, etc. + message (str): Error message returned by the server application. + path (str): Path of the failed request. + + 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: + 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.timestamp = timestamp + self.status = status + self.error = error + self.message = message + self.path = path + 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-afm-client/gooddata_afm_client/model/execution_links.py b/gooddata-afm-client/gooddata_afm_client/model/execution_links.py new file mode 100644 index 000000000..f946fb162 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/execution_links.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class ExecutionLinks(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 { + 'execution_result': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'execution_result': 'executionResult', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, execution_result, *args, **kwargs): # noqa: E501 + """ExecutionLinks - a model defined in OpenAPI + + Args: + execution_result (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.execution_result = execution_result + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, execution_result, *args, **kwargs): # noqa: E501 + """ExecutionLinks - a model defined in OpenAPI + + Args: + execution_result (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.execution_result = execution_result + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-afm-client/gooddata_afm_client/model/execution_response.py b/gooddata-afm-client/gooddata_afm_client/model/execution_response.py new file mode 100644 index 000000000..c284fb065 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/execution_response.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.execution_links import ExecutionLinks + from gooddata_afm_client.model.result_dimension import ResultDimension + globals()['ExecutionLinks'] = ExecutionLinks + globals()['ResultDimension'] = ResultDimension + + +class ExecutionResponse(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dimensions': ([ResultDimension],), # noqa: E501 + 'links': (ExecutionLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dimensions': 'dimensions', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, dimensions, links, *args, **kwargs): # noqa: E501 + """ExecutionResponse - a model defined in OpenAPI + + Args: + dimensions ([ResultDimension]): + links (ExecutionLinks): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.dimensions = dimensions + self.links = links + 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, dimensions, links, *args, **kwargs): # noqa: E501 + """ExecutionResponse - a model defined in OpenAPI + + Args: + dimensions ([ResultDimension]): + links (ExecutionLinks): + + 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: + 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.dimensions = dimensions + self.links = links + 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-afm-client/gooddata_afm_client/model/execution_result.py b/gooddata-afm-client/gooddata_afm_client/model/execution_result.py new file mode 100644 index 000000000..98a302c2e --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/execution_result.py @@ -0,0 +1,289 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.dimension_header import DimensionHeader + from gooddata_afm_client.model.execution_result_grand_total import ExecutionResultGrandTotal + from gooddata_afm_client.model.execution_result_paging import ExecutionResultPaging + globals()['DimensionHeader'] = DimensionHeader + globals()['ExecutionResultGrandTotal'] = ExecutionResultGrandTotal + globals()['ExecutionResultPaging'] = ExecutionResultPaging + + +class ExecutionResult(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}],), # noqa: E501 + 'dimension_headers': ([DimensionHeader],), # noqa: E501 + 'grand_totals': ([ExecutionResultGrandTotal],), # noqa: E501 + 'paging': (ExecutionResultPaging,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'dimension_headers': 'dimensionHeaders', # noqa: E501 + 'grand_totals': 'grandTotals', # noqa: E501 + 'paging': 'paging', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, dimension_headers, grand_totals, paging, *args, **kwargs): # noqa: E501 + """ExecutionResult - a model defined in OpenAPI + + Args: + data ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]): A multi-dimensional array of computed results. The most common one being a 2-dimensional array. The arrays can be composed of Double or null values. + dimension_headers ([DimensionHeader]): An array containing dimension headers. The size of the array corresponds to dimension size. Their order corresponds to the dimension order in the execution result spec. + grand_totals ([ExecutionResultGrandTotal]): An array with grand totals data corresponding to grand totals definition in result spec. + paging (ExecutionResultPaging): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + self.dimension_headers = dimension_headers + self.grand_totals = grand_totals + self.paging = paging + 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, data, dimension_headers, grand_totals, paging, *args, **kwargs): # noqa: E501 + """ExecutionResult - a model defined in OpenAPI + + Args: + data ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]): A multi-dimensional array of computed results. The most common one being a 2-dimensional array. The arrays can be composed of Double or null values. + dimension_headers ([DimensionHeader]): An array containing dimension headers. The size of the array corresponds to dimension size. Their order corresponds to the dimension order in the execution result spec. + grand_totals ([ExecutionResultGrandTotal]): An array with grand totals data corresponding to grand totals definition in result spec. + paging (ExecutionResultPaging): + + 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: + 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.data = data + self.dimension_headers = dimension_headers + self.grand_totals = grand_totals + self.paging = paging + 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-afm-client/gooddata_afm_client/model/execution_result_grand_total.py b/gooddata-afm-client/gooddata_afm_client/model/execution_result_grand_total.py new file mode 100644 index 000000000..43ad15342 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/execution_result_grand_total.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class ExecutionResultGrandTotal(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 { + 'data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'local_identifier': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'local_identifier': 'localIdentifier', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, local_identifier, *args, **kwargs): # noqa: E501 + """ExecutionResultGrandTotal - a model defined in OpenAPI + + Args: + data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + local_identifier (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + self.local_identifier = local_identifier + 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, data, local_identifier, *args, **kwargs): # noqa: E501 + """ExecutionResultGrandTotal - a model defined in OpenAPI + + Args: + data ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): + local_identifier (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.data = data + self.local_identifier = local_identifier + 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-afm-client/gooddata_afm_client/model/execution_result_header.py b/gooddata-afm-client/gooddata_afm_client/model/execution_result_header.py new file mode 100644 index 000000000..c9f7e01c8 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/execution_result_header.py @@ -0,0 +1,322 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.attribute_execution_result_header import AttributeExecutionResultHeader + from gooddata_afm_client.model.attribute_result_header import AttributeResultHeader + from gooddata_afm_client.model.measure_execution_result_header import MeasureExecutionResultHeader + from gooddata_afm_client.model.measure_result_header import MeasureResultHeader + globals()['AttributeExecutionResultHeader'] = AttributeExecutionResultHeader + globals()['AttributeResultHeader'] = AttributeResultHeader + globals()['MeasureExecutionResultHeader'] = MeasureExecutionResultHeader + globals()['MeasureResultHeader'] = MeasureResultHeader + + +class ExecutionResultHeader(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 { + 'attribute_header': (AttributeResultHeader,), # noqa: E501 + 'measure_header': (MeasureResultHeader,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attribute_header': 'attributeHeader', # noqa: E501 + 'measure_header': 'measureHeader', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ExecutionResultHeader - 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,) + attribute_header (AttributeResultHeader): [optional] # noqa: E501 + measure_header (MeasureResultHeader): [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: + 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 + """ExecutionResultHeader - 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,) + attribute_header (AttributeResultHeader): [optional] # noqa: E501 + measure_header (MeasureResultHeader): [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: + 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 beause 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': [ + AttributeExecutionResultHeader, + MeasureExecutionResultHeader, + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/execution_result_paging.py b/gooddata-afm-client/gooddata_afm_client/model/execution_result_paging.py new file mode 100644 index 000000000..0ec2d66ac --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/execution_result_paging.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class ExecutionResultPaging(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 { + 'count': ([int],), # noqa: E501 + 'offset': ([int],), # noqa: E501 + 'total': ([int],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'count': 'count', # noqa: E501 + 'offset': 'offset', # noqa: E501 + 'total': 'total', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, count, offset, total, *args, **kwargs): # noqa: E501 + """ExecutionResultPaging - a model defined in OpenAPI + + Args: + count ([int]): A count of the returned results in every dimension. + offset ([int]): The offset of the results returned in every dimension. + total ([int]): A total count of the results in every dimension. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.count = count + self.offset = offset + self.total = total + 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, count, offset, total, *args, **kwargs): # noqa: E501 + """ExecutionResultPaging - a model defined in OpenAPI + + Args: + count ([int]): A count of the returned results in every dimension. + offset ([int]): The offset of the results returned in every dimension. + total ([int]): A total count of the results in every dimension. + + 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: + 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.count = count + self.offset = offset + self.total = total + 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-afm-client/gooddata_afm_client/model/execution_settings.py b/gooddata-afm-client/gooddata_afm_client/model/execution_settings.py new file mode 100644 index 000000000..050760835 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/execution_settings.py @@ -0,0 +1,259 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class ExecutionSettings(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 = { + ('data_sampling_percentage',): { + 'exclusive_maximum''inclusive_maximum': 100, + 'exclusive_minimum''inclusive_minimum': 0, + }, + } + + @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 { + 'data_sampling_percentage': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data_sampling_percentage': 'dataSamplingPercentage', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ExecutionSettings - 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,) + data_sampling_percentage (float): Specifies the percentage of rows from fact datasets to use during computation. This feature is available only for workspaces that use a Vertica Data Source without table views.. [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: + 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 + """ExecutionSettings - 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,) + data_sampling_percentage (float): Specifies the percentage of rows from fact datasets to use during computation. This feature is available only for workspaces that use a Vertica Data Source without table views.. [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: + 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-afm-client/gooddata_afm_client/model/filter_definition.py b/gooddata-afm-client/gooddata_afm_client/model/filter_definition.py new file mode 100644 index 000000000..8ddf13187 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/filter_definition.py @@ -0,0 +1,367 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.absolute_date_filter_body import AbsoluteDateFilterBody + from gooddata_afm_client.model.attribute_filter import AttributeFilter + from gooddata_afm_client.model.comparison_measure_value_filter_body import ComparisonMeasureValueFilterBody + from gooddata_afm_client.model.date_filter import DateFilter + from gooddata_afm_client.model.inline_filter_definition import InlineFilterDefinition + from gooddata_afm_client.model.inline_filter_definition_body import InlineFilterDefinitionBody + from gooddata_afm_client.model.measure_value_filter import MeasureValueFilter + from gooddata_afm_client.model.negative_attribute_filter_body import NegativeAttributeFilterBody + from gooddata_afm_client.model.positive_attribute_filter_body import PositiveAttributeFilterBody + from gooddata_afm_client.model.range_measure_value_filter_body import RangeMeasureValueFilterBody + from gooddata_afm_client.model.ranking_filter import RankingFilter + from gooddata_afm_client.model.ranking_filter_body import RankingFilterBody + from gooddata_afm_client.model.relative_date_filter_body import RelativeDateFilterBody + globals()['AbsoluteDateFilterBody'] = AbsoluteDateFilterBody + globals()['AttributeFilter'] = AttributeFilter + globals()['ComparisonMeasureValueFilterBody'] = ComparisonMeasureValueFilterBody + globals()['DateFilter'] = DateFilter + globals()['InlineFilterDefinition'] = InlineFilterDefinition + globals()['InlineFilterDefinitionBody'] = InlineFilterDefinitionBody + globals()['MeasureValueFilter'] = MeasureValueFilter + globals()['NegativeAttributeFilterBody'] = NegativeAttributeFilterBody + globals()['PositiveAttributeFilterBody'] = PositiveAttributeFilterBody + globals()['RangeMeasureValueFilterBody'] = RangeMeasureValueFilterBody + globals()['RankingFilter'] = RankingFilter + globals()['RankingFilterBody'] = RankingFilterBody + globals()['RelativeDateFilterBody'] = RelativeDateFilterBody + + +class FilterDefinition(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 { + 'positive_attribute_filter': (PositiveAttributeFilterBody,), # noqa: E501 + 'negative_attribute_filter': (NegativeAttributeFilterBody,), # noqa: E501 + 'comparison_measure_value_filter': (ComparisonMeasureValueFilterBody,), # noqa: E501 + 'range_measure_value_filter': (RangeMeasureValueFilterBody,), # noqa: E501 + 'ranking_filter': (RankingFilterBody,), # noqa: E501 + 'absolute_date_filter': (AbsoluteDateFilterBody,), # noqa: E501 + 'relative_date_filter': (RelativeDateFilterBody,), # noqa: E501 + 'inline': (InlineFilterDefinitionBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'positive_attribute_filter': 'positiveAttributeFilter', # noqa: E501 + 'negative_attribute_filter': 'negativeAttributeFilter', # noqa: E501 + 'comparison_measure_value_filter': 'comparisonMeasureValueFilter', # noqa: E501 + 'range_measure_value_filter': 'rangeMeasureValueFilter', # noqa: E501 + 'ranking_filter': 'rankingFilter', # noqa: E501 + 'absolute_date_filter': 'absoluteDateFilter', # noqa: E501 + 'relative_date_filter': 'relativeDateFilter', # noqa: E501 + 'inline': 'inline', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FilterDefinition - 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,) + positive_attribute_filter (PositiveAttributeFilterBody): [optional] # noqa: E501 + negative_attribute_filter (NegativeAttributeFilterBody): [optional] # noqa: E501 + comparison_measure_value_filter (ComparisonMeasureValueFilterBody): [optional] # noqa: E501 + range_measure_value_filter (RangeMeasureValueFilterBody): [optional] # noqa: E501 + ranking_filter (RankingFilterBody): [optional] # noqa: E501 + absolute_date_filter (AbsoluteDateFilterBody): [optional] # noqa: E501 + relative_date_filter (RelativeDateFilterBody): [optional] # noqa: E501 + inline (InlineFilterDefinitionBody): [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: + 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 + """FilterDefinition - 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,) + positive_attribute_filter (PositiveAttributeFilterBody): [optional] # noqa: E501 + negative_attribute_filter (NegativeAttributeFilterBody): [optional] # noqa: E501 + comparison_measure_value_filter (ComparisonMeasureValueFilterBody): [optional] # noqa: E501 + range_measure_value_filter (RangeMeasureValueFilterBody): [optional] # noqa: E501 + ranking_filter (RankingFilterBody): [optional] # noqa: E501 + absolute_date_filter (AbsoluteDateFilterBody): [optional] # noqa: E501 + relative_date_filter (RelativeDateFilterBody): [optional] # noqa: E501 + inline (InlineFilterDefinitionBody): [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: + 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 beause 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': [ + AttributeFilter, + DateFilter, + InlineFilterDefinition, + MeasureValueFilter, + RankingFilter, + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/filter_definition_for_simple_measure.py b/gooddata-afm-client/gooddata_afm_client/model/filter_definition_for_simple_measure.py new file mode 100644 index 000000000..274f86e69 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/filter_definition_for_simple_measure.py @@ -0,0 +1,334 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.absolute_date_filter_body import AbsoluteDateFilterBody + from gooddata_afm_client.model.attribute_filter import AttributeFilter + from gooddata_afm_client.model.date_filter import DateFilter + from gooddata_afm_client.model.negative_attribute_filter_body import NegativeAttributeFilterBody + from gooddata_afm_client.model.positive_attribute_filter_body import PositiveAttributeFilterBody + from gooddata_afm_client.model.relative_date_filter_body import RelativeDateFilterBody + globals()['AbsoluteDateFilterBody'] = AbsoluteDateFilterBody + globals()['AttributeFilter'] = AttributeFilter + globals()['DateFilter'] = DateFilter + globals()['NegativeAttributeFilterBody'] = NegativeAttributeFilterBody + globals()['PositiveAttributeFilterBody'] = PositiveAttributeFilterBody + globals()['RelativeDateFilterBody'] = RelativeDateFilterBody + + +class FilterDefinitionForSimpleMeasure(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 { + 'absolute_date_filter': (AbsoluteDateFilterBody,), # noqa: E501 + 'relative_date_filter': (RelativeDateFilterBody,), # noqa: E501 + 'positive_attribute_filter': (PositiveAttributeFilterBody,), # noqa: E501 + 'negative_attribute_filter': (NegativeAttributeFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'absolute_date_filter': 'absoluteDateFilter', # noqa: E501 + 'relative_date_filter': 'relativeDateFilter', # noqa: E501 + 'positive_attribute_filter': 'positiveAttributeFilter', # noqa: E501 + 'negative_attribute_filter': 'negativeAttributeFilter', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FilterDefinitionForSimpleMeasure - 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,) + absolute_date_filter (AbsoluteDateFilterBody): [optional] # noqa: E501 + relative_date_filter (RelativeDateFilterBody): [optional] # noqa: E501 + positive_attribute_filter (PositiveAttributeFilterBody): [optional] # noqa: E501 + negative_attribute_filter (NegativeAttributeFilterBody): [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: + 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 + """FilterDefinitionForSimpleMeasure - 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,) + absolute_date_filter (AbsoluteDateFilterBody): [optional] # noqa: E501 + relative_date_filter (RelativeDateFilterBody): [optional] # noqa: E501 + positive_attribute_filter (PositiveAttributeFilterBody): [optional] # noqa: E501 + negative_attribute_filter (NegativeAttributeFilterBody): [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: + 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 beause 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': [ + AttributeFilter, + DateFilter, + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/grand_total.py b/gooddata-afm-client/gooddata_afm_client/model/grand_total.py new file mode 100644 index 000000000..9e275bc25 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/grand_total.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.included_dimension_props import IncludedDimensionProps + globals()['IncludedDimensionProps'] = IncludedDimensionProps + + +class GrandTotal(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'local_identifier': (str,), # noqa: E501 + 'function': (str,), # noqa: E501 + 'included_dimensions': ({str: (IncludedDimensionProps,)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'local_identifier': 'localIdentifier', # noqa: E501 + 'function': 'function', # noqa: E501 + 'included_dimensions': 'includedDimensions', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, local_identifier, function, included_dimensions, *args, **kwargs): # noqa: E501 + """GrandTotal - a model defined in OpenAPI + + Args: + local_identifier (str): Grand total identification within this request. The corresponding data in the result are expected to be matched using this identifier. + function (str): Aggregation function for grand total computation. + included_dimensions ({str: (IncludedDimensionProps,)}): Mapping specifying dimensions on which this grand total will be computed. Dimensions are referenced via their localIdentifiers. Optionally one can specify also the values (properties) of the dimensions' attributes (see ```dimensionAttributesValues```). + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.local_identifier = local_identifier + self.function = function + self.included_dimensions = included_dimensions + 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, local_identifier, function, included_dimensions, *args, **kwargs): # noqa: E501 + """GrandTotal - a model defined in OpenAPI + + Args: + local_identifier (str): Grand total identification within this request. The corresponding data in the result are expected to be matched using this identifier. + function (str): Aggregation function for grand total computation. + included_dimensions ({str: (IncludedDimensionProps,)}): Mapping specifying dimensions on which this grand total will be computed. Dimensions are referenced via their localIdentifiers. Optionally one can specify also the values (properties) of the dimensions' attributes (see ```dimensionAttributesValues```). + + 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: + 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.local_identifier = local_identifier + self.function = function + self.included_dimensions = included_dimensions + 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-afm-client/gooddata_afm_client/model/header_group.py b/gooddata-afm-client/gooddata_afm_client/model/header_group.py new file mode 100644 index 000000000..3ad3106bf --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/header_group.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.execution_result_header import ExecutionResultHeader + globals()['ExecutionResultHeader'] = ExecutionResultHeader + + +class HeaderGroup(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'headers': ([ExecutionResultHeader],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'headers': 'headers', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, headers, *args, **kwargs): # noqa: E501 + """HeaderGroup - a model defined in OpenAPI + + Args: + headers ([ExecutionResultHeader]): An array containing headers. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.headers = headers + 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, headers, *args, **kwargs): # noqa: E501 + """HeaderGroup - a model defined in OpenAPI + + Args: + headers ([ExecutionResultHeader]): An array containing headers. + + 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: + 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.headers = headers + 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-afm-client/gooddata_afm_client/model/identifier.py b/gooddata-afm-client/gooddata_afm_client/model/identifier.py new file mode 100644 index 000000000..573945b0e --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/identifier.py @@ -0,0 +1,325 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier + from gooddata_afm_client.model.local_identifier import LocalIdentifier + from gooddata_afm_client.model.object_identifier import ObjectIdentifier + globals()['AfmObjectIdentifier'] = AfmObjectIdentifier + globals()['LocalIdentifier'] = LocalIdentifier + globals()['ObjectIdentifier'] = ObjectIdentifier + + +class Identifier(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 = { + ('local_identifier',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]+$', # noqa: E501 + }, + }, + } + + @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 { + 'identifier': (ObjectIdentifier,), # noqa: E501 + 'local_identifier': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'identifier': 'identifier', # noqa: E501 + 'local_identifier': 'localIdentifier', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Identifier - 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,) + identifier (ObjectIdentifier): [optional] # noqa: E501 + local_identifier (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: + 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 + """Identifier - 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,) + identifier (ObjectIdentifier): [optional] # noqa: E501 + local_identifier (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: + 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 beause 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': [ + AfmObjectIdentifier, + LocalIdentifier, + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/included_dimension_props.py b/gooddata-afm-client/gooddata_afm_client/model/included_dimension_props.py new file mode 100644 index 000000000..5ff98bc66 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/included_dimension_props.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class IncludedDimensionProps(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 = True + + @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 { + 'dimension_attributes_values': ({str: ([str],)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dimension_attributes_values': 'dimensionAttributesValues', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, dimension_attributes_values, *args, **kwargs): # noqa: E501 + """IncludedDimensionProps - a model defined in OpenAPI + + Args: + dimension_attributes_values ({str: ([str],)}): Allows to customize for which attribute values the grand total will be computed. If the values for particular attribute are not specified then the totals for all values are computed. Note that this also covers the case of individual measures (treated as values of the \"measureGroup\" pseudo attribute). + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.dimension_attributes_values = dimension_attributes_values + 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, dimension_attributes_values, *args, **kwargs): # noqa: E501 + """IncludedDimensionProps - a model defined in OpenAPI + + Args: + dimension_attributes_values ({str: ([str],)}): Allows to customize for which attribute values the grand total will be computed. If the values for particular attribute are not specified then the totals for all values are computed. Note that this also covers the case of individual measures (treated as values of the \"measureGroup\" pseudo attribute). + + 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: + 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.dimension_attributes_values = dimension_attributes_values + 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-afm-client/gooddata_afm_client/model/inline_filter_definition.py b/gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition.py new file mode 100644 index 000000000..720d7f1f5 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.inline_filter_definition_body import InlineFilterDefinitionBody + globals()['InlineFilterDefinitionBody'] = InlineFilterDefinitionBody + + +class InlineFilterDefinition(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'inline': (InlineFilterDefinitionBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'inline': 'inline', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, inline, *args, **kwargs): # noqa: E501 + """InlineFilterDefinition - a model defined in OpenAPI + + Args: + inline (InlineFilterDefinitionBody): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.inline = inline + 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, inline, *args, **kwargs): # noqa: E501 + """InlineFilterDefinition - a model defined in OpenAPI + + Args: + inline (InlineFilterDefinitionBody): + + 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: + 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.inline = inline + 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-afm-client/gooddata_afm_client/model/inline_filter_definition_body.py b/gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition_body.py new file mode 100644 index 000000000..7df562343 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition_body.py @@ -0,0 +1,318 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.common_filter import CommonFilter + from gooddata_afm_client.model.inline_filter_definition_body_all_of import InlineFilterDefinitionBodyAllOf + globals()['CommonFilter'] = CommonFilter + globals()['InlineFilterDefinitionBodyAllOf'] = InlineFilterDefinitionBodyAllOf + + +class InlineFilterDefinitionBody(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 { + 'filter': (str,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filter': 'filter', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """InlineFilterDefinitionBody - a model defined in OpenAPI + + Keyword Args: + filter (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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 + """InlineFilterDefinitionBody - a model defined in OpenAPI + + Keyword Args: + filter (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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 beause 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': [ + CommonFilter, + InlineFilterDefinitionBodyAllOf, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition_body_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition_body_all_of.py new file mode 100644 index 000000000..091c0e950 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/inline_filter_definition_body_all_of.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class InlineFilterDefinitionBodyAllOf(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 { + 'filter': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filter': 'filter', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, filter, *args, **kwargs): # noqa: E501 + """InlineFilterDefinitionBodyAllOf - a model defined in OpenAPI + + Args: + filter (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.filter = filter + 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, filter, *args, **kwargs): # noqa: E501 + """InlineFilterDefinitionBodyAllOf - a model defined in OpenAPI + + Args: + filter (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.filter = filter + 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-afm-client/gooddata_afm_client/model/inline_measure_definition.py b/gooddata-afm-client/gooddata_afm_client/model/inline_measure_definition.py new file mode 100644 index 000000000..220c7e940 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/inline_measure_definition.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.inline_measure_definition_inline import InlineMeasureDefinitionInline + globals()['InlineMeasureDefinitionInline'] = InlineMeasureDefinitionInline + + +class InlineMeasureDefinition(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'inline': (InlineMeasureDefinitionInline,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'inline': 'inline', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, inline, *args, **kwargs): # noqa: E501 + """InlineMeasureDefinition - a model defined in OpenAPI + + Args: + inline (InlineMeasureDefinitionInline): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.inline = inline + 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, inline, *args, **kwargs): # noqa: E501 + """InlineMeasureDefinition - a model defined in OpenAPI + + Args: + inline (InlineMeasureDefinitionInline): + + 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: + 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.inline = inline + 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-afm-client/gooddata_afm_client/model/inline_measure_definition_inline.py b/gooddata-afm-client/gooddata_afm_client/model/inline_measure_definition_inline.py new file mode 100644 index 000000000..525b4e10b --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/inline_measure_definition_inline.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class InlineMeasureDefinitionInline(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 { + 'maql': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'maql': 'maql', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, maql, *args, **kwargs): # noqa: E501 + """InlineMeasureDefinitionInline - a model defined in OpenAPI + + Args: + maql (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.maql = maql + 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, maql, *args, **kwargs): # noqa: E501 + """InlineMeasureDefinitionInline - a model defined in OpenAPI + + Args: + maql (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.maql = maql + 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-afm-client/gooddata_afm_client/model/local_identifier.py b/gooddata-afm-client/gooddata_afm_client/model/local_identifier.py new file mode 100644 index 000000000..fbbd0b150 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/local_identifier.py @@ -0,0 +1,266 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class LocalIdentifier(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 = { + ('local_identifier',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]+$', # noqa: E501 + }, + }, + } + + @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 { + 'local_identifier': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'local_identifier': 'localIdentifier', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, local_identifier, *args, **kwargs): # noqa: E501 + """LocalIdentifier - a model defined in OpenAPI + + Args: + local_identifier (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.local_identifier = local_identifier + 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, local_identifier, *args, **kwargs): # noqa: E501 + """LocalIdentifier - a model defined in OpenAPI + + Args: + local_identifier (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.local_identifier = local_identifier + 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-afm-client/gooddata_afm_client/model/measure_definition.py b/gooddata-afm-client/gooddata_afm_client/model/measure_definition.py new file mode 100644 index 000000000..5df541cb5 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/measure_definition.py @@ -0,0 +1,349 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.arithmetic_measure_definition import ArithmeticMeasureDefinition + from gooddata_afm_client.model.arithmetic_measure_definition_arithmetic_measure import ArithmeticMeasureDefinitionArithmeticMeasure + from gooddata_afm_client.model.inline_measure_definition import InlineMeasureDefinition + from gooddata_afm_client.model.inline_measure_definition_inline import InlineMeasureDefinitionInline + from gooddata_afm_client.model.pop_dataset_measure_definition import PopDatasetMeasureDefinition + from gooddata_afm_client.model.pop_dataset_measure_definition_previous_period_measure import PopDatasetMeasureDefinitionPreviousPeriodMeasure + from gooddata_afm_client.model.pop_date_measure_definition import PopDateMeasureDefinition + from gooddata_afm_client.model.pop_date_measure_definition_over_period_measure import PopDateMeasureDefinitionOverPeriodMeasure + from gooddata_afm_client.model.simple_measure_definition import SimpleMeasureDefinition + from gooddata_afm_client.model.simple_measure_definition_measure import SimpleMeasureDefinitionMeasure + globals()['ArithmeticMeasureDefinition'] = ArithmeticMeasureDefinition + globals()['ArithmeticMeasureDefinitionArithmeticMeasure'] = ArithmeticMeasureDefinitionArithmeticMeasure + globals()['InlineMeasureDefinition'] = InlineMeasureDefinition + globals()['InlineMeasureDefinitionInline'] = InlineMeasureDefinitionInline + globals()['PopDatasetMeasureDefinition'] = PopDatasetMeasureDefinition + globals()['PopDatasetMeasureDefinitionPreviousPeriodMeasure'] = PopDatasetMeasureDefinitionPreviousPeriodMeasure + globals()['PopDateMeasureDefinition'] = PopDateMeasureDefinition + globals()['PopDateMeasureDefinitionOverPeriodMeasure'] = PopDateMeasureDefinitionOverPeriodMeasure + globals()['SimpleMeasureDefinition'] = SimpleMeasureDefinition + globals()['SimpleMeasureDefinitionMeasure'] = SimpleMeasureDefinitionMeasure + + +class MeasureDefinition(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 { + 'inline': (InlineMeasureDefinitionInline,), # noqa: E501 + 'arithmetic_measure': (ArithmeticMeasureDefinitionArithmeticMeasure,), # noqa: E501 + 'measure': (SimpleMeasureDefinitionMeasure,), # noqa: E501 + 'over_period_measure': (PopDateMeasureDefinitionOverPeriodMeasure,), # noqa: E501 + 'previous_period_measure': (PopDatasetMeasureDefinitionPreviousPeriodMeasure,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'inline': 'inline', # noqa: E501 + 'arithmetic_measure': 'arithmeticMeasure', # noqa: E501 + 'measure': 'measure', # noqa: E501 + 'over_period_measure': 'overPeriodMeasure', # noqa: E501 + 'previous_period_measure': 'previousPeriodMeasure', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """MeasureDefinition - 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,) + inline (InlineMeasureDefinitionInline): [optional] # noqa: E501 + arithmetic_measure (ArithmeticMeasureDefinitionArithmeticMeasure): [optional] # noqa: E501 + measure (SimpleMeasureDefinitionMeasure): [optional] # noqa: E501 + over_period_measure (PopDateMeasureDefinitionOverPeriodMeasure): [optional] # noqa: E501 + previous_period_measure (PopDatasetMeasureDefinitionPreviousPeriodMeasure): [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: + 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 + """MeasureDefinition - 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,) + inline (InlineMeasureDefinitionInline): [optional] # noqa: E501 + arithmetic_measure (ArithmeticMeasureDefinitionArithmeticMeasure): [optional] # noqa: E501 + measure (SimpleMeasureDefinitionMeasure): [optional] # noqa: E501 + over_period_measure (PopDateMeasureDefinitionOverPeriodMeasure): [optional] # noqa: E501 + previous_period_measure (PopDatasetMeasureDefinitionPreviousPeriodMeasure): [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: + 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 beause 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': [ + ArithmeticMeasureDefinition, + InlineMeasureDefinition, + PopDatasetMeasureDefinition, + PopDateMeasureDefinition, + SimpleMeasureDefinition, + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/measure_execution_result_header.py b/gooddata-afm-client/gooddata_afm_client/model/measure_execution_result_header.py new file mode 100644 index 000000000..42b07d4a2 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/measure_execution_result_header.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.measure_result_header import MeasureResultHeader + globals()['MeasureResultHeader'] = MeasureResultHeader + + +class MeasureExecutionResultHeader(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'measure_header': (MeasureResultHeader,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure_header': 'measureHeader', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, measure_header, *args, **kwargs): # noqa: E501 + """MeasureExecutionResultHeader - a model defined in OpenAPI + + Args: + measure_header (MeasureResultHeader): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.measure_header = measure_header + 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, measure_header, *args, **kwargs): # noqa: E501 + """MeasureExecutionResultHeader - a model defined in OpenAPI + + Args: + measure_header (MeasureResultHeader): + + 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: + 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.measure_header = measure_header + 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-afm-client/gooddata_afm_client/model/measure_group_header.py b/gooddata-afm-client/gooddata_afm_client/model/measure_group_header.py new file mode 100644 index 000000000..22556d184 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/measure_group_header.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.measure_header_out import MeasureHeaderOut + globals()['MeasureHeaderOut'] = MeasureHeaderOut + + +class MeasureGroupHeader(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'measure_group_headers': ([MeasureHeaderOut],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure_group_headers': 'measureGroupHeaders', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, measure_group_headers, *args, **kwargs): # noqa: E501 + """MeasureGroupHeader - a model defined in OpenAPI + + Args: + measure_group_headers ([MeasureHeaderOut]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.measure_group_headers = measure_group_headers + 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, measure_group_headers, *args, **kwargs): # noqa: E501 + """MeasureGroupHeader - a model defined in OpenAPI + + Args: + measure_group_headers ([MeasureHeaderOut]): + + 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: + 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.measure_group_headers = measure_group_headers + 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-afm-client/gooddata_afm_client/model/measure_header_out.py b/gooddata-afm-client/gooddata_afm_client/model/measure_header_out.py new file mode 100644 index 000000000..0f394ff64 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/measure_header_out.py @@ -0,0 +1,269 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class MeasureHeaderOut(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 { + 'local_identifier': (str,), # noqa: E501 + 'format': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'local_identifier': 'localIdentifier', # noqa: E501 + 'format': 'format', # noqa: E501 + 'name': 'name', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, local_identifier, *args, **kwargs): # noqa: E501 + """MeasureHeaderOut - a model defined in OpenAPI + + Args: + local_identifier (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + format (str): [optional] # noqa: E501 + name (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: + 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.local_identifier = local_identifier + 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, local_identifier, *args, **kwargs): # noqa: E501 + """MeasureHeaderOut - a model defined in OpenAPI + + Args: + local_identifier (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + format (str): [optional] # noqa: E501 + name (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: + 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.local_identifier = local_identifier + 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-afm-client/gooddata_afm_client/model/measure_item.py b/gooddata-afm-client/gooddata_afm_client/model/measure_item.py new file mode 100644 index 000000000..bfbd4b564 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/measure_item.py @@ -0,0 +1,278 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.measure_definition import MeasureDefinition + globals()['MeasureDefinition'] = MeasureDefinition + + +class MeasureItem(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 = { + ('local_identifier',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]+$', # noqa: E501 + }, + }, + } + + @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 { + 'local_identifier': (str,), # noqa: E501 + 'definition': (MeasureDefinition,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'local_identifier': 'localIdentifier', # noqa: E501 + 'definition': 'definition', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, local_identifier, definition, *args, **kwargs): # noqa: E501 + """MeasureItem - a model defined in OpenAPI + + Args: + local_identifier (str): + definition (MeasureDefinition): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.local_identifier = local_identifier + self.definition = definition + 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, local_identifier, definition, *args, **kwargs): # noqa: E501 + """MeasureItem - a model defined in OpenAPI + + Args: + local_identifier (str): + definition (MeasureDefinition): + + 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: + 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.local_identifier = local_identifier + self.definition = definition + 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-afm-client/gooddata_afm_client/model/measure_result_header.py b/gooddata-afm-client/gooddata_afm_client/model/measure_result_header.py new file mode 100644 index 000000000..b8790f48d --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/measure_result_header.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class MeasureResultHeader(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 { + 'measure_index': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure_index': 'measureIndex', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, measure_index, *args, **kwargs): # noqa: E501 + """MeasureResultHeader - a model defined in OpenAPI + + Args: + measure_index (int): Measure index. Starts at 0. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.measure_index = measure_index + 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, measure_index, *args, **kwargs): # noqa: E501 + """MeasureResultHeader - a model defined in OpenAPI + + Args: + measure_index (int): Measure index. Starts at 0. + + 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: + 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.measure_index = measure_index + 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-afm-client/gooddata_afm_client/model/measure_value_filter.py b/gooddata-afm-client/gooddata_afm_client/model/measure_value_filter.py new file mode 100644 index 000000000..b8945dc0d --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/measure_value_filter.py @@ -0,0 +1,322 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.comparison_measure_value_filter import ComparisonMeasureValueFilter + from gooddata_afm_client.model.comparison_measure_value_filter_body import ComparisonMeasureValueFilterBody + from gooddata_afm_client.model.range_measure_value_filter import RangeMeasureValueFilter + from gooddata_afm_client.model.range_measure_value_filter_body import RangeMeasureValueFilterBody + globals()['ComparisonMeasureValueFilter'] = ComparisonMeasureValueFilter + globals()['ComparisonMeasureValueFilterBody'] = ComparisonMeasureValueFilterBody + globals()['RangeMeasureValueFilter'] = RangeMeasureValueFilter + globals()['RangeMeasureValueFilterBody'] = RangeMeasureValueFilterBody + + +class MeasureValueFilter(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_measure_value_filter': (ComparisonMeasureValueFilterBody,), # noqa: E501 + 'range_measure_value_filter': (RangeMeasureValueFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'comparison_measure_value_filter': 'comparisonMeasureValueFilter', # noqa: E501 + 'range_measure_value_filter': 'rangeMeasureValueFilter', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """MeasureValueFilter - 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_measure_value_filter (ComparisonMeasureValueFilterBody): [optional] # noqa: E501 + range_measure_value_filter (RangeMeasureValueFilterBody): [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: + 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 + """MeasureValueFilter - 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_measure_value_filter (ComparisonMeasureValueFilterBody): [optional] # noqa: E501 + range_measure_value_filter (RangeMeasureValueFilterBody): [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: + 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 beause 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': [ + ComparisonMeasureValueFilter, + RangeMeasureValueFilter, + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter.py b/gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter.py new file mode 100644 index 000000000..dd6dcf8f5 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.negative_attribute_filter_body import NegativeAttributeFilterBody + globals()['NegativeAttributeFilterBody'] = NegativeAttributeFilterBody + + +class NegativeAttributeFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'negative_attribute_filter': (NegativeAttributeFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'negative_attribute_filter': 'negativeAttributeFilter', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, negative_attribute_filter, *args, **kwargs): # noqa: E501 + """NegativeAttributeFilter - a model defined in OpenAPI + + Args: + negative_attribute_filter (NegativeAttributeFilterBody): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.negative_attribute_filter = negative_attribute_filter + 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, negative_attribute_filter, *args, **kwargs): # noqa: E501 + """NegativeAttributeFilter - a model defined in OpenAPI + + Args: + negative_attribute_filter (NegativeAttributeFilterBody): + + 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: + 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.negative_attribute_filter = negative_attribute_filter + 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-afm-client/gooddata_afm_client/model/negative_attribute_filter_body.py b/gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter_body.py new file mode 100644 index 000000000..586220d24 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter_body.py @@ -0,0 +1,326 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.attribute_filter_elements import AttributeFilterElements + from gooddata_afm_client.model.common_attribute_filter import CommonAttributeFilter + from gooddata_afm_client.model.identifier import Identifier + from gooddata_afm_client.model.negative_attribute_filter_body_all_of import NegativeAttributeFilterBodyAllOf + globals()['AttributeFilterElements'] = AttributeFilterElements + globals()['CommonAttributeFilter'] = CommonAttributeFilter + globals()['Identifier'] = Identifier + globals()['NegativeAttributeFilterBodyAllOf'] = NegativeAttributeFilterBodyAllOf + + +class NegativeAttributeFilterBody(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 { + 'label': (Identifier,), # noqa: E501 + 'not_in': (AttributeFilterElements,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'label': 'label', # noqa: E501 + 'not_in': 'notIn', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """NegativeAttributeFilterBody - a model defined in OpenAPI + + Keyword Args: + label (Identifier): + not_in (AttributeFilterElements): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 + """NegativeAttributeFilterBody - a model defined in OpenAPI + + Keyword Args: + label (Identifier): + not_in (AttributeFilterElements): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 beause 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': [ + CommonAttributeFilter, + NegativeAttributeFilterBodyAllOf, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter_body_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter_body_all_of.py new file mode 100644 index 000000000..c5b9f4f2e --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/negative_attribute_filter_body_all_of.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.attribute_filter_elements import AttributeFilterElements + globals()['AttributeFilterElements'] = AttributeFilterElements + + +class NegativeAttributeFilterBodyAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'not_in': (AttributeFilterElements,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'not_in': 'notIn', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, not_in, *args, **kwargs): # noqa: E501 + """NegativeAttributeFilterBodyAllOf - a model defined in OpenAPI + + Args: + not_in (AttributeFilterElements): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.not_in = not_in + 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, not_in, *args, **kwargs): # noqa: E501 + """NegativeAttributeFilterBodyAllOf - a model defined in OpenAPI + + Args: + not_in (AttributeFilterElements): + + 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: + 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.not_in = not_in + 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-afm-client/gooddata_afm_client/model/object_identifier.py b/gooddata-afm-client/gooddata_afm_client/model/object_identifier.py new file mode 100644 index 000000000..81551f333 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/object_identifier.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class ObjectIdentifier(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 = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, type, *args, **kwargs): # noqa: E501 + """ObjectIdentifier - a model defined in OpenAPI + + Args: + id (str): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, type, *args, **kwargs): # noqa: E501 + """ObjectIdentifier - a model defined in OpenAPI + + Args: + id (str): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-afm-client/gooddata_afm_client/model/paging.py b/gooddata-afm-client/gooddata_afm_client/model/paging.py new file mode 100644 index 000000000..729f910cd --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/paging.py @@ -0,0 +1,277 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class Paging(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 { + 'total': (int,), # noqa: E501 + 'count': (int,), # noqa: E501 + 'offset': (int,), # noqa: E501 + 'next': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'total': 'total', # noqa: E501 + 'count': 'count', # noqa: E501 + 'offset': 'offset', # noqa: E501 + 'next': 'next', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, total, count, offset, *args, **kwargs): # noqa: E501 + """Paging - a model defined in OpenAPI + + Args: + total (int): Count of returnable items ignoring paging. + count (int): Count of items in this page. + offset (int): Offset of this page. + + 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,) + next (str): Link to next page, or null if this is last page.. [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: + 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.total = total + self.count = count + self.offset = offset + 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, total, count, offset, *args, **kwargs): # noqa: E501 + """Paging - a model defined in OpenAPI + + Args: + total (int): Count of returnable items ignoring paging. + count (int): Count of items in this page. + offset (int): Offset of this page. + + 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,) + next (str): Link to next page, or null if this is last page.. [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: + 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.total = total + self.count = count + self.offset = offset + 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-afm-client/gooddata_afm_client/model/pop_dataset.py b/gooddata-afm-client/gooddata_afm_client/model/pop_dataset.py new file mode 100644 index 000000000..179a03e85 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/pop_dataset.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier + globals()['AfmObjectIdentifier'] = AfmObjectIdentifier + + +class PopDataset(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dataset': (AfmObjectIdentifier,), # noqa: E501 + 'periods_ago': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dataset': 'dataset', # noqa: E501 + 'periods_ago': 'periodsAgo', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, dataset, periods_ago, *args, **kwargs): # noqa: E501 + """PopDataset - a model defined in OpenAPI + + Args: + dataset (AfmObjectIdentifier): + periods_ago (int): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.dataset = dataset + self.periods_ago = periods_ago + 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, dataset, periods_ago, *args, **kwargs): # noqa: E501 + """PopDataset - a model defined in OpenAPI + + Args: + dataset (AfmObjectIdentifier): + periods_ago (int): + + 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: + 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.dataset = dataset + self.periods_ago = periods_ago + 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-afm-client/gooddata_afm_client/model/pop_dataset_measure_definition.py b/gooddata-afm-client/gooddata_afm_client/model/pop_dataset_measure_definition.py new file mode 100644 index 000000000..d7064a532 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/pop_dataset_measure_definition.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.pop_dataset_measure_definition_previous_period_measure import PopDatasetMeasureDefinitionPreviousPeriodMeasure + globals()['PopDatasetMeasureDefinitionPreviousPeriodMeasure'] = PopDatasetMeasureDefinitionPreviousPeriodMeasure + + +class PopDatasetMeasureDefinition(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'previous_period_measure': (PopDatasetMeasureDefinitionPreviousPeriodMeasure,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'previous_period_measure': 'previousPeriodMeasure', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, previous_period_measure, *args, **kwargs): # noqa: E501 + """PopDatasetMeasureDefinition - a model defined in OpenAPI + + Args: + previous_period_measure (PopDatasetMeasureDefinitionPreviousPeriodMeasure): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.previous_period_measure = previous_period_measure + 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, previous_period_measure, *args, **kwargs): # noqa: E501 + """PopDatasetMeasureDefinition - a model defined in OpenAPI + + Args: + previous_period_measure (PopDatasetMeasureDefinitionPreviousPeriodMeasure): + + 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: + 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.previous_period_measure = previous_period_measure + 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-afm-client/gooddata_afm_client/model/pop_dataset_measure_definition_previous_period_measure.py b/gooddata-afm-client/gooddata_afm_client/model/pop_dataset_measure_definition_previous_period_measure.py new file mode 100644 index 000000000..c4e60f5d7 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/pop_dataset_measure_definition_previous_period_measure.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.local_identifier import LocalIdentifier + from gooddata_afm_client.model.pop_dataset import PopDataset + globals()['LocalIdentifier'] = LocalIdentifier + globals()['PopDataset'] = PopDataset + + +class PopDatasetMeasureDefinitionPreviousPeriodMeasure(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'measure_identifier': (LocalIdentifier,), # noqa: E501 + 'date_datasets': ([PopDataset],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure_identifier': 'measureIdentifier', # noqa: E501 + 'date_datasets': 'dateDatasets', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, measure_identifier, date_datasets, *args, **kwargs): # noqa: E501 + """PopDatasetMeasureDefinitionPreviousPeriodMeasure - a model defined in OpenAPI + + Args: + measure_identifier (LocalIdentifier): + date_datasets ([PopDataset]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.measure_identifier = measure_identifier + self.date_datasets = date_datasets + 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, measure_identifier, date_datasets, *args, **kwargs): # noqa: E501 + """PopDatasetMeasureDefinitionPreviousPeriodMeasure - a model defined in OpenAPI + + Args: + measure_identifier (LocalIdentifier): + date_datasets ([PopDataset]): + + 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: + 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.measure_identifier = measure_identifier + self.date_datasets = date_datasets + 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-afm-client/gooddata_afm_client/model/pop_date.py b/gooddata-afm-client/gooddata_afm_client/model/pop_date.py new file mode 100644 index 000000000..88e5531f6 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/pop_date.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier + globals()['AfmObjectIdentifier'] = AfmObjectIdentifier + + +class PopDate(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attribute': (AfmObjectIdentifier,), # noqa: E501 + 'periods_ago': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attribute': 'attribute', # noqa: E501 + 'periods_ago': 'periodsAgo', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, attribute, periods_ago, *args, **kwargs): # noqa: E501 + """PopDate - a model defined in OpenAPI + + Args: + attribute (AfmObjectIdentifier): + periods_ago (int): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.attribute = attribute + self.periods_ago = periods_ago + 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, attribute, periods_ago, *args, **kwargs): # noqa: E501 + """PopDate - a model defined in OpenAPI + + Args: + attribute (AfmObjectIdentifier): + periods_ago (int): + + 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: + 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.attribute = attribute + self.periods_ago = periods_ago + 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-afm-client/gooddata_afm_client/model/pop_date_measure_definition.py b/gooddata-afm-client/gooddata_afm_client/model/pop_date_measure_definition.py new file mode 100644 index 000000000..ec3048d1d --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/pop_date_measure_definition.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.pop_date_measure_definition_over_period_measure import PopDateMeasureDefinitionOverPeriodMeasure + globals()['PopDateMeasureDefinitionOverPeriodMeasure'] = PopDateMeasureDefinitionOverPeriodMeasure + + +class PopDateMeasureDefinition(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'over_period_measure': (PopDateMeasureDefinitionOverPeriodMeasure,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'over_period_measure': 'overPeriodMeasure', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, over_period_measure, *args, **kwargs): # noqa: E501 + """PopDateMeasureDefinition - a model defined in OpenAPI + + Args: + over_period_measure (PopDateMeasureDefinitionOverPeriodMeasure): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.over_period_measure = over_period_measure + 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, over_period_measure, *args, **kwargs): # noqa: E501 + """PopDateMeasureDefinition - a model defined in OpenAPI + + Args: + over_period_measure (PopDateMeasureDefinitionOverPeriodMeasure): + + 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: + 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.over_period_measure = over_period_measure + 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-afm-client/gooddata_afm_client/model/pop_date_measure_definition_over_period_measure.py b/gooddata-afm-client/gooddata_afm_client/model/pop_date_measure_definition_over_period_measure.py new file mode 100644 index 000000000..9919aedae --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/pop_date_measure_definition_over_period_measure.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.local_identifier import LocalIdentifier + from gooddata_afm_client.model.pop_date import PopDate + globals()['LocalIdentifier'] = LocalIdentifier + globals()['PopDate'] = PopDate + + +class PopDateMeasureDefinitionOverPeriodMeasure(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'measure_identifier': (LocalIdentifier,), # noqa: E501 + 'date_attributes': ([PopDate],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure_identifier': 'measureIdentifier', # noqa: E501 + 'date_attributes': 'dateAttributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, measure_identifier, date_attributes, *args, **kwargs): # noqa: E501 + """PopDateMeasureDefinitionOverPeriodMeasure - a model defined in OpenAPI + + Args: + measure_identifier (LocalIdentifier): + date_attributes ([PopDate]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.measure_identifier = measure_identifier + self.date_attributes = date_attributes + 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, measure_identifier, date_attributes, *args, **kwargs): # noqa: E501 + """PopDateMeasureDefinitionOverPeriodMeasure - a model defined in OpenAPI + + Args: + measure_identifier (LocalIdentifier): + date_attributes ([PopDate]): + + 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: + 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.measure_identifier = measure_identifier + self.date_attributes = date_attributes + 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-afm-client/gooddata_afm_client/model/positive_attribute_filter.py b/gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter.py new file mode 100644 index 000000000..fd6b35e04 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.positive_attribute_filter_body import PositiveAttributeFilterBody + globals()['PositiveAttributeFilterBody'] = PositiveAttributeFilterBody + + +class PositiveAttributeFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'positive_attribute_filter': (PositiveAttributeFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'positive_attribute_filter': 'positiveAttributeFilter', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, positive_attribute_filter, *args, **kwargs): # noqa: E501 + """PositiveAttributeFilter - a model defined in OpenAPI + + Args: + positive_attribute_filter (PositiveAttributeFilterBody): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.positive_attribute_filter = positive_attribute_filter + 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, positive_attribute_filter, *args, **kwargs): # noqa: E501 + """PositiveAttributeFilter - a model defined in OpenAPI + + Args: + positive_attribute_filter (PositiveAttributeFilterBody): + + 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: + 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.positive_attribute_filter = positive_attribute_filter + 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-afm-client/gooddata_afm_client/model/positive_attribute_filter_body.py b/gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter_body.py new file mode 100644 index 000000000..c037c006e --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter_body.py @@ -0,0 +1,326 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.attribute_filter_elements import AttributeFilterElements + from gooddata_afm_client.model.common_attribute_filter import CommonAttributeFilter + from gooddata_afm_client.model.identifier import Identifier + from gooddata_afm_client.model.positive_attribute_filter_body_all_of import PositiveAttributeFilterBodyAllOf + globals()['AttributeFilterElements'] = AttributeFilterElements + globals()['CommonAttributeFilter'] = CommonAttributeFilter + globals()['Identifier'] = Identifier + globals()['PositiveAttributeFilterBodyAllOf'] = PositiveAttributeFilterBodyAllOf + + +class PositiveAttributeFilterBody(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 { + 'label': (Identifier,), # noqa: E501 + '_in': (AttributeFilterElements,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'label': 'label', # noqa: E501 + '_in': 'in', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PositiveAttributeFilterBody - a model defined in OpenAPI + + Keyword Args: + label (Identifier): + _in (AttributeFilterElements): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 + """PositiveAttributeFilterBody - a model defined in OpenAPI + + Keyword Args: + label (Identifier): + _in (AttributeFilterElements): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 beause 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': [ + CommonAttributeFilter, + PositiveAttributeFilterBodyAllOf, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter_body_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter_body_all_of.py new file mode 100644 index 000000000..9e6a89455 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/positive_attribute_filter_body_all_of.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.attribute_filter_elements import AttributeFilterElements + globals()['AttributeFilterElements'] = AttributeFilterElements + + +class PositiveAttributeFilterBodyAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + '_in': (AttributeFilterElements,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_in': 'in', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, _in, *args, **kwargs): # noqa: E501 + """PositiveAttributeFilterBodyAllOf - a model defined in OpenAPI + + Args: + _in (AttributeFilterElements): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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._in = _in + 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, _in, *args, **kwargs): # noqa: E501 + """PositiveAttributeFilterBodyAllOf - a model defined in OpenAPI + + Args: + _in (AttributeFilterElements): + + 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: + 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._in = _in + 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-afm-client/gooddata_afm_client/model/range_measure_value_filter.py b/gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter.py new file mode 100644 index 000000000..776d01af9 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.range_measure_value_filter_body import RangeMeasureValueFilterBody + globals()['RangeMeasureValueFilterBody'] = RangeMeasureValueFilterBody + + +class RangeMeasureValueFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'range_measure_value_filter': (RangeMeasureValueFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'range_measure_value_filter': 'rangeMeasureValueFilter', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, range_measure_value_filter, *args, **kwargs): # noqa: E501 + """RangeMeasureValueFilter - a model defined in OpenAPI + + Args: + range_measure_value_filter (RangeMeasureValueFilterBody): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.range_measure_value_filter = range_measure_value_filter + 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, range_measure_value_filter, *args, **kwargs): # noqa: E501 + """RangeMeasureValueFilter - a model defined in OpenAPI + + Args: + range_measure_value_filter (RangeMeasureValueFilterBody): + + 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: + 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.range_measure_value_filter = range_measure_value_filter + 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-afm-client/gooddata_afm_client/model/range_measure_value_filter_body.py b/gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter_body.py new file mode 100644 index 000000000..1d8c4145c --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter_body.py @@ -0,0 +1,344 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.common_measure_value_filter import CommonMeasureValueFilter + from gooddata_afm_client.model.identifier import Identifier + from gooddata_afm_client.model.range_measure_value_filter_body_all_of import RangeMeasureValueFilterBodyAllOf + globals()['CommonMeasureValueFilter'] = CommonMeasureValueFilter + globals()['Identifier'] = Identifier + globals()['RangeMeasureValueFilterBodyAllOf'] = RangeMeasureValueFilterBodyAllOf + + +class RangeMeasureValueFilterBody(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 = { + ('operator',): { + 'BETWEEN': "BETWEEN", + 'NOT_BETWEEN': "NOT_BETWEEN", + }, + } + + 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 { + 'measure': (Identifier,), # noqa: E501 + 'operator': (str,), # noqa: E501 + '_from': (float,), # noqa: E501 + 'to': (float,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + 'dimensionality': ([Identifier],), # noqa: E501 + 'treat_null_values_as': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure': 'measure', # noqa: E501 + 'operator': 'operator', # noqa: E501 + '_from': 'from', # noqa: E501 + 'to': 'to', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + 'dimensionality': 'dimensionality', # noqa: E501 + 'treat_null_values_as': 'treatNullValuesAs', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RangeMeasureValueFilterBody - a model defined in OpenAPI + + Keyword Args: + measure (Identifier): + operator (str): + _from (float): + to (float): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [optional] # noqa: E501 + treat_null_values_as (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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 + """RangeMeasureValueFilterBody - a model defined in OpenAPI + + Keyword Args: + measure (Identifier): + operator (str): + _from (float): + to (float): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [optional] # noqa: E501 + treat_null_values_as (float): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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 beause 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': [ + CommonMeasureValueFilter, + RangeMeasureValueFilterBodyAllOf, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter_body_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter_body_all_of.py new file mode 100644 index 000000000..a4406c658 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/range_measure_value_filter_body_all_of.py @@ -0,0 +1,277 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class RangeMeasureValueFilterBodyAllOf(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 = { + ('operator',): { + 'BETWEEN': "BETWEEN", + 'NOT_BETWEEN': "NOT_BETWEEN", + }, + } + + 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 { + 'operator': (str,), # noqa: E501 + '_from': (float,), # noqa: E501 + 'to': (float,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'operator': 'operator', # noqa: E501 + '_from': 'from', # noqa: E501 + 'to': 'to', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, operator, _from, to, *args, **kwargs): # noqa: E501 + """RangeMeasureValueFilterBodyAllOf - a model defined in OpenAPI + + Args: + operator (str): + _from (float): + to (float): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.operator = operator + self._from = _from + self.to = to + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, operator, _from, to, *args, **kwargs): # noqa: E501 + """RangeMeasureValueFilterBodyAllOf - a model defined in OpenAPI + + Args: + operator (str): + _from (float): + to (float): + + 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: + 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.operator = operator + self._from = _from + self.to = to + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-afm-client/gooddata_afm_client/model/ranking_filter.py b/gooddata-afm-client/gooddata_afm_client/model/ranking_filter.py new file mode 100644 index 000000000..a5596bad5 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/ranking_filter.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.ranking_filter_body import RankingFilterBody + globals()['RankingFilterBody'] = RankingFilterBody + + +class RankingFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'ranking_filter': (RankingFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ranking_filter': 'rankingFilter', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, ranking_filter, *args, **kwargs): # noqa: E501 + """RankingFilter - a model defined in OpenAPI + + Args: + ranking_filter (RankingFilterBody): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.ranking_filter = ranking_filter + 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, ranking_filter, *args, **kwargs): # noqa: E501 + """RankingFilter - a model defined in OpenAPI + + Args: + ranking_filter (RankingFilterBody): + + 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: + 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.ranking_filter = ranking_filter + 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-afm-client/gooddata_afm_client/model/ranking_filter_body.py b/gooddata-afm-client/gooddata_afm_client/model/ranking_filter_body.py new file mode 100644 index 000000000..10cd73217 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/ranking_filter_body.py @@ -0,0 +1,336 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.abstract_measure_value_filter import AbstractMeasureValueFilter + from gooddata_afm_client.model.identifier import Identifier + from gooddata_afm_client.model.ranking_filter_body_all_of import RankingFilterBodyAllOf + globals()['AbstractMeasureValueFilter'] = AbstractMeasureValueFilter + globals()['Identifier'] = Identifier + globals()['RankingFilterBodyAllOf'] = RankingFilterBodyAllOf + + +class RankingFilterBody(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 = { + ('operator',): { + 'TOP': "TOP", + 'BOTTOM': "BOTTOM", + }, + } + + 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 { + 'measures': ([Identifier],), # noqa: E501 + 'operator': (str,), # noqa: E501 + 'value': (int,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + 'dimensionality': ([Identifier],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measures': 'measures', # noqa: E501 + 'operator': 'operator', # noqa: E501 + 'value': 'value', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + 'dimensionality': 'dimensionality', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RankingFilterBody - a model defined in OpenAPI + + Keyword Args: + measures ([Identifier]): + operator (str): + value (int): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [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: + 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 + """RankingFilterBody - a model defined in OpenAPI + + Keyword Args: + measures ([Identifier]): + operator (str): + value (int): + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [optional] # noqa: E501 + dimensionality ([Identifier]): [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: + 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 beause 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': [ + AbstractMeasureValueFilter, + RankingFilterBodyAllOf, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/ranking_filter_body_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/ranking_filter_body_all_of.py new file mode 100644 index 000000000..cdc73d50f --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/ranking_filter_body_all_of.py @@ -0,0 +1,283 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.identifier import Identifier + globals()['Identifier'] = Identifier + + +class RankingFilterBodyAllOf(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 = { + ('operator',): { + 'TOP': "TOP", + 'BOTTOM': "BOTTOM", + }, + } + + 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 { + 'measures': ([Identifier],), # noqa: E501 + 'operator': (str,), # noqa: E501 + 'value': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measures': 'measures', # noqa: E501 + 'operator': 'operator', # noqa: E501 + 'value': 'value', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, measures, operator, value, *args, **kwargs): # noqa: E501 + """RankingFilterBodyAllOf - a model defined in OpenAPI + + Args: + measures ([Identifier]): + operator (str): + value (int): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.measures = measures + self.operator = operator + self.value = value + 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, measures, operator, value, *args, **kwargs): # noqa: E501 + """RankingFilterBodyAllOf - a model defined in OpenAPI + + Args: + measures ([Identifier]): + operator (str): + value (int): + + 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: + 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.measures = measures + self.operator = operator + self.value = value + 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-afm-client/gooddata_afm_client/model/relative_date_filter.py b/gooddata-afm-client/gooddata_afm_client/model/relative_date_filter.py new file mode 100644 index 000000000..8cac31785 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/relative_date_filter.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.relative_date_filter_body import RelativeDateFilterBody + globals()['RelativeDateFilterBody'] = RelativeDateFilterBody + + +class RelativeDateFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'relative_date_filter': (RelativeDateFilterBody,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'relative_date_filter': 'relativeDateFilter', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, relative_date_filter, *args, **kwargs): # noqa: E501 + """RelativeDateFilter - a model defined in OpenAPI + + Args: + relative_date_filter (RelativeDateFilterBody): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.relative_date_filter = relative_date_filter + 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, relative_date_filter, *args, **kwargs): # noqa: E501 + """RelativeDateFilter - a model defined in OpenAPI + + Args: + relative_date_filter (RelativeDateFilterBody): + + 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: + 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.relative_date_filter = relative_date_filter + 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-afm-client/gooddata_afm_client/model/relative_date_filter_body.py b/gooddata-afm-client/gooddata_afm_client/model/relative_date_filter_body.py new file mode 100644 index 000000000..d8af72ef5 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/relative_date_filter_body.py @@ -0,0 +1,349 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier + from gooddata_afm_client.model.common_date_filter import CommonDateFilter + from gooddata_afm_client.model.relative_date_filter_body_all_of import RelativeDateFilterBodyAllOf + globals()['AfmObjectIdentifier'] = AfmObjectIdentifier + globals()['CommonDateFilter'] = CommonDateFilter + globals()['RelativeDateFilterBodyAllOf'] = RelativeDateFilterBodyAllOf + + +class RelativeDateFilterBody(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 { + 'dataset': (AfmObjectIdentifier,), # noqa: E501 + 'granularity': (str,), # noqa: E501 + '_from': (int,), # noqa: E501 + 'to': (int,), # noqa: E501 + 'apply_on_result': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dataset': 'dataset', # noqa: E501 + 'granularity': 'granularity', # noqa: E501 + '_from': 'from', # noqa: E501 + 'to': 'to', # noqa: E501 + 'apply_on_result': 'applyOnResult', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """RelativeDateFilterBody - a model defined in OpenAPI + + Keyword Args: + dataset (AfmObjectIdentifier): + granularity (str): Date granularity specifying particular date attribute in given dimension. + _from (int): Start of the filtering interval. Specified by number of periods (with respect to given granularity). Typically negative (historical time interval like -2 for '2 days/weeks, ... ago'). + to (int): End of the filtering interval. Specified by number of periods (with respect to given granularity). Value 'O' is representing current time-interval (current day, week, ...). + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 + """RelativeDateFilterBody - a model defined in OpenAPI + + Keyword Args: + dataset (AfmObjectIdentifier): + granularity (str): Date granularity specifying particular date attribute in given dimension. + _from (int): Start of the filtering interval. Specified by number of periods (with respect to given granularity). Typically negative (historical time interval like -2 for '2 days/weeks, ... ago'). + to (int): End of the filtering interval. Specified by number of periods (with respect to given granularity). Value 'O' is representing current time-interval (current day, week, ...). + _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,) + apply_on_result (bool): Force the filter to be applied on the result (true) or source data (false). If not specified at all the default behaviour specific to each type of filter is used.. [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: + 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 beause 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': [ + CommonDateFilter, + RelativeDateFilterBodyAllOf, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-afm-client/gooddata_afm_client/model/relative_date_filter_body_all_of.py b/gooddata-afm-client/gooddata_afm_client/model/relative_date_filter_body_all_of.py new file mode 100644 index 000000000..b3b77ecfe --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/relative_date_filter_body_all_of.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class RelativeDateFilterBodyAllOf(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 { + 'granularity': (str,), # noqa: E501 + '_from': (int,), # noqa: E501 + 'to': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'granularity': 'granularity', # noqa: E501 + '_from': 'from', # noqa: E501 + 'to': 'to', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, granularity, _from, to, *args, **kwargs): # noqa: E501 + """RelativeDateFilterBodyAllOf - a model defined in OpenAPI + + Args: + granularity (str): Date granularity specifying particular date attribute in given dimension. + _from (int): Start of the filtering interval. Specified by number of periods (with respect to given granularity). Typically negative (historical time interval like -2 for '2 days/weeks, ... ago'). + to (int): End of the filtering interval. Specified by number of periods (with respect to given granularity). Value 'O' is representing current time-interval (current day, week, ...). + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.granularity = granularity + self._from = _from + self.to = to + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, granularity, _from, to, *args, **kwargs): # noqa: E501 + """RelativeDateFilterBodyAllOf - a model defined in OpenAPI + + Args: + granularity (str): Date granularity specifying particular date attribute in given dimension. + _from (int): Start of the filtering interval. Specified by number of periods (with respect to given granularity). Typically negative (historical time interval like -2 for '2 days/weeks, ... ago'). + to (int): End of the filtering interval. Specified by number of periods (with respect to given granularity). Value 'O' is representing current time-interval (current day, week, ...). + + 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: + 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.granularity = granularity + self._from = _from + self.to = to + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-afm-client/gooddata_afm_client/model/result_dimension.py b/gooddata-afm-client/gooddata_afm_client/model/result_dimension.py new file mode 100644 index 000000000..1712a1bc1 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/result_dimension.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class ResultDimension(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 { + 'headers': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'headers': 'headers', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, headers, *args, **kwargs): # noqa: E501 + """ResultDimension - a model defined in OpenAPI + + Args: + headers ([dict]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.headers = headers + 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, headers, *args, **kwargs): # noqa: E501 + """ResultDimension - a model defined in OpenAPI + + Args: + headers ([dict]): + + 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: + 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.headers = headers + 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-afm-client/gooddata_afm_client/model/result_spec.py b/gooddata-afm-client/gooddata_afm_client/model/result_spec.py new file mode 100644 index 000000000..315f4188f --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/result_spec.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.dimension import Dimension + from gooddata_afm_client.model.grand_total import GrandTotal + globals()['Dimension'] = Dimension + globals()['GrandTotal'] = GrandTotal + + +class ResultSpec(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dimensions': ([Dimension],), # noqa: E501 + 'grand_totals': ([GrandTotal],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dimensions': 'dimensions', # noqa: E501 + 'grand_totals': 'grandTotals', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, dimensions, *args, **kwargs): # noqa: E501 + """ResultSpec - a model defined in OpenAPI + + Args: + dimensions ([Dimension]): + + 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,) + grand_totals ([GrandTotal]): [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: + 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.dimensions = dimensions + 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, dimensions, *args, **kwargs): # noqa: E501 + """ResultSpec - a model defined in OpenAPI + + Args: + dimensions ([Dimension]): + + 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,) + grand_totals ([GrandTotal]): [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: + 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.dimensions = dimensions + 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-afm-client/gooddata_afm_client/model/simple_measure_definition.py b/gooddata-afm-client/gooddata_afm_client/model/simple_measure_definition.py new file mode 100644 index 000000000..de117652c --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/simple_measure_definition.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.simple_measure_definition_measure import SimpleMeasureDefinitionMeasure + globals()['SimpleMeasureDefinitionMeasure'] = SimpleMeasureDefinitionMeasure + + +class SimpleMeasureDefinition(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'measure': (SimpleMeasureDefinitionMeasure,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'measure': 'measure', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, measure, *args, **kwargs): # noqa: E501 + """SimpleMeasureDefinition - a model defined in OpenAPI + + Args: + measure (SimpleMeasureDefinitionMeasure): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.measure = measure + 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, measure, *args, **kwargs): # noqa: E501 + """SimpleMeasureDefinition - a model defined in OpenAPI + + Args: + measure (SimpleMeasureDefinitionMeasure): + + 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: + 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.measure = measure + 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-afm-client/gooddata_afm_client/model/simple_measure_definition_measure.py b/gooddata-afm-client/gooddata_afm_client/model/simple_measure_definition_measure.py new file mode 100644 index 000000000..c5190f9b2 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/simple_measure_definition_measure.py @@ -0,0 +1,291 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier + from gooddata_afm_client.model.filter_definition_for_simple_measure import FilterDefinitionForSimpleMeasure + globals()['AfmObjectIdentifier'] = AfmObjectIdentifier + globals()['FilterDefinitionForSimpleMeasure'] = FilterDefinitionForSimpleMeasure + + +class SimpleMeasureDefinitionMeasure(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 = { + ('aggregation',): { + 'SUM': "SUM", + 'COUNT': "COUNT", + 'APPROXIMATE_COUNT': "APPROXIMATE_COUNT", + 'AVG': "AVG", + 'MIN': "MIN", + 'MAX': "MAX", + 'MEDIAN': "MEDIAN", + 'RUNSUM': "RUNSUM", + }, + } + + 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 { + 'item': (AfmObjectIdentifier,), # noqa: E501 + 'aggregation': (str,), # noqa: E501 + 'compute_ratio': (bool,), # noqa: E501 + 'filters': ([FilterDefinitionForSimpleMeasure],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'item': 'item', # noqa: E501 + 'aggregation': 'aggregation', # noqa: E501 + 'compute_ratio': 'computeRatio', # noqa: E501 + 'filters': 'filters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, item, *args, **kwargs): # noqa: E501 + """SimpleMeasureDefinitionMeasure - a model defined in OpenAPI + + Args: + item (AfmObjectIdentifier): + + 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,) + aggregation (str): Definition of aggregation type of the measure.. [optional] # noqa: E501 + compute_ratio (bool): If true compute the percentage of given measure values (broken down by AFM attributes) to the total (not broken down).. [optional] if omitted the server will use the default value of False # noqa: E501 + filters ([FilterDefinitionForSimpleMeasure]): Measure can be filtered by attribute filters with the same interface as ones for global AFM. Note that only one DateFilter is allowed.. [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: + 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.item = item + 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, item, *args, **kwargs): # noqa: E501 + """SimpleMeasureDefinitionMeasure - a model defined in OpenAPI + + Args: + item (AfmObjectIdentifier): + + 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,) + aggregation (str): Definition of aggregation type of the measure.. [optional] # noqa: E501 + compute_ratio (bool): If true compute the percentage of given measure values (broken down by AFM attributes) to the total (not broken down).. [optional] if omitted the server will use the default value of False # noqa: E501 + filters ([FilterDefinitionForSimpleMeasure]): Measure can be filtered by attribute filters with the same interface as ones for global AFM. Note that only one DateFilter is allowed.. [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: + 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.item = item + 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-afm-client/gooddata_afm_client/model/sort_direction.py b/gooddata-afm-client/gooddata_afm_client/model/sort_direction.py new file mode 100644 index 000000000..609dff737 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/sort_direction.py @@ -0,0 +1,288 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class SortDirection(ModelSimple): + """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. + 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 = { + ('value',): { + 'ASC': "ASC", + 'DESC': "DESC", + }, + } + + 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 { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """SortDirection - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Sorting elements - ascending/descending order.., must be one of ["ASC", "DESC", ] # noqa: E501 + + Keyword Args: + value (str): Sorting elements - ascending/descending order.., must be one of ["ASC", "DESC", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """SortDirection - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Sorting elements - ascending/descending order.., must be one of ["ASC", "DESC", ] # noqa: E501 + + Keyword Args: + value (str): Sorting elements - ascending/descending order.., must be one of ["ASC", "DESC", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-afm-client/gooddata_afm_client/model/sort_key_attribute.py b/gooddata-afm-client/gooddata_afm_client/model/sort_key_attribute.py new file mode 100644 index 000000000..eeb2d831b --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/sort_key_attribute.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.sort_key_attribute_attribute import SortKeyAttributeAttribute + globals()['SortKeyAttributeAttribute'] = SortKeyAttributeAttribute + + +class SortKeyAttribute(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attribute': (SortKeyAttributeAttribute,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attribute': 'attribute', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, attribute, *args, **kwargs): # noqa: E501 + """SortKeyAttribute - a model defined in OpenAPI + + Args: + attribute (SortKeyAttributeAttribute): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.attribute = attribute + 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, attribute, *args, **kwargs): # noqa: E501 + """SortKeyAttribute - a model defined in OpenAPI + + Args: + attribute (SortKeyAttributeAttribute): + + 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: + 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.attribute = attribute + 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-afm-client/gooddata_afm_client/model/sort_key_attribute_attribute.py b/gooddata-afm-client/gooddata_afm_client/model/sort_key_attribute_attribute.py new file mode 100644 index 000000000..58acdadcb --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/sort_key_attribute_attribute.py @@ -0,0 +1,271 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.sort_direction import SortDirection + globals()['SortDirection'] = SortDirection + + +class SortKeyAttributeAttribute(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attribute_identifier': (str,), # noqa: E501 + 'direction': (SortDirection,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attribute_identifier': 'attributeIdentifier', # noqa: E501 + 'direction': 'direction', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, attribute_identifier, *args, **kwargs): # noqa: E501 + """SortKeyAttributeAttribute - a model defined in OpenAPI + + Args: + attribute_identifier (str): One of the 'Dimension.itemIdentifiers' referencing the attribute which should be used for sorting the dimension.s + + 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,) + direction (SortDirection): [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: + 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.attribute_identifier = attribute_identifier + 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, attribute_identifier, *args, **kwargs): # noqa: E501 + """SortKeyAttributeAttribute - a model defined in OpenAPI + + Args: + attribute_identifier (str): One of the 'Dimension.itemIdentifiers' referencing the attribute which should be used for sorting the dimension.s + + 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,) + direction (SortDirection): [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: + 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.attribute_identifier = attribute_identifier + 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-afm-client/gooddata_afm_client/model/sort_key_value.py b/gooddata-afm-client/gooddata_afm_client/model/sort_key_value.py new file mode 100644 index 000000000..ac874c80e --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/sort_key_value.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.sort_key_value_value import SortKeyValueValue + globals()['SortKeyValueValue'] = SortKeyValueValue + + +class SortKeyValue(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'value': (SortKeyValueValue,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'value': 'value', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, value, *args, **kwargs): # noqa: E501 + """SortKeyValue - a model defined in OpenAPI + + Args: + value (SortKeyValueValue): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.value = value + 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, value, *args, **kwargs): # noqa: E501 + """SortKeyValue - a model defined in OpenAPI + + Args: + value (SortKeyValueValue): + + 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: + 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.value = value + 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-afm-client/gooddata_afm_client/model/sort_key_value_value.py b/gooddata-afm-client/gooddata_afm_client/model/sort_key_value_value.py new file mode 100644 index 000000000..3e7957dad --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/sort_key_value_value.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_afm_client.model.data_column_locator import DataColumnLocator + from gooddata_afm_client.model.sort_direction import SortDirection + globals()['DataColumnLocator'] = DataColumnLocator + globals()['SortDirection'] = SortDirection + + +class SortKeyValueValue(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data_column_locators': ({str: (DataColumnLocator,)},), # noqa: E501 + 'direction': (SortDirection,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data_column_locators': 'dataColumnLocators', # noqa: E501 + 'direction': 'direction', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data_column_locators, *args, **kwargs): # noqa: E501 + """SortKeyValueValue - a model defined in OpenAPI + + Args: + data_column_locators ({str: (DataColumnLocator,)}): Mapping from dimensions to data column locators. Locators for each dimension opposite to the sorted one must be specified. + + 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,) + direction (SortDirection): [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: + 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.data_column_locators = data_column_locators + 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, data_column_locators, *args, **kwargs): # noqa: E501 + """SortKeyValueValue - a model defined in OpenAPI + + Args: + data_column_locators ({str: (DataColumnLocator,)}): Mapping from dimensions to data column locators. Locators for each dimension opposite to the sorted one must be specified. + + 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,) + direction (SortDirection): [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: + 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.data_column_locators = data_column_locators + 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-afm-client/gooddata_afm_client/model/total_function.py b/gooddata-afm-client/gooddata_afm_client/model/total_function.py new file mode 100644 index 000000000..1b0257dd6 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model/total_function.py @@ -0,0 +1,291 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_afm_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, +) +from ..model_utils import OpenApiModel +from gooddata_afm_client.exceptions import ApiAttributeError + + + +class TotalFunction(ModelSimple): + """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. + 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 = { + ('value',): { + 'SUM': "SUM", + 'MIN': "MIN", + 'MAX': "MAX", + 'AVG': "AVG", + 'MED': "MED", + }, + } + + 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 { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """TotalFunction - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Sorting elements - ascending/descending order.., must be one of ["SUM", "MIN", "MAX", "AVG", "MED", ] # noqa: E501 + + Keyword Args: + value (str): Sorting elements - ascending/descending order.., must be one of ["SUM", "MIN", "MAX", "AVG", "MED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """TotalFunction - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): Sorting elements - ascending/descending order.., must be one of ["SUM", "MIN", "MAX", "AVG", "MED", ] # noqa: E501 + + Keyword Args: + value (str): Sorting elements - ascending/descending order.., must be one of ["SUM", "MIN", "MAX", "AVG", "MED", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-afm-client/gooddata_afm_client/model_utils.py b/gooddata-afm-client/gooddata_afm_client/model_utils.py new file mode 100644 index 000000000..b2279c439 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/model_utils.py @@ -0,0 +1,1992 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +from datetime import date, datetime # noqa: F401 +import inspect +import io +import os +import pprint +import re +import tempfile + +from dateutil.parser import parse + +from gooddata_afm_client.exceptions import ( + ApiKeyError, + ApiAttributeError, + ApiTypeError, + ApiValueError, +) + +none_type = type(None) +file_type = io.IOBase + + +def convert_js_args_to_python_args(fn): + from functools import wraps + @wraps(fn) + def wrapped_init(_self_loathing__loathing__loathing_, *args, **kwargs): + """ + An attribute named `self` received from the api will conflicts with the reserved `self` + parameter of a class method. During generation, `self` attributes are mapped + to `_self_loathing__loathing__loathing_` in models. Here, we name `_self_loathing__loathing__loathing_` instead of `self` to avoid conflicts. + """ + spec_property_naming = kwargs.get('_spec_property_naming', False) + if spec_property_naming: + kwargs = change_keys_js_to_python(kwargs, _self_loathing__loathing__loathing_ if isinstance(_self_loathing__loathing__loathing_, type) else _self_loathing__loathing__loathing_.__class__) + return fn(_self_loathing__loathing__loathing_, *args, **kwargs) + return wrapped_init + + +class cached_property(object): + # this caches the result of the function call for fn with no inputs + # use this as a decorator on function methods that you want converted + # into cached properties + result_key = '_results' + + def __init__(self, fn): + self._fn = fn + + def __get__(self, instance, cls=None): + if self.result_key in vars(self): + return vars(self)[self.result_key] + else: + result = self._fn() + setattr(self, self.result_key, result) + return result + + +PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) + +def allows_single_value_input(cls): + """ + This function returns True if the input composed schema model or any + descendant model allows a value only input + This is true for cases where oneOf contains items like: + oneOf: + - float + - NumberWithValidation + - StringEnum + - ArrayModel + - null + TODO: lru_cache this + """ + if ( + issubclass(cls, ModelSimple) or + cls in PRIMITIVE_TYPES + ): + return True + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return False + return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) + return False + +def composed_model_input_classes(cls): + """ + This function returns a list of the possible models that can be accepted as + inputs. + TODO: lru_cache this + """ + if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: + return [cls] + elif issubclass(cls, ModelNormal): + if cls.discriminator is None: + return [cls] + else: + return get_discriminated_classes(cls) + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return [] + if cls.discriminator is None: + input_classes = [] + for c in cls._composed_schemas['oneOf']: + input_classes.extend(composed_model_input_classes(c)) + return input_classes + else: + return get_discriminated_classes(cls) + return [] + + +class OpenApiModel(object): + """The base class for all OpenAPIModels""" + + def set_attribute(self, name, value): + # this is only used to set properties on self + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._spec_property_naming, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value, + self._configuration + ) + self.__dict__['_data_store'][name] = value + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other + + def __setattr__(self, attr, value): + """set the value of an attribute using dot notation: `instance.attr = val`""" + self[attr] = value + + def __getattr__(self, attr): + """get the value of an attribute using dot notation: `instance.attr`""" + return self.__getitem__(attr) + + def __new__(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: 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 the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return super(OpenApiModel, cls).__new__(cls) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return super(OpenApiModel, cls).__new__(cls) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = super(OpenApiModel, cls).__new__(cls) + self_inst.__init__(*args, **kwargs) + + new_inst = new_cls.__new__(new_cls, *args, **kwargs) + new_inst.__init__(*args, **kwargs) + return new_inst + + + @classmethod + @convert_js_args_to_python_args + def _new_from_openapi_data(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: 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 the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return cls._from_openapi_data(*args, **kwargs) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return cls._from_openapi_data(*args, **kwargs) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = cls._from_openapi_data(*args, **kwargs) + + + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) + return new_inst + + +class ModelSimple(OpenApiModel): + """the parent class of models whose type != object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_str(self): + """Returns the string representation of the model""" + return str(self.value) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + this_val = self._data_store['value'] + that_val = other._data_store['value'] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + return vals_equal + + +class ModelNormal(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +class ModelComposed(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi and have oneOf/allOf/anyOf + + When one sets a property we use var_name_to_model_instances to store the value in + the correct class instances + run any type checking + validation code. + When one gets a property we use var_name_to_model_instances to get the value + from the correct class instances. + This allows multiple composed schemas to contain the same property with additive + constraints on the value. + + _composed_schemas (dict) stores the anyOf/allOf/oneOf classes + key (str): allOf/oneOf/anyOf + value (list): the classes in the XOf definition. + Note: none_type can be included when the openapi document version >= 3.1.0 + _composed_instances (list): stores a list of instances of the composed schemas + defined in _composed_schemas. When properties are accessed in the self instance, + they are returned from the self._data_store or the data stores in the instances + in self._composed_schemas + _var_name_to_model_instances (dict): maps between a variable name on self and + the composed instances (self included) which contain that data + key (str): property name + value (list): list of class instances, self or instances in _composed_instances + which contain the value that the key is referring to. + """ + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + """ + Use cases: + 1. additional_properties_type is None (additionalProperties == False in spec) + Check for property presence in self.openapi_types + if not present then throw an error + if present set in self, set attribute + always set on composed schemas + 2. additional_properties_type exists + set attribute on self + always set on composed schemas + """ + if self.additional_properties_type is None: + """ + For an attribute to exist on a composed schema it must: + - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND + - fulfill schema_requirements in each oneOf/anyOf/allOf schemas + + schema_requirements: + For an attribute to exist on a schema it must: + - be present in properties at the schema OR + - have additionalProperties unset (defaults additionalProperties = any type) OR + - have additionalProperties set + """ + if name not in self.openapi_types: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + # attribute must be set on self and composed instances + self.set_attribute(name, value) + for model_instance in self._composed_instances: + setattr(model_instance, name, value) + if name not in self._var_name_to_model_instances: + # we assigned an additional property + self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] + return None + + __unset_attribute_value__ = object() + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + # get the attribute from the correct instance + model_instances = self._var_name_to_model_instances.get(name) + values = [] + # A composed model stores self and child (oneof/anyOf/allOf) models under + # self._var_name_to_model_instances. + # Any property must exist in self and all model instances + # The value stored in all model instances must be the same + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + v = model_instance._data_store[name] + if v not in values: + values.append(v) + len_values = len(values) + if len_values == 0: + return default + elif len_values == 1: + return values[0] + elif len_values > 1: + raise ApiValueError( + "Values stored for property {0} in {1} differ when looking " + "at self and self's composed instances. All values must be " + "the same".format(name, type(self).__name__), + [e for e in [self._path_to_item, name] if e] + ) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + value = self.get(name, self.__unset_attribute_value__) + if value is self.__unset_attribute_value__: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + return value + + def __contains__(self, name): + """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`""" + + if name in self.required_properties: + return name in self.__dict__ + + model_instances = self._var_name_to_model_instances.get( + name, self._additional_properties_model_instances) + + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + return True + + return False + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +COERCION_INDEX_BY_TYPE = { + ModelComposed: 0, + ModelNormal: 1, + ModelSimple: 2, + none_type: 3, # The type of 'None'. + list: 4, + dict: 5, + float: 6, + int: 7, + bool: 8, + datetime: 9, + date: 10, + str: 11, + file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. +} + +# these are used to limit what type conversions we try to do +# when we have a valid type already and we want to try converting +# to another type +UPCONVERSION_TYPE_PAIRS = ( + (str, datetime), + (str, date), + (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + (list, ModelComposed), + (dict, ModelComposed), + (str, ModelComposed), + (int, ModelComposed), + (float, ModelComposed), + (list, ModelComposed), + (list, ModelNormal), + (dict, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), +) + +COERCIBLE_TYPE_PAIRS = { + False: ( # client instantiation of a model with client data + # (dict, ModelComposed), + # (list, ModelComposed), + # (dict, ModelNormal), + # (list, ModelNormal), + # (str, ModelSimple), + # (int, ModelSimple), + # (float, ModelSimple), + # (list, ModelSimple), + # (str, int), + # (str, float), + # (str, datetime), + # (str, date), + # (int, str), + # (float, str), + ), + True: ( # server -> client data + (dict, ModelComposed), + (list, ModelComposed), + (dict, ModelNormal), + (list, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), + # (str, int), + # (str, float), + (str, datetime), + (str, date), + # (int, str), + # (float, str), + (str, file_type) + ), +} + + +def get_simple_class(input_value): + """Returns an input_value's simple class that we will use for type checking + Python2: + float and int will return int, where int is the python3 int backport + str and unicode will return str, where str is the python3 str backport + Note: float and int ARE both instances of int backport + Note: str_py2 and unicode_py2 are NOT both instances of str backport + + Args: + input_value (class/class_instance): the item for which we will return + the simple class + """ + if isinstance(input_value, type): + # input_value is a class + return input_value + elif isinstance(input_value, tuple): + return tuple + elif isinstance(input_value, list): + return list + elif isinstance(input_value, dict): + return dict + elif isinstance(input_value, none_type): + return none_type + elif isinstance(input_value, file_type): + return file_type + elif isinstance(input_value, bool): + # this must be higher than the int check because + # isinstance(True, int) == True + return bool + elif isinstance(input_value, int): + return int + elif isinstance(input_value, datetime): + # this must be higher than the date check because + # isinstance(datetime_instance, date) == True + return datetime + elif isinstance(input_value, date): + return date + elif isinstance(input_value, str): + return str + return type(input_value) + + +def check_allowed_values(allowed_values, input_variable_path, input_values): + """Raises an exception if the input_values are not allowed + + Args: + allowed_values (dict): the allowed_values dict + input_variable_path (tuple): the path to the input variable + input_values (list/str/int/float/date/datetime): the values that we + are checking to see if they are in allowed_values + """ + these_allowed_values = list(allowed_values[input_variable_path].values()) + if (isinstance(input_values, list) + and not set(input_values).issubset( + set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values) - set(these_allowed_values))), + raise ApiValueError( + "Invalid values for `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (isinstance(input_values, dict) + and not set( + input_values.keys()).issubset(set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values.keys()) - set(these_allowed_values))) + raise ApiValueError( + "Invalid keys in `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (not isinstance(input_values, (list, dict)) + and input_values not in these_allowed_values): + raise ApiValueError( + "Invalid value for `%s` (%s), must be one of %s" % + ( + input_variable_path[0], + input_values, + these_allowed_values + ) + ) + + +def is_json_validation_enabled(schema_keyword, configuration=None): + """Returns true if JSON schema validation is enabled for the specified + validation keyword. This can be used to skip JSON schema structural validation + as requested in the configuration. + + Args: + schema_keyword (string): the name of a JSON schema validation keyword. + configuration (Configuration): the configuration class. + """ + + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) + + +def check_validations( + validations, input_variable_path, input_values, + configuration=None): + """Raises an exception if the input_values are invalid + + Args: + validations (dict): the validation dictionary. + input_variable_path (tuple): the path to the input variable. + input_values (list/str/int/float/date/datetime): the values that we + are checking. + configuration (Configuration): the configuration class. + """ + + if input_values is None: + return + + current_validations = validations[input_variable_path] + if (is_json_validation_enabled('multipleOf', configuration) and + 'multiple_of' in current_validations and + isinstance(input_values, (int, float)) and + not (float(input_values) / current_validations['multiple_of']).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + raise ApiValueError( + "Invalid value for `%s`, value must be a multiple of " + "`%s`" % ( + input_variable_path[0], + current_validations['multiple_of'] + ) + ) + + if (is_json_validation_enabled('maxLength', configuration) and + 'max_length' in current_validations and + len(input_values) > current_validations['max_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['max_length'] + ) + ) + + if (is_json_validation_enabled('minLength', configuration) and + 'min_length' in current_validations and + len(input_values) < current_validations['min_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be greater than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['min_length'] + ) + ) + + if (is_json_validation_enabled('maxItems', configuration) and + 'max_items' in current_validations and + len(input_values) > current_validations['max_items']): + raise ApiValueError( + "Invalid value for `%s`, number of items must be less than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['max_items'] + ) + ) + + if (is_json_validation_enabled('minItems', configuration) and + 'min_items' in current_validations and + len(input_values) < current_validations['min_items']): + raise ValueError( + "Invalid value for `%s`, number of items must be greater than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['min_items'] + ) + ) + + items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum') + if (any(item in current_validations for item in items)): + if isinstance(input_values, list): + max_val = max(input_values) + min_val = min(input_values) + elif isinstance(input_values, dict): + max_val = max(input_values.values()) + min_val = min(input_values.values()) + else: + max_val = input_values + min_val = input_values + + if (is_json_validation_enabled('exclusiveMaximum', configuration) and + 'exclusive_maximum' in current_validations and + max_val >= current_validations['exclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than `%s`" % ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('maximum', configuration) and + 'inclusive_maximum' in current_validations and + max_val > current_validations['inclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['inclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('exclusiveMinimum', configuration) and + 'exclusive_minimum' in current_validations and + min_val <= current_validations['exclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than `%s`" % + ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('minimum', configuration) and + 'inclusive_minimum' in current_validations and + min_val < current_validations['inclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than or equal " + "to `%s`" % ( + input_variable_path[0], + current_validations['inclusive_minimum'] + ) + ) + flags = current_validations.get('regex', {}).get('flags', 0) + if (is_json_validation_enabled('pattern', configuration) and + 'regex' in current_validations and + not re.search(current_validations['regex']['pattern'], + input_values, flags=flags)): + err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( + input_variable_path[0], + current_validations['regex']['pattern'] + ) + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + err_msg = r"%s with flags=`%s`" % (err_msg, flags) + raise ApiValueError(err_msg) + + +def order_response_types(required_types): + """Returns the required types sorted in coercion order + + Args: + required_types (list/tuple): collection of classes or instance of + list or dict with class information inside it. + + Returns: + (list): coercion order sorted collection of classes or instance + of list or dict with class information inside it. + """ + + def index_getter(class_or_instance): + if isinstance(class_or_instance, list): + return COERCION_INDEX_BY_TYPE[list] + elif isinstance(class_or_instance, dict): + return COERCION_INDEX_BY_TYPE[dict] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelComposed)): + return COERCION_INDEX_BY_TYPE[ModelComposed] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelNormal)): + return COERCION_INDEX_BY_TYPE[ModelNormal] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelSimple)): + return COERCION_INDEX_BY_TYPE[ModelSimple] + elif class_or_instance in COERCION_INDEX_BY_TYPE: + return COERCION_INDEX_BY_TYPE[class_or_instance] + raise ApiValueError("Unsupported type: %s" % class_or_instance) + + sorted_types = sorted( + required_types, + key=lambda class_or_instance: index_getter(class_or_instance) + ) + return sorted_types + + +def remove_uncoercible(required_types_classes, current_item, spec_property_naming, + must_convert=True): + """Only keeps the type conversions that are possible + + Args: + required_types_classes (tuple): tuple of classes that are required + these should be ordered by COERCION_INDEX_BY_TYPE + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + current_item (any): the current item (input data) to be converted + + Keyword Args: + must_convert (bool): if True the item to convert is of the wrong + type and we want a big list of coercibles + if False, we want a limited list of coercibles + + Returns: + (list): the remaining coercible required types, classes only + """ + current_type_simple = get_simple_class(current_item) + + results_classes = [] + for required_type_class in required_types_classes: + # convert our models to OpenApiModel + required_type_class_simplified = required_type_class + if isinstance(required_type_class_simplified, type): + if issubclass(required_type_class_simplified, ModelComposed): + required_type_class_simplified = ModelComposed + elif issubclass(required_type_class_simplified, ModelNormal): + required_type_class_simplified = ModelNormal + elif issubclass(required_type_class_simplified, ModelSimple): + required_type_class_simplified = ModelSimple + + if required_type_class_simplified == current_type_simple: + # don't consider converting to one's own class + continue + + class_pair = (current_type_simple, required_type_class_simplified) + if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: + results_classes.append(required_type_class) + elif class_pair in UPCONVERSION_TYPE_PAIRS: + results_classes.append(required_type_class) + return results_classes + +def get_discriminated_classes(cls): + """ + Returns all the classes that a discriminator converts to + TODO: lru_cache this + """ + possible_classes = [] + key = list(cls.discriminator.keys())[0] + if is_type_nullable(cls): + possible_classes.append(cls) + for discr_cls in cls.discriminator[key].values(): + if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: + possible_classes.extend(get_discriminated_classes(discr_cls)) + else: + possible_classes.append(discr_cls) + return possible_classes + + +def get_possible_classes(cls, from_server_context): + # TODO: lru_cache this + possible_classes = [cls] + if from_server_context: + return possible_classes + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + possible_classes = [] + possible_classes.extend(get_discriminated_classes(cls)) + elif issubclass(cls, ModelComposed): + possible_classes.extend(composed_model_input_classes(cls)) + return possible_classes + + +def get_required_type_classes(required_types_mixed, spec_property_naming): + """Converts the tuple required_types into a tuple and a dict described + below + + Args: + required_types_mixed (tuple/list): will contain either classes or + instance of list or dict + spec_property_naming (bool): if True these values came from the + server, and we use the data types in our endpoints. + If False, we are client side and we need to include + oneOf and discriminator classes inside the data types in our endpoints + + Returns: + (valid_classes, dict_valid_class_to_child_types_mixed): + valid_classes (tuple): the valid classes that the current item + should be + dict_valid_class_to_child_types_mixed (dict): + valid_class (class): this is the key + child_types_mixed (list/dict/tuple): describes the valid child + types + """ + valid_classes = [] + child_req_types_by_current_type = {} + for required_type in required_types_mixed: + if isinstance(required_type, list): + valid_classes.append(list) + child_req_types_by_current_type[list] = required_type + elif isinstance(required_type, tuple): + valid_classes.append(tuple) + child_req_types_by_current_type[tuple] = required_type + elif isinstance(required_type, dict): + valid_classes.append(dict) + child_req_types_by_current_type[dict] = required_type[str] + else: + valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) + return tuple(valid_classes), child_req_types_by_current_type + + +def change_keys_js_to_python(input_dict, model_class): + """ + Converts from javascript_key keys in the input_dict to python_keys in + the output dict using the mapping in model_class. + If the input_dict contains a key which does not declared in the model_class, + the key is added to the output dict as is. The assumption is the model_class + may have undeclared properties (additionalProperties attribute in the OAS + document). + """ + + if getattr(model_class, 'attribute_map', None) is None: + return input_dict + output_dict = {} + reversed_attr_map = {value: key for key, value in + model_class.attribute_map.items()} + for javascript_key, value in input_dict.items(): + python_key = reversed_attr_map.get(javascript_key) + if python_key is None: + # if the key is unknown, it is in error or it is an + # additionalProperties variable + python_key = javascript_key + output_dict[python_key] = value + return output_dict + + +def get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type + ) + + +def deserialize_primitive(data, klass, path_to_item): + """Deserializes string to primitive type. + + :param data: str/int/float + :param klass: str/class the class to convert to + + :return: int, float, str, bool, date, datetime + """ + additional_message = "" + try: + if klass in {datetime, date}: + additional_message = ( + "If you need your parameter to have a fallback " + "string value, please set its type as `type: {}` in your " + "spec. That allows the value to be any type. " + ) + if klass == datetime: + if len(data) < 8: + raise ValueError("This is not a datetime") + # The string should be in iso8601 datetime format. + parsed_datetime = parse(data) + date_only = ( + parsed_datetime.hour == 0 and + parsed_datetime.minute == 0 and + parsed_datetime.second == 0 and + parsed_datetime.tzinfo is None and + 8 <= len(data) <= 10 + ) + if date_only: + raise ValueError("This is a date, not a datetime") + return parsed_datetime + elif klass == date: + if len(data) < 8: + raise ValueError("This is not a date") + return parse(data).date() + else: + converted_value = klass(data) + if isinstance(data, str) and klass == float: + if str(converted_value) != data: + # '7' -> 7.0 -> '7.0' != '7' + raise ValueError('This is not a float') + return converted_value + except (OverflowError, ValueError) as ex: + # parse can raise OverflowError + raise ApiValueError( + "{0}Failed to parse {1} as {2}".format( + additional_message, repr(data), klass.__name__ + ), + path_to_item=path_to_item + ) from ex + + +def get_discriminator_class(model_class, + discr_name, + discr_value, cls_visited): + """Returns the child class specified by the discriminator. + + Args: + model_class (OpenApiModel): the model class. + discr_name (string): the name of the discriminator property. + discr_value (any): the discriminator value. + cls_visited (list): list of model classes that have been visited. + Used to determine the discriminator class without + visiting circular references indefinitely. + + Returns: + used_model_class (class/None): the chosen child class that will be used + to deserialize the data, for example dog.Dog. + If a class is not found, None is returned. + """ + + if model_class in cls_visited: + # The class has already been visited and no suitable class was found. + return None + cls_visited.append(model_class) + used_model_class = None + if discr_name in model_class.discriminator: + class_name_to_discr_class = model_class.discriminator[discr_name] + used_model_class = class_name_to_discr_class.get(discr_value) + if used_model_class is None: + # We didn't find a discriminated class in class_name_to_discr_class. + # So look in the ancestor or descendant discriminators + # The discriminator mapping may exist in a descendant (anyOf, oneOf) + # or ancestor (allOf). + # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat + # hierarchy, the discriminator mappings may be defined at any level + # in the hierarchy. + # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig + # if we try to make BasquePig from mammal, we need to travel through + # the oneOf descendant discriminators to find BasquePig + descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ + model_class._composed_schemas.get('anyOf', ()) + ancestor_classes = model_class._composed_schemas.get('allOf', ()) + possible_classes = descendant_classes + ancestor_classes + for cls in possible_classes: + # Check if the schema has inherited discriminators. + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + used_model_class = get_discriminator_class( + cls, discr_name, discr_value, cls_visited) + if used_model_class is not None: + return used_model_class + return used_model_class + + +def deserialize_model(model_data, model_class, path_to_item, check_type, + configuration, spec_property_naming): + """Deserializes model_data to model instance. + + Args: + model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model + model_class (OpenApiModel): the model class + path_to_item (list): path to the model in the received data + check_type (bool): whether to check the data tupe for the values in + the model + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + + Returns: + model instance + + Raise: + ApiTypeError + ApiValueError + ApiKeyError + """ + + kw_args = dict(_check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _spec_property_naming=spec_property_naming) + + if issubclass(model_class, ModelSimple): + return model_class._new_from_openapi_data(model_data, **kw_args) + elif isinstance(model_data, list): + return model_class._new_from_openapi_data(*model_data, **kw_args) + if isinstance(model_data, dict): + kw_args.update(model_data) + return model_class._new_from_openapi_data(**kw_args) + elif isinstance(model_data, PRIMITIVE_TYPES): + return model_class._new_from_openapi_data(model_data, **kw_args) + + +def deserialize_file(response_data, configuration, content_disposition=None): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + Args: + param response_data (str): the file data to write + configuration (Configuration): the instance to use to convert files + + Keyword Args: + content_disposition (str): the value of the Content-Disposition + header + + Returns: + (file_type): the deserialized file which is open + The user is responsible for closing and reading the file + """ + fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + + f = open(path, "rb") + return f + + +def attempt_convert_item(input_value, valid_classes, path_to_item, + configuration, spec_property_naming, key_type=False, + must_convert=False, check_type=True): + """ + Args: + input_value (any): the data to convert + valid_classes (any): the classes that are valid + path_to_item (list): the path to the item to convert + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + key_type (bool): if True we need to convert a key type (not supported) + must_convert (bool): if True we must convert + check_type (bool): if True we check the type or the returned data in + ModelComposed/ModelNormal/ModelSimple instances + + Returns: + instance (any) the fixed item + + Raises: + ApiTypeError + ApiValueError + ApiKeyError + """ + valid_classes_ordered = order_response_types(valid_classes) + valid_classes_coercible = remove_uncoercible( + valid_classes_ordered, input_value, spec_property_naming) + if not valid_classes_coercible or key_type: + # we do not handle keytype errors, json will take care + # of this for us + if configuration is None or not configuration.discard_unknown_keys: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=key_type) + for valid_class in valid_classes_coercible: + try: + if issubclass(valid_class, OpenApiModel): + return deserialize_model(input_value, valid_class, + path_to_item, check_type, + configuration, spec_property_naming) + elif valid_class == file_type: + return deserialize_file(input_value, configuration) + return deserialize_primitive(input_value, valid_class, + path_to_item) + except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: + if must_convert: + raise conversion_exc + # if we have conversion errors when must_convert == False + # we ignore the exception and move on to the next class + continue + # we were unable to convert, must_convert == False + return input_value + + +def is_type_nullable(input_type): + """ + Returns true if None is an allowed value for the specified input_type. + + A type is nullable if at least one of the following conditions is true: + 1. The OAS 'nullable' attribute has been specified, + 1. The type is the 'null' type, + 1. The type is a anyOf/oneOf composed schema, and a child schema is + the 'null' type. + Args: + input_type (type): the class of the input_value that we are + checking + Returns: + bool + """ + if input_type is none_type: + return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: + return True + if issubclass(input_type, ModelComposed): + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + for t in input_type._composed_schemas.get('oneOf', ()): + if is_type_nullable(t): return True + for t in input_type._composed_schemas.get('anyOf', ()): + if is_type_nullable(t): return True + return False + + +def is_valid_type(input_class_simple, valid_classes): + """ + Args: + input_class_simple (class): the class of the input_value that we are + checking + valid_classes (tuple): the valid classes that the current item + should be + Returns: + bool + """ + valid_type = input_class_simple in valid_classes + if not valid_type and ( + issubclass(input_class_simple, OpenApiModel) or + input_class_simple is none_type): + for valid_class in valid_classes: + if input_class_simple is none_type and is_type_nullable(valid_class): + # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. + return True + if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): + continue + discr_propertyname_py = list(valid_class.discriminator.keys())[0] + discriminator_classes = ( + valid_class.discriminator[discr_propertyname_py].values() + ) + valid_type = is_valid_type(input_class_simple, discriminator_classes) + if valid_type: + return True + return valid_type + + +def validate_and_convert_types(input_value, required_types_mixed, path_to_item, + spec_property_naming, _check_type, configuration=None): + """Raises a TypeError is there is a problem, otherwise returns value + + Args: + input_value (any): the data to validate/convert + required_types_mixed (list/dict/tuple): A list of + valid classes, or a list tuples of valid classes, or a dict where + the value is a tuple of value classes + path_to_item: (list) the path to the data being validated + this stores a list of keys or indices to get to the data being + validated + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + _check_type: (boolean) if true, type will be checked and conversion + will be attempted. + configuration: (Configuration): the configuration class to use + when converting file_type items. + If passed, conversion will be attempted when possible + If not passed, no conversions will be attempted and + exceptions will be raised + + Returns: + the correctly typed value + + Raises: + ApiTypeError + """ + results = get_required_type_classes(required_types_mixed, spec_property_naming) + valid_classes, child_req_types_by_current_type = results + + input_class_simple = get_simple_class(input_value) + valid_type = is_valid_type(input_class_simple, valid_classes) + if not valid_type: + if configuration: + # if input_value is not valid_type try to convert it + converted_instance = attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=True, + check_type=_check_type + ) + return converted_instance + else: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=False) + + # input_value's type is in valid_classes + if len(valid_classes) > 1 and configuration: + # there are valid classes which are not the current class + valid_classes_coercible = remove_uncoercible( + valid_classes, input_value, spec_property_naming, must_convert=False) + if valid_classes_coercible: + converted_instance = attempt_convert_item( + input_value, + valid_classes_coercible, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=False, + check_type=_check_type + ) + return converted_instance + + if child_req_types_by_current_type == {}: + # all types are of the required types and there are no more inner + # variables left to look at + return input_value + inner_required_types = child_req_types_by_current_type.get( + type(input_value) + ) + if inner_required_types is None: + # for this type, there are not more inner variables left to look at + return input_value + if isinstance(input_value, list): + if input_value == []: + # allow an empty list + return input_value + for index, inner_value in enumerate(input_value): + inner_path = list(path_to_item) + inner_path.append(index) + input_value[index] = validate_and_convert_types( + inner_value, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + elif isinstance(input_value, dict): + if input_value == {}: + # allow an empty dict + return input_value + for inner_key, inner_val in input_value.items(): + inner_path = list(path_to_item) + inner_path.append(inner_key) + if get_simple_class(inner_key) != str: + raise get_type_error(inner_key, inner_path, valid_classes, + key_type=True) + input_value[inner_key] = validate_and_convert_types( + inner_val, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + return input_value + + +def model_to_dict(model_instance, serialize=True): + """Returns the model properties as a dict + + Args: + model_instance (one of your model instances): the model instance that + will be converted to a dict. + + Keyword Args: + serialize (bool): if True, the keys in the dict will be values from + attribute_map + """ + result = {} + + model_instances = [model_instance] + if model_instance._composed_schemas: + model_instances.extend(model_instance._composed_instances) + seen_json_attribute_names = set() + used_fallback_python_attribute_names = set() + py_to_json_map = {} + for model_instance in model_instances: + for attr, value in model_instance._data_store.items(): + if serialize: + # we use get here because additional property key names do not + # exist in attribute_map + try: + attr = model_instance.attribute_map[attr] + py_to_json_map.update(model_instance.attribute_map) + seen_json_attribute_names.add(attr) + except KeyError: + used_fallback_python_attribute_names.add(attr) + if isinstance(value, list): + if not value: + # empty list or None + result[attr] = value + else: + res = [] + for v in value: + if isinstance(v, PRIMITIVE_TYPES) or v is None: + res.append(v) + elif isinstance(v, ModelSimple): + res.append(v.value) + else: + res.append(model_to_dict(v, serialize=serialize)) + result[attr] = res + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], + model_to_dict(item[1], serialize=serialize)) + if hasattr(item[1], '_data_store') else item, + value.items() + )) + elif isinstance(value, ModelSimple): + result[attr] = value.value + elif hasattr(value, '_data_store'): + result[attr] = model_to_dict(value, serialize=serialize) + else: + result[attr] = value + if serialize: + for python_key in used_fallback_python_attribute_names: + json_key = py_to_json_map.get(python_key) + if json_key is None: + continue + if python_key == json_key: + continue + json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names + if json_key_assigned_no_need_for_python_key: + del result[python_key] + + return result + + +def type_error_message(var_value=None, var_name=None, valid_classes=None, + key_type=None): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + """ + key_or_value = 'value' + if key_type: + key_or_value = 'key' + valid_classes_phrase = get_valid_classes_phrase(valid_classes) + msg = ( + "Invalid type for variable '{0}'. Required {1} type {2} and " + "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + ) + return msg + + +def get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed + """ + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return 'is {0}'.format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def get_allof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + used to make instances + constant_args (dict): + metadata arguments: + _check_type + _path_to_item + _spec_property_naming + _configuration + _visited_composed_classes + + Returns + composed_instances (list) + """ + composed_instances = [] + for allof_class in self._composed_schemas['allOf']: + + try: + allof_instance = allof_class(**model_args, **constant_args) + composed_instances.append(allof_instance) + except Exception as ex: + raise ApiValueError( + "Invalid inputs given to generate an instance of '%s'. The " + "input data was invalid for the allOf schema '%s' in the composed " + "schema '%s'. Error=%s" % ( + allof_class.__name__, + allof_class.__name__, + self.__class__.__name__, + str(ex) + ) + ) from ex + return composed_instances + + +def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): + """ + Find the oneOf schema that matches the input data (e.g. payload). + If exactly one schema matches the input data, an instance of that schema + is returned. + If zero or more than one schema match the input data, an exception is raised. + In OAS 3.x, the payload MUST, by validation, match exactly one of the + schemas described by oneOf. + + Args: + cls: the class we are handling + model_kwargs (dict): var_name to var_value + The input data, e.g. the payload that must match a oneOf schema + in the OpenAPI document. + constant_kwargs (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Kwargs: + model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): + the value to assign to a primitive class or ModelSimple class + Notes: + - this is only passed in when oneOf includes types which are not object + - None is used to suppress handling of model_arg, nullable models are handled in __new__ + + Returns + oneof_instance (instance) + """ + if len(cls._composed_schemas['oneOf']) == 0: + return None + + oneof_instances = [] + # Iterate over each oneOf schema and determine if the input data + # matches the oneOf schemas. + for oneof_class in cls._composed_schemas['oneOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if oneof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + single_value_input = allows_single_value_input(oneof_class) + + try: + if not single_value_input: + oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) + else: + if issubclass(oneof_class, ModelSimple): + oneof_instance = oneof_class(model_arg, **constant_kwargs) + elif oneof_class in PRIMITIVE_TYPES: + oneof_instance = validate_and_convert_types( + model_arg, + (oneof_class,), + constant_kwargs['_path_to_item'], + constant_kwargs['_spec_property_naming'], + constant_kwargs['_check_type'], + configuration=constant_kwargs['_configuration'] + ) + oneof_instances.append(oneof_instance) + except Exception: + pass + if len(oneof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None " + "of the oneOf schemas matched the input data." % + cls.__name__ + ) + elif len(oneof_instances) > 1: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. Multiple " + "oneOf schemas matched the inputs, but a max of one is allowed." % + cls.__name__ + ) + return oneof_instances[0] + + +def get_anyof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + The input data, e.g. the payload that must match at least one + anyOf child schema in the OpenAPI document. + constant_args (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Returns + anyof_instances (list) + """ + anyof_instances = [] + if len(self._composed_schemas['anyOf']) == 0: + return anyof_instances + + for anyof_class in self._composed_schemas['anyOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if anyof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + try: + anyof_instance = anyof_class(**model_args, **constant_args) + anyof_instances.append(anyof_instance) + except Exception: + pass + if len(anyof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None of the " + "anyOf schemas matched the inputs." % + self.__class__.__name__ + ) + return anyof_instances + + +def get_discarded_args(self, composed_instances, model_args): + """ + Gathers the args that were discarded by configuration.discard_unknown_keys + """ + model_arg_keys = model_args.keys() + discarded_args = set() + # arguments passed to self were already converted to python names + # before __init__ was called + for instance in composed_instances: + if instance.__class__ in self._composed_schemas['allOf']: + try: + keys = instance.to_dict().keys() + discarded_keys = model_args - keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + else: + try: + all_keys = set(model_to_dict(instance, serialize=False).keys()) + js_keys = model_to_dict(instance, serialize=True).keys() + all_keys.update(js_keys) + discarded_keys = model_arg_keys - all_keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + return discarded_args + + +def validate_get_composed_info(constant_args, model_args, self): + """ + For composed schemas, generate schema instances for + all schemas in the oneOf/anyOf/allOf definition. If additional + properties are allowed, also assign those properties on + all matched schemas that contain additionalProperties. + Openapi schemas are python classes. + + Exceptions are raised if: + - 0 or > 1 oneOf schema matches the model_args input data + - no anyOf schema matches the model_args input data + - any of the allOf schemas do not match the model_args input data + + Args: + constant_args (dict): these are the args that every model requires + model_args (dict): these are the required and optional spec args that + were passed in to make this model + self (class): the class that we are instantiating + This class contains self._composed_schemas + + Returns: + composed_info (list): length three + composed_instances (list): the composed instances which are not + self + var_name_to_model_instances (dict): a dict going from var_name + to the model_instance which holds that var_name + the model_instance may be self or an instance of one of the + classes in self.composed_instances() + additional_properties_model_instances (list): a list of the + model instances which have the property + additional_properties_type. This list can include self + """ + # create composed_instances + composed_instances = [] + allof_instances = get_allof_instances(self, model_args, constant_args) + composed_instances.extend(allof_instances) + oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) + if oneof_instance is not None: + composed_instances.append(oneof_instance) + anyof_instances = get_anyof_instances(self, model_args, constant_args) + composed_instances.extend(anyof_instances) + """ + set additional_properties_model_instances + additional properties must be evaluated at the schema level + so self's additional properties are most important + If self is a composed schema with: + - no properties defined in self + - additionalProperties: False + Then for object payloads every property is an additional property + and they are not allowed, so only empty dict is allowed + + Properties must be set on all matching schemas + so when a property is assigned toa composed instance, it must be set on all + composed instances regardless of additionalProperties presence + keeping it to prevent breaking changes in v5.0.1 + TODO remove cls._additional_properties_model_instances in 6.0.0 + """ + additional_properties_model_instances = [] + if self.additional_properties_type is not None: + additional_properties_model_instances = [self] + + """ + no need to set properties on self in here, they will be set in __init__ + By here all composed schema oneOf/anyOf/allOf instances have their properties set using + model_args + """ + discarded_args = get_discarded_args(self, composed_instances, model_args) + + # map variable names to composed_instances + var_name_to_model_instances = {} + for prop_name in model_args: + if prop_name not in discarded_args: + var_name_to_model_instances[prop_name] = [self] + composed_instances + + return [ + composed_instances, + var_name_to_model_instances, + additional_properties_model_instances, + discarded_args + ] diff --git a/gooddata-afm-client/gooddata_afm_client/models/__init__.py b/gooddata-afm-client/gooddata_afm_client/models/__init__.py new file mode 100644 index 000000000..dd5ebf160 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/models/__init__.py @@ -0,0 +1,107 @@ +# flake8: noqa + +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from gooddata_afm_client.model.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +from gooddata_afm_client.model.afm import AFM +from gooddata_afm_client.model.absolute_date_filter import AbsoluteDateFilter +from gooddata_afm_client.model.absolute_date_filter_body import AbsoluteDateFilterBody +from gooddata_afm_client.model.absolute_date_filter_body_all_of import AbsoluteDateFilterBodyAllOf +from gooddata_afm_client.model.abstract_measure_value_filter import AbstractMeasureValueFilter +from gooddata_afm_client.model.abstract_measure_value_filter_all_of import AbstractMeasureValueFilterAllOf +from gooddata_afm_client.model.afm_execution import AfmExecution +from gooddata_afm_client.model.afm_execution_response import AfmExecutionResponse +from gooddata_afm_client.model.afm_object_identifier import AfmObjectIdentifier +from gooddata_afm_client.model.afm_valid_objects_query import AfmValidObjectsQuery +from gooddata_afm_client.model.afm_valid_objects_response import AfmValidObjectsResponse +from gooddata_afm_client.model.arithmetic_measure_definition import ArithmeticMeasureDefinition +from gooddata_afm_client.model.arithmetic_measure_definition_arithmetic_measure import ArithmeticMeasureDefinitionArithmeticMeasure +from gooddata_afm_client.model.attribute_execution_result_header import AttributeExecutionResultHeader +from gooddata_afm_client.model.attribute_filter import AttributeFilter +from gooddata_afm_client.model.attribute_filter_elements import AttributeFilterElements +from gooddata_afm_client.model.attribute_header import AttributeHeader +from gooddata_afm_client.model.attribute_header_attribute_header import AttributeHeaderAttributeHeader +from gooddata_afm_client.model.attribute_item import AttributeItem +from gooddata_afm_client.model.attribute_result_header import AttributeResultHeader +from gooddata_afm_client.model.common_attribute_filter import CommonAttributeFilter +from gooddata_afm_client.model.common_attribute_filter_all_of import CommonAttributeFilterAllOf +from gooddata_afm_client.model.common_date_filter import CommonDateFilter +from gooddata_afm_client.model.common_date_filter_all_of import CommonDateFilterAllOf +from gooddata_afm_client.model.common_filter import CommonFilter +from gooddata_afm_client.model.common_measure_value_filter import CommonMeasureValueFilter +from gooddata_afm_client.model.common_measure_value_filter_all_of import CommonMeasureValueFilterAllOf +from gooddata_afm_client.model.comparison_measure_value_filter import ComparisonMeasureValueFilter +from gooddata_afm_client.model.comparison_measure_value_filter_body import ComparisonMeasureValueFilterBody +from gooddata_afm_client.model.comparison_measure_value_filter_body_all_of import ComparisonMeasureValueFilterBodyAllOf +from gooddata_afm_client.model.data_column_locator import DataColumnLocator +from gooddata_afm_client.model.date_filter import DateFilter +from gooddata_afm_client.model.dimension import Dimension +from gooddata_afm_client.model.dimension_header import DimensionHeader +from gooddata_afm_client.model.element import Element +from gooddata_afm_client.model.elements_response import ElementsResponse +from gooddata_afm_client.model.error_message import ErrorMessage +from gooddata_afm_client.model.execution_links import ExecutionLinks +from gooddata_afm_client.model.execution_response import ExecutionResponse +from gooddata_afm_client.model.execution_result import ExecutionResult +from gooddata_afm_client.model.execution_result_grand_total import ExecutionResultGrandTotal +from gooddata_afm_client.model.execution_result_header import ExecutionResultHeader +from gooddata_afm_client.model.execution_result_paging import ExecutionResultPaging +from gooddata_afm_client.model.execution_settings import ExecutionSettings +from gooddata_afm_client.model.filter_definition import FilterDefinition +from gooddata_afm_client.model.filter_definition_for_simple_measure import FilterDefinitionForSimpleMeasure +from gooddata_afm_client.model.grand_total import GrandTotal +from gooddata_afm_client.model.header_group import HeaderGroup +from gooddata_afm_client.model.identifier import Identifier +from gooddata_afm_client.model.included_dimension_props import IncludedDimensionProps +from gooddata_afm_client.model.inline_filter_definition import InlineFilterDefinition +from gooddata_afm_client.model.inline_filter_definition_body import InlineFilterDefinitionBody +from gooddata_afm_client.model.inline_filter_definition_body_all_of import InlineFilterDefinitionBodyAllOf +from gooddata_afm_client.model.inline_measure_definition import InlineMeasureDefinition +from gooddata_afm_client.model.inline_measure_definition_inline import InlineMeasureDefinitionInline +from gooddata_afm_client.model.local_identifier import LocalIdentifier +from gooddata_afm_client.model.measure_definition import MeasureDefinition +from gooddata_afm_client.model.measure_execution_result_header import MeasureExecutionResultHeader +from gooddata_afm_client.model.measure_group_header import MeasureGroupHeader +from gooddata_afm_client.model.measure_header_out import MeasureHeaderOut +from gooddata_afm_client.model.measure_item import MeasureItem +from gooddata_afm_client.model.measure_result_header import MeasureResultHeader +from gooddata_afm_client.model.measure_value_filter import MeasureValueFilter +from gooddata_afm_client.model.negative_attribute_filter import NegativeAttributeFilter +from gooddata_afm_client.model.negative_attribute_filter_body import NegativeAttributeFilterBody +from gooddata_afm_client.model.negative_attribute_filter_body_all_of import NegativeAttributeFilterBodyAllOf +from gooddata_afm_client.model.object_identifier import ObjectIdentifier +from gooddata_afm_client.model.paging import Paging +from gooddata_afm_client.model.pop_dataset import PopDataset +from gooddata_afm_client.model.pop_dataset_measure_definition import PopDatasetMeasureDefinition +from gooddata_afm_client.model.pop_dataset_measure_definition_previous_period_measure import PopDatasetMeasureDefinitionPreviousPeriodMeasure +from gooddata_afm_client.model.pop_date import PopDate +from gooddata_afm_client.model.pop_date_measure_definition import PopDateMeasureDefinition +from gooddata_afm_client.model.pop_date_measure_definition_over_period_measure import PopDateMeasureDefinitionOverPeriodMeasure +from gooddata_afm_client.model.positive_attribute_filter import PositiveAttributeFilter +from gooddata_afm_client.model.positive_attribute_filter_body import PositiveAttributeFilterBody +from gooddata_afm_client.model.positive_attribute_filter_body_all_of import PositiveAttributeFilterBodyAllOf +from gooddata_afm_client.model.range_measure_value_filter import RangeMeasureValueFilter +from gooddata_afm_client.model.range_measure_value_filter_body import RangeMeasureValueFilterBody +from gooddata_afm_client.model.range_measure_value_filter_body_all_of import RangeMeasureValueFilterBodyAllOf +from gooddata_afm_client.model.ranking_filter import RankingFilter +from gooddata_afm_client.model.ranking_filter_body import RankingFilterBody +from gooddata_afm_client.model.ranking_filter_body_all_of import RankingFilterBodyAllOf +from gooddata_afm_client.model.relative_date_filter import RelativeDateFilter +from gooddata_afm_client.model.relative_date_filter_body import RelativeDateFilterBody +from gooddata_afm_client.model.relative_date_filter_body_all_of import RelativeDateFilterBodyAllOf +from gooddata_afm_client.model.result_dimension import ResultDimension +from gooddata_afm_client.model.result_spec import ResultSpec +from gooddata_afm_client.model.simple_measure_definition import SimpleMeasureDefinition +from gooddata_afm_client.model.simple_measure_definition_measure import SimpleMeasureDefinitionMeasure +from gooddata_afm_client.model.sort_direction import SortDirection +from gooddata_afm_client.model.sort_key_attribute import SortKeyAttribute +from gooddata_afm_client.model.sort_key_attribute_attribute import SortKeyAttributeAttribute +from gooddata_afm_client.model.sort_key_value import SortKeyValue +from gooddata_afm_client.model.sort_key_value_value import SortKeyValueValue +from gooddata_afm_client.model.total_function import TotalFunction diff --git a/gooddata-afm-client/gooddata_afm_client/rest.py b/gooddata-afm-client/gooddata_afm_client/rest.py new file mode 100644 index 000000000..a378ebc40 --- /dev/null +++ b/gooddata-afm-client/gooddata_afm_client/rest.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 + Generated by: https://openapi-generator.tech +""" + + +import io +import json +import logging +import re +import ssl +from urllib.parse import urlencode + +import urllib3 + +from gooddata_afm_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests + if (method != 'DELETE') and ('Content-Type' not in headers): + headers['Content-Type'] = 'application/json' + if query_params: + url += '?' + urlencode(query_params) + if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/gooddata-afm-client/requirements.txt b/gooddata-afm-client/requirements.txt new file mode 100644 index 000000000..96947f604 --- /dev/null +++ b/gooddata-afm-client/requirements.txt @@ -0,0 +1,3 @@ +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.25.3 diff --git a/gooddata-afm-client/setup.cfg b/gooddata-afm-client/setup.cfg new file mode 100644 index 000000000..11433ee87 --- /dev/null +++ b/gooddata-afm-client/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/gooddata-afm-client/setup.py b/gooddata-afm-client/setup.py new file mode 100644 index 000000000..c79f32c1b --- /dev/null +++ b/gooddata-afm-client/setup.py @@ -0,0 +1,42 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "gooddata-afm-client" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "urllib3 >= 1.25.3", + "python-dateutil", +] + +setup( + name=NAME, + version=VERSION, + description="OpenAPI definition", + author="OpenAPI Generator community", + author_email="team@openapitools.org", + url="", + keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI definition"], + python_requires=">=3.6", + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description="""\ + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + """ +) diff --git a/gooddata-afm-client/test-requirements.txt b/gooddata-afm-client/test-requirements.txt new file mode 100644 index 000000000..bb4f22bb7 --- /dev/null +++ b/gooddata-afm-client/test-requirements.txt @@ -0,0 +1 @@ +pytest-cov>=2.8.1 diff --git a/gooddata-afm-client/tox.ini b/gooddata-afm-client/tox.ini new file mode 100644 index 000000000..fe1723662 --- /dev/null +++ b/gooddata-afm-client/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=gooddata_afm_client diff --git a/gooddata-metadata-client/.gitignore b/gooddata-metadata-client/.gitignore new file mode 100644 index 000000000..43995bd42 --- /dev/null +++ b/gooddata-metadata-client/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/gooddata-metadata-client/.openapi-generator-ignore b/gooddata-metadata-client/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/gooddata-metadata-client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/gooddata-metadata-client/.openapi-generator/FILES b/gooddata-metadata-client/.openapi-generator/FILES new file mode 100644 index 000000000..25803be69 --- /dev/null +++ b/gooddata-metadata-client/.openapi-generator/FILES @@ -0,0 +1,735 @@ +.gitignore +.gitlab-ci.yml +.travis.yml +README.md +docs/DataSourceActionsControllerApi.md +docs/DataSourceEntitiesControllerApi.md +docs/DataSourceLayoutControllerApi.md +docs/DataSourceTableIdentifier.md +docs/DatasetReferenceIdentifier.md +docs/DeclarativeAnalyticalDashboard.md +docs/DeclarativeAnalytics.md +docs/DeclarativeAnalyticsLayer.md +docs/DeclarativeAttribute.md +docs/DeclarativeColumn.md +docs/DeclarativeDataSource.md +docs/DeclarativeDataSources.md +docs/DeclarativeDataset.md +docs/DeclarativeDateDataset.md +docs/DeclarativeFact.md +docs/DeclarativeFilterContext.md +docs/DeclarativeLabel.md +docs/DeclarativeLayoutControllerApi.md +docs/DeclarativeLdm.md +docs/DeclarativeMetric.md +docs/DeclarativeModel.md +docs/DeclarativeOrganization.md +docs/DeclarativeOrganizationInfo.md +docs/DeclarativePdm.md +docs/DeclarativeReference.md +docs/DeclarativeTable.md +docs/DeclarativeTables.md +docs/DeclarativeUser.md +docs/DeclarativeUserGroup.md +docs/DeclarativeUserGroups.md +docs/DeclarativeUsers.md +docs/DeclarativeVisualizationObject.md +docs/DeclarativeWorkspace.md +docs/DeclarativeWorkspaceDataFilter.md +docs/DeclarativeWorkspaceDataFilterSetting.md +docs/DeclarativeWorkspaceDataFilters.md +docs/DeclarativeWorkspaceModel.md +docs/DeclarativeWorkspaces.md +docs/GenerateLdmRequest.md +docs/GrainIdentifier.md +docs/GranularitiesFormatting.md +docs/JsonApiACLIn.md +docs/JsonApiACLInDocument.md +docs/JsonApiACLOut.md +docs/JsonApiACLOutAttributes.md +docs/JsonApiACLOutDocument.md +docs/JsonApiACLOutList.md +docs/JsonApiACLOutRelationships.md +docs/JsonApiACLOutRelationshipsObjects.md +docs/JsonApiACLOutRelationshipsSubjects.md +docs/JsonApiACLOutWithLinks.md +docs/JsonApiAnalyticalDashboardIn.md +docs/JsonApiAnalyticalDashboardInDocument.md +docs/JsonApiAnalyticalDashboardLinkage.md +docs/JsonApiAnalyticalDashboardOut.md +docs/JsonApiAnalyticalDashboardOutAttributes.md +docs/JsonApiAnalyticalDashboardOutDocument.md +docs/JsonApiAnalyticalDashboardOutList.md +docs/JsonApiAnalyticalDashboardOutRelationships.md +docs/JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards.md +docs/JsonApiAnalyticalDashboardOutRelationshipsDatasets.md +docs/JsonApiAnalyticalDashboardOutRelationshipsFilterContexts.md +docs/JsonApiAnalyticalDashboardOutRelationshipsLabels.md +docs/JsonApiAnalyticalDashboardOutRelationshipsMetrics.md +docs/JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects.md +docs/JsonApiAnalyticalDashboardOutWithLinks.md +docs/JsonApiAnalyticalDashboardToManyLinkage.md +docs/JsonApiApiTokenIn.md +docs/JsonApiApiTokenInDocument.md +docs/JsonApiApiTokenOut.md +docs/JsonApiApiTokenOutAttributes.md +docs/JsonApiApiTokenOutDocument.md +docs/JsonApiApiTokenOutList.md +docs/JsonApiApiTokenOutWithLinks.md +docs/JsonApiAttributeLinkage.md +docs/JsonApiAttributeOut.md +docs/JsonApiAttributeOutAttributes.md +docs/JsonApiAttributeOutDocument.md +docs/JsonApiAttributeOutList.md +docs/JsonApiAttributeOutRelationships.md +docs/JsonApiAttributeOutRelationshipsDataset.md +docs/JsonApiAttributeOutWithLinks.md +docs/JsonApiAttributeToManyLinkage.md +docs/JsonApiAttributeToOneLinkage.md +docs/JsonApiCookieSecurityConfigurationIn.md +docs/JsonApiCookieSecurityConfigurationInDocument.md +docs/JsonApiCookieSecurityConfigurationOut.md +docs/JsonApiCookieSecurityConfigurationOutAttributes.md +docs/JsonApiCookieSecurityConfigurationOutDocument.md +docs/JsonApiDataSourceIn.md +docs/JsonApiDataSourceInAttributes.md +docs/JsonApiDataSourceInDocument.md +docs/JsonApiDataSourceOut.md +docs/JsonApiDataSourceOutAttributes.md +docs/JsonApiDataSourceOutDocument.md +docs/JsonApiDataSourceOutList.md +docs/JsonApiDataSourceOutWithLinks.md +docs/JsonApiDataSourceTableOut.md +docs/JsonApiDataSourceTableOutAttributes.md +docs/JsonApiDataSourceTableOutAttributesColumns.md +docs/JsonApiDataSourceTableOutDocument.md +docs/JsonApiDataSourceTableOutList.md +docs/JsonApiDataSourceTableOutWithLinks.md +docs/JsonApiDatasetLinkage.md +docs/JsonApiDatasetOut.md +docs/JsonApiDatasetOutAttributes.md +docs/JsonApiDatasetOutAttributesGrain.md +docs/JsonApiDatasetOutAttributesReferenceProperties.md +docs/JsonApiDatasetOutDocument.md +docs/JsonApiDatasetOutList.md +docs/JsonApiDatasetOutRelationships.md +docs/JsonApiDatasetOutRelationshipsAttributes.md +docs/JsonApiDatasetOutRelationshipsFacts.md +docs/JsonApiDatasetOutWithLinks.md +docs/JsonApiDatasetToManyLinkage.md +docs/JsonApiDatasetToOneLinkage.md +docs/JsonApiFactLinkage.md +docs/JsonApiFactOut.md +docs/JsonApiFactOutAttributes.md +docs/JsonApiFactOutDocument.md +docs/JsonApiFactOutList.md +docs/JsonApiFactOutRelationships.md +docs/JsonApiFactOutWithLinks.md +docs/JsonApiFactToManyLinkage.md +docs/JsonApiFilterContextIn.md +docs/JsonApiFilterContextInDocument.md +docs/JsonApiFilterContextLinkage.md +docs/JsonApiFilterContextOut.md +docs/JsonApiFilterContextOutDocument.md +docs/JsonApiFilterContextOutList.md +docs/JsonApiFilterContextOutRelationships.md +docs/JsonApiFilterContextOutWithLinks.md +docs/JsonApiFilterContextToManyLinkage.md +docs/JsonApiLabelLinkage.md +docs/JsonApiLabelOut.md +docs/JsonApiLabelOutAttributes.md +docs/JsonApiLabelOutDocument.md +docs/JsonApiLabelOutList.md +docs/JsonApiLabelOutRelationships.md +docs/JsonApiLabelOutRelationshipsAttribute.md +docs/JsonApiLabelOutWithLinks.md +docs/JsonApiLabelToManyLinkage.md +docs/JsonApiMetricIn.md +docs/JsonApiMetricInDocument.md +docs/JsonApiMetricLinkage.md +docs/JsonApiMetricOut.md +docs/JsonApiMetricOutAttributes.md +docs/JsonApiMetricOutAttributesContent.md +docs/JsonApiMetricOutDocument.md +docs/JsonApiMetricOutList.md +docs/JsonApiMetricOutRelationships.md +docs/JsonApiMetricOutWithLinks.md +docs/JsonApiMetricToManyLinkage.md +docs/JsonApiOrganizationIn.md +docs/JsonApiOrganizationInAttributes.md +docs/JsonApiOrganizationInDocument.md +docs/JsonApiOrganizationOut.md +docs/JsonApiOrganizationOutAttributes.md +docs/JsonApiOrganizationOutDocument.md +docs/JsonApiOrganizationOutRelationships.md +docs/JsonApiOrganizationOutRelationshipsBootstrapUser.md +docs/JsonApiOrganizationOutRelationshipsBootstrapUserGroup.md +docs/JsonApiUserGroupIn.md +docs/JsonApiUserGroupInDocument.md +docs/JsonApiUserGroupLinkage.md +docs/JsonApiUserGroupOut.md +docs/JsonApiUserGroupOutDocument.md +docs/JsonApiUserGroupOutList.md +docs/JsonApiUserGroupOutRelationships.md +docs/JsonApiUserGroupOutWithLinks.md +docs/JsonApiUserGroupToManyLinkage.md +docs/JsonApiUserGroupToOneLinkage.md +docs/JsonApiUserIn.md +docs/JsonApiUserInDocument.md +docs/JsonApiUserLinkage.md +docs/JsonApiUserOut.md +docs/JsonApiUserOutAttributes.md +docs/JsonApiUserOutDocument.md +docs/JsonApiUserOutList.md +docs/JsonApiUserOutRelationships.md +docs/JsonApiUserOutWithLinks.md +docs/JsonApiUserToManyLinkage.md +docs/JsonApiUserToOneLinkage.md +docs/JsonApiVisualizationObjectIn.md +docs/JsonApiVisualizationObjectInDocument.md +docs/JsonApiVisualizationObjectLinkage.md +docs/JsonApiVisualizationObjectOut.md +docs/JsonApiVisualizationObjectOutDocument.md +docs/JsonApiVisualizationObjectOutList.md +docs/JsonApiVisualizationObjectOutRelationships.md +docs/JsonApiVisualizationObjectOutWithLinks.md +docs/JsonApiVisualizationObjectToManyLinkage.md +docs/JsonApiWorkspaceDataFilterIn.md +docs/JsonApiWorkspaceDataFilterInDocument.md +docs/JsonApiWorkspaceDataFilterLinkage.md +docs/JsonApiWorkspaceDataFilterOut.md +docs/JsonApiWorkspaceDataFilterOutAttributes.md +docs/JsonApiWorkspaceDataFilterOutDocument.md +docs/JsonApiWorkspaceDataFilterOutList.md +docs/JsonApiWorkspaceDataFilterOutRelationships.md +docs/JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings.md +docs/JsonApiWorkspaceDataFilterOutWithLinks.md +docs/JsonApiWorkspaceDataFilterSettingLinkage.md +docs/JsonApiWorkspaceDataFilterSettingOut.md +docs/JsonApiWorkspaceDataFilterSettingOutAttributes.md +docs/JsonApiWorkspaceDataFilterSettingOutDocument.md +docs/JsonApiWorkspaceDataFilterSettingOutList.md +docs/JsonApiWorkspaceDataFilterSettingOutRelationships.md +docs/JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter.md +docs/JsonApiWorkspaceDataFilterSettingOutWithLinks.md +docs/JsonApiWorkspaceDataFilterSettingToManyLinkage.md +docs/JsonApiWorkspaceDataFilterToOneLinkage.md +docs/JsonApiWorkspaceIn.md +docs/JsonApiWorkspaceInDocument.md +docs/JsonApiWorkspaceLinkage.md +docs/JsonApiWorkspaceOut.md +docs/JsonApiWorkspaceOutAttributes.md +docs/JsonApiWorkspaceOutDocument.md +docs/JsonApiWorkspaceOutList.md +docs/JsonApiWorkspaceOutMeta.md +docs/JsonApiWorkspaceOutMetaConfig.md +docs/JsonApiWorkspaceOutRelationships.md +docs/JsonApiWorkspaceOutRelationshipsParent.md +docs/JsonApiWorkspaceOutWithLinks.md +docs/JsonApiWorkspaceToOneLinkage.md +docs/ListLinks.md +docs/ListLinksAllOf.md +docs/ObjectLinks.md +docs/ObjectLinksContainer.md +docs/OptionsControllerApi.md +docs/OrganizationControllerApi.md +docs/OrganizationModelControllerApi.md +docs/OrganizationRedirectControllerApi.md +docs/ReferenceIdentifier.md +docs/UserGroupIdentifier.md +docs/UserModelControllerApi.md +docs/WorkspaceIdentifier.md +docs/WorkspaceObjectControllerApi.md +git_push.sh +gooddata_metadata_client/__init__.py +gooddata_metadata_client/api/__init__.py +gooddata_metadata_client/api/data_source_actions_controller_api.py +gooddata_metadata_client/api/data_source_entities_controller_api.py +gooddata_metadata_client/api/data_source_layout_controller_api.py +gooddata_metadata_client/api/declarative_layout_controller_api.py +gooddata_metadata_client/api/options_controller_api.py +gooddata_metadata_client/api/organization_controller_api.py +gooddata_metadata_client/api/organization_model_controller_api.py +gooddata_metadata_client/api/organization_redirect_controller_api.py +gooddata_metadata_client/api/user_model_controller_api.py +gooddata_metadata_client/api/workspace_object_controller_api.py +gooddata_metadata_client/api_client.py +gooddata_metadata_client/apis/__init__.py +gooddata_metadata_client/configuration.py +gooddata_metadata_client/exceptions.py +gooddata_metadata_client/model/__init__.py +gooddata_metadata_client/model/data_source_table_identifier.py +gooddata_metadata_client/model/dataset_reference_identifier.py +gooddata_metadata_client/model/declarative_analytical_dashboard.py +gooddata_metadata_client/model/declarative_analytics.py +gooddata_metadata_client/model/declarative_analytics_layer.py +gooddata_metadata_client/model/declarative_attribute.py +gooddata_metadata_client/model/declarative_column.py +gooddata_metadata_client/model/declarative_data_source.py +gooddata_metadata_client/model/declarative_data_sources.py +gooddata_metadata_client/model/declarative_dataset.py +gooddata_metadata_client/model/declarative_date_dataset.py +gooddata_metadata_client/model/declarative_fact.py +gooddata_metadata_client/model/declarative_filter_context.py +gooddata_metadata_client/model/declarative_label.py +gooddata_metadata_client/model/declarative_ldm.py +gooddata_metadata_client/model/declarative_metric.py +gooddata_metadata_client/model/declarative_model.py +gooddata_metadata_client/model/declarative_organization.py +gooddata_metadata_client/model/declarative_organization_info.py +gooddata_metadata_client/model/declarative_pdm.py +gooddata_metadata_client/model/declarative_reference.py +gooddata_metadata_client/model/declarative_table.py +gooddata_metadata_client/model/declarative_tables.py +gooddata_metadata_client/model/declarative_user.py +gooddata_metadata_client/model/declarative_user_group.py +gooddata_metadata_client/model/declarative_user_groups.py +gooddata_metadata_client/model/declarative_users.py +gooddata_metadata_client/model/declarative_visualization_object.py +gooddata_metadata_client/model/declarative_workspace.py +gooddata_metadata_client/model/declarative_workspace_data_filter.py +gooddata_metadata_client/model/declarative_workspace_data_filter_setting.py +gooddata_metadata_client/model/declarative_workspace_data_filters.py +gooddata_metadata_client/model/declarative_workspace_model.py +gooddata_metadata_client/model/declarative_workspaces.py +gooddata_metadata_client/model/generate_ldm_request.py +gooddata_metadata_client/model/grain_identifier.py +gooddata_metadata_client/model/granularities_formatting.py +gooddata_metadata_client/model/json_api_acl_out.py +gooddata_metadata_client/model/json_api_acl_out_attributes.py +gooddata_metadata_client/model/json_api_acl_out_document.py +gooddata_metadata_client/model/json_api_acl_out_list.py +gooddata_metadata_client/model/json_api_acl_out_relationships.py +gooddata_metadata_client/model/json_api_acl_out_relationships_objects.py +gooddata_metadata_client/model/json_api_acl_out_relationships_subjects.py +gooddata_metadata_client/model/json_api_acl_out_with_links.py +gooddata_metadata_client/model/json_api_aclin.py +gooddata_metadata_client/model/json_api_aclin_document.py +gooddata_metadata_client/model/json_api_analytical_dashboard_in.py +gooddata_metadata_client/model/json_api_analytical_dashboard_in_document.py +gooddata_metadata_client/model/json_api_analytical_dashboard_linkage.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_attributes.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_document.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_list.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_analytical_dashboards.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_datasets.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_filter_contexts.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_labels.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_metrics.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_visualization_objects.py +gooddata_metadata_client/model/json_api_analytical_dashboard_out_with_links.py +gooddata_metadata_client/model/json_api_analytical_dashboard_to_many_linkage.py +gooddata_metadata_client/model/json_api_api_token_in.py +gooddata_metadata_client/model/json_api_api_token_in_document.py +gooddata_metadata_client/model/json_api_api_token_out.py +gooddata_metadata_client/model/json_api_api_token_out_attributes.py +gooddata_metadata_client/model/json_api_api_token_out_document.py +gooddata_metadata_client/model/json_api_api_token_out_list.py +gooddata_metadata_client/model/json_api_api_token_out_with_links.py +gooddata_metadata_client/model/json_api_attribute_linkage.py +gooddata_metadata_client/model/json_api_attribute_out.py +gooddata_metadata_client/model/json_api_attribute_out_attributes.py +gooddata_metadata_client/model/json_api_attribute_out_document.py +gooddata_metadata_client/model/json_api_attribute_out_list.py +gooddata_metadata_client/model/json_api_attribute_out_relationships.py +gooddata_metadata_client/model/json_api_attribute_out_relationships_dataset.py +gooddata_metadata_client/model/json_api_attribute_out_with_links.py +gooddata_metadata_client/model/json_api_attribute_to_many_linkage.py +gooddata_metadata_client/model/json_api_attribute_to_one_linkage.py +gooddata_metadata_client/model/json_api_cookie_security_configuration_in.py +gooddata_metadata_client/model/json_api_cookie_security_configuration_in_document.py +gooddata_metadata_client/model/json_api_cookie_security_configuration_out.py +gooddata_metadata_client/model/json_api_cookie_security_configuration_out_attributes.py +gooddata_metadata_client/model/json_api_cookie_security_configuration_out_document.py +gooddata_metadata_client/model/json_api_data_source_in.py +gooddata_metadata_client/model/json_api_data_source_in_attributes.py +gooddata_metadata_client/model/json_api_data_source_in_document.py +gooddata_metadata_client/model/json_api_data_source_out.py +gooddata_metadata_client/model/json_api_data_source_out_attributes.py +gooddata_metadata_client/model/json_api_data_source_out_document.py +gooddata_metadata_client/model/json_api_data_source_out_list.py +gooddata_metadata_client/model/json_api_data_source_out_with_links.py +gooddata_metadata_client/model/json_api_data_source_table_out.py +gooddata_metadata_client/model/json_api_data_source_table_out_attributes.py +gooddata_metadata_client/model/json_api_data_source_table_out_attributes_columns.py +gooddata_metadata_client/model/json_api_data_source_table_out_document.py +gooddata_metadata_client/model/json_api_data_source_table_out_list.py +gooddata_metadata_client/model/json_api_data_source_table_out_with_links.py +gooddata_metadata_client/model/json_api_dataset_linkage.py +gooddata_metadata_client/model/json_api_dataset_out.py +gooddata_metadata_client/model/json_api_dataset_out_attributes.py +gooddata_metadata_client/model/json_api_dataset_out_attributes_grain.py +gooddata_metadata_client/model/json_api_dataset_out_attributes_reference_properties.py +gooddata_metadata_client/model/json_api_dataset_out_document.py +gooddata_metadata_client/model/json_api_dataset_out_list.py +gooddata_metadata_client/model/json_api_dataset_out_relationships.py +gooddata_metadata_client/model/json_api_dataset_out_relationships_attributes.py +gooddata_metadata_client/model/json_api_dataset_out_relationships_facts.py +gooddata_metadata_client/model/json_api_dataset_out_with_links.py +gooddata_metadata_client/model/json_api_dataset_to_many_linkage.py +gooddata_metadata_client/model/json_api_dataset_to_one_linkage.py +gooddata_metadata_client/model/json_api_fact_linkage.py +gooddata_metadata_client/model/json_api_fact_out.py +gooddata_metadata_client/model/json_api_fact_out_attributes.py +gooddata_metadata_client/model/json_api_fact_out_document.py +gooddata_metadata_client/model/json_api_fact_out_list.py +gooddata_metadata_client/model/json_api_fact_out_relationships.py +gooddata_metadata_client/model/json_api_fact_out_with_links.py +gooddata_metadata_client/model/json_api_fact_to_many_linkage.py +gooddata_metadata_client/model/json_api_filter_context_in.py +gooddata_metadata_client/model/json_api_filter_context_in_document.py +gooddata_metadata_client/model/json_api_filter_context_linkage.py +gooddata_metadata_client/model/json_api_filter_context_out.py +gooddata_metadata_client/model/json_api_filter_context_out_document.py +gooddata_metadata_client/model/json_api_filter_context_out_list.py +gooddata_metadata_client/model/json_api_filter_context_out_relationships.py +gooddata_metadata_client/model/json_api_filter_context_out_with_links.py +gooddata_metadata_client/model/json_api_filter_context_to_many_linkage.py +gooddata_metadata_client/model/json_api_label_linkage.py +gooddata_metadata_client/model/json_api_label_out.py +gooddata_metadata_client/model/json_api_label_out_attributes.py +gooddata_metadata_client/model/json_api_label_out_document.py +gooddata_metadata_client/model/json_api_label_out_list.py +gooddata_metadata_client/model/json_api_label_out_relationships.py +gooddata_metadata_client/model/json_api_label_out_relationships_attribute.py +gooddata_metadata_client/model/json_api_label_out_with_links.py +gooddata_metadata_client/model/json_api_label_to_many_linkage.py +gooddata_metadata_client/model/json_api_metric_in.py +gooddata_metadata_client/model/json_api_metric_in_document.py +gooddata_metadata_client/model/json_api_metric_linkage.py +gooddata_metadata_client/model/json_api_metric_out.py +gooddata_metadata_client/model/json_api_metric_out_attributes.py +gooddata_metadata_client/model/json_api_metric_out_attributes_content.py +gooddata_metadata_client/model/json_api_metric_out_document.py +gooddata_metadata_client/model/json_api_metric_out_list.py +gooddata_metadata_client/model/json_api_metric_out_relationships.py +gooddata_metadata_client/model/json_api_metric_out_with_links.py +gooddata_metadata_client/model/json_api_metric_to_many_linkage.py +gooddata_metadata_client/model/json_api_organization_in.py +gooddata_metadata_client/model/json_api_organization_in_attributes.py +gooddata_metadata_client/model/json_api_organization_in_document.py +gooddata_metadata_client/model/json_api_organization_out.py +gooddata_metadata_client/model/json_api_organization_out_attributes.py +gooddata_metadata_client/model/json_api_organization_out_document.py +gooddata_metadata_client/model/json_api_organization_out_relationships.py +gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user.py +gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user_group.py +gooddata_metadata_client/model/json_api_user_group_in.py +gooddata_metadata_client/model/json_api_user_group_in_document.py +gooddata_metadata_client/model/json_api_user_group_linkage.py +gooddata_metadata_client/model/json_api_user_group_out.py +gooddata_metadata_client/model/json_api_user_group_out_document.py +gooddata_metadata_client/model/json_api_user_group_out_list.py +gooddata_metadata_client/model/json_api_user_group_out_relationships.py +gooddata_metadata_client/model/json_api_user_group_out_with_links.py +gooddata_metadata_client/model/json_api_user_group_to_many_linkage.py +gooddata_metadata_client/model/json_api_user_group_to_one_linkage.py +gooddata_metadata_client/model/json_api_user_in.py +gooddata_metadata_client/model/json_api_user_in_document.py +gooddata_metadata_client/model/json_api_user_linkage.py +gooddata_metadata_client/model/json_api_user_out.py +gooddata_metadata_client/model/json_api_user_out_attributes.py +gooddata_metadata_client/model/json_api_user_out_document.py +gooddata_metadata_client/model/json_api_user_out_list.py +gooddata_metadata_client/model/json_api_user_out_relationships.py +gooddata_metadata_client/model/json_api_user_out_with_links.py +gooddata_metadata_client/model/json_api_user_to_many_linkage.py +gooddata_metadata_client/model/json_api_user_to_one_linkage.py +gooddata_metadata_client/model/json_api_visualization_object_in.py +gooddata_metadata_client/model/json_api_visualization_object_in_document.py +gooddata_metadata_client/model/json_api_visualization_object_linkage.py +gooddata_metadata_client/model/json_api_visualization_object_out.py +gooddata_metadata_client/model/json_api_visualization_object_out_document.py +gooddata_metadata_client/model/json_api_visualization_object_out_list.py +gooddata_metadata_client/model/json_api_visualization_object_out_relationships.py +gooddata_metadata_client/model/json_api_visualization_object_out_with_links.py +gooddata_metadata_client/model/json_api_visualization_object_to_many_linkage.py +gooddata_metadata_client/model/json_api_workspace_data_filter_in.py +gooddata_metadata_client/model/json_api_workspace_data_filter_in_document.py +gooddata_metadata_client/model/json_api_workspace_data_filter_linkage.py +gooddata_metadata_client/model/json_api_workspace_data_filter_out.py +gooddata_metadata_client/model/json_api_workspace_data_filter_out_attributes.py +gooddata_metadata_client/model/json_api_workspace_data_filter_out_document.py +gooddata_metadata_client/model/json_api_workspace_data_filter_out_list.py +gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships.py +gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships_filter_settings.py +gooddata_metadata_client/model/json_api_workspace_data_filter_out_with_links.py +gooddata_metadata_client/model/json_api_workspace_data_filter_setting_linkage.py +gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out.py +gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_attributes.py +gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_document.py +gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_list.py +gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships.py +gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships_workspace_data_filter.py +gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_with_links.py +gooddata_metadata_client/model/json_api_workspace_data_filter_setting_to_many_linkage.py +gooddata_metadata_client/model/json_api_workspace_data_filter_to_one_linkage.py +gooddata_metadata_client/model/json_api_workspace_in.py +gooddata_metadata_client/model/json_api_workspace_in_document.py +gooddata_metadata_client/model/json_api_workspace_linkage.py +gooddata_metadata_client/model/json_api_workspace_out.py +gooddata_metadata_client/model/json_api_workspace_out_attributes.py +gooddata_metadata_client/model/json_api_workspace_out_document.py +gooddata_metadata_client/model/json_api_workspace_out_list.py +gooddata_metadata_client/model/json_api_workspace_out_meta.py +gooddata_metadata_client/model/json_api_workspace_out_meta_config.py +gooddata_metadata_client/model/json_api_workspace_out_relationships.py +gooddata_metadata_client/model/json_api_workspace_out_relationships_parent.py +gooddata_metadata_client/model/json_api_workspace_out_with_links.py +gooddata_metadata_client/model/json_api_workspace_to_one_linkage.py +gooddata_metadata_client/model/list_links.py +gooddata_metadata_client/model/list_links_all_of.py +gooddata_metadata_client/model/object_links.py +gooddata_metadata_client/model/object_links_container.py +gooddata_metadata_client/model/reference_identifier.py +gooddata_metadata_client/model/user_group_identifier.py +gooddata_metadata_client/model/workspace_identifier.py +gooddata_metadata_client/model_utils.py +gooddata_metadata_client/models/__init__.py +gooddata_metadata_client/rest.py +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_data_source_actions_controller_api.py +test/test_data_source_entities_controller_api.py +test/test_data_source_layout_controller_api.py +test/test_data_source_table_identifier.py +test/test_dataset_reference_identifier.py +test/test_declarative_analytical_dashboard.py +test/test_declarative_analytics.py +test/test_declarative_analytics_layer.py +test/test_declarative_attribute.py +test/test_declarative_column.py +test/test_declarative_data_source.py +test/test_declarative_data_sources.py +test/test_declarative_dataset.py +test/test_declarative_date_dataset.py +test/test_declarative_fact.py +test/test_declarative_filter_context.py +test/test_declarative_label.py +test/test_declarative_layout_controller_api.py +test/test_declarative_ldm.py +test/test_declarative_metric.py +test/test_declarative_model.py +test/test_declarative_organization.py +test/test_declarative_organization_info.py +test/test_declarative_pdm.py +test/test_declarative_reference.py +test/test_declarative_table.py +test/test_declarative_tables.py +test/test_declarative_user.py +test/test_declarative_user_group.py +test/test_declarative_user_groups.py +test/test_declarative_users.py +test/test_declarative_visualization_object.py +test/test_declarative_workspace.py +test/test_declarative_workspace_data_filter.py +test/test_declarative_workspace_data_filter_setting.py +test/test_declarative_workspace_data_filters.py +test/test_declarative_workspace_model.py +test/test_declarative_workspaces.py +test/test_generate_ldm_request.py +test/test_grain_identifier.py +test/test_granularities_formatting.py +test/test_json_api_acl_out.py +test/test_json_api_acl_out_attributes.py +test/test_json_api_acl_out_document.py +test/test_json_api_acl_out_list.py +test/test_json_api_acl_out_relationships.py +test/test_json_api_acl_out_relationships_objects.py +test/test_json_api_acl_out_relationships_subjects.py +test/test_json_api_acl_out_with_links.py +test/test_json_api_aclin.py +test/test_json_api_aclin_document.py +test/test_json_api_analytical_dashboard_in.py +test/test_json_api_analytical_dashboard_in_document.py +test/test_json_api_analytical_dashboard_linkage.py +test/test_json_api_analytical_dashboard_out.py +test/test_json_api_analytical_dashboard_out_attributes.py +test/test_json_api_analytical_dashboard_out_document.py +test/test_json_api_analytical_dashboard_out_list.py +test/test_json_api_analytical_dashboard_out_relationships.py +test/test_json_api_analytical_dashboard_out_relationships_analytical_dashboards.py +test/test_json_api_analytical_dashboard_out_relationships_datasets.py +test/test_json_api_analytical_dashboard_out_relationships_filter_contexts.py +test/test_json_api_analytical_dashboard_out_relationships_labels.py +test/test_json_api_analytical_dashboard_out_relationships_metrics.py +test/test_json_api_analytical_dashboard_out_relationships_visualization_objects.py +test/test_json_api_analytical_dashboard_out_with_links.py +test/test_json_api_analytical_dashboard_to_many_linkage.py +test/test_json_api_api_token_in.py +test/test_json_api_api_token_in_document.py +test/test_json_api_api_token_out.py +test/test_json_api_api_token_out_attributes.py +test/test_json_api_api_token_out_document.py +test/test_json_api_api_token_out_list.py +test/test_json_api_api_token_out_with_links.py +test/test_json_api_attribute_linkage.py +test/test_json_api_attribute_out.py +test/test_json_api_attribute_out_attributes.py +test/test_json_api_attribute_out_document.py +test/test_json_api_attribute_out_list.py +test/test_json_api_attribute_out_relationships.py +test/test_json_api_attribute_out_relationships_dataset.py +test/test_json_api_attribute_out_with_links.py +test/test_json_api_attribute_to_many_linkage.py +test/test_json_api_attribute_to_one_linkage.py +test/test_json_api_cookie_security_configuration_in.py +test/test_json_api_cookie_security_configuration_in_document.py +test/test_json_api_cookie_security_configuration_out.py +test/test_json_api_cookie_security_configuration_out_attributes.py +test/test_json_api_cookie_security_configuration_out_document.py +test/test_json_api_data_source_in.py +test/test_json_api_data_source_in_attributes.py +test/test_json_api_data_source_in_document.py +test/test_json_api_data_source_out.py +test/test_json_api_data_source_out_attributes.py +test/test_json_api_data_source_out_document.py +test/test_json_api_data_source_out_list.py +test/test_json_api_data_source_out_with_links.py +test/test_json_api_data_source_table_out.py +test/test_json_api_data_source_table_out_attributes.py +test/test_json_api_data_source_table_out_attributes_columns.py +test/test_json_api_data_source_table_out_document.py +test/test_json_api_data_source_table_out_list.py +test/test_json_api_data_source_table_out_with_links.py +test/test_json_api_dataset_linkage.py +test/test_json_api_dataset_out.py +test/test_json_api_dataset_out_attributes.py +test/test_json_api_dataset_out_attributes_grain.py +test/test_json_api_dataset_out_attributes_reference_properties.py +test/test_json_api_dataset_out_document.py +test/test_json_api_dataset_out_list.py +test/test_json_api_dataset_out_relationships.py +test/test_json_api_dataset_out_relationships_attributes.py +test/test_json_api_dataset_out_relationships_facts.py +test/test_json_api_dataset_out_with_links.py +test/test_json_api_dataset_to_many_linkage.py +test/test_json_api_dataset_to_one_linkage.py +test/test_json_api_fact_linkage.py +test/test_json_api_fact_out.py +test/test_json_api_fact_out_attributes.py +test/test_json_api_fact_out_document.py +test/test_json_api_fact_out_list.py +test/test_json_api_fact_out_relationships.py +test/test_json_api_fact_out_with_links.py +test/test_json_api_fact_to_many_linkage.py +test/test_json_api_filter_context_in.py +test/test_json_api_filter_context_in_document.py +test/test_json_api_filter_context_linkage.py +test/test_json_api_filter_context_out.py +test/test_json_api_filter_context_out_document.py +test/test_json_api_filter_context_out_list.py +test/test_json_api_filter_context_out_relationships.py +test/test_json_api_filter_context_out_with_links.py +test/test_json_api_filter_context_to_many_linkage.py +test/test_json_api_label_linkage.py +test/test_json_api_label_out.py +test/test_json_api_label_out_attributes.py +test/test_json_api_label_out_document.py +test/test_json_api_label_out_list.py +test/test_json_api_label_out_relationships.py +test/test_json_api_label_out_relationships_attribute.py +test/test_json_api_label_out_with_links.py +test/test_json_api_label_to_many_linkage.py +test/test_json_api_metric_in.py +test/test_json_api_metric_in_document.py +test/test_json_api_metric_linkage.py +test/test_json_api_metric_out.py +test/test_json_api_metric_out_attributes.py +test/test_json_api_metric_out_attributes_content.py +test/test_json_api_metric_out_document.py +test/test_json_api_metric_out_list.py +test/test_json_api_metric_out_relationships.py +test/test_json_api_metric_out_with_links.py +test/test_json_api_metric_to_many_linkage.py +test/test_json_api_organization_in.py +test/test_json_api_organization_in_attributes.py +test/test_json_api_organization_in_document.py +test/test_json_api_organization_out.py +test/test_json_api_organization_out_attributes.py +test/test_json_api_organization_out_document.py +test/test_json_api_organization_out_relationships.py +test/test_json_api_organization_out_relationships_bootstrap_user.py +test/test_json_api_organization_out_relationships_bootstrap_user_group.py +test/test_json_api_user_group_in.py +test/test_json_api_user_group_in_document.py +test/test_json_api_user_group_linkage.py +test/test_json_api_user_group_out.py +test/test_json_api_user_group_out_document.py +test/test_json_api_user_group_out_list.py +test/test_json_api_user_group_out_relationships.py +test/test_json_api_user_group_out_with_links.py +test/test_json_api_user_group_to_many_linkage.py +test/test_json_api_user_group_to_one_linkage.py +test/test_json_api_user_in.py +test/test_json_api_user_in_document.py +test/test_json_api_user_linkage.py +test/test_json_api_user_out.py +test/test_json_api_user_out_attributes.py +test/test_json_api_user_out_document.py +test/test_json_api_user_out_list.py +test/test_json_api_user_out_relationships.py +test/test_json_api_user_out_with_links.py +test/test_json_api_user_to_many_linkage.py +test/test_json_api_user_to_one_linkage.py +test/test_json_api_visualization_object_in.py +test/test_json_api_visualization_object_in_document.py +test/test_json_api_visualization_object_linkage.py +test/test_json_api_visualization_object_out.py +test/test_json_api_visualization_object_out_document.py +test/test_json_api_visualization_object_out_list.py +test/test_json_api_visualization_object_out_relationships.py +test/test_json_api_visualization_object_out_with_links.py +test/test_json_api_visualization_object_to_many_linkage.py +test/test_json_api_workspace_data_filter_in.py +test/test_json_api_workspace_data_filter_in_document.py +test/test_json_api_workspace_data_filter_linkage.py +test/test_json_api_workspace_data_filter_out.py +test/test_json_api_workspace_data_filter_out_attributes.py +test/test_json_api_workspace_data_filter_out_document.py +test/test_json_api_workspace_data_filter_out_list.py +test/test_json_api_workspace_data_filter_out_relationships.py +test/test_json_api_workspace_data_filter_out_relationships_filter_settings.py +test/test_json_api_workspace_data_filter_out_with_links.py +test/test_json_api_workspace_data_filter_setting_linkage.py +test/test_json_api_workspace_data_filter_setting_out.py +test/test_json_api_workspace_data_filter_setting_out_attributes.py +test/test_json_api_workspace_data_filter_setting_out_document.py +test/test_json_api_workspace_data_filter_setting_out_list.py +test/test_json_api_workspace_data_filter_setting_out_relationships.py +test/test_json_api_workspace_data_filter_setting_out_relationships_workspace_data_filter.py +test/test_json_api_workspace_data_filter_setting_out_with_links.py +test/test_json_api_workspace_data_filter_setting_to_many_linkage.py +test/test_json_api_workspace_data_filter_to_one_linkage.py +test/test_json_api_workspace_in.py +test/test_json_api_workspace_in_document.py +test/test_json_api_workspace_linkage.py +test/test_json_api_workspace_out.py +test/test_json_api_workspace_out_attributes.py +test/test_json_api_workspace_out_document.py +test/test_json_api_workspace_out_list.py +test/test_json_api_workspace_out_meta.py +test/test_json_api_workspace_out_meta_config.py +test/test_json_api_workspace_out_relationships.py +test/test_json_api_workspace_out_relationships_parent.py +test/test_json_api_workspace_out_with_links.py +test/test_json_api_workspace_to_one_linkage.py +test/test_list_links.py +test/test_list_links_all_of.py +test/test_object_links.py +test/test_object_links_container.py +test/test_options_controller_api.py +test/test_organization_controller_api.py +test/test_organization_model_controller_api.py +test/test_organization_redirect_controller_api.py +test/test_reference_identifier.py +test/test_user_group_identifier.py +test/test_user_model_controller_api.py +test/test_workspace_identifier.py +test/test_workspace_object_controller_api.py +tox.ini diff --git a/gooddata-metadata-client/.openapi-generator/VERSION b/gooddata-metadata-client/.openapi-generator/VERSION new file mode 100644 index 000000000..862529f8c --- /dev/null +++ b/gooddata-metadata-client/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.2.1-SNAPSHOT \ No newline at end of file diff --git a/gooddata-metadata-client/README.md b/gooddata-metadata-client/README.md new file mode 100644 index 000000000..904af97bf --- /dev/null +++ b/gooddata-metadata-client/README.md @@ -0,0 +1,453 @@ +# gooddata-metadata-client +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: v0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen + +## Requirements. + +Python >= 3.6 + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import gooddata_metadata_client +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import gooddata_metadata_client +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import time +import gooddata_metadata_client +from pprint import pprint +from gooddata_metadata_client.api import data_source_actions_controller_api +from gooddata_metadata_client.model.declarative_model import DeclarativeModel +from gooddata_metadata_client.model.generate_ldm_request import GenerateLdmRequest +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = data_source_actions_controller_api.DataSourceActionsControllerApi(api_client) + data_source_id = "dataSourceId_example" # str | +generate_ldm_request = GenerateLdmRequest( + separator="__", + table_prefix="out_table", + view_prefix="out_view", + primary_label_prefix="pl", + secondary_label_prefix="sl", + fact_prefix="f", + date_granularities="all", + grain_prefix="g", + reference_prefix="r", + grain_reference_prefix="gr", + denorm_prefix="dr", + wdf_prefix="wdf", + ) # GenerateLdmRequest | + + try: + # Generate LDM from PDM + api_response = api_instance.generate_logical_model(data_source_id, generate_ldm_request) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DataSourceActionsControllerApi->generate_logical_model: %s\n" % e) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DataSourceActionsControllerApi* | [**generate_logical_model**](docs/DataSourceActionsControllerApi.md#generate_logical_model) | **POST** /api/actions/dataSources/{dataSourceId}/generateLogicalModel | Generate LDM from PDM +*DataSourceActionsControllerApi* | [**register_upload_notification**](docs/DataSourceActionsControllerApi.md#register_upload_notification) | **POST** /api/actions/dataSources/{dataSourceId}/uploadNotification | Register an upload notification +*DataSourceEntitiesControllerApi* | [**get_all_entities_data_source_tables**](docs/DataSourceEntitiesControllerApi.md#get_all_entities_data_source_tables) | **GET** /api/entities/dataSources/{dataSourceId}/dataSourceTables | +*DataSourceEntitiesControllerApi* | [**get_entity_data_source_tables**](docs/DataSourceEntitiesControllerApi.md#get_entity_data_source_tables) | **GET** /api/entities/dataSources/{dataSourceId}/dataSourceTables/{id} | +*DataSourceLayoutControllerApi* | [**get_pdm_layout**](docs/DataSourceLayoutControllerApi.md#get_pdm_layout) | **GET** /api/layout/dataSources/{dataSourceId}/physicalModel | Get data source physical model layout +*DataSourceLayoutControllerApi* | [**set_pdm_layout**](docs/DataSourceLayoutControllerApi.md#set_pdm_layout) | **PUT** /api/layout/dataSources/{dataSourceId}/physicalModel | Set data source physical model layout +*DeclarativeLayoutControllerApi* | [**get_analytics_model**](docs/DeclarativeLayoutControllerApi.md#get_analytics_model) | **GET** /api/layout/workspaces/{workspaceId}/analyticsModel | Get analytics model +*DeclarativeLayoutControllerApi* | [**get_data_sources_layout**](docs/DeclarativeLayoutControllerApi.md#get_data_sources_layout) | **GET** /api/layout/dataSources | Get all data sources +*DeclarativeLayoutControllerApi* | [**get_logical_model**](docs/DeclarativeLayoutControllerApi.md#get_logical_model) | **GET** /api/layout/workspaces/{workspaceId}/logicalModel | Get logical model +*DeclarativeLayoutControllerApi* | [**get_organization_layout**](docs/DeclarativeLayoutControllerApi.md#get_organization_layout) | **GET** /api/layout/organization | Get organization layout +*DeclarativeLayoutControllerApi* | [**get_user_groups_layout**](docs/DeclarativeLayoutControllerApi.md#get_user_groups_layout) | **GET** /api/layout/userGroups | Get all users +*DeclarativeLayoutControllerApi* | [**get_users_layout**](docs/DeclarativeLayoutControllerApi.md#get_users_layout) | **GET** /api/layout/users | Get all users +*DeclarativeLayoutControllerApi* | [**get_workspace_data_filters_layout**](docs/DeclarativeLayoutControllerApi.md#get_workspace_data_filters_layout) | **GET** /api/layout/workspaceDataFilters | Get workspace data filters for all workspaces +*DeclarativeLayoutControllerApi* | [**get_workspace_layout**](docs/DeclarativeLayoutControllerApi.md#get_workspace_layout) | **GET** /api/layout/workspaces/{workspaceId} | Get workspace layout +*DeclarativeLayoutControllerApi* | [**get_workspaces_layout**](docs/DeclarativeLayoutControllerApi.md#get_workspaces_layout) | **GET** /api/layout/workspaces | Get all workspaces layout +*DeclarativeLayoutControllerApi* | [**put_data_sources_layout**](docs/DeclarativeLayoutControllerApi.md#put_data_sources_layout) | **PUT** /api/layout/userGroups | Put all data sources +*DeclarativeLayoutControllerApi* | [**put_data_sources_layout1**](docs/DeclarativeLayoutControllerApi.md#put_data_sources_layout1) | **PUT** /api/layout/dataSources | Put all data sources +*DeclarativeLayoutControllerApi* | [**put_users_layout**](docs/DeclarativeLayoutControllerApi.md#put_users_layout) | **PUT** /api/layout/users | Put all users +*DeclarativeLayoutControllerApi* | [**put_workspace_layout**](docs/DeclarativeLayoutControllerApi.md#put_workspace_layout) | **PUT** /api/layout/workspaces/{workspaceId} | Set workspace layout +*DeclarativeLayoutControllerApi* | [**set_analytics_model**](docs/DeclarativeLayoutControllerApi.md#set_analytics_model) | **PUT** /api/layout/workspaces/{workspaceId}/analyticsModel | Set analytics model +*DeclarativeLayoutControllerApi* | [**set_logical_model**](docs/DeclarativeLayoutControllerApi.md#set_logical_model) | **PUT** /api/layout/workspaces/{workspaceId}/logicalModel | Set logical model +*DeclarativeLayoutControllerApi* | [**set_organization_layout**](docs/DeclarativeLayoutControllerApi.md#set_organization_layout) | **PUT** /api/layout/organization | Set organization layout +*DeclarativeLayoutControllerApi* | [**set_workspace_data_filters_layout**](docs/DeclarativeLayoutControllerApi.md#set_workspace_data_filters_layout) | **PUT** /api/layout/workspaceDataFilters | Set all workspace data filters +*DeclarativeLayoutControllerApi* | [**set_workspaces_layout**](docs/DeclarativeLayoutControllerApi.md#set_workspaces_layout) | **PUT** /api/layout/workspaces | Set all workspaces layout +*OptionsControllerApi* | [**get_all_options**](docs/OptionsControllerApi.md#get_all_options) | **GET** /api/options | Links for all configuration options +*OptionsControllerApi* | [**get_data_source_drivers**](docs/OptionsControllerApi.md#get_data_source_drivers) | **GET** /api/options/availableDrivers | Get all available data source drivers +*OrganizationControllerApi* | [**get_entity_cookie_security_configurations**](docs/OrganizationControllerApi.md#get_entity_cookie_security_configurations) | **GET** /api/entities/admin/cookieSecurityConfigurations/{id} | +*OrganizationControllerApi* | [**get_entity_organizations**](docs/OrganizationControllerApi.md#get_entity_organizations) | **GET** /api/entities/admin/organizations/{id} | +*OrganizationControllerApi* | [**update_entity_cookie_security_configurations**](docs/OrganizationControllerApi.md#update_entity_cookie_security_configurations) | **PUT** /api/entities/admin/cookieSecurityConfigurations/{id} | +*OrganizationControllerApi* | [**update_entity_organizations**](docs/OrganizationControllerApi.md#update_entity_organizations) | **PUT** /api/entities/admin/organizations/{id} | +*OrganizationModelControllerApi* | [**create_entity_acls**](docs/OrganizationModelControllerApi.md#create_entity_acls) | **POST** /api/entities/acls | +*OrganizationModelControllerApi* | [**create_entity_data_sources**](docs/OrganizationModelControllerApi.md#create_entity_data_sources) | **POST** /api/entities/dataSources | +*OrganizationModelControllerApi* | [**create_entity_user_groups**](docs/OrganizationModelControllerApi.md#create_entity_user_groups) | **POST** /api/entities/userGroups | +*OrganizationModelControllerApi* | [**create_entity_users**](docs/OrganizationModelControllerApi.md#create_entity_users) | **POST** /api/entities/users | +*OrganizationModelControllerApi* | [**create_entity_workspaces**](docs/OrganizationModelControllerApi.md#create_entity_workspaces) | **POST** /api/entities/workspaces | +*OrganizationModelControllerApi* | [**delete_entity_acls**](docs/OrganizationModelControllerApi.md#delete_entity_acls) | **DELETE** /api/entities/acls/{id} | +*OrganizationModelControllerApi* | [**delete_entity_data_sources**](docs/OrganizationModelControllerApi.md#delete_entity_data_sources) | **DELETE** /api/entities/dataSources/{id} | +*OrganizationModelControllerApi* | [**delete_entity_user_groups**](docs/OrganizationModelControllerApi.md#delete_entity_user_groups) | **DELETE** /api/entities/userGroups/{id} | +*OrganizationModelControllerApi* | [**delete_entity_users**](docs/OrganizationModelControllerApi.md#delete_entity_users) | **DELETE** /api/entities/users/{id} | +*OrganizationModelControllerApi* | [**delete_entity_workspaces**](docs/OrganizationModelControllerApi.md#delete_entity_workspaces) | **DELETE** /api/entities/workspaces/{id} | +*OrganizationModelControllerApi* | [**get_all_entities_acls**](docs/OrganizationModelControllerApi.md#get_all_entities_acls) | **GET** /api/entities/acls | +*OrganizationModelControllerApi* | [**get_all_entities_data_sources**](docs/OrganizationModelControllerApi.md#get_all_entities_data_sources) | **GET** /api/entities/dataSources | +*OrganizationModelControllerApi* | [**get_all_entities_user_groups**](docs/OrganizationModelControllerApi.md#get_all_entities_user_groups) | **GET** /api/entities/userGroups | +*OrganizationModelControllerApi* | [**get_all_entities_users**](docs/OrganizationModelControllerApi.md#get_all_entities_users) | **GET** /api/entities/users | +*OrganizationModelControllerApi* | [**get_all_entities_workspaces**](docs/OrganizationModelControllerApi.md#get_all_entities_workspaces) | **GET** /api/entities/workspaces | +*OrganizationModelControllerApi* | [**get_entity_acls**](docs/OrganizationModelControllerApi.md#get_entity_acls) | **GET** /api/entities/acls/{id} | +*OrganizationModelControllerApi* | [**get_entity_data_sources**](docs/OrganizationModelControllerApi.md#get_entity_data_sources) | **GET** /api/entities/dataSources/{id} | +*OrganizationModelControllerApi* | [**get_entity_user_groups**](docs/OrganizationModelControllerApi.md#get_entity_user_groups) | **GET** /api/entities/userGroups/{id} | +*OrganizationModelControllerApi* | [**get_entity_users**](docs/OrganizationModelControllerApi.md#get_entity_users) | **GET** /api/entities/users/{id} | +*OrganizationModelControllerApi* | [**get_entity_workspaces**](docs/OrganizationModelControllerApi.md#get_entity_workspaces) | **GET** /api/entities/workspaces/{id} | +*OrganizationModelControllerApi* | [**update_entity_acls**](docs/OrganizationModelControllerApi.md#update_entity_acls) | **PUT** /api/entities/acls/{id} | +*OrganizationModelControllerApi* | [**update_entity_data_sources**](docs/OrganizationModelControllerApi.md#update_entity_data_sources) | **PUT** /api/entities/dataSources/{id} | +*OrganizationModelControllerApi* | [**update_entity_user_groups**](docs/OrganizationModelControllerApi.md#update_entity_user_groups) | **PUT** /api/entities/userGroups/{id} | +*OrganizationModelControllerApi* | [**update_entity_users**](docs/OrganizationModelControllerApi.md#update_entity_users) | **PUT** /api/entities/users/{id} | +*OrganizationModelControllerApi* | [**update_entity_workspaces**](docs/OrganizationModelControllerApi.md#update_entity_workspaces) | **PUT** /api/entities/workspaces/{id} | +*OrganizationRedirectControllerApi* | [**get_organization**](docs/OrganizationRedirectControllerApi.md#get_organization) | **GET** /api/entities/organization | Get current organization info +*UserModelControllerApi* | [**create_entity_api_tokens**](docs/UserModelControllerApi.md#create_entity_api_tokens) | **POST** /api/entities/users/{userId}/apiTokens | +*UserModelControllerApi* | [**delete_entity_api_tokens**](docs/UserModelControllerApi.md#delete_entity_api_tokens) | **DELETE** /api/entities/users/{userId}/apiTokens/{id} | +*UserModelControllerApi* | [**get_all_entities_api_tokens**](docs/UserModelControllerApi.md#get_all_entities_api_tokens) | **GET** /api/entities/users/{userId}/apiTokens | +*UserModelControllerApi* | [**get_entity_api_tokens**](docs/UserModelControllerApi.md#get_entity_api_tokens) | **GET** /api/entities/users/{userId}/apiTokens/{id} | +*WorkspaceObjectControllerApi* | [**create_entity_analytical_dashboards**](docs/WorkspaceObjectControllerApi.md#create_entity_analytical_dashboards) | **POST** /api/entities/workspaces/{workspaceId}/analyticalDashboards | +*WorkspaceObjectControllerApi* | [**create_entity_filter_contexts**](docs/WorkspaceObjectControllerApi.md#create_entity_filter_contexts) | **POST** /api/entities/workspaces/{workspaceId}/filterContexts | +*WorkspaceObjectControllerApi* | [**create_entity_metrics**](docs/WorkspaceObjectControllerApi.md#create_entity_metrics) | **POST** /api/entities/workspaces/{workspaceId}/metrics | +*WorkspaceObjectControllerApi* | [**create_entity_visualization_objects**](docs/WorkspaceObjectControllerApi.md#create_entity_visualization_objects) | **POST** /api/entities/workspaces/{workspaceId}/visualizationObjects | +*WorkspaceObjectControllerApi* | [**create_entity_workspace_data_filters**](docs/WorkspaceObjectControllerApi.md#create_entity_workspace_data_filters) | **POST** /api/entities/workspaces/{workspaceId}/workspaceDataFilters | +*WorkspaceObjectControllerApi* | [**delete_entity_analytical_dashboards**](docs/WorkspaceObjectControllerApi.md#delete_entity_analytical_dashboards) | **DELETE** /api/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | +*WorkspaceObjectControllerApi* | [**delete_entity_filter_contexts**](docs/WorkspaceObjectControllerApi.md#delete_entity_filter_contexts) | **DELETE** /api/entities/workspaces/{workspaceId}/filterContexts/{objectId} | +*WorkspaceObjectControllerApi* | [**delete_entity_metrics**](docs/WorkspaceObjectControllerApi.md#delete_entity_metrics) | **DELETE** /api/entities/workspaces/{workspaceId}/metrics/{objectId} | +*WorkspaceObjectControllerApi* | [**delete_entity_visualization_objects**](docs/WorkspaceObjectControllerApi.md#delete_entity_visualization_objects) | **DELETE** /api/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | +*WorkspaceObjectControllerApi* | [**delete_entity_workspace_data_filters**](docs/WorkspaceObjectControllerApi.md#delete_entity_workspace_data_filters) | **DELETE** /api/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | +*WorkspaceObjectControllerApi* | [**get_all_entities_analytical_dashboards**](docs/WorkspaceObjectControllerApi.md#get_all_entities_analytical_dashboards) | **GET** /api/entities/workspaces/{workspaceId}/analyticalDashboards | +*WorkspaceObjectControllerApi* | [**get_all_entities_attributes**](docs/WorkspaceObjectControllerApi.md#get_all_entities_attributes) | **GET** /api/entities/workspaces/{workspaceId}/attributes | +*WorkspaceObjectControllerApi* | [**get_all_entities_datasets**](docs/WorkspaceObjectControllerApi.md#get_all_entities_datasets) | **GET** /api/entities/workspaces/{workspaceId}/datasets | +*WorkspaceObjectControllerApi* | [**get_all_entities_facts**](docs/WorkspaceObjectControllerApi.md#get_all_entities_facts) | **GET** /api/entities/workspaces/{workspaceId}/facts | +*WorkspaceObjectControllerApi* | [**get_all_entities_filter_contexts**](docs/WorkspaceObjectControllerApi.md#get_all_entities_filter_contexts) | **GET** /api/entities/workspaces/{workspaceId}/filterContexts | +*WorkspaceObjectControllerApi* | [**get_all_entities_labels**](docs/WorkspaceObjectControllerApi.md#get_all_entities_labels) | **GET** /api/entities/workspaces/{workspaceId}/labels | +*WorkspaceObjectControllerApi* | [**get_all_entities_metrics**](docs/WorkspaceObjectControllerApi.md#get_all_entities_metrics) | **GET** /api/entities/workspaces/{workspaceId}/metrics | +*WorkspaceObjectControllerApi* | [**get_all_entities_visualization_objects**](docs/WorkspaceObjectControllerApi.md#get_all_entities_visualization_objects) | **GET** /api/entities/workspaces/{workspaceId}/visualizationObjects | +*WorkspaceObjectControllerApi* | [**get_all_entities_workspace_data_filter_settings**](docs/WorkspaceObjectControllerApi.md#get_all_entities_workspace_data_filter_settings) | **GET** /api/entities/workspaces/{workspaceId}/workspaceDataFilterSettings | +*WorkspaceObjectControllerApi* | [**get_all_entities_workspace_data_filters**](docs/WorkspaceObjectControllerApi.md#get_all_entities_workspace_data_filters) | **GET** /api/entities/workspaces/{workspaceId}/workspaceDataFilters | +*WorkspaceObjectControllerApi* | [**get_entity_analytical_dashboards**](docs/WorkspaceObjectControllerApi.md#get_entity_analytical_dashboards) | **GET** /api/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | +*WorkspaceObjectControllerApi* | [**get_entity_attributes**](docs/WorkspaceObjectControllerApi.md#get_entity_attributes) | **GET** /api/entities/workspaces/{workspaceId}/attributes/{objectId} | +*WorkspaceObjectControllerApi* | [**get_entity_datasets**](docs/WorkspaceObjectControllerApi.md#get_entity_datasets) | **GET** /api/entities/workspaces/{workspaceId}/datasets/{objectId} | +*WorkspaceObjectControllerApi* | [**get_entity_facts**](docs/WorkspaceObjectControllerApi.md#get_entity_facts) | **GET** /api/entities/workspaces/{workspaceId}/facts/{objectId} | +*WorkspaceObjectControllerApi* | [**get_entity_filter_contexts**](docs/WorkspaceObjectControllerApi.md#get_entity_filter_contexts) | **GET** /api/entities/workspaces/{workspaceId}/filterContexts/{objectId} | +*WorkspaceObjectControllerApi* | [**get_entity_labels**](docs/WorkspaceObjectControllerApi.md#get_entity_labels) | **GET** /api/entities/workspaces/{workspaceId}/labels/{objectId} | +*WorkspaceObjectControllerApi* | [**get_entity_metrics**](docs/WorkspaceObjectControllerApi.md#get_entity_metrics) | **GET** /api/entities/workspaces/{workspaceId}/metrics/{objectId} | +*WorkspaceObjectControllerApi* | [**get_entity_visualization_objects**](docs/WorkspaceObjectControllerApi.md#get_entity_visualization_objects) | **GET** /api/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | +*WorkspaceObjectControllerApi* | [**get_entity_workspace_data_filter_settings**](docs/WorkspaceObjectControllerApi.md#get_entity_workspace_data_filter_settings) | **GET** /api/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId} | +*WorkspaceObjectControllerApi* | [**get_entity_workspace_data_filters**](docs/WorkspaceObjectControllerApi.md#get_entity_workspace_data_filters) | **GET** /api/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | +*WorkspaceObjectControllerApi* | [**update_entity_analytical_dashboards**](docs/WorkspaceObjectControllerApi.md#update_entity_analytical_dashboards) | **PUT** /api/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | +*WorkspaceObjectControllerApi* | [**update_entity_filter_contexts**](docs/WorkspaceObjectControllerApi.md#update_entity_filter_contexts) | **PUT** /api/entities/workspaces/{workspaceId}/filterContexts/{objectId} | +*WorkspaceObjectControllerApi* | [**update_entity_metrics**](docs/WorkspaceObjectControllerApi.md#update_entity_metrics) | **PUT** /api/entities/workspaces/{workspaceId}/metrics/{objectId} | +*WorkspaceObjectControllerApi* | [**update_entity_visualization_objects**](docs/WorkspaceObjectControllerApi.md#update_entity_visualization_objects) | **PUT** /api/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | +*WorkspaceObjectControllerApi* | [**update_entity_workspace_data_filters**](docs/WorkspaceObjectControllerApi.md#update_entity_workspace_data_filters) | **PUT** /api/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | + + +## Documentation For Models + + - [DataSourceTableIdentifier](docs/DataSourceTableIdentifier.md) + - [DatasetReferenceIdentifier](docs/DatasetReferenceIdentifier.md) + - [DeclarativeAnalyticalDashboard](docs/DeclarativeAnalyticalDashboard.md) + - [DeclarativeAnalytics](docs/DeclarativeAnalytics.md) + - [DeclarativeAnalyticsLayer](docs/DeclarativeAnalyticsLayer.md) + - [DeclarativeAttribute](docs/DeclarativeAttribute.md) + - [DeclarativeColumn](docs/DeclarativeColumn.md) + - [DeclarativeDataSource](docs/DeclarativeDataSource.md) + - [DeclarativeDataSources](docs/DeclarativeDataSources.md) + - [DeclarativeDataset](docs/DeclarativeDataset.md) + - [DeclarativeDateDataset](docs/DeclarativeDateDataset.md) + - [DeclarativeFact](docs/DeclarativeFact.md) + - [DeclarativeFilterContext](docs/DeclarativeFilterContext.md) + - [DeclarativeLabel](docs/DeclarativeLabel.md) + - [DeclarativeLdm](docs/DeclarativeLdm.md) + - [DeclarativeMetric](docs/DeclarativeMetric.md) + - [DeclarativeModel](docs/DeclarativeModel.md) + - [DeclarativeOrganization](docs/DeclarativeOrganization.md) + - [DeclarativeOrganizationInfo](docs/DeclarativeOrganizationInfo.md) + - [DeclarativePdm](docs/DeclarativePdm.md) + - [DeclarativeReference](docs/DeclarativeReference.md) + - [DeclarativeTable](docs/DeclarativeTable.md) + - [DeclarativeTables](docs/DeclarativeTables.md) + - [DeclarativeUser](docs/DeclarativeUser.md) + - [DeclarativeUserGroup](docs/DeclarativeUserGroup.md) + - [DeclarativeUserGroups](docs/DeclarativeUserGroups.md) + - [DeclarativeUsers](docs/DeclarativeUsers.md) + - [DeclarativeVisualizationObject](docs/DeclarativeVisualizationObject.md) + - [DeclarativeWorkspace](docs/DeclarativeWorkspace.md) + - [DeclarativeWorkspaceDataFilter](docs/DeclarativeWorkspaceDataFilter.md) + - [DeclarativeWorkspaceDataFilterSetting](docs/DeclarativeWorkspaceDataFilterSetting.md) + - [DeclarativeWorkspaceDataFilters](docs/DeclarativeWorkspaceDataFilters.md) + - [DeclarativeWorkspaceModel](docs/DeclarativeWorkspaceModel.md) + - [DeclarativeWorkspaces](docs/DeclarativeWorkspaces.md) + - [GenerateLdmRequest](docs/GenerateLdmRequest.md) + - [GrainIdentifier](docs/GrainIdentifier.md) + - [GranularitiesFormatting](docs/GranularitiesFormatting.md) + - [JsonApiACLIn](docs/JsonApiACLIn.md) + - [JsonApiACLInDocument](docs/JsonApiACLInDocument.md) + - [JsonApiACLOut](docs/JsonApiACLOut.md) + - [JsonApiACLOutAttributes](docs/JsonApiACLOutAttributes.md) + - [JsonApiACLOutDocument](docs/JsonApiACLOutDocument.md) + - [JsonApiACLOutList](docs/JsonApiACLOutList.md) + - [JsonApiACLOutRelationships](docs/JsonApiACLOutRelationships.md) + - [JsonApiACLOutRelationshipsObjects](docs/JsonApiACLOutRelationshipsObjects.md) + - [JsonApiACLOutRelationshipsSubjects](docs/JsonApiACLOutRelationshipsSubjects.md) + - [JsonApiACLOutWithLinks](docs/JsonApiACLOutWithLinks.md) + - [JsonApiAnalyticalDashboardIn](docs/JsonApiAnalyticalDashboardIn.md) + - [JsonApiAnalyticalDashboardInDocument](docs/JsonApiAnalyticalDashboardInDocument.md) + - [JsonApiAnalyticalDashboardLinkage](docs/JsonApiAnalyticalDashboardLinkage.md) + - [JsonApiAnalyticalDashboardOut](docs/JsonApiAnalyticalDashboardOut.md) + - [JsonApiAnalyticalDashboardOutAttributes](docs/JsonApiAnalyticalDashboardOutAttributes.md) + - [JsonApiAnalyticalDashboardOutDocument](docs/JsonApiAnalyticalDashboardOutDocument.md) + - [JsonApiAnalyticalDashboardOutList](docs/JsonApiAnalyticalDashboardOutList.md) + - [JsonApiAnalyticalDashboardOutRelationships](docs/JsonApiAnalyticalDashboardOutRelationships.md) + - [JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards](docs/JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards.md) + - [JsonApiAnalyticalDashboardOutRelationshipsDatasets](docs/JsonApiAnalyticalDashboardOutRelationshipsDatasets.md) + - [JsonApiAnalyticalDashboardOutRelationshipsFilterContexts](docs/JsonApiAnalyticalDashboardOutRelationshipsFilterContexts.md) + - [JsonApiAnalyticalDashboardOutRelationshipsLabels](docs/JsonApiAnalyticalDashboardOutRelationshipsLabels.md) + - [JsonApiAnalyticalDashboardOutRelationshipsMetrics](docs/JsonApiAnalyticalDashboardOutRelationshipsMetrics.md) + - [JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects](docs/JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects.md) + - [JsonApiAnalyticalDashboardOutWithLinks](docs/JsonApiAnalyticalDashboardOutWithLinks.md) + - [JsonApiAnalyticalDashboardToManyLinkage](docs/JsonApiAnalyticalDashboardToManyLinkage.md) + - [JsonApiApiTokenIn](docs/JsonApiApiTokenIn.md) + - [JsonApiApiTokenInDocument](docs/JsonApiApiTokenInDocument.md) + - [JsonApiApiTokenOut](docs/JsonApiApiTokenOut.md) + - [JsonApiApiTokenOutAttributes](docs/JsonApiApiTokenOutAttributes.md) + - [JsonApiApiTokenOutDocument](docs/JsonApiApiTokenOutDocument.md) + - [JsonApiApiTokenOutList](docs/JsonApiApiTokenOutList.md) + - [JsonApiApiTokenOutWithLinks](docs/JsonApiApiTokenOutWithLinks.md) + - [JsonApiAttributeLinkage](docs/JsonApiAttributeLinkage.md) + - [JsonApiAttributeOut](docs/JsonApiAttributeOut.md) + - [JsonApiAttributeOutAttributes](docs/JsonApiAttributeOutAttributes.md) + - [JsonApiAttributeOutDocument](docs/JsonApiAttributeOutDocument.md) + - [JsonApiAttributeOutList](docs/JsonApiAttributeOutList.md) + - [JsonApiAttributeOutRelationships](docs/JsonApiAttributeOutRelationships.md) + - [JsonApiAttributeOutRelationshipsDataset](docs/JsonApiAttributeOutRelationshipsDataset.md) + - [JsonApiAttributeOutWithLinks](docs/JsonApiAttributeOutWithLinks.md) + - [JsonApiAttributeToManyLinkage](docs/JsonApiAttributeToManyLinkage.md) + - [JsonApiAttributeToOneLinkage](docs/JsonApiAttributeToOneLinkage.md) + - [JsonApiCookieSecurityConfigurationIn](docs/JsonApiCookieSecurityConfigurationIn.md) + - [JsonApiCookieSecurityConfigurationInDocument](docs/JsonApiCookieSecurityConfigurationInDocument.md) + - [JsonApiCookieSecurityConfigurationOut](docs/JsonApiCookieSecurityConfigurationOut.md) + - [JsonApiCookieSecurityConfigurationOutAttributes](docs/JsonApiCookieSecurityConfigurationOutAttributes.md) + - [JsonApiCookieSecurityConfigurationOutDocument](docs/JsonApiCookieSecurityConfigurationOutDocument.md) + - [JsonApiDataSourceIn](docs/JsonApiDataSourceIn.md) + - [JsonApiDataSourceInAttributes](docs/JsonApiDataSourceInAttributes.md) + - [JsonApiDataSourceInDocument](docs/JsonApiDataSourceInDocument.md) + - [JsonApiDataSourceOut](docs/JsonApiDataSourceOut.md) + - [JsonApiDataSourceOutAttributes](docs/JsonApiDataSourceOutAttributes.md) + - [JsonApiDataSourceOutDocument](docs/JsonApiDataSourceOutDocument.md) + - [JsonApiDataSourceOutList](docs/JsonApiDataSourceOutList.md) + - [JsonApiDataSourceOutWithLinks](docs/JsonApiDataSourceOutWithLinks.md) + - [JsonApiDataSourceTableOut](docs/JsonApiDataSourceTableOut.md) + - [JsonApiDataSourceTableOutAttributes](docs/JsonApiDataSourceTableOutAttributes.md) + - [JsonApiDataSourceTableOutAttributesColumns](docs/JsonApiDataSourceTableOutAttributesColumns.md) + - [JsonApiDataSourceTableOutDocument](docs/JsonApiDataSourceTableOutDocument.md) + - [JsonApiDataSourceTableOutList](docs/JsonApiDataSourceTableOutList.md) + - [JsonApiDataSourceTableOutWithLinks](docs/JsonApiDataSourceTableOutWithLinks.md) + - [JsonApiDatasetLinkage](docs/JsonApiDatasetLinkage.md) + - [JsonApiDatasetOut](docs/JsonApiDatasetOut.md) + - [JsonApiDatasetOutAttributes](docs/JsonApiDatasetOutAttributes.md) + - [JsonApiDatasetOutAttributesGrain](docs/JsonApiDatasetOutAttributesGrain.md) + - [JsonApiDatasetOutAttributesReferenceProperties](docs/JsonApiDatasetOutAttributesReferenceProperties.md) + - [JsonApiDatasetOutDocument](docs/JsonApiDatasetOutDocument.md) + - [JsonApiDatasetOutList](docs/JsonApiDatasetOutList.md) + - [JsonApiDatasetOutRelationships](docs/JsonApiDatasetOutRelationships.md) + - [JsonApiDatasetOutRelationshipsAttributes](docs/JsonApiDatasetOutRelationshipsAttributes.md) + - [JsonApiDatasetOutRelationshipsFacts](docs/JsonApiDatasetOutRelationshipsFacts.md) + - [JsonApiDatasetOutWithLinks](docs/JsonApiDatasetOutWithLinks.md) + - [JsonApiDatasetToManyLinkage](docs/JsonApiDatasetToManyLinkage.md) + - [JsonApiDatasetToOneLinkage](docs/JsonApiDatasetToOneLinkage.md) + - [JsonApiFactLinkage](docs/JsonApiFactLinkage.md) + - [JsonApiFactOut](docs/JsonApiFactOut.md) + - [JsonApiFactOutAttributes](docs/JsonApiFactOutAttributes.md) + - [JsonApiFactOutDocument](docs/JsonApiFactOutDocument.md) + - [JsonApiFactOutList](docs/JsonApiFactOutList.md) + - [JsonApiFactOutRelationships](docs/JsonApiFactOutRelationships.md) + - [JsonApiFactOutWithLinks](docs/JsonApiFactOutWithLinks.md) + - [JsonApiFactToManyLinkage](docs/JsonApiFactToManyLinkage.md) + - [JsonApiFilterContextIn](docs/JsonApiFilterContextIn.md) + - [JsonApiFilterContextInDocument](docs/JsonApiFilterContextInDocument.md) + - [JsonApiFilterContextLinkage](docs/JsonApiFilterContextLinkage.md) + - [JsonApiFilterContextOut](docs/JsonApiFilterContextOut.md) + - [JsonApiFilterContextOutDocument](docs/JsonApiFilterContextOutDocument.md) + - [JsonApiFilterContextOutList](docs/JsonApiFilterContextOutList.md) + - [JsonApiFilterContextOutRelationships](docs/JsonApiFilterContextOutRelationships.md) + - [JsonApiFilterContextOutWithLinks](docs/JsonApiFilterContextOutWithLinks.md) + - [JsonApiFilterContextToManyLinkage](docs/JsonApiFilterContextToManyLinkage.md) + - [JsonApiLabelLinkage](docs/JsonApiLabelLinkage.md) + - [JsonApiLabelOut](docs/JsonApiLabelOut.md) + - [JsonApiLabelOutAttributes](docs/JsonApiLabelOutAttributes.md) + - [JsonApiLabelOutDocument](docs/JsonApiLabelOutDocument.md) + - [JsonApiLabelOutList](docs/JsonApiLabelOutList.md) + - [JsonApiLabelOutRelationships](docs/JsonApiLabelOutRelationships.md) + - [JsonApiLabelOutRelationshipsAttribute](docs/JsonApiLabelOutRelationshipsAttribute.md) + - [JsonApiLabelOutWithLinks](docs/JsonApiLabelOutWithLinks.md) + - [JsonApiLabelToManyLinkage](docs/JsonApiLabelToManyLinkage.md) + - [JsonApiMetricIn](docs/JsonApiMetricIn.md) + - [JsonApiMetricInDocument](docs/JsonApiMetricInDocument.md) + - [JsonApiMetricLinkage](docs/JsonApiMetricLinkage.md) + - [JsonApiMetricOut](docs/JsonApiMetricOut.md) + - [JsonApiMetricOutAttributes](docs/JsonApiMetricOutAttributes.md) + - [JsonApiMetricOutAttributesContent](docs/JsonApiMetricOutAttributesContent.md) + - [JsonApiMetricOutDocument](docs/JsonApiMetricOutDocument.md) + - [JsonApiMetricOutList](docs/JsonApiMetricOutList.md) + - [JsonApiMetricOutRelationships](docs/JsonApiMetricOutRelationships.md) + - [JsonApiMetricOutWithLinks](docs/JsonApiMetricOutWithLinks.md) + - [JsonApiMetricToManyLinkage](docs/JsonApiMetricToManyLinkage.md) + - [JsonApiOrganizationIn](docs/JsonApiOrganizationIn.md) + - [JsonApiOrganizationInAttributes](docs/JsonApiOrganizationInAttributes.md) + - [JsonApiOrganizationInDocument](docs/JsonApiOrganizationInDocument.md) + - [JsonApiOrganizationOut](docs/JsonApiOrganizationOut.md) + - [JsonApiOrganizationOutAttributes](docs/JsonApiOrganizationOutAttributes.md) + - [JsonApiOrganizationOutDocument](docs/JsonApiOrganizationOutDocument.md) + - [JsonApiOrganizationOutRelationships](docs/JsonApiOrganizationOutRelationships.md) + - [JsonApiOrganizationOutRelationshipsBootstrapUser](docs/JsonApiOrganizationOutRelationshipsBootstrapUser.md) + - [JsonApiOrganizationOutRelationshipsBootstrapUserGroup](docs/JsonApiOrganizationOutRelationshipsBootstrapUserGroup.md) + - [JsonApiUserGroupIn](docs/JsonApiUserGroupIn.md) + - [JsonApiUserGroupInDocument](docs/JsonApiUserGroupInDocument.md) + - [JsonApiUserGroupLinkage](docs/JsonApiUserGroupLinkage.md) + - [JsonApiUserGroupOut](docs/JsonApiUserGroupOut.md) + - [JsonApiUserGroupOutDocument](docs/JsonApiUserGroupOutDocument.md) + - [JsonApiUserGroupOutList](docs/JsonApiUserGroupOutList.md) + - [JsonApiUserGroupOutRelationships](docs/JsonApiUserGroupOutRelationships.md) + - [JsonApiUserGroupOutWithLinks](docs/JsonApiUserGroupOutWithLinks.md) + - [JsonApiUserGroupToManyLinkage](docs/JsonApiUserGroupToManyLinkage.md) + - [JsonApiUserGroupToOneLinkage](docs/JsonApiUserGroupToOneLinkage.md) + - [JsonApiUserIn](docs/JsonApiUserIn.md) + - [JsonApiUserInDocument](docs/JsonApiUserInDocument.md) + - [JsonApiUserLinkage](docs/JsonApiUserLinkage.md) + - [JsonApiUserOut](docs/JsonApiUserOut.md) + - [JsonApiUserOutAttributes](docs/JsonApiUserOutAttributes.md) + - [JsonApiUserOutDocument](docs/JsonApiUserOutDocument.md) + - [JsonApiUserOutList](docs/JsonApiUserOutList.md) + - [JsonApiUserOutRelationships](docs/JsonApiUserOutRelationships.md) + - [JsonApiUserOutWithLinks](docs/JsonApiUserOutWithLinks.md) + - [JsonApiUserToManyLinkage](docs/JsonApiUserToManyLinkage.md) + - [JsonApiUserToOneLinkage](docs/JsonApiUserToOneLinkage.md) + - [JsonApiVisualizationObjectIn](docs/JsonApiVisualizationObjectIn.md) + - [JsonApiVisualizationObjectInDocument](docs/JsonApiVisualizationObjectInDocument.md) + - [JsonApiVisualizationObjectLinkage](docs/JsonApiVisualizationObjectLinkage.md) + - [JsonApiVisualizationObjectOut](docs/JsonApiVisualizationObjectOut.md) + - [JsonApiVisualizationObjectOutDocument](docs/JsonApiVisualizationObjectOutDocument.md) + - [JsonApiVisualizationObjectOutList](docs/JsonApiVisualizationObjectOutList.md) + - [JsonApiVisualizationObjectOutRelationships](docs/JsonApiVisualizationObjectOutRelationships.md) + - [JsonApiVisualizationObjectOutWithLinks](docs/JsonApiVisualizationObjectOutWithLinks.md) + - [JsonApiVisualizationObjectToManyLinkage](docs/JsonApiVisualizationObjectToManyLinkage.md) + - [JsonApiWorkspaceDataFilterIn](docs/JsonApiWorkspaceDataFilterIn.md) + - [JsonApiWorkspaceDataFilterInDocument](docs/JsonApiWorkspaceDataFilterInDocument.md) + - [JsonApiWorkspaceDataFilterLinkage](docs/JsonApiWorkspaceDataFilterLinkage.md) + - [JsonApiWorkspaceDataFilterOut](docs/JsonApiWorkspaceDataFilterOut.md) + - [JsonApiWorkspaceDataFilterOutAttributes](docs/JsonApiWorkspaceDataFilterOutAttributes.md) + - [JsonApiWorkspaceDataFilterOutDocument](docs/JsonApiWorkspaceDataFilterOutDocument.md) + - [JsonApiWorkspaceDataFilterOutList](docs/JsonApiWorkspaceDataFilterOutList.md) + - [JsonApiWorkspaceDataFilterOutRelationships](docs/JsonApiWorkspaceDataFilterOutRelationships.md) + - [JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings](docs/JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings.md) + - [JsonApiWorkspaceDataFilterOutWithLinks](docs/JsonApiWorkspaceDataFilterOutWithLinks.md) + - [JsonApiWorkspaceDataFilterSettingLinkage](docs/JsonApiWorkspaceDataFilterSettingLinkage.md) + - [JsonApiWorkspaceDataFilterSettingOut](docs/JsonApiWorkspaceDataFilterSettingOut.md) + - [JsonApiWorkspaceDataFilterSettingOutAttributes](docs/JsonApiWorkspaceDataFilterSettingOutAttributes.md) + - [JsonApiWorkspaceDataFilterSettingOutDocument](docs/JsonApiWorkspaceDataFilterSettingOutDocument.md) + - [JsonApiWorkspaceDataFilterSettingOutList](docs/JsonApiWorkspaceDataFilterSettingOutList.md) + - [JsonApiWorkspaceDataFilterSettingOutRelationships](docs/JsonApiWorkspaceDataFilterSettingOutRelationships.md) + - [JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter](docs/JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter.md) + - [JsonApiWorkspaceDataFilterSettingOutWithLinks](docs/JsonApiWorkspaceDataFilterSettingOutWithLinks.md) + - [JsonApiWorkspaceDataFilterSettingToManyLinkage](docs/JsonApiWorkspaceDataFilterSettingToManyLinkage.md) + - [JsonApiWorkspaceDataFilterToOneLinkage](docs/JsonApiWorkspaceDataFilterToOneLinkage.md) + - [JsonApiWorkspaceIn](docs/JsonApiWorkspaceIn.md) + - [JsonApiWorkspaceInDocument](docs/JsonApiWorkspaceInDocument.md) + - [JsonApiWorkspaceLinkage](docs/JsonApiWorkspaceLinkage.md) + - [JsonApiWorkspaceOut](docs/JsonApiWorkspaceOut.md) + - [JsonApiWorkspaceOutAttributes](docs/JsonApiWorkspaceOutAttributes.md) + - [JsonApiWorkspaceOutDocument](docs/JsonApiWorkspaceOutDocument.md) + - [JsonApiWorkspaceOutList](docs/JsonApiWorkspaceOutList.md) + - [JsonApiWorkspaceOutMeta](docs/JsonApiWorkspaceOutMeta.md) + - [JsonApiWorkspaceOutMetaConfig](docs/JsonApiWorkspaceOutMetaConfig.md) + - [JsonApiWorkspaceOutRelationships](docs/JsonApiWorkspaceOutRelationships.md) + - [JsonApiWorkspaceOutRelationshipsParent](docs/JsonApiWorkspaceOutRelationshipsParent.md) + - [JsonApiWorkspaceOutWithLinks](docs/JsonApiWorkspaceOutWithLinks.md) + - [JsonApiWorkspaceToOneLinkage](docs/JsonApiWorkspaceToOneLinkage.md) + - [ListLinks](docs/ListLinks.md) + - [ListLinksAllOf](docs/ListLinksAllOf.md) + - [ObjectLinks](docs/ObjectLinks.md) + - [ObjectLinksContainer](docs/ObjectLinksContainer.md) + - [ReferenceIdentifier](docs/ReferenceIdentifier.md) + - [UserGroupIdentifier](docs/UserGroupIdentifier.md) + - [WorkspaceIdentifier](docs/WorkspaceIdentifier.md) + + +## Documentation For Authorization + + All endpoints do not require authorization. + +## Author + + + + +## Notes for Large OpenAPI documents +If the OpenAPI document is large, imports in gooddata_metadata_client.apis and gooddata_metadata_client.models may fail with a +RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: + +Solution 1: +Use specific imports for apis and models like: +- `from gooddata_metadata_client.api.default_api import DefaultApi` +- `from gooddata_metadata_client.model.pet import Pet` + +Solution 2: +Before importing the package, adjust the maximum recursion limit as shown below: +``` +import sys +sys.setrecursionlimit(1500) +import gooddata_metadata_client +from gooddata_metadata_client.apis import * +from gooddata_metadata_client.models import * +``` + diff --git a/gooddata-metadata-client/docs/DataSourceActionsControllerApi.md b/gooddata-metadata-client/docs/DataSourceActionsControllerApi.md new file mode 100644 index 000000000..14ffe5fdc --- /dev/null +++ b/gooddata-metadata-client/docs/DataSourceActionsControllerApi.md @@ -0,0 +1,156 @@ +# gooddata_metadata_client.DataSourceActionsControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**generate_logical_model**](DataSourceActionsControllerApi.md#generate_logical_model) | **POST** /api/actions/dataSources/{dataSourceId}/generateLogicalModel | Generate LDM from PDM +[**register_upload_notification**](DataSourceActionsControllerApi.md#register_upload_notification) | **POST** /api/actions/dataSources/{dataSourceId}/uploadNotification | Register an upload notification + + +# **generate_logical_model** +> DeclarativeModel generate_logical_model(data_source_id, generate_ldm_request) + +Generate LDM from PDM + +Generate LDM from PDM stored in data source. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import data_source_actions_controller_api +from gooddata_metadata_client.model.declarative_model import DeclarativeModel +from gooddata_metadata_client.model.generate_ldm_request import GenerateLdmRequest +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_actions_controller_api.DataSourceActionsControllerApi(api_client) + data_source_id = "dataSourceId_example" # str | + generate_ldm_request = GenerateLdmRequest( + separator="__", + table_prefix="out_table", + view_prefix="out_view", + primary_label_prefix="pl", + secondary_label_prefix="sl", + fact_prefix="f", + date_granularities="all", + grain_prefix="g", + reference_prefix="r", + grain_reference_prefix="gr", + denorm_prefix="dr", + wdf_prefix="wdf", + ) # GenerateLdmRequest | + + # example passing only required values which don't have defaults set + try: + # Generate LDM from PDM + api_response = api_instance.generate_logical_model(data_source_id, generate_ldm_request) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DataSourceActionsControllerApi->generate_logical_model: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + **generate_ldm_request** | [**GenerateLdmRequest**](GenerateLdmRequest.md)| | + +### Return type + +[**DeclarativeModel**](DeclarativeModel.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | LDM generated successfully. | - | +**404** | Data source with given name does not exist. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **register_upload_notification** +> register_upload_notification(data_source_id) + +Register an upload notification + +Notification sets up all reports to be computed again with new data. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import data_source_actions_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_actions_controller_api.DataSourceActionsControllerApi(api_client) + data_source_id = "dataSourceId_example" # str | + + # example passing only required values which don't have defaults set + try: + # Register an upload notification + api_instance.register_upload_notification(data_source_id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DataSourceActionsControllerApi->register_upload_notification: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | An upload notification has been successfully registered. | - | +**404** | Data source with given name does not exist. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/docs/DataSourceEntitiesControllerApi.md b/gooddata-metadata-client/docs/DataSourceEntitiesControllerApi.md new file mode 100644 index 000000000..b47043d0c --- /dev/null +++ b/gooddata-metadata-client/docs/DataSourceEntitiesControllerApi.md @@ -0,0 +1,168 @@ +# gooddata_metadata_client.DataSourceEntitiesControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_all_entities_data_source_tables**](DataSourceEntitiesControllerApi.md#get_all_entities_data_source_tables) | **GET** /api/entities/dataSources/{dataSourceId}/dataSourceTables | +[**get_entity_data_source_tables**](DataSourceEntitiesControllerApi.md#get_entity_data_source_tables) | **GET** /api/entities/dataSources/{dataSourceId}/dataSourceTables/{id} | + + +# **get_all_entities_data_source_tables** +> JsonApiDataSourceTableOutList get_all_entities_data_source_tables(data_source_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import data_source_entities_controller_api +from gooddata_metadata_client.model.json_api_data_source_table_out_list import JsonApiDataSourceTableOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_entities_controller_api.DataSourceEntitiesControllerApi(api_client) + data_source_id = "dataSourceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=path==v1,v2,v3;type==DataSourceTableTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_data_source_tables(data_source_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DataSourceEntitiesControllerApi->get_all_entities_data_source_tables: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_data_source_tables(data_source_id, predicate=predicate, filter=filter, page=page, size=size, sort=sort) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DataSourceEntitiesControllerApi->get_all_entities_data_source_tables: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + +### Return type + +[**JsonApiDataSourceTableOutList**](JsonApiDataSourceTableOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_data_source_tables** +> JsonApiDataSourceTableOutDocument get_entity_data_source_tables(data_source_id, id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import data_source_entities_controller_api +from gooddata_metadata_client.model.json_api_data_source_table_out_document import JsonApiDataSourceTableOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_entities_controller_api.DataSourceEntitiesControllerApi(api_client) + data_source_id = "dataSourceId_example" # str | + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=path==v1,v2,v3;type==DataSourceTableTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_data_source_tables(data_source_id, id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DataSourceEntitiesControllerApi->get_entity_data_source_tables: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_data_source_tables(data_source_id, id, predicate=predicate, filter=filter) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DataSourceEntitiesControllerApi->get_entity_data_source_tables: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +[**JsonApiDataSourceTableOutDocument**](JsonApiDataSourceTableOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/docs/DataSourceLayoutControllerApi.md b/gooddata-metadata-client/docs/DataSourceLayoutControllerApi.md new file mode 100644 index 000000000..71abe6036 --- /dev/null +++ b/gooddata-metadata-client/docs/DataSourceLayoutControllerApi.md @@ -0,0 +1,160 @@ +# gooddata_metadata_client.DataSourceLayoutControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_pdm_layout**](DataSourceLayoutControllerApi.md#get_pdm_layout) | **GET** /api/layout/dataSources/{dataSourceId}/physicalModel | Get data source physical model layout +[**set_pdm_layout**](DataSourceLayoutControllerApi.md#set_pdm_layout) | **PUT** /api/layout/dataSources/{dataSourceId}/physicalModel | Set data source physical model layout + + +# **get_pdm_layout** +> DeclarativePdm get_pdm_layout(data_source_id) + +Get data source physical model layout + +Retrieve complete layout of tables with their columns + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import data_source_layout_controller_api +from gooddata_metadata_client.model.declarative_pdm import DeclarativePdm +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_layout_controller_api.DataSourceLayoutControllerApi(api_client) + data_source_id = "dataSourceId_example" # str | + + # example passing only required values which don't have defaults set + try: + # Get data source physical model layout + api_response = api_instance.get_pdm_layout(data_source_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DataSourceLayoutControllerApi->get_pdm_layout: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + +### Return type + +[**DeclarativePdm**](DeclarativePdm.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved data source physical mode layout. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_pdm_layout** +> set_pdm_layout(data_source_id, declarative_pdm) + +Set data source physical model layout + +Sets complete layout of tables with their columns under corresponding Data Source. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import data_source_layout_controller_api +from gooddata_metadata_client.model.declarative_pdm import DeclarativePdm +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = data_source_layout_controller_api.DataSourceLayoutControllerApi(api_client) + data_source_id = "dataSourceId_example" # str | + declarative_pdm = DeclarativePdm( + pdm=DeclarativeTables( + tables=[ + DeclarativeTable( + id="customers", + path=["table_schema","table_name"], + type="VIEW", + columns=[ + DeclarativeColumn( + name="customer_id", + data_type="INT", + is_primary_key=True, + referenced_table_id="customers", + referenced_table_column="customer_id", + ), + ], + ), + ], + ), + ) # DeclarativePdm | + + # example passing only required values which don't have defaults set + try: + # Set data source physical model layout + api_instance.set_pdm_layout(data_source_id, declarative_pdm) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DataSourceLayoutControllerApi->set_pdm_layout: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_source_id** | **str**| | + **declarative_pdm** | [**DeclarativePdm**](DeclarativePdm.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Data source physical mode layout set successfully. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/docs/DataSourceTableIdentifier.md b/gooddata-metadata-client/docs/DataSourceTableIdentifier.md new file mode 100644 index 000000000..2afb4bcac --- /dev/null +++ b/gooddata-metadata-client/docs/DataSourceTableIdentifier.md @@ -0,0 +1,15 @@ +# DataSourceTableIdentifier + +An id of the table from PDM mapped to this dataset. Including ID of data source. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of table. | +**data_source_id** | **str** | Data source ID. | +**type** | **str** | Data source entity type. | defaults to "dataSource" +**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-metadata-client/docs/DatasetReferenceIdentifier.md b/gooddata-metadata-client/docs/DatasetReferenceIdentifier.md new file mode 100644 index 000000000..a183544c3 --- /dev/null +++ b/gooddata-metadata-client/docs/DatasetReferenceIdentifier.md @@ -0,0 +1,13 @@ +# DatasetReferenceIdentifier + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "dataset" +**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-metadata-client/docs/DeclarativeAnalyticalDashboard.md b/gooddata-metadata-client/docs/DeclarativeAnalyticalDashboard.md new file mode 100644 index 000000000..54d4c3be6 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeAnalyticalDashboard.md @@ -0,0 +1,16 @@ +# DeclarativeAnalyticalDashboard + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Analytical dashboard ID. | +**title** | **str** | Analytical dashboard title. | +**content** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | A server agnostic definition of the visualization object in JSON format. | +**description** | **str** | Analytical dashboard description. | [optional] +**tags** | **[str]** | A list of tags. | [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-metadata-client/docs/DeclarativeAnalytics.md b/gooddata-metadata-client/docs/DeclarativeAnalytics.md new file mode 100644 index 000000000..afac01893 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeAnalytics.md @@ -0,0 +1,13 @@ +# DeclarativeAnalytics + +Entities describing users' view on data. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analytics** | [**DeclarativeAnalyticsLayer**](DeclarativeAnalyticsLayer.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeAnalyticsLayer.md b/gooddata-metadata-client/docs/DeclarativeAnalyticsLayer.md new file mode 100644 index 000000000..8cd6e4f18 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeAnalyticsLayer.md @@ -0,0 +1,15 @@ +# DeclarativeAnalyticsLayer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analytical_dashboards** | [**[DeclarativeAnalyticalDashboard]**](DeclarativeAnalyticalDashboard.md) | A list of analytical dashboards available in the model. | +**filter_contexts** | [**[DeclarativeFilterContext]**](DeclarativeFilterContext.md) | A list of filter contexts available in the model. | +**metrics** | [**[DeclarativeMetric]**](DeclarativeMetric.md) | A list of metrics available in the model. | +**visualization_objects** | [**[DeclarativeVisualizationObject]**](DeclarativeVisualizationObject.md) | A list of visualization objects available in the model. | +**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-metadata-client/docs/DeclarativeAttribute.md b/gooddata-metadata-client/docs/DeclarativeAttribute.md new file mode 100644 index 000000000..01ae534ce --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeAttribute.md @@ -0,0 +1,17 @@ +# DeclarativeAttribute + +A dataset attribute. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Attribute ID. | +**title** | **str** | Attribute title. | +**labels** | [**[DeclarativeLabel]**](DeclarativeLabel.md) | An array of attribute labels. | +**description** | **str** | Attribute description. | [optional] +**tags** | **[str]** | A list of tags. | [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-metadata-client/docs/DeclarativeColumn.md b/gooddata-metadata-client/docs/DeclarativeColumn.md new file mode 100644 index 000000000..9616ff2b0 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeColumn.md @@ -0,0 +1,17 @@ +# DeclarativeColumn + +A table column. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Column name | +**data_type** | **str** | Column type | +**is_primary_key** | **bool** | Is column part of primary key? | [optional] +**referenced_table_id** | **str** | Referenced table (Foreign key) | [optional] +**referenced_table_column** | **str** | Referenced table (Foreign key) | [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-metadata-client/docs/DeclarativeDataSource.md b/gooddata-metadata-client/docs/DeclarativeDataSource.md new file mode 100644 index 000000000..682732f98 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeDataSource.md @@ -0,0 +1,21 @@ +# DeclarativeDataSource + +A data source and its properties. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Data source ID. | +**name** | **str** | Name of the data source. | +**type** | **str** | Type of database. | +**url** | **str** | An connection string relevant to type of database. | +**schema** | **str** | A scheme/database with the data. | +**pdm** | [**DeclarativeTables**](DeclarativeTables.md) | | +**username** | **str** | User with permission connect the data source/database. | [optional] +**password** | **str** | Password for the data-source user, property is never returned back. | [optional] +**token** | **str** | Token as an alternative to username and password. | [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-metadata-client/docs/DeclarativeDataSources.md b/gooddata-metadata-client/docs/DeclarativeDataSources.md new file mode 100644 index 000000000..5f2420837 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeDataSources.md @@ -0,0 +1,13 @@ +# DeclarativeDataSources + +A data source and its properties. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_sources** | [**[DeclarativeDataSource]**](DeclarativeDataSource.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeDataset.md b/gooddata-metadata-client/docs/DeclarativeDataset.md new file mode 100644 index 000000000..061d45a00 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeDataset.md @@ -0,0 +1,21 @@ +# DeclarativeDataset + +A dataset defined by its properties. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The Dataset ID. This ID is further used to refer to this instance of dataset. | +**title** | **str** | A dataset title. | +**grain** | [**[GrainIdentifier]**](GrainIdentifier.md) | An array of grain identifiers. | +**attributes** | [**[DeclarativeAttribute]**](DeclarativeAttribute.md) | An array of attributes. | +**facts** | [**[DeclarativeFact]**](DeclarativeFact.md) | An array of facts. | +**references** | [**[DeclarativeReference]**](DeclarativeReference.md) | An array of references. | +**description** | **str** | A dataset description. | [optional] +**data_source_table_id** | [**DataSourceTableIdentifier**](DataSourceTableIdentifier.md) | | [optional] +**tags** | **[str]** | A list of tags. | [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-metadata-client/docs/DeclarativeDateDataset.md b/gooddata-metadata-client/docs/DeclarativeDateDataset.md new file mode 100644 index 000000000..8bd21d12a --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeDateDataset.md @@ -0,0 +1,18 @@ +# DeclarativeDateDataset + +A date dataset. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Date dataset ID. | +**title** | **str** | Date dataset title. | +**granularities_formatting** | [**GranularitiesFormatting**](GranularitiesFormatting.md) | | +**granularities** | **[str]** | An array of date granularities. All listed granularities will be available for date dataset. | +**description** | **str** | Date dataset description. | [optional] +**tags** | **[str]** | A list of tags. | [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-metadata-client/docs/DeclarativeFact.md b/gooddata-metadata-client/docs/DeclarativeFact.md new file mode 100644 index 000000000..afe6ec3d5 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeFact.md @@ -0,0 +1,17 @@ +# DeclarativeFact + +A dataset fact. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Fact ID. | +**title** | **str** | Fact title. | +**source_column** | **str** | A name of the source column in the table. | +**description** | **str** | Fact description. | [optional] +**tags** | **[str]** | A list of tags. | [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-metadata-client/docs/DeclarativeFilterContext.md b/gooddata-metadata-client/docs/DeclarativeFilterContext.md new file mode 100644 index 000000000..5a0ecb256 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeFilterContext.md @@ -0,0 +1,16 @@ +# DeclarativeFilterContext + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Filter Context ID. | +**title** | **str** | Filter Context title. | +**content** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | A server agnostic definition of the visualization object in JSON format. | +**description** | **str** | Filter Context description. | [optional] +**tags** | **[str]** | A list of tags. | [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-metadata-client/docs/DeclarativeLabel.md b/gooddata-metadata-client/docs/DeclarativeLabel.md new file mode 100644 index 000000000..46f975ed6 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeLabel.md @@ -0,0 +1,18 @@ +# DeclarativeLabel + +A attribute label. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Label ID. | +**title** | **str** | Label title. | +**primary** | **bool** | A flag indicating whether the label should be treated as a primary one. | +**source_column** | **str** | A name of the source column in the table. | +**description** | **str** | Label description. | [optional] +**tags** | **[str]** | A list of tags. | [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-metadata-client/docs/DeclarativeLayoutControllerApi.md b/gooddata-metadata-client/docs/DeclarativeLayoutControllerApi.md new file mode 100644 index 000000000..4b1d6bd03 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeLayoutControllerApi.md @@ -0,0 +1,1835 @@ +# gooddata_metadata_client.DeclarativeLayoutControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_analytics_model**](DeclarativeLayoutControllerApi.md#get_analytics_model) | **GET** /api/layout/workspaces/{workspaceId}/analyticsModel | Get analytics model +[**get_data_sources_layout**](DeclarativeLayoutControllerApi.md#get_data_sources_layout) | **GET** /api/layout/dataSources | Get all data sources +[**get_logical_model**](DeclarativeLayoutControllerApi.md#get_logical_model) | **GET** /api/layout/workspaces/{workspaceId}/logicalModel | Get logical model +[**get_organization_layout**](DeclarativeLayoutControllerApi.md#get_organization_layout) | **GET** /api/layout/organization | Get organization layout +[**get_user_groups_layout**](DeclarativeLayoutControllerApi.md#get_user_groups_layout) | **GET** /api/layout/userGroups | Get all users +[**get_users_layout**](DeclarativeLayoutControllerApi.md#get_users_layout) | **GET** /api/layout/users | Get all users +[**get_workspace_data_filters_layout**](DeclarativeLayoutControllerApi.md#get_workspace_data_filters_layout) | **GET** /api/layout/workspaceDataFilters | Get workspace data filters for all workspaces +[**get_workspace_layout**](DeclarativeLayoutControllerApi.md#get_workspace_layout) | **GET** /api/layout/workspaces/{workspaceId} | Get workspace layout +[**get_workspaces_layout**](DeclarativeLayoutControllerApi.md#get_workspaces_layout) | **GET** /api/layout/workspaces | Get all workspaces layout +[**put_data_sources_layout**](DeclarativeLayoutControllerApi.md#put_data_sources_layout) | **PUT** /api/layout/userGroups | Put all data sources +[**put_data_sources_layout1**](DeclarativeLayoutControllerApi.md#put_data_sources_layout1) | **PUT** /api/layout/dataSources | Put all data sources +[**put_users_layout**](DeclarativeLayoutControllerApi.md#put_users_layout) | **PUT** /api/layout/users | Put all users +[**put_workspace_layout**](DeclarativeLayoutControllerApi.md#put_workspace_layout) | **PUT** /api/layout/workspaces/{workspaceId} | Set workspace layout +[**set_analytics_model**](DeclarativeLayoutControllerApi.md#set_analytics_model) | **PUT** /api/layout/workspaces/{workspaceId}/analyticsModel | Set analytics model +[**set_logical_model**](DeclarativeLayoutControllerApi.md#set_logical_model) | **PUT** /api/layout/workspaces/{workspaceId}/logicalModel | Set logical model +[**set_organization_layout**](DeclarativeLayoutControllerApi.md#set_organization_layout) | **PUT** /api/layout/organization | Set organization layout +[**set_workspace_data_filters_layout**](DeclarativeLayoutControllerApi.md#set_workspace_data_filters_layout) | **PUT** /api/layout/workspaceDataFilters | Set all workspace data filters +[**set_workspaces_layout**](DeclarativeLayoutControllerApi.md#set_workspaces_layout) | **PUT** /api/layout/workspaces | Set all workspaces layout + + +# **get_analytics_model** +> DeclarativeAnalytics get_analytics_model(workspace_id) + +Get analytics model + +Retrieve current analytics model of the workspace. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_analytics import DeclarativeAnalytics +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + + # example passing only required values which don't have defaults set + try: + # Get analytics model + api_response = api_instance.get_analytics_model(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->get_analytics_model: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + +### Return type + +[**DeclarativeAnalytics**](DeclarativeAnalytics.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved current analytics model. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_data_sources_layout** +> DeclarativeDataSources get_data_sources_layout() + +Get all data sources + +Retrieve all data sources including related physical model. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_data_sources import DeclarativeDataSources +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get all data sources + api_response = api_instance.get_data_sources_layout() + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->get_data_sources_layout: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DeclarativeDataSources**](DeclarativeDataSources.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved all data sources. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_logical_model** +> DeclarativeModel get_logical_model(workspace_id) + +Get logical model + +Retrieve current logical model of the workspace in declarative form. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_model import DeclarativeModel +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + + # example passing only required values which don't have defaults set + try: + # Get logical model + api_response = api_instance.get_logical_model(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->get_logical_model: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + +### Return type + +[**DeclarativeModel**](DeclarativeModel.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved current logical model. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_organization_layout** +> DeclarativeOrganization get_organization_layout() + +Get organization layout + +Retrieve complete layout of organization, workspaces, user-groups, etc. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_organization import DeclarativeOrganization +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get organization layout + api_response = api_instance.get_organization_layout() + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->get_organization_layout: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DeclarativeOrganization**](DeclarativeOrganization.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved all parts of an organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_user_groups_layout** +> DeclarativeUserGroups get_user_groups_layout() + +Get all users + +Retrieve all user-groups eventually with parent group. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_user_groups import DeclarativeUserGroups +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get all users + api_response = api_instance.get_user_groups_layout() + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->get_user_groups_layout: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DeclarativeUserGroups**](DeclarativeUserGroups.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved all groups. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_users_layout** +> DeclarativeUsers get_users_layout() + +Get all users + +Retrieve all users including authentication properties. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_users import DeclarativeUsers +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get all users + api_response = api_instance.get_users_layout() + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->get_users_layout: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DeclarativeUsers**](DeclarativeUsers.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved all users. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_workspace_data_filters_layout** +> DeclarativeWorkspaceDataFilters get_workspace_data_filters_layout() + +Get workspace data filters for all workspaces + +Retrieve all workspaces and related workspace data filters (and their settings / values). + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_workspace_data_filters import DeclarativeWorkspaceDataFilters +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get workspace data filters for all workspaces + api_response = api_instance.get_workspace_data_filters_layout() + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->get_workspace_data_filters_layout: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DeclarativeWorkspaceDataFilters**](DeclarativeWorkspaceDataFilters.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved all workspace data filters. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_workspace_layout** +> DeclarativeWorkspaceModel get_workspace_layout(workspace_id) + +Get workspace layout + +Retrieve current model of the workspace in declarative form. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_workspace_model import DeclarativeWorkspaceModel +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + + # example passing only required values which don't have defaults set + try: + # Get workspace layout + api_response = api_instance.get_workspace_layout(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->get_workspace_layout: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + +### Return type + +[**DeclarativeWorkspaceModel**](DeclarativeWorkspaceModel.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved the workspace model. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_workspaces_layout** +> DeclarativeWorkspaces get_workspaces_layout() + +Get all workspaces layout + +Gets complete layout of workspaces, their hierarchy, models. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_workspaces import DeclarativeWorkspaces +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get all workspaces layout + api_response = api_instance.get_workspaces_layout() + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->get_workspaces_layout: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**DeclarativeWorkspaces**](DeclarativeWorkspaces.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Retrieved layout of all workspaces. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **put_data_sources_layout** +> put_data_sources_layout(declarative_user_groups) + +Put all data sources + +Set all data sources including related physical model. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_user_groups import DeclarativeUserGroups +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + declarative_user_groups = DeclarativeUserGroups( + user_groups=[ + DeclarativeUserGroup( + id="employees.all", + parents=[ + UserGroupIdentifier( + id="group.admins", + type="userGroup", + ), + ], + ), + ], + ) # DeclarativeUserGroups | + + # example passing only required values which don't have defaults set + try: + # Put all data sources + api_instance.put_data_sources_layout(declarative_user_groups) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->put_data_sources_layout: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **declarative_user_groups** | [**DeclarativeUserGroups**](DeclarativeUserGroups.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Defined all data sources. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **put_data_sources_layout1** +> put_data_sources_layout1(declarative_data_sources) + +Put all data sources + +Set all data sources including related physical model. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_data_sources import DeclarativeDataSources +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + declarative_data_sources = DeclarativeDataSources( + data_sources=[ + DeclarativeDataSource( + id="pg_local_docker-demo", + name="postgres demo", + type="POSTGRESQL", + url="jdbc:postgresql://postgres:5432/gooddata", + schema="demo", + username="demo", + password="*****", + token="Bigquery service account JSON. Encode it using base64!", + pdm=DeclarativeTables( + tables=[ + DeclarativeTable( + id="customers", + path=["table_schema","table_name"], + type="VIEW", + columns=[ + DeclarativeColumn( + name="customer_id", + data_type="INT", + is_primary_key=True, + referenced_table_id="customers", + referenced_table_column="customer_id", + ), + ], + ), + ], + ), + ), + ], + ) # DeclarativeDataSources | + + # example passing only required values which don't have defaults set + try: + # Put all data sources + api_instance.put_data_sources_layout1(declarative_data_sources) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->put_data_sources_layout1: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **declarative_data_sources** | [**DeclarativeDataSources**](DeclarativeDataSources.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Defined all data sources. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **put_users_layout** +> put_users_layout(declarative_users) + +Put all users + +Set all users and their authentication properties. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_users import DeclarativeUsers +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + declarative_users = DeclarativeUsers( + users=[ + DeclarativeUser( + id="employee123", + auth_id="auth_id_example", + user_groups=[ + UserGroupIdentifier( + id="group.admins", + type="userGroup", + ), + ], + ), + ], + ) # DeclarativeUsers | + + # example passing only required values which don't have defaults set + try: + # Put all users + api_instance.put_users_layout(declarative_users) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->put_users_layout: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **declarative_users** | [**DeclarativeUsers**](DeclarativeUsers.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Defined all users. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **put_workspace_layout** +> put_workspace_layout(workspace_id, declarative_workspace_model) + +Set workspace layout + +Set complete layout of workspace, like model, ACLs, etc. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_workspace_model import DeclarativeWorkspaceModel +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + declarative_workspace_model = DeclarativeWorkspaceModel( + ldm=DeclarativeLdm( + datasets=[ + DeclarativeDataset( + id="customers", + title="Customers", + description="The customers of ours.", + grain=[ + GrainIdentifier( + id="attr.customers.customer_name", + type="ATTRIBUTE", + ), + ], + attributes=[ + DeclarativeAttribute( + id="attr.customers.customer_name", + title="Customer name", + description="Customer name including first and last name.", + labels=[ + DeclarativeLabel( + id="label.customer_name", + title="Customer name", + description="Customer name", + primary=False, + source_column="customer_name", + tags=["Customers"], + ), + ], + tags=["Customers"], + ), + ], + facts=[ + DeclarativeFact( + id="fact.customer_order_count", + title="Customer order count", + description="A number of orders created by the customer - including all orders, even the non-delivered ones.", + source_column="customer_order_count", + tags=["Customers"], + ), + ], + references=[ + DeclarativeReference( + identifier=ReferenceIdentifier( + id="customers", + type="DATASET", + ), + multivalue=False, + source_columns=["customer_id"], + ), + ], + data_source_table_id=DataSourceTableIdentifier( + id="customers", + data_source_id="my-postgres", + type="dataSource", + ), + tags=["Customers"], + ), + ], + date_instances=[ + DeclarativeDateDataset( + id="date", + title="Date", + description="A customer order date", + granularities_formatting=GranularitiesFormatting( + title_base="title_base_example", + title_pattern="%titleBase - %granularityTitle", + ), + granularities=[ + "MINUTE", + ], + tags=["Customer dates"], + ), + ], + ), + analytics=DeclarativeAnalyticsLayer( + analytical_dashboards=[ + DeclarativeAnalyticalDashboard( + id="revenues-analysis", + title="Revenues analysis", + description="Period to period comparison of revenues in main sectors.", + content={}, + tags=["Revenues"], + ), + ], + filter_contexts=[ + DeclarativeFilterContext( + id="filter-sales", + title="Filter Context for Sales team", + description="Filter Context for Sales team.", + content={}, + tags=["Revenues"], + ), + ], + metrics=[ + DeclarativeMetric( + id="total-sales", + title="Total sales", + description="Sales for all the data available.", + content={}, + tags=["Revenues"], + ), + ], + visualization_objects=[ + DeclarativeVisualizationObject( + id="visualization-1", + title="Count of goods", + description="Simple number for total goods in current production.", + content={}, + tags=["Revenues"], + ), + ], + ), + ) # DeclarativeWorkspaceModel | + + # example passing only required values which don't have defaults set + try: + # Set workspace layout + api_instance.put_workspace_layout(workspace_id, declarative_workspace_model) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->put_workspace_layout: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **declarative_workspace_model** | [**DeclarativeWorkspaceModel**](DeclarativeWorkspaceModel.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The model of the workspace was set. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_analytics_model** +> set_analytics_model(workspace_id, declarative_analytics) + +Set analytics model + +Set effective analytics model of the workspace. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_analytics import DeclarativeAnalytics +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + declarative_analytics = DeclarativeAnalytics( + analytics=DeclarativeAnalyticsLayer( + analytical_dashboards=[ + DeclarativeAnalyticalDashboard( + id="revenues-analysis", + title="Revenues analysis", + description="Period to period comparison of revenues in main sectors.", + content={}, + tags=["Revenues"], + ), + ], + filter_contexts=[ + DeclarativeFilterContext( + id="filter-sales", + title="Filter Context for Sales team", + description="Filter Context for Sales team.", + content={}, + tags=["Revenues"], + ), + ], + metrics=[ + DeclarativeMetric( + id="total-sales", + title="Total sales", + description="Sales for all the data available.", + content={}, + tags=["Revenues"], + ), + ], + visualization_objects=[ + DeclarativeVisualizationObject( + id="visualization-1", + title="Count of goods", + description="Simple number for total goods in current production.", + content={}, + tags=["Revenues"], + ), + ], + ), + ) # DeclarativeAnalytics | + + # example passing only required values which don't have defaults set + try: + # Set analytics model + api_instance.set_analytics_model(workspace_id, declarative_analytics) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->set_analytics_model: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **declarative_analytics** | [**DeclarativeAnalytics**](DeclarativeAnalytics.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Analytics model successfully set. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_logical_model** +> set_logical_model(workspace_id, declarative_model) + +Set logical model + +Set effective logical model of the workspace. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_model import DeclarativeModel +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + declarative_model = DeclarativeModel( + ldm=DeclarativeLdm( + datasets=[ + DeclarativeDataset( + id="customers", + title="Customers", + description="The customers of ours.", + grain=[ + GrainIdentifier( + id="attr.customers.customer_name", + type="ATTRIBUTE", + ), + ], + attributes=[ + DeclarativeAttribute( + id="attr.customers.customer_name", + title="Customer name", + description="Customer name including first and last name.", + labels=[ + DeclarativeLabel( + id="label.customer_name", + title="Customer name", + description="Customer name", + primary=False, + source_column="customer_name", + tags=["Customers"], + ), + ], + tags=["Customers"], + ), + ], + facts=[ + DeclarativeFact( + id="fact.customer_order_count", + title="Customer order count", + description="A number of orders created by the customer - including all orders, even the non-delivered ones.", + source_column="customer_order_count", + tags=["Customers"], + ), + ], + references=[ + DeclarativeReference( + identifier=ReferenceIdentifier( + id="customers", + type="DATASET", + ), + multivalue=False, + source_columns=["customer_id"], + ), + ], + data_source_table_id=DataSourceTableIdentifier( + id="customers", + data_source_id="my-postgres", + type="dataSource", + ), + tags=["Customers"], + ), + ], + date_instances=[ + DeclarativeDateDataset( + id="date", + title="Date", + description="A customer order date", + granularities_formatting=GranularitiesFormatting( + title_base="title_base_example", + title_pattern="%titleBase - %granularityTitle", + ), + granularities=[ + "MINUTE", + ], + tags=["Customer dates"], + ), + ], + ), + ) # DeclarativeModel | + + # example passing only required values which don't have defaults set + try: + # Set logical model + api_instance.set_logical_model(workspace_id, declarative_model) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->set_logical_model: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **declarative_model** | [**DeclarativeModel**](DeclarativeModel.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Logical model successfully set. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_organization_layout** +> set_organization_layout(declarative_organization) + +Set organization layout + +Sets complete layout of organization, like workspaces, user-groups, etc. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_organization import DeclarativeOrganization +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + declarative_organization = DeclarativeOrganization( + organization=DeclarativeOrganizationInfo( + id="Alpha corporation", + name="Alpha corporation", + hostname="alpha.com", + oauth_issuer_location="oauth_issuer_location_example", + oauth_client_id="oauth_client_id_example", + oauth_client_secret="oauth_client_secret_example", + ), + users=[ + DeclarativeUser( + id="employee123", + auth_id="auth_id_example", + user_groups=[ + UserGroupIdentifier( + id="group.admins", + type="userGroup", + ), + ], + ), + ], + user_groups=[ + DeclarativeUserGroup( + id="employees.all", + parents=[ + UserGroupIdentifier( + id="group.admins", + type="userGroup", + ), + ], + ), + ], + data_sources=[ + DeclarativeDataSource( + id="pg_local_docker-demo", + name="postgres demo", + type="POSTGRESQL", + url="jdbc:postgresql://postgres:5432/gooddata", + schema="demo", + username="demo", + password="*****", + token="Bigquery service account JSON. Encode it using base64!", + pdm=DeclarativeTables( + tables=[ + DeclarativeTable( + id="customers", + path=["table_schema","table_name"], + type="VIEW", + columns=[ + DeclarativeColumn( + name="customer_id", + data_type="INT", + is_primary_key=True, + referenced_table_id="customers", + referenced_table_column="customer_id", + ), + ], + ), + ], + ), + ), + ], + workspaces=[ + DeclarativeWorkspace( + id="alpha.sales", + name="Alpha Sales", + model=DeclarativeWorkspaceModel( + ldm=DeclarativeLdm( + datasets=[ + DeclarativeDataset( + id="customers", + title="Customers", + description="The customers of ours.", + grain=[ + GrainIdentifier( + id="attr.customers.customer_name", + type="ATTRIBUTE", + ), + ], + attributes=[ + DeclarativeAttribute( + id="attr.customers.customer_name", + title="Customer name", + description="Customer name including first and last name.", + labels=[ + DeclarativeLabel( + id="label.customer_name", + title="Customer name", + description="Customer name", + primary=False, + source_column="customer_name", + tags=["Customers"], + ), + ], + tags=["Customers"], + ), + ], + facts=[ + DeclarativeFact( + id="fact.customer_order_count", + title="Customer order count", + description="A number of orders created by the customer - including all orders, even the non-delivered ones.", + source_column="customer_order_count", + tags=["Customers"], + ), + ], + references=[ + DeclarativeReference( + identifier=ReferenceIdentifier( + id="customers", + type="DATASET", + ), + multivalue=False, + source_columns=["customer_id"], + ), + ], + data_source_table_id=DataSourceTableIdentifier( + id="customers", + data_source_id="my-postgres", + type="dataSource", + ), + tags=["Customers"], + ), + ], + date_instances=[ + DeclarativeDateDataset( + id="date", + title="Date", + description="A customer order date", + granularities_formatting=GranularitiesFormatting( + title_base="title_base_example", + title_pattern="%titleBase - %granularityTitle", + ), + granularities=[ + "MINUTE", + ], + tags=["Customer dates"], + ), + ], + ), + analytics=DeclarativeAnalyticsLayer( + analytical_dashboards=[ + DeclarativeAnalyticalDashboard( + id="revenues-analysis", + title="Revenues analysis", + description="Period to period comparison of revenues in main sectors.", + content={}, + tags=["Revenues"], + ), + ], + filter_contexts=[ + DeclarativeFilterContext( + id="filter-sales", + title="Filter Context for Sales team", + description="Filter Context for Sales team.", + content={}, + tags=["Revenues"], + ), + ], + metrics=[ + DeclarativeMetric( + id="total-sales", + title="Total sales", + description="Sales for all the data available.", + content={}, + tags=["Revenues"], + ), + ], + visualization_objects=[ + DeclarativeVisualizationObject( + id="visualization-1", + title="Count of goods", + description="Simple number for total goods in current production.", + content={}, + tags=["Revenues"], + ), + ], + ), + ), + parent=WorkspaceIdentifier( + id="alpha.sales", + type="workspace", + ), + ), + ], + workspace_data_filters=[ + DeclarativeWorkspaceDataFilter( + id="country_id", + title="Country ID", + description="ID of country", + column_name="country_id", + data_source_id="sampleDataSource", + workspace_data_filter_settings=[ + DeclarativeWorkspaceDataFilterSetting( + id="country_id_setting", + title="Country ID setting", + description="ID of country setting", + filter_values=["US"], + workspace=WorkspaceIdentifier( + id="alpha.sales", + type="workspace", + ), + ), + ], + workspace=WorkspaceIdentifier( + id="alpha.sales", + type="workspace", + ), + ), + ], + ) # DeclarativeOrganization | + + # example passing only required values which don't have defaults set + try: + # Set organization layout + api_instance.set_organization_layout(declarative_organization) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->set_organization_layout: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **declarative_organization** | [**DeclarativeOrganization**](DeclarativeOrganization.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Defined all parts of an organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_workspace_data_filters_layout** +> set_workspace_data_filters_layout(declarative_workspace_data_filters) + +Set all workspace data filters + +Sets workspace data filters in all workspaces in entire organization. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_workspace_data_filters import DeclarativeWorkspaceDataFilters +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + declarative_workspace_data_filters = DeclarativeWorkspaceDataFilters( + workspace_data_filters=[ + DeclarativeWorkspaceDataFilter( + id="country_id", + title="Country ID", + description="ID of country", + column_name="country_id", + data_source_id="sampleDataSource", + workspace_data_filter_settings=[ + DeclarativeWorkspaceDataFilterSetting( + id="country_id_setting", + title="Country ID setting", + description="ID of country setting", + filter_values=["US"], + workspace=WorkspaceIdentifier( + id="alpha.sales", + type="workspace", + ), + ), + ], + workspace=WorkspaceIdentifier( + id="alpha.sales", + type="workspace", + ), + ), + ], + ) # DeclarativeWorkspaceDataFilters | + + # example passing only required values which don't have defaults set + try: + # Set all workspace data filters + api_instance.set_workspace_data_filters_layout(declarative_workspace_data_filters) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->set_workspace_data_filters_layout: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **declarative_workspace_data_filters** | [**DeclarativeWorkspaceDataFilters**](DeclarativeWorkspaceDataFilters.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | All workspace data filters set. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **set_workspaces_layout** +> set_workspaces_layout(declarative_workspaces) + +Set all workspaces layout + +Sets complete layout of workspaces, their hierarchy, models. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import declarative_layout_controller_api +from gooddata_metadata_client.model.declarative_workspaces import DeclarativeWorkspaces +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = declarative_layout_controller_api.DeclarativeLayoutControllerApi(api_client) + declarative_workspaces = DeclarativeWorkspaces( + workspaces=[ + DeclarativeWorkspace( + id="alpha.sales", + name="Alpha Sales", + model=DeclarativeWorkspaceModel( + ldm=DeclarativeLdm( + datasets=[ + DeclarativeDataset( + id="customers", + title="Customers", + description="The customers of ours.", + grain=[ + GrainIdentifier( + id="attr.customers.customer_name", + type="ATTRIBUTE", + ), + ], + attributes=[ + DeclarativeAttribute( + id="attr.customers.customer_name", + title="Customer name", + description="Customer name including first and last name.", + labels=[ + DeclarativeLabel( + id="label.customer_name", + title="Customer name", + description="Customer name", + primary=False, + source_column="customer_name", + tags=["Customers"], + ), + ], + tags=["Customers"], + ), + ], + facts=[ + DeclarativeFact( + id="fact.customer_order_count", + title="Customer order count", + description="A number of orders created by the customer - including all orders, even the non-delivered ones.", + source_column="customer_order_count", + tags=["Customers"], + ), + ], + references=[ + DeclarativeReference( + identifier=ReferenceIdentifier( + id="customers", + type="DATASET", + ), + multivalue=False, + source_columns=["customer_id"], + ), + ], + data_source_table_id=DataSourceTableIdentifier( + id="customers", + data_source_id="my-postgres", + type="dataSource", + ), + tags=["Customers"], + ), + ], + date_instances=[ + DeclarativeDateDataset( + id="date", + title="Date", + description="A customer order date", + granularities_formatting=GranularitiesFormatting( + title_base="title_base_example", + title_pattern="%titleBase - %granularityTitle", + ), + granularities=[ + "MINUTE", + ], + tags=["Customer dates"], + ), + ], + ), + analytics=DeclarativeAnalyticsLayer( + analytical_dashboards=[ + DeclarativeAnalyticalDashboard( + id="revenues-analysis", + title="Revenues analysis", + description="Period to period comparison of revenues in main sectors.", + content={}, + tags=["Revenues"], + ), + ], + filter_contexts=[ + DeclarativeFilterContext( + id="filter-sales", + title="Filter Context for Sales team", + description="Filter Context for Sales team.", + content={}, + tags=["Revenues"], + ), + ], + metrics=[ + DeclarativeMetric( + id="total-sales", + title="Total sales", + description="Sales for all the data available.", + content={}, + tags=["Revenues"], + ), + ], + visualization_objects=[ + DeclarativeVisualizationObject( + id="visualization-1", + title="Count of goods", + description="Simple number for total goods in current production.", + content={}, + tags=["Revenues"], + ), + ], + ), + ), + parent=WorkspaceIdentifier( + id="alpha.sales", + type="workspace", + ), + ), + ], + workspace_data_filters=[ + DeclarativeWorkspaceDataFilter( + id="country_id", + title="Country ID", + description="ID of country", + column_name="country_id", + data_source_id="sampleDataSource", + workspace_data_filter_settings=[ + DeclarativeWorkspaceDataFilterSetting( + id="country_id_setting", + title="Country ID setting", + description="ID of country setting", + filter_values=["US"], + workspace=WorkspaceIdentifier( + id="alpha.sales", + type="workspace", + ), + ), + ], + workspace=WorkspaceIdentifier( + id="alpha.sales", + type="workspace", + ), + ), + ], + ) # DeclarativeWorkspaces | + + # example passing only required values which don't have defaults set + try: + # Set all workspaces layout + api_instance.set_workspaces_layout(declarative_workspaces) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling DeclarativeLayoutControllerApi->set_workspaces_layout: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **declarative_workspaces** | [**DeclarativeWorkspaces**](DeclarativeWorkspaces.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | All workspaces layout set. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/docs/DeclarativeLdm.md b/gooddata-metadata-client/docs/DeclarativeLdm.md new file mode 100644 index 000000000..43e2f08d1 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeLdm.md @@ -0,0 +1,14 @@ +# DeclarativeLdm + +A logical data model (LDM) representation. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**datasets** | [**[DeclarativeDataset]**](DeclarativeDataset.md) | An array containing datasets. | +**date_instances** | [**[DeclarativeDateDataset]**](DeclarativeDateDataset.md) | An array containing date-related datasets. | +**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-metadata-client/docs/DeclarativeMetric.md b/gooddata-metadata-client/docs/DeclarativeMetric.md new file mode 100644 index 000000000..315a2cbf0 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeMetric.md @@ -0,0 +1,16 @@ +# DeclarativeMetric + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Metric ID. | +**title** | **str** | Metric title. | +**content** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | A server agnostic definition of the visualization object in JSON format. | +**description** | **str** | Metric description. | [optional] +**tags** | **[str]** | A list of tags. | [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-metadata-client/docs/DeclarativeModel.md b/gooddata-metadata-client/docs/DeclarativeModel.md new file mode 100644 index 000000000..e0ec9fe70 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeModel.md @@ -0,0 +1,13 @@ +# DeclarativeModel + +A data model structured as a set of its attributes. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ldm** | [**DeclarativeLdm**](DeclarativeLdm.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeOrganization.md b/gooddata-metadata-client/docs/DeclarativeOrganization.md new file mode 100644 index 000000000..7566e9200 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeOrganization.md @@ -0,0 +1,18 @@ +# DeclarativeOrganization + +Complete definition of an organization in a declarative form. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization** | [**DeclarativeOrganizationInfo**](DeclarativeOrganizationInfo.md) | | +**users** | [**[DeclarativeUser]**](DeclarativeUser.md) | | +**user_groups** | [**[DeclarativeUserGroup]**](DeclarativeUserGroup.md) | | +**data_sources** | [**[DeclarativeDataSource]**](DeclarativeDataSource.md) | | +**workspaces** | [**[DeclarativeWorkspace]**](DeclarativeWorkspace.md) | | +**workspace_data_filters** | [**[DeclarativeWorkspaceDataFilter]**](DeclarativeWorkspaceDataFilter.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeOrganizationInfo.md b/gooddata-metadata-client/docs/DeclarativeOrganizationInfo.md new file mode 100644 index 000000000..6959b7211 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeOrganizationInfo.md @@ -0,0 +1,18 @@ +# DeclarativeOrganizationInfo + +Information available about an organization. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the organization. | +**name** | **str** | Formal name of the organization. | +**hostname** | **str** | Formal hostname used in deployment. | +**oauth_issuer_location** | **str** | URI of the authentication provider. | [optional] +**oauth_client_id** | **str** | Identifier of the authentication provider | [optional] +**oauth_client_secret** | **str** | Communication secret of the authentication provider (never returned back). | [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-metadata-client/docs/DeclarativePdm.md b/gooddata-metadata-client/docs/DeclarativePdm.md new file mode 100644 index 000000000..86e053b98 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativePdm.md @@ -0,0 +1,13 @@ +# DeclarativePdm + +A physical data model (PDM) representation for single data source. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pdm** | [**DeclarativeTables**](DeclarativeTables.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeReference.md b/gooddata-metadata-client/docs/DeclarativeReference.md new file mode 100644 index 000000000..a89cc886e --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeReference.md @@ -0,0 +1,15 @@ +# DeclarativeReference + +A dataset reference. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | [**ReferenceIdentifier**](ReferenceIdentifier.md) | | +**multivalue** | **bool** | The multi-value flag enables many-to-many cardinality for references. | +**source_columns** | **[str]** | An array of source column names for a given reference. | +**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-metadata-client/docs/DeclarativeTable.md b/gooddata-metadata-client/docs/DeclarativeTable.md new file mode 100644 index 000000000..5a33c4e8f --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeTable.md @@ -0,0 +1,16 @@ +# DeclarativeTable + +A database table. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Table id. | +**path** | **[str]** | Path to table. | +**type** | **str** | Table type: TABLE or VIEW. | +**columns** | [**[DeclarativeColumn]**](DeclarativeColumn.md) | An array of physical columns | +**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-metadata-client/docs/DeclarativeTables.md b/gooddata-metadata-client/docs/DeclarativeTables.md new file mode 100644 index 000000000..1e7db802b --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeTables.md @@ -0,0 +1,13 @@ +# DeclarativeTables + +A physical data model (PDM) tables. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tables** | [**[DeclarativeTable]**](DeclarativeTable.md) | An array of physical database tables. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeUser.md b/gooddata-metadata-client/docs/DeclarativeUser.md new file mode 100644 index 000000000..713f64d4b --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeUser.md @@ -0,0 +1,15 @@ +# DeclarativeUser + +A user and its properties + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | User identifier. | +**auth_id** | **str** | User identification in the authentication manager. | [optional] +**user_groups** | [**[UserGroupIdentifier]**](UserGroupIdentifier.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-metadata-client/docs/DeclarativeUserGroup.md b/gooddata-metadata-client/docs/DeclarativeUserGroup.md new file mode 100644 index 000000000..4b67a90c3 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeUserGroup.md @@ -0,0 +1,14 @@ +# DeclarativeUserGroup + +A user-group and its properties + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | UserGroup identifier. | +**parents** | [**[UserGroupIdentifier]**](UserGroupIdentifier.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-metadata-client/docs/DeclarativeUserGroups.md b/gooddata-metadata-client/docs/DeclarativeUserGroups.md new file mode 100644 index 000000000..9cfcf01a6 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeUserGroups.md @@ -0,0 +1,13 @@ +# DeclarativeUserGroups + +Declarative form of userGroups and its properties. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_groups** | [**[DeclarativeUserGroup]**](DeclarativeUserGroup.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeUsers.md b/gooddata-metadata-client/docs/DeclarativeUsers.md new file mode 100644 index 000000000..ea5d50039 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeUsers.md @@ -0,0 +1,13 @@ +# DeclarativeUsers + +Declarative form of users and its properties. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**[DeclarativeUser]**](DeclarativeUser.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeVisualizationObject.md b/gooddata-metadata-client/docs/DeclarativeVisualizationObject.md new file mode 100644 index 000000000..15a1ec0cd --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeVisualizationObject.md @@ -0,0 +1,16 @@ +# DeclarativeVisualizationObject + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Visualization object ID. | +**title** | **str** | Visualization object title. | +**content** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | A server agnostic definition of the visualization object in JSON format. | +**description** | **str** | Visualization object description. | [optional] +**tags** | **[str]** | A list of tags. | [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-metadata-client/docs/DeclarativeWorkspace.md b/gooddata-metadata-client/docs/DeclarativeWorkspace.md new file mode 100644 index 000000000..bc45b5834 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeWorkspace.md @@ -0,0 +1,16 @@ +# DeclarativeWorkspace + +A declarative form of a particular workspace. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of a workspace | +**name** | **str** | Name of a workspace to view. | +**model** | [**DeclarativeWorkspaceModel**](DeclarativeWorkspaceModel.md) | | +**parent** | [**WorkspaceIdentifier**](WorkspaceIdentifier.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-metadata-client/docs/DeclarativeWorkspaceDataFilter.md b/gooddata-metadata-client/docs/DeclarativeWorkspaceDataFilter.md new file mode 100644 index 000000000..ff96a3d8b --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeWorkspaceDataFilter.md @@ -0,0 +1,19 @@ +# DeclarativeWorkspaceDataFilter + +Workspace Data Filters serving the filtering of what data users can see in workspaces. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Workspace Data Filters ID. This ID is further used to refer to this instance. | +**title** | **str** | Workspace Data Filters title. | +**column_name** | **str** | Workspace Data Filters column name. Data are filtered using this physical column. | +**data_source_id** | **str** | Data source ID. Workspace Data Filters must always be connected to single data source. | +**workspace_data_filter_settings** | [**[DeclarativeWorkspaceDataFilterSetting]**](DeclarativeWorkspaceDataFilterSetting.md) | Filter settings specifying values of filters valid for the workspace. | +**description** | **str** | Workspace Data Filters description. | [optional] +**workspace** | [**WorkspaceIdentifier**](WorkspaceIdentifier.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-metadata-client/docs/DeclarativeWorkspaceDataFilterSetting.md b/gooddata-metadata-client/docs/DeclarativeWorkspaceDataFilterSetting.md new file mode 100644 index 000000000..c9cf2d051 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeWorkspaceDataFilterSetting.md @@ -0,0 +1,17 @@ +# DeclarativeWorkspaceDataFilterSetting + +Workspace Data Filters serving the filtering of what data users can see in workspaces. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Workspace Data Filters ID. This ID is further used to refer to this instance. | +**title** | **str** | Workspace Data Filters setting title. | +**filter_values** | **[str]** | Only those rows are returned, where columnName from filter matches those values. | +**workspace** | [**WorkspaceIdentifier**](WorkspaceIdentifier.md) | | +**description** | **str** | Workspace Data Filters setting description. | [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-metadata-client/docs/DeclarativeWorkspaceDataFilters.md b/gooddata-metadata-client/docs/DeclarativeWorkspaceDataFilters.md new file mode 100644 index 000000000..255d63aa1 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeWorkspaceDataFilters.md @@ -0,0 +1,13 @@ +# DeclarativeWorkspaceDataFilters + +Declarative form of data filters. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workspace_data_filters** | [**[DeclarativeWorkspaceDataFilter]**](DeclarativeWorkspaceDataFilter.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeWorkspaceModel.md b/gooddata-metadata-client/docs/DeclarativeWorkspaceModel.md new file mode 100644 index 000000000..d26976481 --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeWorkspaceModel.md @@ -0,0 +1,14 @@ +# DeclarativeWorkspaceModel + +A declarative form of a model and analytics for a workspace. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ldm** | [**DeclarativeLdm**](DeclarativeLdm.md) | | +**analytics** | [**DeclarativeAnalyticsLayer**](DeclarativeAnalyticsLayer.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/DeclarativeWorkspaces.md b/gooddata-metadata-client/docs/DeclarativeWorkspaces.md new file mode 100644 index 000000000..c2cd408cc --- /dev/null +++ b/gooddata-metadata-client/docs/DeclarativeWorkspaces.md @@ -0,0 +1,14 @@ +# DeclarativeWorkspaces + +A declarative form of a all workspace layout. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workspaces** | [**[DeclarativeWorkspace]**](DeclarativeWorkspace.md) | | +**workspace_data_filters** | [**[DeclarativeWorkspaceDataFilter]**](DeclarativeWorkspaceDataFilter.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/GenerateLdmRequest.md b/gooddata-metadata-client/docs/GenerateLdmRequest.md new file mode 100644 index 000000000..ebe9e99af --- /dev/null +++ b/gooddata-metadata-client/docs/GenerateLdmRequest.md @@ -0,0 +1,24 @@ +# GenerateLdmRequest + +A request containing all information needed for generation of logical model. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**separator** | **str** | A separator between prefixes and the names. Default is \"__\". | +**table_prefix** | **str** | Tables starting with this prefix will be included. The prefix is then followed by the value of `separator` parameter. Given the table prefix is `out_table` and separator is `__`, the table with name like `out_table__customers` will be scanned. | [optional] +**view_prefix** | **str** | Views starting with this prefix will be included. The prefix is then followed by the value of `separator` parameter. Given the view prefix is `out_view` and separator is `__`, the table with name like `out_view__us_customers` will be scanned. | [optional] +**primary_label_prefix** | **str** | Columns starting with this prefix will be considered as primary labels. The prefix is then followed by the value of `separator` parameter. Given the primary label prefix is `pl` and separator is `__`, the columns with name like `pl__country_id` will be considered as primary labels. | [optional] +**secondary_label_prefix** | **str** | Columns starting with this prefix will be considered as secondary labels. The prefix is then followed by the value of `separator` parameter. Given the secondary label prefix is `sl` and separator is `__`, the columns with name like `sl__country_id_country_name` will be considered as secondary labels. | [optional] +**fact_prefix** | **str** | Columns starting with this prefix will be considered as facts. The prefix is then followed by the value of `separator` parameter. Given the fact prefix is `f` and separator is `__`, the columns with name like `f__sold` will be considered as facts. | [optional] +**date_granularities** | **str** | Option to control date granularities for date datasets. Empty value enables common date granularities (DAY, WEEK, MONTH, QUARTER, YEAR). Default value is `all` which enables all available date granularities, including time granularities (like hours, minutes). | [optional] +**grain_prefix** | **str** | Columns starting with this prefix will be considered as grains. The prefix is then followed by the value of `separator` parameter. Given the grain prefix is `g` and separator is `__`, the columns with name like `g__name` will be considered as grains. | [optional] +**reference_prefix** | **str** | Columns starting with this prefix will be considered as references. The prefix is then followed by the value of `separator` parameter. Given the reference prefix is `r` and separator is `__`, the columns with name like `r__customer_name` will be considered as references. | [optional] +**grain_reference_prefix** | **str** | Columns starting with this prefix will be considered as grain references. The prefix is then followed by the value of `separator` parameter. Given the reference prefix is `gr` and separator is `__`, the columns with name like `gr__customer_name` will be considered as grain references. | [optional] +**denorm_prefix** | **str** | Columns starting with this prefix will be considered as denormalization references. The prefix is then followed by the value of `separator` parameter. Given the denormalization reference prefix is `dr` and separator is `__`, the columns with name like `dr__customer_name` will be considered as denormalization references. | [optional] +**wdf_prefix** | **str** | Column serving as workspace data filter. No labels are auto generated for such columns. | [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-metadata-client/docs/GrainIdentifier.md b/gooddata-metadata-client/docs/GrainIdentifier.md new file mode 100644 index 000000000..6de7aff78 --- /dev/null +++ b/gooddata-metadata-client/docs/GrainIdentifier.md @@ -0,0 +1,14 @@ +# GrainIdentifier + +A grain identifier. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Grain ID. | +**type** | **str** | A type of the grain. | +**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-metadata-client/docs/GranularitiesFormatting.md b/gooddata-metadata-client/docs/GranularitiesFormatting.md new file mode 100644 index 000000000..cd5d087b6 --- /dev/null +++ b/gooddata-metadata-client/docs/GranularitiesFormatting.md @@ -0,0 +1,14 @@ +# GranularitiesFormatting + +A date dataset granularities title formatting rules. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title_base** | **str** | Title base is used as a token in title pattern. If left empty, it is replaced by date dataset title. | +**title_pattern** | **str** | This pattern is used to generate the title of attributes and labels that result from the granularities. There are two tokens available: * `%titleBase` - represents shared part by all titles, or title of Date Dataset if left empty * `%granularityTitle` - represents `DateGranularity` built-in title | +**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-metadata-client/docs/JsonApiACLIn.md b/gooddata-metadata-client/docs/JsonApiACLIn.md new file mode 100644 index 000000000..9666c7954 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLIn.md @@ -0,0 +1,16 @@ +# JsonApiACLIn + +JSON:API representation of acl entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "acl" +**attributes** | [**JsonApiACLOutAttributes**](JsonApiACLOutAttributes.md) | | [optional] +**relationships** | [**JsonApiACLOutRelationships**](JsonApiACLOutRelationships.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-metadata-client/docs/JsonApiACLInDocument.md b/gooddata-metadata-client/docs/JsonApiACLInDocument.md new file mode 100644 index 000000000..e26b8db6f --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLInDocument.md @@ -0,0 +1,12 @@ +# JsonApiACLInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiACLIn**](JsonApiACLIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiACLOut.md b/gooddata-metadata-client/docs/JsonApiACLOut.md new file mode 100644 index 000000000..1c36a9e51 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLOut.md @@ -0,0 +1,16 @@ +# JsonApiACLOut + +JSON:API representation of acl entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "acl" +**attributes** | [**JsonApiACLOutAttributes**](JsonApiACLOutAttributes.md) | | [optional] +**relationships** | [**JsonApiACLOutRelationships**](JsonApiACLOutRelationships.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-metadata-client/docs/JsonApiACLOutAttributes.md b/gooddata-metadata-client/docs/JsonApiACLOutAttributes.md new file mode 100644 index 000000000..705348e04 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLOutAttributes.md @@ -0,0 +1,14 @@ +# JsonApiACLOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access** | **str** | | [optional] if omitted the server will use the default value of "FULL_ACCESS" +**priority** | **int** | | [optional] +**control** | **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-metadata-client/docs/JsonApiACLOutDocument.md b/gooddata-metadata-client/docs/JsonApiACLOutDocument.md new file mode 100644 index 000000000..c3b688772 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiACLOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiACLOut**](JsonApiACLOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiACLOutList.md b/gooddata-metadata-client/docs/JsonApiACLOutList.md new file mode 100644 index 000000000..fbd8e9b5b --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLOutList.md @@ -0,0 +1,15 @@ +# JsonApiACLOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiACLOutWithLinks]**](JsonApiACLOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiACLOutRelationships.md b/gooddata-metadata-client/docs/JsonApiACLOutRelationships.md new file mode 100644 index 000000000..3f829a75e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLOutRelationships.md @@ -0,0 +1,13 @@ +# JsonApiACLOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subjects** | [**JsonApiACLOutRelationshipsSubjects**](JsonApiACLOutRelationshipsSubjects.md) | | [optional] +**objects** | [**JsonApiACLOutRelationshipsObjects**](JsonApiACLOutRelationshipsObjects.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-metadata-client/docs/JsonApiACLOutRelationshipsObjects.md b/gooddata-metadata-client/docs/JsonApiACLOutRelationshipsObjects.md new file mode 100644 index 000000000..a916ff10b --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLOutRelationshipsObjects.md @@ -0,0 +1,12 @@ +# JsonApiACLOutRelationshipsObjects + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiUserGroupToManyLinkage**](JsonApiUserGroupToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiACLOutRelationshipsSubjects.md b/gooddata-metadata-client/docs/JsonApiACLOutRelationshipsSubjects.md new file mode 100644 index 000000000..3224f2f30 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLOutRelationshipsSubjects.md @@ -0,0 +1,12 @@ +# JsonApiACLOutRelationshipsSubjects + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiUserToManyLinkage**](JsonApiUserToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiACLOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiACLOutWithLinks.md new file mode 100644 index 000000000..a1ba142c6 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiACLOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiACLOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "acl" +**attributes** | [**JsonApiACLOutAttributes**](JsonApiACLOutAttributes.md) | | [optional] +**relationships** | [**JsonApiACLOutRelationships**](JsonApiACLOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiAnalyticalDashboardIn.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardIn.md new file mode 100644 index 000000000..c42a7b02a --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardIn.md @@ -0,0 +1,15 @@ +# JsonApiAnalyticalDashboardIn + +JSON:API representation of analyticalDashboard entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "analyticalDashboard" +**attributes** | [**JsonApiAnalyticalDashboardOutAttributes**](JsonApiAnalyticalDashboardOutAttributes.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-metadata-client/docs/JsonApiAnalyticalDashboardInDocument.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardInDocument.md new file mode 100644 index 000000000..ea34f887a --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardInDocument.md @@ -0,0 +1,12 @@ +# JsonApiAnalyticalDashboardInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiAnalyticalDashboardIn**](JsonApiAnalyticalDashboardIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardLinkage.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardLinkage.md new file mode 100644 index 000000000..c6e962241 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardLinkage.md @@ -0,0 +1,14 @@ +# JsonApiAnalyticalDashboardLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "analyticalDashboard" +**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-metadata-client/docs/JsonApiAnalyticalDashboardOut.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOut.md new file mode 100644 index 000000000..817051d0a --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOut.md @@ -0,0 +1,16 @@ +# JsonApiAnalyticalDashboardOut + +JSON:API representation of analyticalDashboard entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "analyticalDashboard" +**attributes** | [**JsonApiAnalyticalDashboardOutAttributes**](JsonApiAnalyticalDashboardOutAttributes.md) | | [optional] +**relationships** | [**JsonApiAnalyticalDashboardOutRelationships**](JsonApiAnalyticalDashboardOutRelationships.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-metadata-client/docs/JsonApiAnalyticalDashboardOutAttributes.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutAttributes.md new file mode 100644 index 000000000..8a7e9dbfa --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutAttributes.md @@ -0,0 +1,16 @@ +# JsonApiAnalyticalDashboardOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**tags** | **[str]** | | [optional] +**are_relations_valid** | **bool** | | [optional] +**content** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Free-form JSON content. | [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-metadata-client/docs/JsonApiAnalyticalDashboardOutDocument.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutDocument.md new file mode 100644 index 000000000..a1fe7dd93 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiAnalyticalDashboardOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiAnalyticalDashboardOut**](JsonApiAnalyticalDashboardOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiAnalyticalDashboardOutList.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutList.md new file mode 100644 index 000000000..ae5ee1ca1 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutList.md @@ -0,0 +1,15 @@ +# JsonApiAnalyticalDashboardOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiAnalyticalDashboardOutWithLinks]**](JsonApiAnalyticalDashboardOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationships.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationships.md new file mode 100644 index 000000000..4c5dce610 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationships.md @@ -0,0 +1,17 @@ +# JsonApiAnalyticalDashboardOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visualization_objects** | [**JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects**](JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects.md) | | [optional] +**analytical_dashboards** | [**JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards**](JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards.md) | | [optional] +**labels** | [**JsonApiAnalyticalDashboardOutRelationshipsLabels**](JsonApiAnalyticalDashboardOutRelationshipsLabels.md) | | [optional] +**metrics** | [**JsonApiAnalyticalDashboardOutRelationshipsMetrics**](JsonApiAnalyticalDashboardOutRelationshipsMetrics.md) | | [optional] +**datasets** | [**JsonApiAnalyticalDashboardOutRelationshipsDatasets**](JsonApiAnalyticalDashboardOutRelationshipsDatasets.md) | | [optional] +**filter_contexts** | [**JsonApiAnalyticalDashboardOutRelationshipsFilterContexts**](JsonApiAnalyticalDashboardOutRelationshipsFilterContexts.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-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards.md new file mode 100644 index 000000000..4053ef673 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards.md @@ -0,0 +1,12 @@ +# JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiAnalyticalDashboardToManyLinkage**](JsonApiAnalyticalDashboardToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsDatasets.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsDatasets.md new file mode 100644 index 000000000..f497dca3e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsDatasets.md @@ -0,0 +1,12 @@ +# JsonApiAnalyticalDashboardOutRelationshipsDatasets + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiDatasetToManyLinkage**](JsonApiDatasetToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsFilterContexts.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsFilterContexts.md new file mode 100644 index 000000000..15c8f5235 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsFilterContexts.md @@ -0,0 +1,12 @@ +# JsonApiAnalyticalDashboardOutRelationshipsFilterContexts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiFilterContextToManyLinkage**](JsonApiFilterContextToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsLabels.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsLabels.md new file mode 100644 index 000000000..7f9eaa4e0 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsLabels.md @@ -0,0 +1,12 @@ +# JsonApiAnalyticalDashboardOutRelationshipsLabels + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiLabelToManyLinkage**](JsonApiLabelToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsMetrics.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsMetrics.md new file mode 100644 index 000000000..ff3a92c67 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsMetrics.md @@ -0,0 +1,12 @@ +# JsonApiAnalyticalDashboardOutRelationshipsMetrics + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiMetricToManyLinkage**](JsonApiMetricToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects.md new file mode 100644 index 000000000..567653504 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects.md @@ -0,0 +1,12 @@ +# JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiVisualizationObjectToManyLinkage**](JsonApiVisualizationObjectToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutWithLinks.md new file mode 100644 index 000000000..0f6f570f2 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiAnalyticalDashboardOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "analyticalDashboard" +**attributes** | [**JsonApiAnalyticalDashboardOutAttributes**](JsonApiAnalyticalDashboardOutAttributes.md) | | [optional] +**relationships** | [**JsonApiAnalyticalDashboardOutRelationships**](JsonApiAnalyticalDashboardOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiAnalyticalDashboardToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardToManyLinkage.md new file mode 100644 index 000000000..5dbf3d167 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAnalyticalDashboardToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiAnalyticalDashboardToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiAnalyticalDashboardLinkage]**](JsonApiAnalyticalDashboardLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiApiTokenIn.md b/gooddata-metadata-client/docs/JsonApiApiTokenIn.md new file mode 100644 index 000000000..14ddde0e0 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiApiTokenIn.md @@ -0,0 +1,15 @@ +# JsonApiApiTokenIn + +JSON:API representation of apiToken entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "apiToken" +**attributes** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiApiTokenInDocument.md b/gooddata-metadata-client/docs/JsonApiApiTokenInDocument.md new file mode 100644 index 000000000..6f2dae18e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiApiTokenInDocument.md @@ -0,0 +1,12 @@ +# JsonApiApiTokenInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiApiTokenIn**](JsonApiApiTokenIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiApiTokenOut.md b/gooddata-metadata-client/docs/JsonApiApiTokenOut.md new file mode 100644 index 000000000..9973ab211 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiApiTokenOut.md @@ -0,0 +1,15 @@ +# JsonApiApiTokenOut + +JSON:API representation of apiToken entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "apiToken" +**attributes** | [**JsonApiApiTokenOutAttributes**](JsonApiApiTokenOutAttributes.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-metadata-client/docs/JsonApiApiTokenOutAttributes.md b/gooddata-metadata-client/docs/JsonApiApiTokenOutAttributes.md new file mode 100644 index 000000000..a887217ff --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiApiTokenOutAttributes.md @@ -0,0 +1,12 @@ +# JsonApiApiTokenOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bearer_token** | **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-metadata-client/docs/JsonApiApiTokenOutDocument.md b/gooddata-metadata-client/docs/JsonApiApiTokenOutDocument.md new file mode 100644 index 000000000..0f8d0c67e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiApiTokenOutDocument.md @@ -0,0 +1,13 @@ +# JsonApiApiTokenOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiApiTokenOut**](JsonApiApiTokenOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiApiTokenOutList.md b/gooddata-metadata-client/docs/JsonApiApiTokenOutList.md new file mode 100644 index 000000000..1e20f3fc9 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiApiTokenOutList.md @@ -0,0 +1,14 @@ +# JsonApiApiTokenOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiApiTokenOutWithLinks]**](JsonApiApiTokenOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.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-metadata-client/docs/JsonApiApiTokenOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiApiTokenOutWithLinks.md new file mode 100644 index 000000000..21723e0bd --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiApiTokenOutWithLinks.md @@ -0,0 +1,15 @@ +# JsonApiApiTokenOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "apiToken" +**attributes** | [**JsonApiApiTokenOutAttributes**](JsonApiApiTokenOutAttributes.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiAttributeLinkage.md b/gooddata-metadata-client/docs/JsonApiAttributeLinkage.md new file mode 100644 index 000000000..02d7b79b0 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeLinkage.md @@ -0,0 +1,14 @@ +# JsonApiAttributeLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "attribute" +**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-metadata-client/docs/JsonApiAttributeOut.md b/gooddata-metadata-client/docs/JsonApiAttributeOut.md new file mode 100644 index 000000000..011c2172e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeOut.md @@ -0,0 +1,16 @@ +# JsonApiAttributeOut + +JSON:API representation of attribute entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "attribute" +**attributes** | [**JsonApiAttributeOutAttributes**](JsonApiAttributeOutAttributes.md) | | [optional] +**relationships** | [**JsonApiAttributeOutRelationships**](JsonApiAttributeOutRelationships.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-metadata-client/docs/JsonApiAttributeOutAttributes.md b/gooddata-metadata-client/docs/JsonApiAttributeOutAttributes.md new file mode 100644 index 000000000..6753650de --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeOutAttributes.md @@ -0,0 +1,16 @@ +# JsonApiAttributeOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**tags** | **[str]** | | [optional] +**granularity** | **str** | | [optional] +**are_relations_valid** | **bool** | | [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-metadata-client/docs/JsonApiAttributeOutDocument.md b/gooddata-metadata-client/docs/JsonApiAttributeOutDocument.md new file mode 100644 index 000000000..58d02ae85 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiAttributeOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiAttributeOut**](JsonApiAttributeOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiAttributeOutList.md b/gooddata-metadata-client/docs/JsonApiAttributeOutList.md new file mode 100644 index 000000000..4f88fa048 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeOutList.md @@ -0,0 +1,15 @@ +# JsonApiAttributeOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiAttributeOutWithLinks]**](JsonApiAttributeOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiAttributeOutRelationships.md b/gooddata-metadata-client/docs/JsonApiAttributeOutRelationships.md new file mode 100644 index 000000000..07786b60f --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeOutRelationships.md @@ -0,0 +1,13 @@ +# JsonApiAttributeOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dataset** | [**JsonApiAttributeOutRelationshipsDataset**](JsonApiAttributeOutRelationshipsDataset.md) | | [optional] +**labels** | [**JsonApiAnalyticalDashboardOutRelationshipsLabels**](JsonApiAnalyticalDashboardOutRelationshipsLabels.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-metadata-client/docs/JsonApiAttributeOutRelationshipsDataset.md b/gooddata-metadata-client/docs/JsonApiAttributeOutRelationshipsDataset.md new file mode 100644 index 000000000..4618c1a86 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeOutRelationshipsDataset.md @@ -0,0 +1,12 @@ +# JsonApiAttributeOutRelationshipsDataset + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiDatasetToOneLinkage**](JsonApiDatasetToOneLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiAttributeOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiAttributeOutWithLinks.md new file mode 100644 index 000000000..ad1e70a61 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiAttributeOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "attribute" +**attributes** | [**JsonApiAttributeOutAttributes**](JsonApiAttributeOutAttributes.md) | | [optional] +**relationships** | [**JsonApiAttributeOutRelationships**](JsonApiAttributeOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiAttributeToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiAttributeToManyLinkage.md new file mode 100644 index 000000000..072bde124 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiAttributeToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiAttributeLinkage]**](JsonApiAttributeLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiAttributeToOneLinkage.md b/gooddata-metadata-client/docs/JsonApiAttributeToOneLinkage.md new file mode 100644 index 000000000..bb0b4a7ca --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiAttributeToOneLinkage.md @@ -0,0 +1,14 @@ +# JsonApiAttributeToOneLinkage + +References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | [optional] if omitted the server will use the default value of "attribute" +**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-metadata-client/docs/JsonApiCookieSecurityConfigurationIn.md b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationIn.md new file mode 100644 index 000000000..5fdd3cec9 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationIn.md @@ -0,0 +1,15 @@ +# JsonApiCookieSecurityConfigurationIn + +JSON:API representation of cookieSecurityConfiguration entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "cookieSecurityConfiguration" +**attributes** | [**JsonApiCookieSecurityConfigurationOutAttributes**](JsonApiCookieSecurityConfigurationOutAttributes.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-metadata-client/docs/JsonApiCookieSecurityConfigurationInDocument.md b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationInDocument.md new file mode 100644 index 000000000..b474d3e41 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationInDocument.md @@ -0,0 +1,12 @@ +# JsonApiCookieSecurityConfigurationInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiCookieSecurityConfigurationIn**](JsonApiCookieSecurityConfigurationIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOut.md b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOut.md new file mode 100644 index 000000000..a3096caf5 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOut.md @@ -0,0 +1,15 @@ +# JsonApiCookieSecurityConfigurationOut + +JSON:API representation of cookieSecurityConfiguration entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "cookieSecurityConfiguration" +**attributes** | [**JsonApiCookieSecurityConfigurationOutAttributes**](JsonApiCookieSecurityConfigurationOutAttributes.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-metadata-client/docs/JsonApiCookieSecurityConfigurationOutAttributes.md b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOutAttributes.md new file mode 100644 index 000000000..6bc7e39ac --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOutAttributes.md @@ -0,0 +1,13 @@ +# JsonApiCookieSecurityConfigurationOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_rotation** | **datetime** | | [optional] +**rotation_interval** | **str** | Length of interval between automatic rotations expressed in format of ISO 8601 duration | [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-metadata-client/docs/JsonApiCookieSecurityConfigurationOutDocument.md b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOutDocument.md new file mode 100644 index 000000000..51c0fd836 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiCookieSecurityConfigurationOutDocument.md @@ -0,0 +1,13 @@ +# JsonApiCookieSecurityConfigurationOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiCookieSecurityConfigurationOut**](JsonApiCookieSecurityConfigurationOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiDataSourceIn.md b/gooddata-metadata-client/docs/JsonApiDataSourceIn.md new file mode 100644 index 000000000..91b135d03 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceIn.md @@ -0,0 +1,15 @@ +# JsonApiDataSourceIn + +JSON:API representation of dataSource entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**attributes** | [**JsonApiDataSourceInAttributes**](JsonApiDataSourceInAttributes.md) | | +**type** | **str** | Object type | defaults to "dataSource" +**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-metadata-client/docs/JsonApiDataSourceInAttributes.md b/gooddata-metadata-client/docs/JsonApiDataSourceInAttributes.md new file mode 100644 index 000000000..e800d5207 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceInAttributes.md @@ -0,0 +1,18 @@ +# JsonApiDataSourceInAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**type** | **str** | | +**url** | **str** | | +**schema** | **str** | | +**username** | **str** | | [optional] +**password** | **str** | | [optional] +**token** | **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-metadata-client/docs/JsonApiDataSourceInDocument.md b/gooddata-metadata-client/docs/JsonApiDataSourceInDocument.md new file mode 100644 index 000000000..4c377574c --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceInDocument.md @@ -0,0 +1,12 @@ +# JsonApiDataSourceInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiDataSourceIn**](JsonApiDataSourceIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiDataSourceOut.md b/gooddata-metadata-client/docs/JsonApiDataSourceOut.md new file mode 100644 index 000000000..85109e5d6 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceOut.md @@ -0,0 +1,15 @@ +# JsonApiDataSourceOut + +JSON:API representation of dataSource entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**attributes** | [**JsonApiDataSourceOutAttributes**](JsonApiDataSourceOutAttributes.md) | | +**type** | **str** | Object type | defaults to "dataSource" +**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-metadata-client/docs/JsonApiDataSourceOutAttributes.md b/gooddata-metadata-client/docs/JsonApiDataSourceOutAttributes.md new file mode 100644 index 000000000..5c8ab3f27 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceOutAttributes.md @@ -0,0 +1,16 @@ +# JsonApiDataSourceOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**type** | **str** | | +**url** | **str** | | +**schema** | **str** | | +**username** | **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-metadata-client/docs/JsonApiDataSourceOutDocument.md b/gooddata-metadata-client/docs/JsonApiDataSourceOutDocument.md new file mode 100644 index 000000000..7db5a8db5 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceOutDocument.md @@ -0,0 +1,13 @@ +# JsonApiDataSourceOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiDataSourceOut**](JsonApiDataSourceOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiDataSourceOutList.md b/gooddata-metadata-client/docs/JsonApiDataSourceOutList.md new file mode 100644 index 000000000..04a447b8b --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceOutList.md @@ -0,0 +1,14 @@ +# JsonApiDataSourceOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiDataSourceOutWithLinks]**](JsonApiDataSourceOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.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-metadata-client/docs/JsonApiDataSourceOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiDataSourceOutWithLinks.md new file mode 100644 index 000000000..bde43fc04 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceOutWithLinks.md @@ -0,0 +1,15 @@ +# JsonApiDataSourceOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**attributes** | [**JsonApiDataSourceOutAttributes**](JsonApiDataSourceOutAttributes.md) | | +**type** | **str** | Object type | defaults to "dataSource" +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiDataSourceTableOut.md b/gooddata-metadata-client/docs/JsonApiDataSourceTableOut.md new file mode 100644 index 000000000..e02705bab --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceTableOut.md @@ -0,0 +1,15 @@ +# JsonApiDataSourceTableOut + +Tables in data source + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "dataSourceTable" +**attributes** | [**JsonApiDataSourceTableOutAttributes**](JsonApiDataSourceTableOutAttributes.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-metadata-client/docs/JsonApiDataSourceTableOutAttributes.md b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutAttributes.md new file mode 100644 index 000000000..db87132d4 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutAttributes.md @@ -0,0 +1,14 @@ +# JsonApiDataSourceTableOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **[str]** | Path to table. | [optional] +**type** | **str** | | [optional] +**columns** | [**[JsonApiDataSourceTableOutAttributesColumns]**](JsonApiDataSourceTableOutAttributesColumns.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-metadata-client/docs/JsonApiDataSourceTableOutAttributesColumns.md b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutAttributesColumns.md new file mode 100644 index 000000000..3f184bf4d --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutAttributesColumns.md @@ -0,0 +1,17 @@ +# JsonApiDataSourceTableOutAttributesColumns + +Table columns in data source + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**data_type** | **str** | | +**is_primary_key** | **bool** | | [optional] +**referenced_table_id** | **str** | | [optional] +**referenced_table_column** | **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-metadata-client/docs/JsonApiDataSourceTableOutDocument.md b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutDocument.md new file mode 100644 index 000000000..d02e75ba6 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutDocument.md @@ -0,0 +1,13 @@ +# JsonApiDataSourceTableOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiDataSourceTableOut**](JsonApiDataSourceTableOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiDataSourceTableOutList.md b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutList.md new file mode 100644 index 000000000..e184e6990 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutList.md @@ -0,0 +1,14 @@ +# JsonApiDataSourceTableOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiDataSourceTableOutWithLinks]**](JsonApiDataSourceTableOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.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-metadata-client/docs/JsonApiDataSourceTableOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutWithLinks.md new file mode 100644 index 000000000..c00d51780 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDataSourceTableOutWithLinks.md @@ -0,0 +1,15 @@ +# JsonApiDataSourceTableOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "dataSourceTable" +**attributes** | [**JsonApiDataSourceTableOutAttributes**](JsonApiDataSourceTableOutAttributes.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiDatasetLinkage.md b/gooddata-metadata-client/docs/JsonApiDatasetLinkage.md new file mode 100644 index 000000000..450c9791d --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetLinkage.md @@ -0,0 +1,14 @@ +# JsonApiDatasetLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "dataset" +**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-metadata-client/docs/JsonApiDatasetOut.md b/gooddata-metadata-client/docs/JsonApiDatasetOut.md new file mode 100644 index 000000000..9391331b2 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOut.md @@ -0,0 +1,16 @@ +# JsonApiDatasetOut + +JSON:API representation of dataset entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**attributes** | [**JsonApiDatasetOutAttributes**](JsonApiDatasetOutAttributes.md) | | +**type** | **str** | Object type | defaults to "dataset" +**relationships** | [**JsonApiDatasetOutRelationships**](JsonApiDatasetOutRelationships.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-metadata-client/docs/JsonApiDatasetOutAttributes.md b/gooddata-metadata-client/docs/JsonApiDatasetOutAttributes.md new file mode 100644 index 000000000..33fc61841 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOutAttributes.md @@ -0,0 +1,19 @@ +# JsonApiDatasetOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**tags** | **[str]** | | [optional] +**grain** | [**[JsonApiDatasetOutAttributesGrain]**](JsonApiDatasetOutAttributesGrain.md) | | [optional] +**reference_properties** | [**[JsonApiDatasetOutAttributesReferenceProperties]**](JsonApiDatasetOutAttributesReferenceProperties.md) | | [optional] +**data_source_table_id** | **str** | | [optional] +**are_relations_valid** | **bool** | | [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-metadata-client/docs/JsonApiDatasetOutAttributesGrain.md b/gooddata-metadata-client/docs/JsonApiDatasetOutAttributesGrain.md new file mode 100644 index 000000000..f8906053c --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOutAttributesGrain.md @@ -0,0 +1,13 @@ +# JsonApiDatasetOutAttributesGrain + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiDatasetOutAttributesReferenceProperties.md b/gooddata-metadata-client/docs/JsonApiDatasetOutAttributesReferenceProperties.md new file mode 100644 index 000000000..aab16f1fb --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOutAttributesReferenceProperties.md @@ -0,0 +1,14 @@ +# JsonApiDatasetOutAttributesReferenceProperties + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | [**DatasetReferenceIdentifier**](DatasetReferenceIdentifier.md) | | +**multivalue** | **bool** | | +**source_columns** | **[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-metadata-client/docs/JsonApiDatasetOutDocument.md b/gooddata-metadata-client/docs/JsonApiDatasetOutDocument.md new file mode 100644 index 000000000..a9537656a --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiDatasetOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiDatasetOut**](JsonApiDatasetOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiDatasetOutList.md b/gooddata-metadata-client/docs/JsonApiDatasetOutList.md new file mode 100644 index 000000000..b8921e1d2 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOutList.md @@ -0,0 +1,15 @@ +# JsonApiDatasetOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiDatasetOutWithLinks]**](JsonApiDatasetOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiDatasetOutRelationships.md b/gooddata-metadata-client/docs/JsonApiDatasetOutRelationships.md new file mode 100644 index 000000000..35bda301e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOutRelationships.md @@ -0,0 +1,14 @@ +# JsonApiDatasetOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | [**JsonApiDatasetOutRelationshipsAttributes**](JsonApiDatasetOutRelationshipsAttributes.md) | | [optional] +**facts** | [**JsonApiDatasetOutRelationshipsFacts**](JsonApiDatasetOutRelationshipsFacts.md) | | [optional] +**references** | [**JsonApiAnalyticalDashboardOutRelationshipsDatasets**](JsonApiAnalyticalDashboardOutRelationshipsDatasets.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-metadata-client/docs/JsonApiDatasetOutRelationshipsAttributes.md b/gooddata-metadata-client/docs/JsonApiDatasetOutRelationshipsAttributes.md new file mode 100644 index 000000000..a2607b390 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOutRelationshipsAttributes.md @@ -0,0 +1,12 @@ +# JsonApiDatasetOutRelationshipsAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiAttributeToManyLinkage**](JsonApiAttributeToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiDatasetOutRelationshipsFacts.md b/gooddata-metadata-client/docs/JsonApiDatasetOutRelationshipsFacts.md new file mode 100644 index 000000000..3393fb6f5 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOutRelationshipsFacts.md @@ -0,0 +1,12 @@ +# JsonApiDatasetOutRelationshipsFacts + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiFactToManyLinkage**](JsonApiFactToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiDatasetOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiDatasetOutWithLinks.md new file mode 100644 index 000000000..3fbff058a --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiDatasetOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**attributes** | [**JsonApiDatasetOutAttributes**](JsonApiDatasetOutAttributes.md) | | +**type** | **str** | Object type | defaults to "dataset" +**relationships** | [**JsonApiDatasetOutRelationships**](JsonApiDatasetOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiDatasetToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiDatasetToManyLinkage.md new file mode 100644 index 000000000..d893ec22f --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiDatasetToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiDatasetLinkage]**](JsonApiDatasetLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiDatasetToOneLinkage.md b/gooddata-metadata-client/docs/JsonApiDatasetToOneLinkage.md new file mode 100644 index 000000000..4b61452f2 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiDatasetToOneLinkage.md @@ -0,0 +1,14 @@ +# JsonApiDatasetToOneLinkage + +References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | [optional] if omitted the server will use the default value of "dataset" +**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-metadata-client/docs/JsonApiFactLinkage.md b/gooddata-metadata-client/docs/JsonApiFactLinkage.md new file mode 100644 index 000000000..db4e12ec3 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFactLinkage.md @@ -0,0 +1,14 @@ +# JsonApiFactLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "fact" +**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-metadata-client/docs/JsonApiFactOut.md b/gooddata-metadata-client/docs/JsonApiFactOut.md new file mode 100644 index 000000000..957aabff6 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFactOut.md @@ -0,0 +1,16 @@ +# JsonApiFactOut + +JSON:API representation of fact entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "fact" +**attributes** | [**JsonApiFactOutAttributes**](JsonApiFactOutAttributes.md) | | [optional] +**relationships** | [**JsonApiFactOutRelationships**](JsonApiFactOutRelationships.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-metadata-client/docs/JsonApiFactOutAttributes.md b/gooddata-metadata-client/docs/JsonApiFactOutAttributes.md new file mode 100644 index 000000000..5331bbc6a --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFactOutAttributes.md @@ -0,0 +1,16 @@ +# JsonApiFactOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**tags** | **[str]** | | [optional] +**source_column** | **str** | | [optional] +**are_relations_valid** | **bool** | | [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-metadata-client/docs/JsonApiFactOutDocument.md b/gooddata-metadata-client/docs/JsonApiFactOutDocument.md new file mode 100644 index 000000000..9dc5431d7 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFactOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiFactOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiFactOut**](JsonApiFactOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiFactOutList.md b/gooddata-metadata-client/docs/JsonApiFactOutList.md new file mode 100644 index 000000000..e7dc8e9e4 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFactOutList.md @@ -0,0 +1,15 @@ +# JsonApiFactOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiFactOutWithLinks]**](JsonApiFactOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiFactOutRelationships.md b/gooddata-metadata-client/docs/JsonApiFactOutRelationships.md new file mode 100644 index 000000000..009973c96 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFactOutRelationships.md @@ -0,0 +1,12 @@ +# JsonApiFactOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dataset** | [**JsonApiAttributeOutRelationshipsDataset**](JsonApiAttributeOutRelationshipsDataset.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-metadata-client/docs/JsonApiFactOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiFactOutWithLinks.md new file mode 100644 index 000000000..1dc82fdca --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFactOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiFactOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "fact" +**attributes** | [**JsonApiFactOutAttributes**](JsonApiFactOutAttributes.md) | | [optional] +**relationships** | [**JsonApiFactOutRelationships**](JsonApiFactOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiFactToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiFactToManyLinkage.md new file mode 100644 index 000000000..8bd44ff73 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFactToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiFactToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiFactLinkage]**](JsonApiFactLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiFilterContextIn.md b/gooddata-metadata-client/docs/JsonApiFilterContextIn.md new file mode 100644 index 000000000..c8c8d04ff --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFilterContextIn.md @@ -0,0 +1,15 @@ +# JsonApiFilterContextIn + +JSON:API representation of filterContext entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "filterContext" +**attributes** | [**JsonApiAnalyticalDashboardOutAttributes**](JsonApiAnalyticalDashboardOutAttributes.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-metadata-client/docs/JsonApiFilterContextInDocument.md b/gooddata-metadata-client/docs/JsonApiFilterContextInDocument.md new file mode 100644 index 000000000..27dba1382 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFilterContextInDocument.md @@ -0,0 +1,12 @@ +# JsonApiFilterContextInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiFilterContextIn**](JsonApiFilterContextIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiFilterContextLinkage.md b/gooddata-metadata-client/docs/JsonApiFilterContextLinkage.md new file mode 100644 index 000000000..49adbd48e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFilterContextLinkage.md @@ -0,0 +1,14 @@ +# JsonApiFilterContextLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "filterContext" +**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-metadata-client/docs/JsonApiFilterContextOut.md b/gooddata-metadata-client/docs/JsonApiFilterContextOut.md new file mode 100644 index 000000000..d053bb760 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFilterContextOut.md @@ -0,0 +1,16 @@ +# JsonApiFilterContextOut + +JSON:API representation of filterContext entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "filterContext" +**attributes** | [**JsonApiAnalyticalDashboardOutAttributes**](JsonApiAnalyticalDashboardOutAttributes.md) | | [optional] +**relationships** | [**JsonApiFilterContextOutRelationships**](JsonApiFilterContextOutRelationships.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-metadata-client/docs/JsonApiFilterContextOutDocument.md b/gooddata-metadata-client/docs/JsonApiFilterContextOutDocument.md new file mode 100644 index 000000000..8e8d55985 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFilterContextOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiFilterContextOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiFilterContextOut**](JsonApiFilterContextOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiFilterContextOutList.md b/gooddata-metadata-client/docs/JsonApiFilterContextOutList.md new file mode 100644 index 000000000..a9e89b620 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFilterContextOutList.md @@ -0,0 +1,15 @@ +# JsonApiFilterContextOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiFilterContextOutWithLinks]**](JsonApiFilterContextOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiFilterContextOutRelationships.md b/gooddata-metadata-client/docs/JsonApiFilterContextOutRelationships.md new file mode 100644 index 000000000..32fa82b0f --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFilterContextOutRelationships.md @@ -0,0 +1,14 @@ +# JsonApiFilterContextOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | [**JsonApiDatasetOutRelationshipsAttributes**](JsonApiDatasetOutRelationshipsAttributes.md) | | [optional] +**datasets** | [**JsonApiAnalyticalDashboardOutRelationshipsDatasets**](JsonApiAnalyticalDashboardOutRelationshipsDatasets.md) | | [optional] +**labels** | [**JsonApiAnalyticalDashboardOutRelationshipsLabels**](JsonApiAnalyticalDashboardOutRelationshipsLabels.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-metadata-client/docs/JsonApiFilterContextOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiFilterContextOutWithLinks.md new file mode 100644 index 000000000..86114749a --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFilterContextOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiFilterContextOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "filterContext" +**attributes** | [**JsonApiAnalyticalDashboardOutAttributes**](JsonApiAnalyticalDashboardOutAttributes.md) | | [optional] +**relationships** | [**JsonApiFilterContextOutRelationships**](JsonApiFilterContextOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiFilterContextToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiFilterContextToManyLinkage.md new file mode 100644 index 000000000..d1bfd608f --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiFilterContextToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiFilterContextToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiFilterContextLinkage]**](JsonApiFilterContextLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiLabelLinkage.md b/gooddata-metadata-client/docs/JsonApiLabelLinkage.md new file mode 100644 index 000000000..e96bb852c --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiLabelLinkage.md @@ -0,0 +1,14 @@ +# JsonApiLabelLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "label" +**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-metadata-client/docs/JsonApiLabelOut.md b/gooddata-metadata-client/docs/JsonApiLabelOut.md new file mode 100644 index 000000000..952448373 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiLabelOut.md @@ -0,0 +1,16 @@ +# JsonApiLabelOut + +JSON:API representation of label entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "label" +**attributes** | [**JsonApiLabelOutAttributes**](JsonApiLabelOutAttributes.md) | | [optional] +**relationships** | [**JsonApiLabelOutRelationships**](JsonApiLabelOutRelationships.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-metadata-client/docs/JsonApiLabelOutAttributes.md b/gooddata-metadata-client/docs/JsonApiLabelOutAttributes.md new file mode 100644 index 000000000..b41960f40 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiLabelOutAttributes.md @@ -0,0 +1,17 @@ +# JsonApiLabelOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**tags** | **[str]** | | [optional] +**primary** | **bool** | | [optional] +**source_column** | **str** | | [optional] +**are_relations_valid** | **bool** | | [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-metadata-client/docs/JsonApiLabelOutDocument.md b/gooddata-metadata-client/docs/JsonApiLabelOutDocument.md new file mode 100644 index 000000000..898a335fc --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiLabelOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiLabelOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiLabelOut**](JsonApiLabelOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiLabelOutList.md b/gooddata-metadata-client/docs/JsonApiLabelOutList.md new file mode 100644 index 000000000..7529bfeaa --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiLabelOutList.md @@ -0,0 +1,15 @@ +# JsonApiLabelOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiLabelOutWithLinks]**](JsonApiLabelOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiLabelOutRelationships.md b/gooddata-metadata-client/docs/JsonApiLabelOutRelationships.md new file mode 100644 index 000000000..3108e5571 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiLabelOutRelationships.md @@ -0,0 +1,12 @@ +# JsonApiLabelOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute** | [**JsonApiLabelOutRelationshipsAttribute**](JsonApiLabelOutRelationshipsAttribute.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-metadata-client/docs/JsonApiLabelOutRelationshipsAttribute.md b/gooddata-metadata-client/docs/JsonApiLabelOutRelationshipsAttribute.md new file mode 100644 index 000000000..566d1ac64 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiLabelOutRelationshipsAttribute.md @@ -0,0 +1,12 @@ +# JsonApiLabelOutRelationshipsAttribute + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiAttributeToOneLinkage**](JsonApiAttributeToOneLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiLabelOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiLabelOutWithLinks.md new file mode 100644 index 000000000..289bc0bd7 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiLabelOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiLabelOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "label" +**attributes** | [**JsonApiLabelOutAttributes**](JsonApiLabelOutAttributes.md) | | [optional] +**relationships** | [**JsonApiLabelOutRelationships**](JsonApiLabelOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiLabelToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiLabelToManyLinkage.md new file mode 100644 index 000000000..8e7bb59ae --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiLabelToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiLabelToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiLabelLinkage]**](JsonApiLabelLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiMetricIn.md b/gooddata-metadata-client/docs/JsonApiMetricIn.md new file mode 100644 index 000000000..74225669b --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricIn.md @@ -0,0 +1,15 @@ +# JsonApiMetricIn + +JSON:API representation of metric entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**attributes** | [**JsonApiMetricOutAttributes**](JsonApiMetricOutAttributes.md) | | +**type** | **str** | Object type | defaults to "metric" +**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-metadata-client/docs/JsonApiMetricInDocument.md b/gooddata-metadata-client/docs/JsonApiMetricInDocument.md new file mode 100644 index 000000000..5fc892cc9 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricInDocument.md @@ -0,0 +1,12 @@ +# JsonApiMetricInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiMetricIn**](JsonApiMetricIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiMetricLinkage.md b/gooddata-metadata-client/docs/JsonApiMetricLinkage.md new file mode 100644 index 000000000..c9c03fc47 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricLinkage.md @@ -0,0 +1,14 @@ +# JsonApiMetricLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "metric" +**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-metadata-client/docs/JsonApiMetricOut.md b/gooddata-metadata-client/docs/JsonApiMetricOut.md new file mode 100644 index 000000000..d6b4304ea --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricOut.md @@ -0,0 +1,16 @@ +# JsonApiMetricOut + +JSON:API representation of metric entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**attributes** | [**JsonApiMetricOutAttributes**](JsonApiMetricOutAttributes.md) | | +**type** | **str** | Object type | defaults to "metric" +**relationships** | [**JsonApiMetricOutRelationships**](JsonApiMetricOutRelationships.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-metadata-client/docs/JsonApiMetricOutAttributes.md b/gooddata-metadata-client/docs/JsonApiMetricOutAttributes.md new file mode 100644 index 000000000..c7d6a44ff --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricOutAttributes.md @@ -0,0 +1,16 @@ +# JsonApiMetricOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**JsonApiMetricOutAttributesContent**](JsonApiMetricOutAttributesContent.md) | | +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**tags** | **[str]** | | [optional] +**are_relations_valid** | **bool** | | [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-metadata-client/docs/JsonApiMetricOutAttributesContent.md b/gooddata-metadata-client/docs/JsonApiMetricOutAttributesContent.md new file mode 100644 index 000000000..2c294c9c3 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricOutAttributesContent.md @@ -0,0 +1,13 @@ +# JsonApiMetricOutAttributesContent + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maql** | **str** | | +**format** | **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-metadata-client/docs/JsonApiMetricOutDocument.md b/gooddata-metadata-client/docs/JsonApiMetricOutDocument.md new file mode 100644 index 000000000..c400a67cc --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiMetricOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiMetricOut**](JsonApiMetricOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiMetricOutList.md b/gooddata-metadata-client/docs/JsonApiMetricOutList.md new file mode 100644 index 000000000..37ef03130 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricOutList.md @@ -0,0 +1,15 @@ +# JsonApiMetricOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiMetricOutWithLinks]**](JsonApiMetricOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiMetricOutRelationships.md b/gooddata-metadata-client/docs/JsonApiMetricOutRelationships.md new file mode 100644 index 000000000..019ae6b5a --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricOutRelationships.md @@ -0,0 +1,15 @@ +# JsonApiMetricOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**facts** | [**JsonApiDatasetOutRelationshipsFacts**](JsonApiDatasetOutRelationshipsFacts.md) | | [optional] +**attributes** | [**JsonApiDatasetOutRelationshipsAttributes**](JsonApiDatasetOutRelationshipsAttributes.md) | | [optional] +**labels** | [**JsonApiAnalyticalDashboardOutRelationshipsLabels**](JsonApiAnalyticalDashboardOutRelationshipsLabels.md) | | [optional] +**metrics** | [**JsonApiAnalyticalDashboardOutRelationshipsMetrics**](JsonApiAnalyticalDashboardOutRelationshipsMetrics.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-metadata-client/docs/JsonApiMetricOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiMetricOutWithLinks.md new file mode 100644 index 000000000..f2ab17f93 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiMetricOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**attributes** | [**JsonApiMetricOutAttributes**](JsonApiMetricOutAttributes.md) | | +**type** | **str** | Object type | defaults to "metric" +**relationships** | [**JsonApiMetricOutRelationships**](JsonApiMetricOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiMetricToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiMetricToManyLinkage.md new file mode 100644 index 000000000..bd0f7f73e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiMetricToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiMetricToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiMetricLinkage]**](JsonApiMetricLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiOrganizationIn.md b/gooddata-metadata-client/docs/JsonApiOrganizationIn.md new file mode 100644 index 000000000..69e48d876 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiOrganizationIn.md @@ -0,0 +1,15 @@ +# JsonApiOrganizationIn + +JSON:API representation of organization entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "organization" +**attributes** | [**JsonApiOrganizationInAttributes**](JsonApiOrganizationInAttributes.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-metadata-client/docs/JsonApiOrganizationInAttributes.md b/gooddata-metadata-client/docs/JsonApiOrganizationInAttributes.md new file mode 100644 index 000000000..8863e5531 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiOrganizationInAttributes.md @@ -0,0 +1,16 @@ +# JsonApiOrganizationInAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**hostname** | **str** | | [optional] +**oauth_issuer_location** | **str** | | [optional] +**oauth_client_id** | **str** | | [optional] +**oauth_client_secret** | **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-metadata-client/docs/JsonApiOrganizationInDocument.md b/gooddata-metadata-client/docs/JsonApiOrganizationInDocument.md new file mode 100644 index 000000000..29c61fbf0 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiOrganizationInDocument.md @@ -0,0 +1,12 @@ +# JsonApiOrganizationInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiOrganizationIn**](JsonApiOrganizationIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiOrganizationOut.md b/gooddata-metadata-client/docs/JsonApiOrganizationOut.md new file mode 100644 index 000000000..b4a073e5f --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiOrganizationOut.md @@ -0,0 +1,16 @@ +# JsonApiOrganizationOut + +JSON:API representation of organization entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "organization" +**attributes** | [**JsonApiOrganizationOutAttributes**](JsonApiOrganizationOutAttributes.md) | | [optional] +**relationships** | [**JsonApiOrganizationOutRelationships**](JsonApiOrganizationOutRelationships.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-metadata-client/docs/JsonApiOrganizationOutAttributes.md b/gooddata-metadata-client/docs/JsonApiOrganizationOutAttributes.md new file mode 100644 index 000000000..fe68a9eae --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiOrganizationOutAttributes.md @@ -0,0 +1,15 @@ +# JsonApiOrganizationOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**hostname** | **str** | | [optional] +**oauth_issuer_location** | **str** | | [optional] +**oauth_client_id** | **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-metadata-client/docs/JsonApiOrganizationOutDocument.md b/gooddata-metadata-client/docs/JsonApiOrganizationOutDocument.md new file mode 100644 index 000000000..bc9c6d56e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiOrganizationOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiOrganizationOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiOrganizationOut**](JsonApiOrganizationOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiOrganizationOutRelationships.md b/gooddata-metadata-client/docs/JsonApiOrganizationOutRelationships.md new file mode 100644 index 000000000..f9bbc3ca1 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiOrganizationOutRelationships.md @@ -0,0 +1,13 @@ +# JsonApiOrganizationOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bootstrap_user** | [**JsonApiOrganizationOutRelationshipsBootstrapUser**](JsonApiOrganizationOutRelationshipsBootstrapUser.md) | | [optional] +**bootstrap_user_group** | [**JsonApiOrganizationOutRelationshipsBootstrapUserGroup**](JsonApiOrganizationOutRelationshipsBootstrapUserGroup.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-metadata-client/docs/JsonApiOrganizationOutRelationshipsBootstrapUser.md b/gooddata-metadata-client/docs/JsonApiOrganizationOutRelationshipsBootstrapUser.md new file mode 100644 index 000000000..06ef9a8d5 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiOrganizationOutRelationshipsBootstrapUser.md @@ -0,0 +1,12 @@ +# JsonApiOrganizationOutRelationshipsBootstrapUser + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiUserToOneLinkage**](JsonApiUserToOneLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiOrganizationOutRelationshipsBootstrapUserGroup.md b/gooddata-metadata-client/docs/JsonApiOrganizationOutRelationshipsBootstrapUserGroup.md new file mode 100644 index 000000000..8855a203b --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiOrganizationOutRelationshipsBootstrapUserGroup.md @@ -0,0 +1,12 @@ +# JsonApiOrganizationOutRelationshipsBootstrapUserGroup + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiUserGroupToOneLinkage**](JsonApiUserGroupToOneLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiUserGroupIn.md b/gooddata-metadata-client/docs/JsonApiUserGroupIn.md new file mode 100644 index 000000000..7fa3c9e28 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupIn.md @@ -0,0 +1,16 @@ +# JsonApiUserGroupIn + +JSON:API representation of userGroup entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "userGroup" +**attributes** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**relationships** | [**JsonApiUserGroupOutRelationships**](JsonApiUserGroupOutRelationships.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-metadata-client/docs/JsonApiUserGroupInDocument.md b/gooddata-metadata-client/docs/JsonApiUserGroupInDocument.md new file mode 100644 index 000000000..3b2d3c722 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupInDocument.md @@ -0,0 +1,12 @@ +# JsonApiUserGroupInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiUserGroupIn**](JsonApiUserGroupIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiUserGroupLinkage.md b/gooddata-metadata-client/docs/JsonApiUserGroupLinkage.md new file mode 100644 index 000000000..9eceb7a82 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupLinkage.md @@ -0,0 +1,14 @@ +# JsonApiUserGroupLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "userGroup" +**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-metadata-client/docs/JsonApiUserGroupOut.md b/gooddata-metadata-client/docs/JsonApiUserGroupOut.md new file mode 100644 index 000000000..8ee9d4e62 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupOut.md @@ -0,0 +1,16 @@ +# JsonApiUserGroupOut + +JSON:API representation of userGroup entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "userGroup" +**attributes** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**relationships** | [**JsonApiUserGroupOutRelationships**](JsonApiUserGroupOutRelationships.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-metadata-client/docs/JsonApiUserGroupOutDocument.md b/gooddata-metadata-client/docs/JsonApiUserGroupOutDocument.md new file mode 100644 index 000000000..2e4356e4e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiUserGroupOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiUserGroupOut**](JsonApiUserGroupOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiUserGroupOutList.md b/gooddata-metadata-client/docs/JsonApiUserGroupOutList.md new file mode 100644 index 000000000..a450ea0e5 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupOutList.md @@ -0,0 +1,15 @@ +# JsonApiUserGroupOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiUserGroupOutWithLinks]**](JsonApiUserGroupOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiUserGroupOutRelationships.md b/gooddata-metadata-client/docs/JsonApiUserGroupOutRelationships.md new file mode 100644 index 000000000..1b48a8e50 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupOutRelationships.md @@ -0,0 +1,12 @@ +# JsonApiUserGroupOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**parents** | [**JsonApiACLOutRelationshipsObjects**](JsonApiACLOutRelationshipsObjects.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-metadata-client/docs/JsonApiUserGroupOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiUserGroupOutWithLinks.md new file mode 100644 index 000000000..fd7a2d8ae --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiUserGroupOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "userGroup" +**attributes** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**relationships** | [**JsonApiUserGroupOutRelationships**](JsonApiUserGroupOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiUserGroupToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiUserGroupToManyLinkage.md new file mode 100644 index 000000000..26779e004 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiUserGroupToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiUserGroupLinkage]**](JsonApiUserGroupLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiUserGroupToOneLinkage.md b/gooddata-metadata-client/docs/JsonApiUserGroupToOneLinkage.md new file mode 100644 index 000000000..2853e1d8e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserGroupToOneLinkage.md @@ -0,0 +1,14 @@ +# JsonApiUserGroupToOneLinkage + +References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | [optional] if omitted the server will use the default value of "userGroup" +**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-metadata-client/docs/JsonApiUserIn.md b/gooddata-metadata-client/docs/JsonApiUserIn.md new file mode 100644 index 000000000..28591235f --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserIn.md @@ -0,0 +1,16 @@ +# JsonApiUserIn + +JSON:API representation of user entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "user" +**attributes** | [**JsonApiUserOutAttributes**](JsonApiUserOutAttributes.md) | | [optional] +**relationships** | [**JsonApiUserOutRelationships**](JsonApiUserOutRelationships.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-metadata-client/docs/JsonApiUserInDocument.md b/gooddata-metadata-client/docs/JsonApiUserInDocument.md new file mode 100644 index 000000000..c86097568 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserInDocument.md @@ -0,0 +1,12 @@ +# JsonApiUserInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiUserIn**](JsonApiUserIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiUserLinkage.md b/gooddata-metadata-client/docs/JsonApiUserLinkage.md new file mode 100644 index 000000000..c47b16b12 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserLinkage.md @@ -0,0 +1,14 @@ +# JsonApiUserLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "user" +**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-metadata-client/docs/JsonApiUserOut.md b/gooddata-metadata-client/docs/JsonApiUserOut.md new file mode 100644 index 000000000..0a2c819a0 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserOut.md @@ -0,0 +1,16 @@ +# JsonApiUserOut + +JSON:API representation of user entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "user" +**attributes** | [**JsonApiUserOutAttributes**](JsonApiUserOutAttributes.md) | | [optional] +**relationships** | [**JsonApiUserOutRelationships**](JsonApiUserOutRelationships.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-metadata-client/docs/JsonApiUserOutAttributes.md b/gooddata-metadata-client/docs/JsonApiUserOutAttributes.md new file mode 100644 index 000000000..7ec330634 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserOutAttributes.md @@ -0,0 +1,12 @@ +# JsonApiUserOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authentication_id** | **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-metadata-client/docs/JsonApiUserOutDocument.md b/gooddata-metadata-client/docs/JsonApiUserOutDocument.md new file mode 100644 index 000000000..81b6007c2 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiUserOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiUserOut**](JsonApiUserOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiUserOutList.md b/gooddata-metadata-client/docs/JsonApiUserOutList.md new file mode 100644 index 000000000..1c6c5925c --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserOutList.md @@ -0,0 +1,15 @@ +# JsonApiUserOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiUserOutWithLinks]**](JsonApiUserOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiUserOutRelationships.md b/gooddata-metadata-client/docs/JsonApiUserOutRelationships.md new file mode 100644 index 000000000..5832da97d --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserOutRelationships.md @@ -0,0 +1,12 @@ +# JsonApiUserOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_groups** | [**JsonApiACLOutRelationshipsObjects**](JsonApiACLOutRelationshipsObjects.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-metadata-client/docs/JsonApiUserOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiUserOutWithLinks.md new file mode 100644 index 000000000..794c92342 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiUserOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "user" +**attributes** | [**JsonApiUserOutAttributes**](JsonApiUserOutAttributes.md) | | [optional] +**relationships** | [**JsonApiUserOutRelationships**](JsonApiUserOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiUserToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiUserToManyLinkage.md new file mode 100644 index 000000000..0363d88cc --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiUserToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiUserLinkage]**](JsonApiUserLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiUserToOneLinkage.md b/gooddata-metadata-client/docs/JsonApiUserToOneLinkage.md new file mode 100644 index 000000000..23b23c0c8 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiUserToOneLinkage.md @@ -0,0 +1,14 @@ +# JsonApiUserToOneLinkage + +References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | [optional] if omitted the server will use the default value of "user" +**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-metadata-client/docs/JsonApiVisualizationObjectIn.md b/gooddata-metadata-client/docs/JsonApiVisualizationObjectIn.md new file mode 100644 index 000000000..149425020 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiVisualizationObjectIn.md @@ -0,0 +1,15 @@ +# JsonApiVisualizationObjectIn + +JSON:API representation of visualizationObject entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "visualizationObject" +**attributes** | [**JsonApiAnalyticalDashboardOutAttributes**](JsonApiAnalyticalDashboardOutAttributes.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-metadata-client/docs/JsonApiVisualizationObjectInDocument.md b/gooddata-metadata-client/docs/JsonApiVisualizationObjectInDocument.md new file mode 100644 index 000000000..079bccb45 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiVisualizationObjectInDocument.md @@ -0,0 +1,12 @@ +# JsonApiVisualizationObjectInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiVisualizationObjectIn**](JsonApiVisualizationObjectIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiVisualizationObjectLinkage.md b/gooddata-metadata-client/docs/JsonApiVisualizationObjectLinkage.md new file mode 100644 index 000000000..c18925cb9 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiVisualizationObjectLinkage.md @@ -0,0 +1,14 @@ +# JsonApiVisualizationObjectLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "visualizationObject" +**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-metadata-client/docs/JsonApiVisualizationObjectOut.md b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOut.md new file mode 100644 index 000000000..9ad996156 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOut.md @@ -0,0 +1,16 @@ +# JsonApiVisualizationObjectOut + +JSON:API representation of visualizationObject entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "visualizationObject" +**attributes** | [**JsonApiAnalyticalDashboardOutAttributes**](JsonApiAnalyticalDashboardOutAttributes.md) | | [optional] +**relationships** | [**JsonApiVisualizationObjectOutRelationships**](JsonApiVisualizationObjectOutRelationships.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-metadata-client/docs/JsonApiVisualizationObjectOutDocument.md b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOutDocument.md new file mode 100644 index 000000000..ea92f77ff --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiVisualizationObjectOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiVisualizationObjectOut**](JsonApiVisualizationObjectOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiVisualizationObjectOutList.md b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOutList.md new file mode 100644 index 000000000..0feb18855 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOutList.md @@ -0,0 +1,15 @@ +# JsonApiVisualizationObjectOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiVisualizationObjectOutWithLinks]**](JsonApiVisualizationObjectOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiVisualizationObjectOutRelationships.md b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOutRelationships.md new file mode 100644 index 000000000..8424cad5e --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOutRelationships.md @@ -0,0 +1,16 @@ +# JsonApiVisualizationObjectOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**facts** | [**JsonApiDatasetOutRelationshipsFacts**](JsonApiDatasetOutRelationshipsFacts.md) | | [optional] +**attributes** | [**JsonApiDatasetOutRelationshipsAttributes**](JsonApiDatasetOutRelationshipsAttributes.md) | | [optional] +**labels** | [**JsonApiAnalyticalDashboardOutRelationshipsLabels**](JsonApiAnalyticalDashboardOutRelationshipsLabels.md) | | [optional] +**metrics** | [**JsonApiAnalyticalDashboardOutRelationshipsMetrics**](JsonApiAnalyticalDashboardOutRelationshipsMetrics.md) | | [optional] +**datasets** | [**JsonApiAnalyticalDashboardOutRelationshipsDatasets**](JsonApiAnalyticalDashboardOutRelationshipsDatasets.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-metadata-client/docs/JsonApiVisualizationObjectOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOutWithLinks.md new file mode 100644 index 000000000..4fcd107ab --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiVisualizationObjectOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiVisualizationObjectOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "visualizationObject" +**attributes** | [**JsonApiAnalyticalDashboardOutAttributes**](JsonApiAnalyticalDashboardOutAttributes.md) | | [optional] +**relationships** | [**JsonApiVisualizationObjectOutRelationships**](JsonApiVisualizationObjectOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiVisualizationObjectToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiVisualizationObjectToManyLinkage.md new file mode 100644 index 000000000..daa824bb8 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiVisualizationObjectToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiVisualizationObjectToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiVisualizationObjectLinkage]**](JsonApiVisualizationObjectLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterIn.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterIn.md new file mode 100644 index 000000000..b03045014 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterIn.md @@ -0,0 +1,16 @@ +# JsonApiWorkspaceDataFilterIn + +JSON:API representation of workspaceDataFilter entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "workspaceDataFilter" +**attributes** | [**JsonApiWorkspaceDataFilterOutAttributes**](JsonApiWorkspaceDataFilterOutAttributes.md) | | [optional] +**relationships** | [**JsonApiWorkspaceDataFilterOutRelationships**](JsonApiWorkspaceDataFilterOutRelationships.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-metadata-client/docs/JsonApiWorkspaceDataFilterInDocument.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterInDocument.md new file mode 100644 index 000000000..4e1a00ef0 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterInDocument.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceDataFilterInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiWorkspaceDataFilterIn**](JsonApiWorkspaceDataFilterIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterLinkage.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterLinkage.md new file mode 100644 index 000000000..612f5bf20 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterLinkage.md @@ -0,0 +1,14 @@ +# JsonApiWorkspaceDataFilterLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "workspaceDataFilter" +**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-metadata-client/docs/JsonApiWorkspaceDataFilterOut.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOut.md new file mode 100644 index 000000000..e048d46f5 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOut.md @@ -0,0 +1,16 @@ +# JsonApiWorkspaceDataFilterOut + +JSON:API representation of workspaceDataFilter entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "workspaceDataFilter" +**attributes** | [**JsonApiWorkspaceDataFilterOutAttributes**](JsonApiWorkspaceDataFilterOutAttributes.md) | | [optional] +**relationships** | [**JsonApiWorkspaceDataFilterOutRelationships**](JsonApiWorkspaceDataFilterOutRelationships.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-metadata-client/docs/JsonApiWorkspaceDataFilterOutAttributes.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutAttributes.md new file mode 100644 index 000000000..8456f6b4b --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutAttributes.md @@ -0,0 +1,15 @@ +# JsonApiWorkspaceDataFilterOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**column_name** | **str** | | [optional] +**data_source_id** | **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-metadata-client/docs/JsonApiWorkspaceDataFilterOutDocument.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutDocument.md new file mode 100644 index 000000000..b7d32b5be --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiWorkspaceDataFilterOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiWorkspaceDataFilterOut**](JsonApiWorkspaceDataFilterOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiWorkspaceDataFilterOutList.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutList.md new file mode 100644 index 000000000..8facf9d78 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutList.md @@ -0,0 +1,15 @@ +# JsonApiWorkspaceDataFilterOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiWorkspaceDataFilterOutWithLinks]**](JsonApiWorkspaceDataFilterOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiWorkspaceDataFilterOutRelationships.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutRelationships.md new file mode 100644 index 000000000..60c9057fa --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutRelationships.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceDataFilterOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter_settings** | [**JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings**](JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings.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-metadata-client/docs/JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings.md new file mode 100644 index 000000000..36096fe0c --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiWorkspaceDataFilterSettingToManyLinkage**](JsonApiWorkspaceDataFilterSettingToManyLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutWithLinks.md new file mode 100644 index 000000000..17d20bcd8 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiWorkspaceDataFilterOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "workspaceDataFilter" +**attributes** | [**JsonApiWorkspaceDataFilterOutAttributes**](JsonApiWorkspaceDataFilterOutAttributes.md) | | [optional] +**relationships** | [**JsonApiWorkspaceDataFilterOutRelationships**](JsonApiWorkspaceDataFilterOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiWorkspaceDataFilterSettingLinkage.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingLinkage.md new file mode 100644 index 000000000..1e8c321cc --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingLinkage.md @@ -0,0 +1,14 @@ +# JsonApiWorkspaceDataFilterSettingLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "workspaceDataFilterSetting" +**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-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOut.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOut.md new file mode 100644 index 000000000..b4499df3c --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOut.md @@ -0,0 +1,16 @@ +# JsonApiWorkspaceDataFilterSettingOut + +JSON:API representation of workspaceDataFilterSetting entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "workspaceDataFilterSetting" +**attributes** | [**JsonApiWorkspaceDataFilterSettingOutAttributes**](JsonApiWorkspaceDataFilterSettingOutAttributes.md) | | [optional] +**relationships** | [**JsonApiWorkspaceDataFilterSettingOutRelationships**](JsonApiWorkspaceDataFilterSettingOutRelationships.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-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutAttributes.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutAttributes.md new file mode 100644 index 000000000..37704f89d --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutAttributes.md @@ -0,0 +1,14 @@ +# JsonApiWorkspaceDataFilterSettingOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**filter_values** | **[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-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutDocument.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutDocument.md new file mode 100644 index 000000000..bc9f8c1ef --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiWorkspaceDataFilterSettingOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiWorkspaceDataFilterSettingOut**](JsonApiWorkspaceDataFilterSettingOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutList.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutList.md new file mode 100644 index 000000000..9bfd08605 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutList.md @@ -0,0 +1,15 @@ +# JsonApiWorkspaceDataFilterSettingOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiWorkspaceDataFilterSettingOutWithLinks]**](JsonApiWorkspaceDataFilterSettingOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutRelationships.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutRelationships.md new file mode 100644 index 000000000..66213b095 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutRelationships.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceDataFilterSettingOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workspace_data_filter** | [**JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter**](JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter.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-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter.md new file mode 100644 index 000000000..0c4c9e7aa --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiWorkspaceDataFilterToOneLinkage**](JsonApiWorkspaceDataFilterToOneLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutWithLinks.md new file mode 100644 index 000000000..3394cd261 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingOutWithLinks.md @@ -0,0 +1,16 @@ +# JsonApiWorkspaceDataFilterSettingOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "workspaceDataFilterSetting" +**attributes** | [**JsonApiWorkspaceDataFilterSettingOutAttributes**](JsonApiWorkspaceDataFilterSettingOutAttributes.md) | | [optional] +**relationships** | [**JsonApiWorkspaceDataFilterSettingOutRelationships**](JsonApiWorkspaceDataFilterSettingOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiWorkspaceDataFilterSettingToManyLinkage.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingToManyLinkage.md new file mode 100644 index 000000000..ad9de7fdf --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterSettingToManyLinkage.md @@ -0,0 +1,13 @@ +# JsonApiWorkspaceDataFilterSettingToManyLinkage + +References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[JsonApiWorkspaceDataFilterSettingLinkage]**](JsonApiWorkspaceDataFilterSettingLinkage.md) | References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterToOneLinkage.md b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterToOneLinkage.md new file mode 100644 index 000000000..042038b38 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceDataFilterToOneLinkage.md @@ -0,0 +1,14 @@ +# JsonApiWorkspaceDataFilterToOneLinkage + +References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | [optional] if omitted the server will use the default value of "workspaceDataFilter" +**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-metadata-client/docs/JsonApiWorkspaceIn.md b/gooddata-metadata-client/docs/JsonApiWorkspaceIn.md new file mode 100644 index 000000000..2dcec5ef7 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceIn.md @@ -0,0 +1,16 @@ +# JsonApiWorkspaceIn + +JSON:API representation of workspace entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "workspace" +**attributes** | [**JsonApiWorkspaceOutAttributes**](JsonApiWorkspaceOutAttributes.md) | | [optional] +**relationships** | [**JsonApiWorkspaceOutRelationships**](JsonApiWorkspaceOutRelationships.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-metadata-client/docs/JsonApiWorkspaceInDocument.md b/gooddata-metadata-client/docs/JsonApiWorkspaceInDocument.md new file mode 100644 index 000000000..7a638ea5a --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceInDocument.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceInDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiWorkspaceIn**](JsonApiWorkspaceIn.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiWorkspaceLinkage.md b/gooddata-metadata-client/docs/JsonApiWorkspaceLinkage.md new file mode 100644 index 000000000..db29379db --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceLinkage.md @@ -0,0 +1,14 @@ +# JsonApiWorkspaceLinkage + +The \\\"type\\\" and \\\"id\\\" to non-empty members. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**type** | **str** | | defaults to "workspace" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiWorkspaceOut.md b/gooddata-metadata-client/docs/JsonApiWorkspaceOut.md new file mode 100644 index 000000000..2ded16762 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceOut.md @@ -0,0 +1,17 @@ +# JsonApiWorkspaceOut + +JSON:API representation of workspace entity. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "workspace" +**meta** | [**JsonApiWorkspaceOutMeta**](JsonApiWorkspaceOutMeta.md) | | [optional] +**attributes** | [**JsonApiWorkspaceOutAttributes**](JsonApiWorkspaceOutAttributes.md) | | [optional] +**relationships** | [**JsonApiWorkspaceOutRelationships**](JsonApiWorkspaceOutRelationships.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-metadata-client/docs/JsonApiWorkspaceOutAttributes.md b/gooddata-metadata-client/docs/JsonApiWorkspaceOutAttributes.md new file mode 100644 index 000000000..70f0e0f66 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceOutAttributes.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceOutAttributes + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **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-metadata-client/docs/JsonApiWorkspaceOutDocument.md b/gooddata-metadata-client/docs/JsonApiWorkspaceOutDocument.md new file mode 100644 index 000000000..ab930be84 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceOutDocument.md @@ -0,0 +1,14 @@ +# JsonApiWorkspaceOutDocument + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiWorkspaceOut**](JsonApiWorkspaceOut.md) | | +**links** | [**ObjectLinks**](ObjectLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiWorkspaceOutList.md b/gooddata-metadata-client/docs/JsonApiWorkspaceOutList.md new file mode 100644 index 000000000..4d7d0c64d --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceOutList.md @@ -0,0 +1,15 @@ +# JsonApiWorkspaceOutList + +A JSON:API document with a list of resources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[JsonApiWorkspaceOutWithLinks]**](JsonApiWorkspaceOutWithLinks.md) | | +**links** | [**ListLinks**](ListLinks.md) | | [optional] +**included** | **[dict]** | Included resources | [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-metadata-client/docs/JsonApiWorkspaceOutMeta.md b/gooddata-metadata-client/docs/JsonApiWorkspaceOutMeta.md new file mode 100644 index 000000000..3e4b3ef85 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceOutMeta.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceOutMeta + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | [**JsonApiWorkspaceOutMetaConfig**](JsonApiWorkspaceOutMetaConfig.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-metadata-client/docs/JsonApiWorkspaceOutMetaConfig.md b/gooddata-metadata-client/docs/JsonApiWorkspaceOutMetaConfig.md new file mode 100644 index 000000000..03818f746 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceOutMetaConfig.md @@ -0,0 +1,13 @@ +# JsonApiWorkspaceOutMetaConfig + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_sampling_available** | **bool** | is sampling enabled - based on type of data-source connected to this workspace | defaults to False +**approximate_count_available** | **bool** | is approximate count enabled - based on type of data-source connected to this workspace | defaults to False +**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-metadata-client/docs/JsonApiWorkspaceOutRelationships.md b/gooddata-metadata-client/docs/JsonApiWorkspaceOutRelationships.md new file mode 100644 index 000000000..73bd00f91 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceOutRelationships.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceOutRelationships + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**parent** | [**JsonApiWorkspaceOutRelationshipsParent**](JsonApiWorkspaceOutRelationshipsParent.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-metadata-client/docs/JsonApiWorkspaceOutRelationshipsParent.md b/gooddata-metadata-client/docs/JsonApiWorkspaceOutRelationshipsParent.md new file mode 100644 index 000000000..2dfa71f16 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceOutRelationshipsParent.md @@ -0,0 +1,12 @@ +# JsonApiWorkspaceOutRelationshipsParent + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**JsonApiWorkspaceToOneLinkage**](JsonApiWorkspaceToOneLinkage.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/JsonApiWorkspaceOutWithLinks.md b/gooddata-metadata-client/docs/JsonApiWorkspaceOutWithLinks.md new file mode 100644 index 000000000..68abb57a5 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceOutWithLinks.md @@ -0,0 +1,17 @@ +# JsonApiWorkspaceOutWithLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | API identifier of an object | +**type** | **str** | Object type | defaults to "workspace" +**meta** | [**JsonApiWorkspaceOutMeta**](JsonApiWorkspaceOutMeta.md) | | [optional] +**attributes** | [**JsonApiWorkspaceOutAttributes**](JsonApiWorkspaceOutAttributes.md) | | [optional] +**relationships** | [**JsonApiWorkspaceOutRelationships**](JsonApiWorkspaceOutRelationships.md) | | [optional] +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/JsonApiWorkspaceToOneLinkage.md b/gooddata-metadata-client/docs/JsonApiWorkspaceToOneLinkage.md new file mode 100644 index 000000000..051bb8eb6 --- /dev/null +++ b/gooddata-metadata-client/docs/JsonApiWorkspaceToOneLinkage.md @@ -0,0 +1,14 @@ +# JsonApiWorkspaceToOneLinkage + +References to other resource objects in a to-one (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | [optional] if omitted the server will use the default value of "workspace" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/ListLinks.md b/gooddata-metadata-client/docs/ListLinks.md new file mode 100644 index 000000000..845693140 --- /dev/null +++ b/gooddata-metadata-client/docs/ListLinks.md @@ -0,0 +1,13 @@ +# ListLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | **str** | A string containing the link's URL. | +**next** | **str** | A string containing the link's URL for the next page of data. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/ListLinksAllOf.md b/gooddata-metadata-client/docs/ListLinksAllOf.md new file mode 100644 index 000000000..105c83c51 --- /dev/null +++ b/gooddata-metadata-client/docs/ListLinksAllOf.md @@ -0,0 +1,12 @@ +# ListLinksAllOf + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | **str** | A string containing the link's URL for the next page of data. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/ObjectLinks.md b/gooddata-metadata-client/docs/ObjectLinks.md new file mode 100644 index 000000000..d2761c718 --- /dev/null +++ b/gooddata-metadata-client/docs/ObjectLinks.md @@ -0,0 +1,12 @@ +# ObjectLinks + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_self** | **str** | A string containing the link's URL. | +**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-metadata-client/docs/ObjectLinksContainer.md b/gooddata-metadata-client/docs/ObjectLinksContainer.md new file mode 100644 index 000000000..69bc8612f --- /dev/null +++ b/gooddata-metadata-client/docs/ObjectLinksContainer.md @@ -0,0 +1,12 @@ +# ObjectLinksContainer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**ObjectLinks**](ObjectLinks.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-metadata-client/docs/OptionsControllerApi.md b/gooddata-metadata-client/docs/OptionsControllerApi.md new file mode 100644 index 000000000..5f1b40d53 --- /dev/null +++ b/gooddata-metadata-client/docs/OptionsControllerApi.md @@ -0,0 +1,128 @@ +# gooddata_metadata_client.OptionsControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_all_options**](OptionsControllerApi.md#get_all_options) | **GET** /api/options | Links for all configuration options +[**get_data_source_drivers**](OptionsControllerApi.md#get_data_source_drivers) | **GET** /api/options/availableDrivers | Get all available data source drivers + + +# **get_all_options** +> get_all_options() + +Links for all configuration options + +Retrieves links for all options for different configurations. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import options_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = options_controller_api.OptionsControllerApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Links for all configuration options + api_instance.get_all_options() + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OptionsControllerApi->get_all_options: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Links for all configuration options. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_data_source_drivers** +> get_data_source_drivers() + +Get all available data source drivers + +Retrieves a list of all supported data sources along with information about the used drivers. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import options_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = options_controller_api.OptionsControllerApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get all available data source drivers + api_instance.get_data_source_drivers() + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OptionsControllerApi->get_data_source_drivers: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of all available data source drivers. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/docs/OrganizationControllerApi.md b/gooddata-metadata-client/docs/OrganizationControllerApi.md new file mode 100644 index 000000000..b7f0ac9cf --- /dev/null +++ b/gooddata-metadata-client/docs/OrganizationControllerApi.md @@ -0,0 +1,343 @@ +# gooddata_metadata_client.OrganizationControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_entity_cookie_security_configurations**](OrganizationControllerApi.md#get_entity_cookie_security_configurations) | **GET** /api/entities/admin/cookieSecurityConfigurations/{id} | +[**get_entity_organizations**](OrganizationControllerApi.md#get_entity_organizations) | **GET** /api/entities/admin/organizations/{id} | +[**update_entity_cookie_security_configurations**](OrganizationControllerApi.md#update_entity_cookie_security_configurations) | **PUT** /api/entities/admin/cookieSecurityConfigurations/{id} | +[**update_entity_organizations**](OrganizationControllerApi.md#update_entity_organizations) | **PUT** /api/entities/admin/organizations/{id} | + + +# **get_entity_cookie_security_configurations** +> JsonApiCookieSecurityConfigurationOutDocument get_entity_cookie_security_configurations(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_controller_api +from gooddata_metadata_client.model.json_api_cookie_security_configuration_out_document import JsonApiCookieSecurityConfigurationOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_controller_api.OrganizationControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=keySet==KeysetHandleValue;lastRotation==InstantValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_cookie_security_configurations(id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationControllerApi->get_entity_cookie_security_configurations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_cookie_security_configurations(id, predicate=predicate, filter=filter) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationControllerApi->get_entity_cookie_security_configurations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +[**JsonApiCookieSecurityConfigurationOutDocument**](JsonApiCookieSecurityConfigurationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_organizations** +> JsonApiOrganizationOutDocument get_entity_organizations(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_controller_api +from gooddata_metadata_client.model.json_api_organization_out_document import JsonApiOrganizationOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_controller_api.OrganizationControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;hostname==someString;bootstrapUser.id==321;bootstrapUserGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=bootstrapUser,bootstrapUserGroup", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_organizations(id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationControllerApi->get_entity_organizations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_organizations(id, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationControllerApi->get_entity_organizations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiOrganizationOutDocument**](JsonApiOrganizationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_cookie_security_configurations** +> JsonApiCookieSecurityConfigurationOutDocument update_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_controller_api +from gooddata_metadata_client.model.json_api_cookie_security_configuration_out_document import JsonApiCookieSecurityConfigurationOutDocument +from gooddata_metadata_client.model.json_api_cookie_security_configuration_in_document import JsonApiCookieSecurityConfigurationInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_controller_api.OrganizationControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + json_api_cookie_security_configuration_in_document = JsonApiCookieSecurityConfigurationInDocument( + data=JsonApiCookieSecurityConfigurationIn( + id="id1", + type="cookieSecurityConfiguration", + attributes=JsonApiCookieSecurityConfigurationOutAttributes( + last_rotation=dateutil_parser('1970-01-01T00:00:00.00Z'), + rotation_interval="P30D", + ), + ), + ) # JsonApiCookieSecurityConfigurationInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=keySet==KeysetHandleValue;lastRotation==InstantValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationControllerApi->update_entity_cookie_security_configurations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_in_document, predicate=predicate, filter=filter) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationControllerApi->update_entity_cookie_security_configurations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_cookie_security_configuration_in_document** | [**JsonApiCookieSecurityConfigurationInDocument**](JsonApiCookieSecurityConfigurationInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +[**JsonApiCookieSecurityConfigurationOutDocument**](JsonApiCookieSecurityConfigurationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_organizations** +> JsonApiOrganizationOutDocument update_entity_organizations(id, json_api_organization_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_controller_api +from gooddata_metadata_client.model.json_api_organization_in_document import JsonApiOrganizationInDocument +from gooddata_metadata_client.model.json_api_organization_out_document import JsonApiOrganizationOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_controller_api.OrganizationControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + json_api_organization_in_document = JsonApiOrganizationInDocument( + data=JsonApiOrganizationIn( + id="id1", + type="organization", + attributes=JsonApiOrganizationInAttributes( + name="name_example", + hostname="hostname_example", + oauth_issuer_location="oauth_issuer_location_example", + oauth_client_id="oauth_client_id_example", + oauth_client_secret="oauth_client_secret_example", + ), + ), + ) # JsonApiOrganizationInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;hostname==someString;bootstrapUser.id==321;bootstrapUserGroup.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=bootstrapUser,bootstrapUserGroup", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_organizations(id, json_api_organization_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationControllerApi->update_entity_organizations: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_organizations(id, json_api_organization_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationControllerApi->update_entity_organizations: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_organization_in_document** | [**JsonApiOrganizationInDocument**](JsonApiOrganizationInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiOrganizationOutDocument**](JsonApiOrganizationOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/docs/OrganizationModelControllerApi.md b/gooddata-metadata-client/docs/OrganizationModelControllerApi.md new file mode 100644 index 000000000..b1d98a349 --- /dev/null +++ b/gooddata-metadata-client/docs/OrganizationModelControllerApi.md @@ -0,0 +1,2105 @@ +# gooddata_metadata_client.OrganizationModelControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_acls**](OrganizationModelControllerApi.md#create_entity_acls) | **POST** /api/entities/acls | +[**create_entity_data_sources**](OrganizationModelControllerApi.md#create_entity_data_sources) | **POST** /api/entities/dataSources | +[**create_entity_user_groups**](OrganizationModelControllerApi.md#create_entity_user_groups) | **POST** /api/entities/userGroups | +[**create_entity_users**](OrganizationModelControllerApi.md#create_entity_users) | **POST** /api/entities/users | +[**create_entity_workspaces**](OrganizationModelControllerApi.md#create_entity_workspaces) | **POST** /api/entities/workspaces | +[**delete_entity_acls**](OrganizationModelControllerApi.md#delete_entity_acls) | **DELETE** /api/entities/acls/{id} | +[**delete_entity_data_sources**](OrganizationModelControllerApi.md#delete_entity_data_sources) | **DELETE** /api/entities/dataSources/{id} | +[**delete_entity_user_groups**](OrganizationModelControllerApi.md#delete_entity_user_groups) | **DELETE** /api/entities/userGroups/{id} | +[**delete_entity_users**](OrganizationModelControllerApi.md#delete_entity_users) | **DELETE** /api/entities/users/{id} | +[**delete_entity_workspaces**](OrganizationModelControllerApi.md#delete_entity_workspaces) | **DELETE** /api/entities/workspaces/{id} | +[**get_all_entities_acls**](OrganizationModelControllerApi.md#get_all_entities_acls) | **GET** /api/entities/acls | +[**get_all_entities_data_sources**](OrganizationModelControllerApi.md#get_all_entities_data_sources) | **GET** /api/entities/dataSources | +[**get_all_entities_user_groups**](OrganizationModelControllerApi.md#get_all_entities_user_groups) | **GET** /api/entities/userGroups | +[**get_all_entities_users**](OrganizationModelControllerApi.md#get_all_entities_users) | **GET** /api/entities/users | +[**get_all_entities_workspaces**](OrganizationModelControllerApi.md#get_all_entities_workspaces) | **GET** /api/entities/workspaces | +[**get_entity_acls**](OrganizationModelControllerApi.md#get_entity_acls) | **GET** /api/entities/acls/{id} | +[**get_entity_data_sources**](OrganizationModelControllerApi.md#get_entity_data_sources) | **GET** /api/entities/dataSources/{id} | +[**get_entity_user_groups**](OrganizationModelControllerApi.md#get_entity_user_groups) | **GET** /api/entities/userGroups/{id} | +[**get_entity_users**](OrganizationModelControllerApi.md#get_entity_users) | **GET** /api/entities/users/{id} | +[**get_entity_workspaces**](OrganizationModelControllerApi.md#get_entity_workspaces) | **GET** /api/entities/workspaces/{id} | +[**update_entity_acls**](OrganizationModelControllerApi.md#update_entity_acls) | **PUT** /api/entities/acls/{id} | +[**update_entity_data_sources**](OrganizationModelControllerApi.md#update_entity_data_sources) | **PUT** /api/entities/dataSources/{id} | +[**update_entity_user_groups**](OrganizationModelControllerApi.md#update_entity_user_groups) | **PUT** /api/entities/userGroups/{id} | +[**update_entity_users**](OrganizationModelControllerApi.md#update_entity_users) | **PUT** /api/entities/users/{id} | +[**update_entity_workspaces**](OrganizationModelControllerApi.md#update_entity_workspaces) | **PUT** /api/entities/workspaces/{id} | + + +# **create_entity_acls** +> JsonApiACLOutDocument create_entity_acls(json_api_aclin_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_aclin_document import JsonApiACLInDocument +from gooddata_metadata_client.model.json_api_acl_out_document import JsonApiACLOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + json_api_aclin_document = JsonApiACLInDocument( + data=JsonApiACLIn( + id="id1", + type="acl", + attributes=JsonApiACLOutAttributes( + access="FULL_ACCESS", + priority=1, + control="ALLOW", + ), + relationships=JsonApiACLOutRelationships( + subjects=JsonApiACLOutRelationshipsSubjects( + data=JsonApiUserToManyLinkage([ + JsonApiUserLinkage( + id="id_example", + type="user", + ), + ]), + ), + objects=JsonApiACLOutRelationshipsObjects( + data=JsonApiUserGroupToManyLinkage([ + JsonApiUserGroupLinkage( + id="id_example", + type="userGroup", + ), + ]), + ), + ), + ), + ) # JsonApiACLInDocument | + include = [ + "include=subjects,objects", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_acls(json_api_aclin_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->create_entity_acls: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.create_entity_acls(json_api_aclin_document, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->create_entity_acls: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **json_api_aclin_document** | [**JsonApiACLInDocument**](JsonApiACLInDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiACLOutDocument**](JsonApiACLOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_entity_data_sources** +> JsonApiDataSourceOutDocument create_entity_data_sources(json_api_data_source_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from gooddata_metadata_client.model.json_api_data_source_in_document import JsonApiDataSourceInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + json_api_data_source_in_document = JsonApiDataSourceInDocument( + data=JsonApiDataSourceIn( + id="id1", + type="dataSource", + attributes=JsonApiDataSourceInAttributes( + name="name_example", + type="POSTGRESQL", + url="url_example", + schema="schema_example", + username="username_example", + password="password_example", + token="token_example", + ), + ), + ) # JsonApiDataSourceInDocument | + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_data_sources(json_api_data_source_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->create_entity_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **json_api_data_source_in_document** | [**JsonApiDataSourceInDocument**](JsonApiDataSourceInDocument.md)| | + +### Return type + +[**JsonApiDataSourceOutDocument**](JsonApiDataSourceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_entity_user_groups** +> JsonApiUserGroupOutDocument create_entity_user_groups(json_api_user_group_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_user_group_out_document import JsonApiUserGroupOutDocument +from gooddata_metadata_client.model.json_api_user_group_in_document import JsonApiUserGroupInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + json_api_user_group_in_document = JsonApiUserGroupInDocument( + data=JsonApiUserGroupIn( + id="id1", + type="userGroup", + attributes={}, + relationships=JsonApiUserGroupOutRelationships( + parents=JsonApiACLOutRelationshipsObjects( + data=JsonApiUserGroupToManyLinkage([ + JsonApiUserGroupLinkage( + id="id_example", + type="userGroup", + ), + ]), + ), + ), + ), + ) # JsonApiUserGroupInDocument | + include = [ + "include=parents,objectOfACLs", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_user_groups(json_api_user_group_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->create_entity_user_groups: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.create_entity_user_groups(json_api_user_group_in_document, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->create_entity_user_groups: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **json_api_user_group_in_document** | [**JsonApiUserGroupInDocument**](JsonApiUserGroupInDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiUserGroupOutDocument**](JsonApiUserGroupOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_entity_users** +> JsonApiUserOutDocument create_entity_users(json_api_user_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_user_out_document import JsonApiUserOutDocument +from gooddata_metadata_client.model.json_api_user_in_document import JsonApiUserInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + json_api_user_in_document = JsonApiUserInDocument( + data=JsonApiUserIn( + id="id1", + type="user", + attributes=JsonApiUserOutAttributes( + authentication_id="authentication_id_example", + ), + relationships=JsonApiUserOutRelationships( + user_groups=JsonApiACLOutRelationshipsObjects( + data=JsonApiUserGroupToManyLinkage([ + JsonApiUserGroupLinkage( + id="id_example", + type="userGroup", + ), + ]), + ), + ), + ), + ) # JsonApiUserInDocument | + include = [ + "include=userGroups,subjectOfACLs", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_users(json_api_user_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->create_entity_users: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.create_entity_users(json_api_user_in_document, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->create_entity_users: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **json_api_user_in_document** | [**JsonApiUserInDocument**](JsonApiUserInDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiUserOutDocument**](JsonApiUserOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_entity_workspaces** +> JsonApiWorkspaceOutDocument create_entity_workspaces(json_api_workspace_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_workspace_out_document import JsonApiWorkspaceOutDocument +from gooddata_metadata_client.model.json_api_workspace_in_document import JsonApiWorkspaceInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + json_api_workspace_in_document = JsonApiWorkspaceInDocument( + data=JsonApiWorkspaceIn( + id="id1", + type="workspace", + attributes=JsonApiWorkspaceOutAttributes( + name="name_example", + ), + relationships=JsonApiWorkspaceOutRelationships( + parent=JsonApiWorkspaceOutRelationshipsParent( + data=JsonApiWorkspaceToOneLinkage(), + ), + ), + ), + ) # JsonApiWorkspaceInDocument | + include = [ + "include=parent", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_workspaces(json_api_workspace_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->create_entity_workspaces: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.create_entity_workspaces(json_api_workspace_in_document, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->create_entity_workspaces: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **json_api_workspace_in_document** | [**JsonApiWorkspaceInDocument**](JsonApiWorkspaceInDocument.md)| | + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiWorkspaceOutDocument**](JsonApiWorkspaceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_acls** +> delete_entity_acls(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=access==ACLAccessValue;priority==123" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_acls(id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_acls: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_acls(id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_acls: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_data_sources** +> delete_entity_data_sources(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;type==DatabaseTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_data_sources(id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_data_sources: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_data_sources(id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_user_groups** +> delete_entity_user_groups(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_user_groups(id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_user_groups: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_user_groups(id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_user_groups: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_users** +> delete_entity_users(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=authenticationId==someString;lastLogoutAllTimestamp==InstantValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_users(id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_users: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_users(id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_users: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_workspaces** +> delete_entity_workspaces(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;parent.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_workspaces(id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_workspaces: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_workspaces(id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->delete_entity_workspaces: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_acls** +> JsonApiACLOutList get_all_entities_acls() + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_acl_out_list import JsonApiACLOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=access==ACLAccessValue;priority==123" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=subjects,objects", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_acls(predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_all_entities_acls: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + +### Return type + +[**JsonApiACLOutList**](JsonApiACLOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_data_sources** +> JsonApiDataSourceOutList get_all_entities_data_sources() + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_data_source_out_list import JsonApiDataSourceOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;type==DatabaseTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_data_sources(predicate=predicate, filter=filter, page=page, size=size, sort=sort) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_all_entities_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + +### Return type + +[**JsonApiDataSourceOutList**](JsonApiDataSourceOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_user_groups** +> JsonApiUserGroupOutList get_all_entities_user_groups() + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_user_group_out_list import JsonApiUserGroupOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=parents,objectOfACLs", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_user_groups(predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_all_entities_user_groups: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + +### Return type + +[**JsonApiUserGroupOutList**](JsonApiUserGroupOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_users** +> JsonApiUserOutList get_all_entities_users() + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_user_out_list import JsonApiUserOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=authenticationId==someString;lastLogoutAllTimestamp==InstantValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=userGroups,subjectOfACLs", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_users(predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_all_entities_users: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + +### Return type + +[**JsonApiUserOutList**](JsonApiUserOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_workspaces** +> JsonApiWorkspaceOutList get_all_entities_workspaces() + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_workspace_out_list import JsonApiWorkspaceOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;parent.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=parent", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + meta_include = [ + "metaInclude=config,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_workspaces(predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, meta_include=meta_include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_all_entities_workspaces: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceOutList**](JsonApiWorkspaceOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_acls** +> JsonApiACLOutDocument get_entity_acls(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_acl_out_document import JsonApiACLOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=access==ACLAccessValue;priority==123" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=subjects,objects", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_acls(id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_acls: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_acls(id, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_acls: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiACLOutDocument**](JsonApiACLOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_data_sources** +> JsonApiDataSourceOutDocument get_entity_data_sources(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;type==DatabaseTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_data_sources(id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_data_sources: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_data_sources(id, predicate=predicate, filter=filter) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +[**JsonApiDataSourceOutDocument**](JsonApiDataSourceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_user_groups** +> JsonApiUserGroupOutDocument get_entity_user_groups(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_user_group_out_document import JsonApiUserGroupOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=parents,objectOfACLs", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_user_groups(id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_user_groups: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_user_groups(id, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_user_groups: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiUserGroupOutDocument**](JsonApiUserGroupOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_users** +> JsonApiUserOutDocument get_entity_users(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_user_out_document import JsonApiUserOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=authenticationId==someString;lastLogoutAllTimestamp==InstantValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=userGroups,subjectOfACLs", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_users(id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_users: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_users(id, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_users: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiUserOutDocument**](JsonApiUserOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_workspaces** +> JsonApiWorkspaceOutDocument get_entity_workspaces(id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_workspace_out_document import JsonApiWorkspaceOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;parent.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=parent", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + meta_include = [ + "metaInclude=config,all", + ] # [str] | Include Meta objects. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_workspaces(id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_workspaces: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_workspaces(id, predicate=predicate, filter=filter, include=include, meta_include=meta_include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->get_entity_workspaces: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **meta_include** | **[str]**| Include Meta objects. | [optional] + +### Return type + +[**JsonApiWorkspaceOutDocument**](JsonApiWorkspaceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_acls** +> JsonApiACLOutDocument update_entity_acls(id, json_api_aclin_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_aclin_document import JsonApiACLInDocument +from gooddata_metadata_client.model.json_api_acl_out_document import JsonApiACLOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + json_api_aclin_document = JsonApiACLInDocument( + data=JsonApiACLIn( + id="id1", + type="acl", + attributes=JsonApiACLOutAttributes( + access="FULL_ACCESS", + priority=1, + control="ALLOW", + ), + relationships=JsonApiACLOutRelationships( + subjects=JsonApiACLOutRelationshipsSubjects( + data=JsonApiUserToManyLinkage([ + JsonApiUserLinkage( + id="id_example", + type="user", + ), + ]), + ), + objects=JsonApiACLOutRelationshipsObjects( + data=JsonApiUserGroupToManyLinkage([ + JsonApiUserGroupLinkage( + id="id_example", + type="userGroup", + ), + ]), + ), + ), + ), + ) # JsonApiACLInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=access==ACLAccessValue;priority==123" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=subjects,objects", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_acls(id, json_api_aclin_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_acls: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_acls(id, json_api_aclin_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_acls: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_aclin_document** | [**JsonApiACLInDocument**](JsonApiACLInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiACLOutDocument**](JsonApiACLOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_data_sources** +> JsonApiDataSourceOutDocument update_entity_data_sources(id, json_api_data_source_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from gooddata_metadata_client.model.json_api_data_source_in_document import JsonApiDataSourceInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + json_api_data_source_in_document = JsonApiDataSourceInDocument( + data=JsonApiDataSourceIn( + id="id1", + type="dataSource", + attributes=JsonApiDataSourceInAttributes( + name="name_example", + type="POSTGRESQL", + url="url_example", + schema="schema_example", + username="username_example", + password="password_example", + token="token_example", + ), + ), + ) # JsonApiDataSourceInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;type==DatabaseTypeValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_data_sources(id, json_api_data_source_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_data_sources: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_data_sources(id, json_api_data_source_in_document, predicate=predicate, filter=filter) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_data_sources: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_data_source_in_document** | [**JsonApiDataSourceInDocument**](JsonApiDataSourceInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +[**JsonApiDataSourceOutDocument**](JsonApiDataSourceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_user_groups** +> JsonApiUserGroupOutDocument update_entity_user_groups(id, json_api_user_group_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_user_group_out_document import JsonApiUserGroupOutDocument +from gooddata_metadata_client.model.json_api_user_group_in_document import JsonApiUserGroupInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + json_api_user_group_in_document = JsonApiUserGroupInDocument( + data=JsonApiUserGroupIn( + id="id1", + type="userGroup", + attributes={}, + relationships=JsonApiUserGroupOutRelationships( + parents=JsonApiACLOutRelationshipsObjects( + data=JsonApiUserGroupToManyLinkage([ + JsonApiUserGroupLinkage( + id="id_example", + type="userGroup", + ), + ]), + ), + ), + ), + ) # JsonApiUserGroupInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=parents,objectOfACLs", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_user_groups(id, json_api_user_group_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_user_groups: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_user_groups(id, json_api_user_group_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_user_groups: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_user_group_in_document** | [**JsonApiUserGroupInDocument**](JsonApiUserGroupInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiUserGroupOutDocument**](JsonApiUserGroupOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_users** +> JsonApiUserOutDocument update_entity_users(id, json_api_user_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_user_out_document import JsonApiUserOutDocument +from gooddata_metadata_client.model.json_api_user_in_document import JsonApiUserInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + json_api_user_in_document = JsonApiUserInDocument( + data=JsonApiUserIn( + id="id1", + type="user", + attributes=JsonApiUserOutAttributes( + authentication_id="authentication_id_example", + ), + relationships=JsonApiUserOutRelationships( + user_groups=JsonApiACLOutRelationshipsObjects( + data=JsonApiUserGroupToManyLinkage([ + JsonApiUserGroupLinkage( + id="id_example", + type="userGroup", + ), + ]), + ), + ), + ), + ) # JsonApiUserInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=authenticationId==someString;lastLogoutAllTimestamp==InstantValue" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=userGroups,subjectOfACLs", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_users(id, json_api_user_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_users: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_users(id, json_api_user_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_users: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_user_in_document** | [**JsonApiUserInDocument**](JsonApiUserInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiUserOutDocument**](JsonApiUserOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_workspaces** +> JsonApiWorkspaceOutDocument update_entity_workspaces(id, json_api_workspace_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_model_controller_api +from gooddata_metadata_client.model.json_api_workspace_out_document import JsonApiWorkspaceOutDocument +from gooddata_metadata_client.model.json_api_workspace_in_document import JsonApiWorkspaceInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_model_controller_api.OrganizationModelControllerApi(api_client) + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + json_api_workspace_in_document = JsonApiWorkspaceInDocument( + data=JsonApiWorkspaceIn( + id="id1", + type="workspace", + attributes=JsonApiWorkspaceOutAttributes( + name="name_example", + ), + relationships=JsonApiWorkspaceOutRelationships( + parent=JsonApiWorkspaceOutRelationshipsParent( + data=JsonApiWorkspaceToOneLinkage(), + ), + ), + ), + ) # JsonApiWorkspaceInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=name==someString;parent.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=parent", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_workspaces(id, json_api_workspace_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_workspaces: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_workspaces(id, json_api_workspace_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationModelControllerApi->update_entity_workspaces: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **json_api_workspace_in_document** | [**JsonApiWorkspaceInDocument**](JsonApiWorkspaceInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiWorkspaceOutDocument**](JsonApiWorkspaceOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/docs/OrganizationRedirectControllerApi.md b/gooddata-metadata-client/docs/OrganizationRedirectControllerApi.md new file mode 100644 index 000000000..86f11a44f --- /dev/null +++ b/gooddata-metadata-client/docs/OrganizationRedirectControllerApi.md @@ -0,0 +1,68 @@ +# gooddata_metadata_client.OrganizationRedirectControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_organization**](OrganizationRedirectControllerApi.md#get_organization) | **GET** /api/entities/organization | Get current organization info + + +# **get_organization** +> get_organization() + +Get current organization info + +Gets a basic information about organization. + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import organization_redirect_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = organization_redirect_controller_api.OrganizationRedirectControllerApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Get current organization info + api_instance.get_organization() + except gooddata_metadata_client.ApiException as e: + print("Exception when calling OrganizationRedirectControllerApi->get_organization: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**302** | Redirect to entity URI. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/docs/ReferenceIdentifier.md b/gooddata-metadata-client/docs/ReferenceIdentifier.md new file mode 100644 index 000000000..5a9a4449e --- /dev/null +++ b/gooddata-metadata-client/docs/ReferenceIdentifier.md @@ -0,0 +1,14 @@ +# ReferenceIdentifier + +A reference identifier. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Reference ID. | +**type** | **str** | A type of the reference. | defaults to "dataset" +**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-metadata-client/docs/UserGroupIdentifier.md b/gooddata-metadata-client/docs/UserGroupIdentifier.md new file mode 100644 index 000000000..58b9c6e0f --- /dev/null +++ b/gooddata-metadata-client/docs/UserGroupIdentifier.md @@ -0,0 +1,14 @@ +# UserGroupIdentifier + +A user group identifier. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the user group. | +**type** | **str** | A type. | defaults to "userGroup" +**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-metadata-client/docs/UserModelControllerApi.md b/gooddata-metadata-client/docs/UserModelControllerApi.md new file mode 100644 index 000000000..c527df632 --- /dev/null +++ b/gooddata-metadata-client/docs/UserModelControllerApi.md @@ -0,0 +1,314 @@ +# gooddata_metadata_client.UserModelControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_api_tokens**](UserModelControllerApi.md#create_entity_api_tokens) | **POST** /api/entities/users/{userId}/apiTokens | +[**delete_entity_api_tokens**](UserModelControllerApi.md#delete_entity_api_tokens) | **DELETE** /api/entities/users/{userId}/apiTokens/{id} | +[**get_all_entities_api_tokens**](UserModelControllerApi.md#get_all_entities_api_tokens) | **GET** /api/entities/users/{userId}/apiTokens | +[**get_entity_api_tokens**](UserModelControllerApi.md#get_entity_api_tokens) | **GET** /api/entities/users/{userId}/apiTokens/{id} | + + +# **create_entity_api_tokens** +> JsonApiApiTokenOutDocument create_entity_api_tokens(user_id, json_api_api_token_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import user_model_controller_api +from gooddata_metadata_client.model.json_api_api_token_in_document import JsonApiApiTokenInDocument +from gooddata_metadata_client.model.json_api_api_token_out_document import JsonApiApiTokenOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_model_controller_api.UserModelControllerApi(api_client) + user_id = "userId_example" # str | + json_api_api_token_in_document = JsonApiApiTokenInDocument( + data=JsonApiApiTokenIn( + id="id1", + type="apiToken", + attributes={}, + ), + ) # JsonApiApiTokenInDocument | + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_api_tokens(user_id, json_api_api_token_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling UserModelControllerApi->create_entity_api_tokens: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **json_api_api_token_in_document** | [**JsonApiApiTokenInDocument**](JsonApiApiTokenInDocument.md)| | + +### Return type + +[**JsonApiApiTokenOutDocument**](JsonApiApiTokenOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_api_tokens** +> delete_entity_api_tokens(user_id, id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import user_model_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_model_controller_api.UserModelControllerApi(api_client) + user_id = "userId_example" # str | + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=cryptedToken==someString;bearerToken==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_api_tokens(user_id, id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling UserModelControllerApi->delete_entity_api_tokens: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_api_tokens(user_id, id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling UserModelControllerApi->delete_entity_api_tokens: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_api_tokens** +> JsonApiApiTokenOutList get_all_entities_api_tokens(user_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import user_model_controller_api +from gooddata_metadata_client.model.json_api_api_token_out_list import JsonApiApiTokenOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_model_controller_api.UserModelControllerApi(api_client) + user_id = "userId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=cryptedToken==someString;bearerToken==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_api_tokens(user_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling UserModelControllerApi->get_all_entities_api_tokens: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_api_tokens(user_id, predicate=predicate, filter=filter, page=page, size=size, sort=sort) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling UserModelControllerApi->get_all_entities_api_tokens: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + +### Return type + +[**JsonApiApiTokenOutList**](JsonApiApiTokenOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_api_tokens** +> JsonApiApiTokenOutDocument get_entity_api_tokens(user_id, id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import user_model_controller_api +from gooddata_metadata_client.model.json_api_api_token_out_document import JsonApiApiTokenOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = user_model_controller_api.UserModelControllerApi(api_client) + user_id = "userId_example" # str | + id = "26bUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awxoFZxHzs6ED.kjUSnTINkYPUndNl8pmPg5K897Fu1JEFj9R1_dz9rEoBi0LnU8SsOWJ7wYrcziVQdt8mVLxbg4bCLrLBcmXxWQK6MzKSg5jphei0IfRRwpnT_Z.qKa_YppZepezJ0.VmLSUTLYyW" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=cryptedToken==someString;bearerToken==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_api_tokens(user_id, id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling UserModelControllerApi->get_entity_api_tokens: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_api_tokens(user_id, id, predicate=predicate, filter=filter) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling UserModelControllerApi->get_entity_api_tokens: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| | + **id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +[**JsonApiApiTokenOutDocument**](JsonApiApiTokenOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/docs/WorkspaceIdentifier.md b/gooddata-metadata-client/docs/WorkspaceIdentifier.md new file mode 100644 index 000000000..a69d274e0 --- /dev/null +++ b/gooddata-metadata-client/docs/WorkspaceIdentifier.md @@ -0,0 +1,14 @@ +# WorkspaceIdentifier + +A workspace identifier. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the workspace. | +**type** | **str** | A type. | defaults to "workspace" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gooddata-metadata-client/docs/WorkspaceObjectControllerApi.md b/gooddata-metadata-client/docs/WorkspaceObjectControllerApi.md new file mode 100644 index 000000000..d8de2d8c2 --- /dev/null +++ b/gooddata-metadata-client/docs/WorkspaceObjectControllerApi.md @@ -0,0 +1,3088 @@ +# gooddata_metadata_client.WorkspaceObjectControllerApi + +All URIs are relative to *https://staging.anywhere.gooddata.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_entity_analytical_dashboards**](WorkspaceObjectControllerApi.md#create_entity_analytical_dashboards) | **POST** /api/entities/workspaces/{workspaceId}/analyticalDashboards | +[**create_entity_filter_contexts**](WorkspaceObjectControllerApi.md#create_entity_filter_contexts) | **POST** /api/entities/workspaces/{workspaceId}/filterContexts | +[**create_entity_metrics**](WorkspaceObjectControllerApi.md#create_entity_metrics) | **POST** /api/entities/workspaces/{workspaceId}/metrics | +[**create_entity_visualization_objects**](WorkspaceObjectControllerApi.md#create_entity_visualization_objects) | **POST** /api/entities/workspaces/{workspaceId}/visualizationObjects | +[**create_entity_workspace_data_filters**](WorkspaceObjectControllerApi.md#create_entity_workspace_data_filters) | **POST** /api/entities/workspaces/{workspaceId}/workspaceDataFilters | +[**delete_entity_analytical_dashboards**](WorkspaceObjectControllerApi.md#delete_entity_analytical_dashboards) | **DELETE** /api/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | +[**delete_entity_filter_contexts**](WorkspaceObjectControllerApi.md#delete_entity_filter_contexts) | **DELETE** /api/entities/workspaces/{workspaceId}/filterContexts/{objectId} | +[**delete_entity_metrics**](WorkspaceObjectControllerApi.md#delete_entity_metrics) | **DELETE** /api/entities/workspaces/{workspaceId}/metrics/{objectId} | +[**delete_entity_visualization_objects**](WorkspaceObjectControllerApi.md#delete_entity_visualization_objects) | **DELETE** /api/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | +[**delete_entity_workspace_data_filters**](WorkspaceObjectControllerApi.md#delete_entity_workspace_data_filters) | **DELETE** /api/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | +[**get_all_entities_analytical_dashboards**](WorkspaceObjectControllerApi.md#get_all_entities_analytical_dashboards) | **GET** /api/entities/workspaces/{workspaceId}/analyticalDashboards | +[**get_all_entities_attributes**](WorkspaceObjectControllerApi.md#get_all_entities_attributes) | **GET** /api/entities/workspaces/{workspaceId}/attributes | +[**get_all_entities_datasets**](WorkspaceObjectControllerApi.md#get_all_entities_datasets) | **GET** /api/entities/workspaces/{workspaceId}/datasets | +[**get_all_entities_facts**](WorkspaceObjectControllerApi.md#get_all_entities_facts) | **GET** /api/entities/workspaces/{workspaceId}/facts | +[**get_all_entities_filter_contexts**](WorkspaceObjectControllerApi.md#get_all_entities_filter_contexts) | **GET** /api/entities/workspaces/{workspaceId}/filterContexts | +[**get_all_entities_labels**](WorkspaceObjectControllerApi.md#get_all_entities_labels) | **GET** /api/entities/workspaces/{workspaceId}/labels | +[**get_all_entities_metrics**](WorkspaceObjectControllerApi.md#get_all_entities_metrics) | **GET** /api/entities/workspaces/{workspaceId}/metrics | +[**get_all_entities_visualization_objects**](WorkspaceObjectControllerApi.md#get_all_entities_visualization_objects) | **GET** /api/entities/workspaces/{workspaceId}/visualizationObjects | +[**get_all_entities_workspace_data_filter_settings**](WorkspaceObjectControllerApi.md#get_all_entities_workspace_data_filter_settings) | **GET** /api/entities/workspaces/{workspaceId}/workspaceDataFilterSettings | +[**get_all_entities_workspace_data_filters**](WorkspaceObjectControllerApi.md#get_all_entities_workspace_data_filters) | **GET** /api/entities/workspaces/{workspaceId}/workspaceDataFilters | +[**get_entity_analytical_dashboards**](WorkspaceObjectControllerApi.md#get_entity_analytical_dashboards) | **GET** /api/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | +[**get_entity_attributes**](WorkspaceObjectControllerApi.md#get_entity_attributes) | **GET** /api/entities/workspaces/{workspaceId}/attributes/{objectId} | +[**get_entity_datasets**](WorkspaceObjectControllerApi.md#get_entity_datasets) | **GET** /api/entities/workspaces/{workspaceId}/datasets/{objectId} | +[**get_entity_facts**](WorkspaceObjectControllerApi.md#get_entity_facts) | **GET** /api/entities/workspaces/{workspaceId}/facts/{objectId} | +[**get_entity_filter_contexts**](WorkspaceObjectControllerApi.md#get_entity_filter_contexts) | **GET** /api/entities/workspaces/{workspaceId}/filterContexts/{objectId} | +[**get_entity_labels**](WorkspaceObjectControllerApi.md#get_entity_labels) | **GET** /api/entities/workspaces/{workspaceId}/labels/{objectId} | +[**get_entity_metrics**](WorkspaceObjectControllerApi.md#get_entity_metrics) | **GET** /api/entities/workspaces/{workspaceId}/metrics/{objectId} | +[**get_entity_visualization_objects**](WorkspaceObjectControllerApi.md#get_entity_visualization_objects) | **GET** /api/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | +[**get_entity_workspace_data_filter_settings**](WorkspaceObjectControllerApi.md#get_entity_workspace_data_filter_settings) | **GET** /api/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId} | +[**get_entity_workspace_data_filters**](WorkspaceObjectControllerApi.md#get_entity_workspace_data_filters) | **GET** /api/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | +[**update_entity_analytical_dashboards**](WorkspaceObjectControllerApi.md#update_entity_analytical_dashboards) | **PUT** /api/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId} | +[**update_entity_filter_contexts**](WorkspaceObjectControllerApi.md#update_entity_filter_contexts) | **PUT** /api/entities/workspaces/{workspaceId}/filterContexts/{objectId} | +[**update_entity_metrics**](WorkspaceObjectControllerApi.md#update_entity_metrics) | **PUT** /api/entities/workspaces/{workspaceId}/metrics/{objectId} | +[**update_entity_visualization_objects**](WorkspaceObjectControllerApi.md#update_entity_visualization_objects) | **PUT** /api/entities/workspaces/{workspaceId}/visualizationObjects/{objectId} | +[**update_entity_workspace_data_filters**](WorkspaceObjectControllerApi.md#update_entity_workspace_data_filters) | **PUT** /api/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId} | + + +# **create_entity_analytical_dashboards** +> JsonApiAnalyticalDashboardOutDocument create_entity_analytical_dashboards(workspace_id, json_api_analytical_dashboard_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_analytical_dashboard_in_document import JsonApiAnalyticalDashboardInDocument +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_analytical_dashboard_in_document = JsonApiAnalyticalDashboardInDocument( + data=JsonApiAnalyticalDashboardIn( + id="id1", + type="analyticalDashboard", + attributes=JsonApiAnalyticalDashboardOutAttributes( + title="title_example", + description="description_example", + tags=[ + "tags_example", + ], + are_relations_valid=True, + content={}, + ), + ), + ) # JsonApiAnalyticalDashboardInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=visualizationObjects,analyticalDashboards,labels,metrics,datasets,filterContexts", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_analytical_dashboards(workspace_id, json_api_analytical_dashboard_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.create_entity_analytical_dashboards(workspace_id, json_api_analytical_dashboard_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_analytical_dashboard_in_document** | [**JsonApiAnalyticalDashboardInDocument**](JsonApiAnalyticalDashboardInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiAnalyticalDashboardOutDocument**](JsonApiAnalyticalDashboardOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_entity_filter_contexts** +> JsonApiFilterContextOutDocument create_entity_filter_contexts(workspace_id, json_api_filter_context_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from gooddata_metadata_client.model.json_api_filter_context_in_document import JsonApiFilterContextInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_filter_context_in_document = JsonApiFilterContextInDocument( + data=JsonApiFilterContextIn( + id="id1", + type="filterContext", + attributes=JsonApiAnalyticalDashboardOutAttributes( + title="title_example", + description="description_example", + tags=[ + "tags_example", + ], + are_relations_valid=True, + content={}, + ), + ), + ) # JsonApiFilterContextInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=attributes,datasets,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_filter_contexts(workspace_id, json_api_filter_context_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.create_entity_filter_contexts(workspace_id, json_api_filter_context_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_filter_context_in_document** | [**JsonApiFilterContextInDocument**](JsonApiFilterContextInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiFilterContextOutDocument**](JsonApiFilterContextOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_entity_metrics** +> JsonApiMetricOutDocument create_entity_metrics(workspace_id, json_api_metric_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_metric_in_document import JsonApiMetricInDocument +from gooddata_metadata_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_metric_in_document = JsonApiMetricInDocument( + data=JsonApiMetricIn( + id="id1", + type="metric", + attributes=JsonApiMetricOutAttributes( + title="title_example", + description="description_example", + tags=[ + "tags_example", + ], + are_relations_valid=True, + content=JsonApiMetricOutAttributesContent( + format="format_example", + maql="maql_example", + ), + ), + ), + ) # JsonApiMetricInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=facts,attributes,labels,metrics", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_metrics(workspace_id, json_api_metric_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.create_entity_metrics(workspace_id, json_api_metric_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_metric_in_document** | [**JsonApiMetricInDocument**](JsonApiMetricInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiMetricOutDocument**](JsonApiMetricOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_entity_visualization_objects** +> JsonApiVisualizationObjectOutDocument create_entity_visualization_objects(workspace_id, json_api_visualization_object_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_visualization_object_in_document import JsonApiVisualizationObjectInDocument +from gooddata_metadata_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_visualization_object_in_document = JsonApiVisualizationObjectInDocument( + data=JsonApiVisualizationObjectIn( + id="id1", + type="visualizationObject", + attributes=JsonApiAnalyticalDashboardOutAttributes( + title="title_example", + description="description_example", + tags=[ + "tags_example", + ], + are_relations_valid=True, + content={}, + ), + ), + ) # JsonApiVisualizationObjectInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_visualization_objects(workspace_id, json_api_visualization_object_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.create_entity_visualization_objects(workspace_id, json_api_visualization_object_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_visualization_object_in_document** | [**JsonApiVisualizationObjectInDocument**](JsonApiVisualizationObjectInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiVisualizationObjectOutDocument**](JsonApiVisualizationObjectOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_entity_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutDocument create_entity_workspace_data_filters(workspace_id, json_api_workspace_data_filter_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_workspace_data_filter_in_document import JsonApiWorkspaceDataFilterInDocument +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + json_api_workspace_data_filter_in_document = JsonApiWorkspaceDataFilterInDocument( + data=JsonApiWorkspaceDataFilterIn( + id="id1", + type="workspaceDataFilter", + attributes=JsonApiWorkspaceDataFilterOutAttributes( + title="title_example", + description="description_example", + column_name="column_name_example", + data_source_id="data_source_id_example", + ), + relationships=JsonApiWorkspaceDataFilterOutRelationships( + filter_settings=JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings( + data=JsonApiWorkspaceDataFilterSettingToManyLinkage([ + JsonApiWorkspaceDataFilterSettingLinkage( + id="id_example", + type="workspaceDataFilterSetting", + ), + ]), + ), + ), + ), + ) # JsonApiWorkspaceDataFilterInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=filterSettings", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.create_entity_workspace_data_filters(workspace_id, json_api_workspace_data_filter_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.create_entity_workspace_data_filters(workspace_id, json_api_workspace_data_filter_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->create_entity_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **json_api_workspace_data_filter_in_document** | [**JsonApiWorkspaceDataFilterInDocument**](JsonApiWorkspaceDataFilterInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterOutDocument**](JsonApiWorkspaceDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_analytical_dashboards** +> delete_entity_analytical_dashboards(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_analytical_dashboards(workspace_id, object_id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_analytical_dashboards(workspace_id, object_id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_filter_contexts** +> delete_entity_filter_contexts(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_filter_contexts(workspace_id, object_id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_filter_contexts(workspace_id, object_id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_metrics** +> delete_entity_metrics(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_metrics(workspace_id, object_id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_metrics(workspace_id, object_id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_visualization_objects** +> delete_entity_visualization_objects(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_visualization_objects(workspace_id, object_id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_visualization_objects(workspace_id, object_id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_entity_workspace_data_filters** +> delete_entity_workspace_data_filters(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + + # example passing only required values which don't have defaults set + try: + api_instance.delete_entity_workspace_data_filters(workspace_id, object_id) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_instance.delete_entity_workspace_data_filters(workspace_id, object_id, predicate=predicate, filter=filter) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->delete_entity_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_analytical_dashboards** +> JsonApiAnalyticalDashboardOutList get_all_entities_analytical_dashboards(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_list import JsonApiAnalyticalDashboardOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=visualizationObjects,analyticalDashboards,labels,metrics,datasets,filterContexts", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_analytical_dashboards(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_analytical_dashboards(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiAnalyticalDashboardOutList**](JsonApiAnalyticalDashboardOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_attributes** +> JsonApiAttributeOutList get_all_entities_attributes(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_attribute_out_list import JsonApiAttributeOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString;dataset.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=dataset,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_attributes(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_attributes: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_attributes(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_attributes: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiAttributeOutList**](JsonApiAttributeOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_datasets** +> JsonApiDatasetOutList get_all_entities_datasets(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_dataset_out_list import JsonApiDatasetOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=attributes,facts,references", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_datasets(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_datasets: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_datasets(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_datasets: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiDatasetOutList**](JsonApiDatasetOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_facts** +> JsonApiFactOutList get_all_entities_facts(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_fact_out_list import JsonApiFactOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString;dataset.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=dataset", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_facts(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_facts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_facts(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_facts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiFactOutList**](JsonApiFactOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_filter_contexts** +> JsonApiFilterContextOutList get_all_entities_filter_contexts(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_filter_context_out_list import JsonApiFilterContextOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=attributes,datasets,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_filter_contexts(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_filter_contexts(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiFilterContextOutList**](JsonApiFilterContextOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_labels** +> JsonApiLabelOutList get_all_entities_labels(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_label_out_list import JsonApiLabelOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString;attribute.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=attribute", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_labels(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_labels: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_labels(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_labels: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiLabelOutList**](JsonApiLabelOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_metrics** +> JsonApiMetricOutList get_all_entities_metrics(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_metric_out_list import JsonApiMetricOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=facts,attributes,labels,metrics", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_metrics(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_metrics(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiMetricOutList**](JsonApiMetricOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_visualization_objects** +> JsonApiVisualizationObjectOutList get_all_entities_visualization_objects(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_visualization_object_out_list import JsonApiVisualizationObjectOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_visualization_objects(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_visualization_objects(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiVisualizationObjectOutList**](JsonApiVisualizationObjectOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_workspace_data_filter_settings** +> JsonApiWorkspaceDataFilterSettingOutList get_all_entities_workspace_data_filter_settings(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_list import JsonApiWorkspaceDataFilterSettingOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString;workspaceDataFilter.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=workspaceDataFilter", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_workspace_data_filter_settings(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_workspace_data_filter_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_workspace_data_filter_settings(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_workspace_data_filter_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiWorkspaceDataFilterSettingOutList**](JsonApiWorkspaceDataFilterSettingOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_entities_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutList get_all_entities_workspace_data_filters(workspace_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_list import JsonApiWorkspaceDataFilterOutList +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=filterSettings", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + page = 0 # int | Zero-based page index (0..N) (optional) if omitted the server will use the default value of 0 + size = 20 # int | The size of the page to be returned (optional) if omitted the server will use the default value of 20 + sort = [ + "sort_example", + ] # [str] | Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_all_entities_workspace_data_filters(workspace_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_all_entities_workspace_data_filters(workspace_id, predicate=predicate, filter=filter, include=include, page=page, size=size, sort=sort, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_all_entities_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **page** | **int**| Zero-based page index (0..N) | [optional] if omitted the server will use the default value of 0 + **size** | **int**| The size of the page to be returned | [optional] if omitted the server will use the default value of 20 + **sort** | **[str]**| Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiWorkspaceDataFilterOutList**](JsonApiWorkspaceDataFilterOutList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_analytical_dashboards** +> JsonApiAnalyticalDashboardOutDocument get_entity_analytical_dashboards(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=visualizationObjects,analyticalDashboards,labels,metrics,datasets,filterContexts", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_analytical_dashboards(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_analytical_dashboards(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiAnalyticalDashboardOutDocument**](JsonApiAnalyticalDashboardOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_attributes** +> JsonApiAttributeOutDocument get_entity_attributes(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_attribute_out_document import JsonApiAttributeOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString;dataset.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=dataset,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_attributes(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_attributes: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_attributes(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_attributes: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiAttributeOutDocument**](JsonApiAttributeOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_datasets** +> JsonApiDatasetOutDocument get_entity_datasets(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_dataset_out_document import JsonApiDatasetOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=attributes,facts,references", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_datasets(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_datasets: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_datasets(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_datasets: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiDatasetOutDocument**](JsonApiDatasetOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_facts** +> JsonApiFactOutDocument get_entity_facts(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_fact_out_document import JsonApiFactOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString;dataset.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=dataset", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_facts(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_facts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_facts(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_facts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiFactOutDocument**](JsonApiFactOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_filter_contexts** +> JsonApiFilterContextOutDocument get_entity_filter_contexts(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=attributes,datasets,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_filter_contexts(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_filter_contexts(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiFilterContextOutDocument**](JsonApiFilterContextOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_labels** +> JsonApiLabelOutDocument get_entity_labels(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_label_out_document import JsonApiLabelOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString;attribute.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=attribute", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_labels(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_labels: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_labels(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_labels: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiLabelOutDocument**](JsonApiLabelOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_metrics** +> JsonApiMetricOutDocument get_entity_metrics(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=facts,attributes,labels,metrics", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_metrics(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_metrics(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiMetricOutDocument**](JsonApiMetricOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_visualization_objects** +> JsonApiVisualizationObjectOutDocument get_entity_visualization_objects(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_visualization_objects(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_visualization_objects(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiVisualizationObjectOutDocument**](JsonApiVisualizationObjectOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_workspace_data_filter_settings** +> JsonApiWorkspaceDataFilterSettingOutDocument get_entity_workspace_data_filter_settings(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_document import JsonApiWorkspaceDataFilterSettingOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString;workspaceDataFilter.id==321" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=workspaceDataFilter", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_workspace_data_filter_settings(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_workspace_data_filter_settings: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_workspace_data_filter_settings(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_workspace_data_filter_settings: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiWorkspaceDataFilterSettingOutDocument**](JsonApiWorkspaceDataFilterSettingOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_entity_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutDocument get_entity_workspace_data_filters(workspace_id, object_id) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=filterSettings", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + x_gdc_validate_relations = False # bool | (optional) if omitted the server will use the default value of False + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_entity_workspace_data_filters(workspace_id, object_id) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.get_entity_workspace_data_filters(workspace_id, object_id, predicate=predicate, filter=filter, include=include, x_gdc_validate_relations=x_gdc_validate_relations) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->get_entity_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + **x_gdc_validate_relations** | **bool**| | [optional] if omitted the server will use the default value of False + +### Return type + +[**JsonApiWorkspaceDataFilterOutDocument**](JsonApiWorkspaceDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_analytical_dashboards** +> JsonApiAnalyticalDashboardOutDocument update_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_analytical_dashboard_in_document import JsonApiAnalyticalDashboardInDocument +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_analytical_dashboard_in_document = JsonApiAnalyticalDashboardInDocument( + data=JsonApiAnalyticalDashboardIn( + id="id1", + type="analyticalDashboard", + attributes=JsonApiAnalyticalDashboardOutAttributes( + title="title_example", + description="description_example", + tags=[ + "tags_example", + ], + are_relations_valid=True, + content={}, + ), + ), + ) # JsonApiAnalyticalDashboardInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=visualizationObjects,analyticalDashboards,labels,metrics,datasets,filterContexts", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_analytical_dashboards: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_analytical_dashboards: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_analytical_dashboard_in_document** | [**JsonApiAnalyticalDashboardInDocument**](JsonApiAnalyticalDashboardInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiAnalyticalDashboardOutDocument**](JsonApiAnalyticalDashboardOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_filter_contexts** +> JsonApiFilterContextOutDocument update_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from gooddata_metadata_client.model.json_api_filter_context_in_document import JsonApiFilterContextInDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_filter_context_in_document = JsonApiFilterContextInDocument( + data=JsonApiFilterContextIn( + id="id1", + type="filterContext", + attributes=JsonApiAnalyticalDashboardOutAttributes( + title="title_example", + description="description_example", + tags=[ + "tags_example", + ], + are_relations_valid=True, + content={}, + ), + ), + ) # JsonApiFilterContextInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=attributes,datasets,labels", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_filter_contexts: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_filter_contexts: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_filter_context_in_document** | [**JsonApiFilterContextInDocument**](JsonApiFilterContextInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiFilterContextOutDocument**](JsonApiFilterContextOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_metrics** +> JsonApiMetricOutDocument update_entity_metrics(workspace_id, object_id, json_api_metric_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_metric_in_document import JsonApiMetricInDocument +from gooddata_metadata_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_metric_in_document = JsonApiMetricInDocument( + data=JsonApiMetricIn( + id="id1", + type="metric", + attributes=JsonApiMetricOutAttributes( + title="title_example", + description="description_example", + tags=[ + "tags_example", + ], + are_relations_valid=True, + content=JsonApiMetricOutAttributesContent( + format="format_example", + maql="maql_example", + ), + ), + ), + ) # JsonApiMetricInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=facts,attributes,labels,metrics", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_metrics(workspace_id, object_id, json_api_metric_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_metrics: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_metrics(workspace_id, object_id, json_api_metric_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_metrics: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_metric_in_document** | [**JsonApiMetricInDocument**](JsonApiMetricInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiMetricOutDocument**](JsonApiMetricOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_visualization_objects** +> JsonApiVisualizationObjectOutDocument update_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_visualization_object_in_document import JsonApiVisualizationObjectInDocument +from gooddata_metadata_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_visualization_object_in_document = JsonApiVisualizationObjectInDocument( + data=JsonApiVisualizationObjectIn( + id="id1", + type="visualizationObject", + attributes=JsonApiAnalyticalDashboardOutAttributes( + title="title_example", + description="description_example", + tags=[ + "tags_example", + ], + are_relations_valid=True, + content={}, + ), + ), + ) # JsonApiVisualizationObjectInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=facts,attributes,labels,metrics,datasets", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_visualization_objects: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_visualization_objects: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_visualization_object_in_document** | [**JsonApiVisualizationObjectInDocument**](JsonApiVisualizationObjectInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiVisualizationObjectOutDocument**](JsonApiVisualizationObjectOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_entity_workspace_data_filters** +> JsonApiWorkspaceDataFilterOutDocument update_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_in_document) + + + +### Example + +```python +import time +import gooddata_metadata_client +from gooddata_metadata_client.api import workspace_object_controller_api +from gooddata_metadata_client.model.json_api_workspace_data_filter_in_document import JsonApiWorkspaceDataFilterInDocument +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from pprint import pprint +# Defining the host is optional and defaults to https://staging.anywhere.gooddata.com +# See configuration.py for a list of all supported configuration parameters. +configuration = gooddata_metadata_client.Configuration( + host = "https://staging.anywhere.gooddata.com" +) + + +# Enter a context with an instance of the API client +with gooddata_metadata_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = workspace_object_controller_api.WorkspaceObjectControllerApi(api_client) + workspace_id = "workspaceId_example" # str | + object_id = "objectId_example" # str | + json_api_workspace_data_filter_in_document = JsonApiWorkspaceDataFilterInDocument( + data=JsonApiWorkspaceDataFilterIn( + id="id1", + type="workspaceDataFilter", + attributes=JsonApiWorkspaceDataFilterOutAttributes( + title="title_example", + description="description_example", + column_name="column_name_example", + data_source_id="data_source_id_example", + ), + relationships=JsonApiWorkspaceDataFilterOutRelationships( + filter_settings=JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings( + data=JsonApiWorkspaceDataFilterSettingToManyLinkage([ + JsonApiWorkspaceDataFilterSettingLinkage( + id="id_example", + type="workspaceDataFilterSetting", + ), + ]), + ), + ), + ), + ) # JsonApiWorkspaceDataFilterInDocument | + predicate = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). (optional) + filter = "filter=title==someString;description==someString" # str | Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') (optional) + include = [ + "include=filterSettings", + ] # [str] | Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. (optional) + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.update_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_in_document) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_workspace_data_filters: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + api_response = api_instance.update_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_in_document, predicate=predicate, filter=filter, include=include) + pprint(api_response) + except gooddata_metadata_client.ApiException as e: + print("Exception when calling WorkspaceObjectControllerApi->update_entity_workspace_data_filters: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workspace_id** | **str**| | + **object_id** | **str**| | + **json_api_workspace_data_filter_in_document** | [**JsonApiWorkspaceDataFilterInDocument**](JsonApiWorkspaceDataFilterInDocument.md)| | + **predicate** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](bool, date, datetime, dict, float, int, list, str, none_type.md)| Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123). | [optional] + **filter** | **str**| Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc') | [optional] + **include** | **[str]**| Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together. | [optional] + +### Return type + +[**JsonApiWorkspaceDataFilterOutDocument**](JsonApiWorkspaceDataFilterOutDocument.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/vnd.gooddata.api+json + - **Accept**: application/vnd.gooddata.api+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Request successfully processed | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/gooddata-metadata-client/gooddata_metadata_client/__init__.py b/gooddata-metadata-client/gooddata_metadata_client/__init__.py new file mode 100644 index 000000000..6641b3c81 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/__init__.py @@ -0,0 +1,27 @@ +# flake8: noqa + +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +__version__ = "1.0.0" + +# import ApiClient +from gooddata_metadata_client.api_client import ApiClient + +# import Configuration +from gooddata_metadata_client.configuration import Configuration + +# import exceptions +from gooddata_metadata_client.exceptions import OpenApiException +from gooddata_metadata_client.exceptions import ApiAttributeError +from gooddata_metadata_client.exceptions import ApiTypeError +from gooddata_metadata_client.exceptions import ApiValueError +from gooddata_metadata_client.exceptions import ApiKeyError +from gooddata_metadata_client.exceptions import ApiException diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/__init__.py b/gooddata-metadata-client/gooddata_metadata_client/api/__init__.py new file mode 100644 index 000000000..3fe33d83e --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/__init__.py @@ -0,0 +1,3 @@ +# do not import all apis into this module because that uses a lot of memory and stack frames +# if you need the ability to import all apis from one package, import them with +# from gooddata_metadata_client.apis import DataSourceActionsControllerApi diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/data_source_actions_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/data_source_actions_controller_api.py new file mode 100644 index 000000000..e9f3f7cb0 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/data_source_actions_controller_api.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_metadata_client.model.declarative_model import DeclarativeModel +from gooddata_metadata_client.model.generate_ldm_request import GenerateLdmRequest + + +class DataSourceActionsControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __generate_logical_model( + self, + data_source_id, + generate_ldm_request, + **kwargs + ): + """Generate LDM from PDM # noqa: E501 + + Generate LDM from PDM stored in data source. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.generate_logical_model(data_source_id, generate_ldm_request, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + generate_ldm_request (GenerateLdmRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeModel + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['data_source_id'] = \ + data_source_id + kwargs['generate_ldm_request'] = \ + generate_ldm_request + return self.call_with_http_info(**kwargs) + + self.generate_logical_model = _Endpoint( + settings={ + 'response_type': (DeclarativeModel,), + 'auth': [], + 'endpoint_path': '/api/actions/dataSources/{dataSourceId}/generateLogicalModel', + 'operation_id': 'generate_logical_model', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + 'generate_ldm_request', + ], + 'required': [ + 'data_source_id', + 'generate_ldm_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + 'generate_ldm_request': + (GenerateLdmRequest,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + 'generate_ldm_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__generate_logical_model + ) + + def __register_upload_notification( + self, + data_source_id, + **kwargs + ): + """Register an upload notification # noqa: E501 + + Notification sets up all reports to be computed again with new data. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.register_upload_notification(data_source_id, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['data_source_id'] = \ + data_source_id + return self.call_with_http_info(**kwargs) + + self.register_upload_notification = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/actions/dataSources/{dataSourceId}/uploadNotification', + 'operation_id': 'register_upload_notification', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + ], + 'required': [ + 'data_source_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__register_upload_notification + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/data_source_entities_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/data_source_entities_controller_api.py new file mode 100644 index 000000000..a21da66c7 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/data_source_entities_controller_api.py @@ -0,0 +1,330 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_metadata_client.model.json_api_data_source_table_out_document import JsonApiDataSourceTableOutDocument +from gooddata_metadata_client.model.json_api_data_source_table_out_list import JsonApiDataSourceTableOutList + + +class DataSourceEntitiesControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __get_all_entities_data_source_tables( + self, + data_source_id, + **kwargs + ): + """get_all_entities_data_source_tables # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_data_source_tables(data_source_id, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceTableOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['data_source_id'] = \ + data_source_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_data_source_tables = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceTableOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/dataSources/{dataSourceId}/dataSourceTables', + 'operation_id': 'get_all_entities_data_source_tables', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + 'predicate', + 'filter', + 'page', + 'size', + 'sort', + ], + 'required': [ + 'data_source_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + }, + 'location_map': { + 'data_source_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_data_source_tables + ) + + def __get_entity_data_source_tables( + self, + data_source_id, + id, + **kwargs + ): + """get_entity_data_source_tables # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_data_source_tables(data_source_id, id, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceTableOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['data_source_id'] = \ + data_source_id + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.get_entity_data_source_tables = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceTableOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/dataSources/{dataSourceId}/dataSourceTables/{id}', + 'operation_id': 'get_entity_data_source_tables', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'data_source_id', + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'data_source_id': 'path', + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_data_source_tables + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/data_source_layout_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/data_source_layout_controller_api.py new file mode 100644 index 000000000..bb3fd3f18 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/data_source_layout_controller_api.py @@ -0,0 +1,280 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_metadata_client.model.declarative_pdm import DeclarativePdm + + +class DataSourceLayoutControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __get_pdm_layout( + self, + data_source_id, + **kwargs + ): + """Get data source physical model layout # noqa: E501 + + Retrieve complete layout of tables with their columns # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pdm_layout(data_source_id, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativePdm + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['data_source_id'] = \ + data_source_id + return self.call_with_http_info(**kwargs) + + self.get_pdm_layout = _Endpoint( + settings={ + 'response_type': (DeclarativePdm,), + 'auth': [], + 'endpoint_path': '/api/layout/dataSources/{dataSourceId}/physicalModel', + 'operation_id': 'get_pdm_layout', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + ], + 'required': [ + 'data_source_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_pdm_layout + ) + + def __set_pdm_layout( + self, + data_source_id, + declarative_pdm, + **kwargs + ): + """Set data source physical model layout # noqa: E501 + + Sets complete layout of tables with their columns under corresponding Data Source. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.set_pdm_layout(data_source_id, declarative_pdm, async_req=True) + >>> result = thread.get() + + Args: + data_source_id (str): + declarative_pdm (DeclarativePdm): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['data_source_id'] = \ + data_source_id + kwargs['declarative_pdm'] = \ + declarative_pdm + return self.call_with_http_info(**kwargs) + + self.set_pdm_layout = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/dataSources/{dataSourceId}/physicalModel', + 'operation_id': 'set_pdm_layout', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'data_source_id', + 'declarative_pdm', + ], + 'required': [ + 'data_source_id', + 'declarative_pdm', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'data_source_id': + (str,), + 'declarative_pdm': + (DeclarativePdm,), + }, + 'attribute_map': { + 'data_source_id': 'dataSourceId', + }, + 'location_map': { + 'data_source_id': 'path', + 'declarative_pdm': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__set_pdm_layout + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/declarative_layout_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/declarative_layout_controller_api.py new file mode 100644 index 000000000..44431f022 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/declarative_layout_controller_api.py @@ -0,0 +1,2100 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_metadata_client.model.declarative_analytics import DeclarativeAnalytics +from gooddata_metadata_client.model.declarative_data_sources import DeclarativeDataSources +from gooddata_metadata_client.model.declarative_model import DeclarativeModel +from gooddata_metadata_client.model.declarative_organization import DeclarativeOrganization +from gooddata_metadata_client.model.declarative_user_groups import DeclarativeUserGroups +from gooddata_metadata_client.model.declarative_users import DeclarativeUsers +from gooddata_metadata_client.model.declarative_workspace_data_filters import DeclarativeWorkspaceDataFilters +from gooddata_metadata_client.model.declarative_workspace_model import DeclarativeWorkspaceModel +from gooddata_metadata_client.model.declarative_workspaces import DeclarativeWorkspaces + + +class DeclarativeLayoutControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __get_analytics_model( + self, + workspace_id, + **kwargs + ): + """Get analytics model # noqa: E501 + + Retrieve current analytics model of the workspace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_analytics_model(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeAnalytics + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_analytics_model = _Endpoint( + settings={ + 'response_type': (DeclarativeAnalytics,), + 'auth': [], + 'endpoint_path': '/api/layout/workspaces/{workspaceId}/analyticsModel', + 'operation_id': 'get_analytics_model', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + }, + 'location_map': { + 'workspace_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_analytics_model + ) + + def __get_data_sources_layout( + self, + **kwargs + ): + """Get all data sources # noqa: E501 + + Retrieve all data sources including related physical model. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_data_sources_layout(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeDataSources + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_data_sources_layout = _Endpoint( + settings={ + 'response_type': (DeclarativeDataSources,), + 'auth': [], + 'endpoint_path': '/api/layout/dataSources', + 'operation_id': 'get_data_sources_layout', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_data_sources_layout + ) + + def __get_logical_model( + self, + workspace_id, + **kwargs + ): + """Get logical model # noqa: E501 + + Retrieve current logical model of the workspace in declarative form. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_logical_model(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeModel + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_logical_model = _Endpoint( + settings={ + 'response_type': (DeclarativeModel,), + 'auth': [], + 'endpoint_path': '/api/layout/workspaces/{workspaceId}/logicalModel', + 'operation_id': 'get_logical_model', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + }, + 'location_map': { + 'workspace_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_logical_model + ) + + def __get_organization_layout( + self, + **kwargs + ): + """Get organization layout # noqa: E501 + + Retrieve complete layout of organization, workspaces, user-groups, etc. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_organization_layout(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeOrganization + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_organization_layout = _Endpoint( + settings={ + 'response_type': (DeclarativeOrganization,), + 'auth': [], + 'endpoint_path': '/api/layout/organization', + 'operation_id': 'get_organization_layout', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_organization_layout + ) + + def __get_user_groups_layout( + self, + **kwargs + ): + """Get all users # noqa: E501 + + Retrieve all user-groups eventually with parent group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_user_groups_layout(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeUserGroups + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_user_groups_layout = _Endpoint( + settings={ + 'response_type': (DeclarativeUserGroups,), + 'auth': [], + 'endpoint_path': '/api/layout/userGroups', + 'operation_id': 'get_user_groups_layout', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_user_groups_layout + ) + + def __get_users_layout( + self, + **kwargs + ): + """Get all users # noqa: E501 + + Retrieve all users including authentication properties. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_users_layout(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeUsers + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_users_layout = _Endpoint( + settings={ + 'response_type': (DeclarativeUsers,), + 'auth': [], + 'endpoint_path': '/api/layout/users', + 'operation_id': 'get_users_layout', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_users_layout + ) + + def __get_workspace_data_filters_layout( + self, + **kwargs + ): + """Get workspace data filters for all workspaces # noqa: E501 + + Retrieve all workspaces and related workspace data filters (and their settings / values). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_workspace_data_filters_layout(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeWorkspaceDataFilters + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_workspace_data_filters_layout = _Endpoint( + settings={ + 'response_type': (DeclarativeWorkspaceDataFilters,), + 'auth': [], + 'endpoint_path': '/api/layout/workspaceDataFilters', + 'operation_id': 'get_workspace_data_filters_layout', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_workspace_data_filters_layout + ) + + def __get_workspace_layout( + self, + workspace_id, + **kwargs + ): + """Get workspace layout # noqa: E501 + + Retrieve current model of the workspace in declarative form. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_workspace_layout(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeWorkspaceModel + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_workspace_layout = _Endpoint( + settings={ + 'response_type': (DeclarativeWorkspaceModel,), + 'auth': [], + 'endpoint_path': '/api/layout/workspaces/{workspaceId}', + 'operation_id': 'get_workspace_layout', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + }, + 'location_map': { + 'workspace_id': 'path', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_workspace_layout + ) + + def __get_workspaces_layout( + self, + **kwargs + ): + """Get all workspaces layout # noqa: E501 + + Gets complete layout of workspaces, their hierarchy, models. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_workspaces_layout(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + DeclarativeWorkspaces + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_workspaces_layout = _Endpoint( + settings={ + 'response_type': (DeclarativeWorkspaces,), + 'auth': [], + 'endpoint_path': '/api/layout/workspaces', + 'operation_id': 'get_workspaces_layout', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + '*/*' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_workspaces_layout + ) + + def __put_data_sources_layout( + self, + declarative_user_groups, + **kwargs + ): + """Put all data sources # noqa: E501 + + Set all data sources including related physical model. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.put_data_sources_layout(declarative_user_groups, async_req=True) + >>> result = thread.get() + + Args: + declarative_user_groups (DeclarativeUserGroups): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['declarative_user_groups'] = \ + declarative_user_groups + return self.call_with_http_info(**kwargs) + + self.put_data_sources_layout = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/userGroups', + 'operation_id': 'put_data_sources_layout', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'declarative_user_groups', + ], + 'required': [ + 'declarative_user_groups', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'declarative_user_groups': + (DeclarativeUserGroups,), + }, + 'attribute_map': { + }, + 'location_map': { + 'declarative_user_groups': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__put_data_sources_layout + ) + + def __put_data_sources_layout1( + self, + declarative_data_sources, + **kwargs + ): + """Put all data sources # noqa: E501 + + Set all data sources including related physical model. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.put_data_sources_layout1(declarative_data_sources, async_req=True) + >>> result = thread.get() + + Args: + declarative_data_sources (DeclarativeDataSources): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['declarative_data_sources'] = \ + declarative_data_sources + return self.call_with_http_info(**kwargs) + + self.put_data_sources_layout1 = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/dataSources', + 'operation_id': 'put_data_sources_layout1', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'declarative_data_sources', + ], + 'required': [ + 'declarative_data_sources', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'declarative_data_sources': + (DeclarativeDataSources,), + }, + 'attribute_map': { + }, + 'location_map': { + 'declarative_data_sources': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__put_data_sources_layout1 + ) + + def __put_users_layout( + self, + declarative_users, + **kwargs + ): + """Put all users # noqa: E501 + + Set all users and their authentication properties. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.put_users_layout(declarative_users, async_req=True) + >>> result = thread.get() + + Args: + declarative_users (DeclarativeUsers): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['declarative_users'] = \ + declarative_users + return self.call_with_http_info(**kwargs) + + self.put_users_layout = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/users', + 'operation_id': 'put_users_layout', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'declarative_users', + ], + 'required': [ + 'declarative_users', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'declarative_users': + (DeclarativeUsers,), + }, + 'attribute_map': { + }, + 'location_map': { + 'declarative_users': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__put_users_layout + ) + + def __put_workspace_layout( + self, + workspace_id, + declarative_workspace_model, + **kwargs + ): + """Set workspace layout # noqa: E501 + + Set complete layout of workspace, like model, ACLs, etc. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.put_workspace_layout(workspace_id, declarative_workspace_model, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + declarative_workspace_model (DeclarativeWorkspaceModel): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['declarative_workspace_model'] = \ + declarative_workspace_model + return self.call_with_http_info(**kwargs) + + self.put_workspace_layout = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/workspaces/{workspaceId}', + 'operation_id': 'put_workspace_layout', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'declarative_workspace_model', + ], + 'required': [ + 'workspace_id', + 'declarative_workspace_model', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'declarative_workspace_model': + (DeclarativeWorkspaceModel,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + }, + 'location_map': { + 'workspace_id': 'path', + 'declarative_workspace_model': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__put_workspace_layout + ) + + def __set_analytics_model( + self, + workspace_id, + declarative_analytics, + **kwargs + ): + """Set analytics model # noqa: E501 + + Set effective analytics model of the workspace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.set_analytics_model(workspace_id, declarative_analytics, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + declarative_analytics (DeclarativeAnalytics): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['declarative_analytics'] = \ + declarative_analytics + return self.call_with_http_info(**kwargs) + + self.set_analytics_model = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/workspaces/{workspaceId}/analyticsModel', + 'operation_id': 'set_analytics_model', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'declarative_analytics', + ], + 'required': [ + 'workspace_id', + 'declarative_analytics', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'declarative_analytics': + (DeclarativeAnalytics,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + }, + 'location_map': { + 'workspace_id': 'path', + 'declarative_analytics': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__set_analytics_model + ) + + def __set_logical_model( + self, + workspace_id, + declarative_model, + **kwargs + ): + """Set logical model # noqa: E501 + + Set effective logical model of the workspace. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.set_logical_model(workspace_id, declarative_model, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + declarative_model (DeclarativeModel): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['declarative_model'] = \ + declarative_model + return self.call_with_http_info(**kwargs) + + self.set_logical_model = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/workspaces/{workspaceId}/logicalModel', + 'operation_id': 'set_logical_model', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'declarative_model', + ], + 'required': [ + 'workspace_id', + 'declarative_model', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'declarative_model': + (DeclarativeModel,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + }, + 'location_map': { + 'workspace_id': 'path', + 'declarative_model': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__set_logical_model + ) + + def __set_organization_layout( + self, + declarative_organization, + **kwargs + ): + """Set organization layout # noqa: E501 + + Sets complete layout of organization, like workspaces, user-groups, etc. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.set_organization_layout(declarative_organization, async_req=True) + >>> result = thread.get() + + Args: + declarative_organization (DeclarativeOrganization): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['declarative_organization'] = \ + declarative_organization + return self.call_with_http_info(**kwargs) + + self.set_organization_layout = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/organization', + 'operation_id': 'set_organization_layout', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'declarative_organization', + ], + 'required': [ + 'declarative_organization', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'declarative_organization': + (DeclarativeOrganization,), + }, + 'attribute_map': { + }, + 'location_map': { + 'declarative_organization': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__set_organization_layout + ) + + def __set_workspace_data_filters_layout( + self, + declarative_workspace_data_filters, + **kwargs + ): + """Set all workspace data filters # noqa: E501 + + Sets workspace data filters in all workspaces in entire organization. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.set_workspace_data_filters_layout(declarative_workspace_data_filters, async_req=True) + >>> result = thread.get() + + Args: + declarative_workspace_data_filters (DeclarativeWorkspaceDataFilters): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['declarative_workspace_data_filters'] = \ + declarative_workspace_data_filters + return self.call_with_http_info(**kwargs) + + self.set_workspace_data_filters_layout = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/workspaceDataFilters', + 'operation_id': 'set_workspace_data_filters_layout', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'declarative_workspace_data_filters', + ], + 'required': [ + 'declarative_workspace_data_filters', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'declarative_workspace_data_filters': + (DeclarativeWorkspaceDataFilters,), + }, + 'attribute_map': { + }, + 'location_map': { + 'declarative_workspace_data_filters': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__set_workspace_data_filters_layout + ) + + def __set_workspaces_layout( + self, + declarative_workspaces, + **kwargs + ): + """Set all workspaces layout # noqa: E501 + + Sets complete layout of workspaces, their hierarchy, models. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.set_workspaces_layout(declarative_workspaces, async_req=True) + >>> result = thread.get() + + Args: + declarative_workspaces (DeclarativeWorkspaces): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['declarative_workspaces'] = \ + declarative_workspaces + return self.call_with_http_info(**kwargs) + + self.set_workspaces_layout = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/layout/workspaces', + 'operation_id': 'set_workspaces_layout', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'declarative_workspaces', + ], + 'required': [ + 'declarative_workspaces', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'declarative_workspaces': + (DeclarativeWorkspaces,), + }, + 'attribute_map': { + }, + 'location_map': { + 'declarative_workspaces': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + callable=__set_workspaces_layout + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/options_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/options_controller_api.py new file mode 100644 index 000000000..72e2e9ae8 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/options_controller_api.py @@ -0,0 +1,246 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) + + +class OptionsControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __get_all_options( + self, + **kwargs + ): + """Links for all configuration options # noqa: E501 + + Retrieves links for all options for different configurations. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_options(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_all_options = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/options', + 'operation_id': 'get_all_options', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_options + ) + + def __get_data_source_drivers( + self, + **kwargs + ): + """Get all available data source drivers # noqa: E501 + + Retrieves a list of all supported data sources along with information about the used drivers. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_data_source_drivers(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_data_source_drivers = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/options/availableDrivers', + 'operation_id': 'get_data_source_drivers', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_data_source_drivers + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/organization_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/organization_controller_api.py new file mode 100644 index 000000000..f46b05d57 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/organization_controller_api.py @@ -0,0 +1,634 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_metadata_client.model.json_api_cookie_security_configuration_in_document import JsonApiCookieSecurityConfigurationInDocument +from gooddata_metadata_client.model.json_api_cookie_security_configuration_out_document import JsonApiCookieSecurityConfigurationOutDocument +from gooddata_metadata_client.model.json_api_organization_in_document import JsonApiOrganizationInDocument +from gooddata_metadata_client.model.json_api_organization_out_document import JsonApiOrganizationOutDocument + + +class OrganizationControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __get_entity_cookie_security_configurations( + self, + id, + **kwargs + ): + """get_entity_cookie_security_configurations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_cookie_security_configurations(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiCookieSecurityConfigurationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.get_entity_cookie_security_configurations = _Endpoint( + settings={ + 'response_type': (JsonApiCookieSecurityConfigurationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/admin/cookieSecurityConfigurations/{id}', + 'operation_id': 'get_entity_cookie_security_configurations', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_cookie_security_configurations + ) + + def __get_entity_organizations( + self, + id, + **kwargs + ): + """get_entity_organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_organizations(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiOrganizationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.get_entity_organizations = _Endpoint( + settings={ + 'response_type': (JsonApiOrganizationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/admin/organizations/{id}', + 'operation_id': 'get_entity_organizations', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "BOOTSTRAPUSER": "bootstrapUser", + "BOOTSTRAPUSERGROUP": "bootstrapUserGroup", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_organizations + ) + + def __update_entity_cookie_security_configurations( + self, + id, + json_api_cookie_security_configuration_in_document, + **kwargs + ): + """update_entity_cookie_security_configurations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_cookie_security_configurations(id, json_api_cookie_security_configuration_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_cookie_security_configuration_in_document (JsonApiCookieSecurityConfigurationInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiCookieSecurityConfigurationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['json_api_cookie_security_configuration_in_document'] = \ + json_api_cookie_security_configuration_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_cookie_security_configurations = _Endpoint( + settings={ + 'response_type': (JsonApiCookieSecurityConfigurationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/admin/cookieSecurityConfigurations/{id}', + 'operation_id': 'update_entity_cookie_security_configurations', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_cookie_security_configuration_in_document', + 'predicate', + 'filter', + ], + 'required': [ + 'id', + 'json_api_cookie_security_configuration_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_cookie_security_configuration_in_document': + (JsonApiCookieSecurityConfigurationInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_cookie_security_configuration_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_cookie_security_configurations + ) + + def __update_entity_organizations( + self, + id, + json_api_organization_in_document, + **kwargs + ): + """update_entity_organizations # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_organizations(id, json_api_organization_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_organization_in_document (JsonApiOrganizationInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiOrganizationOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['json_api_organization_in_document'] = \ + json_api_organization_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_organizations = _Endpoint( + settings={ + 'response_type': (JsonApiOrganizationOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/admin/organizations/{id}', + 'operation_id': 'update_entity_organizations', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_organization_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'id', + 'json_api_organization_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "BOOTSTRAPUSER": "bootstrapUser", + "BOOTSTRAPUSERGROUP": "bootstrapUserGroup", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_organization_in_document': + (JsonApiOrganizationInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'json_api_organization_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_organizations + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/organization_model_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/organization_model_controller_api.py new file mode 100644 index 000000000..2a09bc307 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/organization_model_controller_api.py @@ -0,0 +1,3659 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_metadata_client.model.json_api_aclin_document import JsonApiACLInDocument +from gooddata_metadata_client.model.json_api_acl_out_document import JsonApiACLOutDocument +from gooddata_metadata_client.model.json_api_acl_out_list import JsonApiACLOutList +from gooddata_metadata_client.model.json_api_data_source_in_document import JsonApiDataSourceInDocument +from gooddata_metadata_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from gooddata_metadata_client.model.json_api_data_source_out_list import JsonApiDataSourceOutList +from gooddata_metadata_client.model.json_api_user_group_in_document import JsonApiUserGroupInDocument +from gooddata_metadata_client.model.json_api_user_group_out_document import JsonApiUserGroupOutDocument +from gooddata_metadata_client.model.json_api_user_group_out_list import JsonApiUserGroupOutList +from gooddata_metadata_client.model.json_api_user_in_document import JsonApiUserInDocument +from gooddata_metadata_client.model.json_api_user_out_document import JsonApiUserOutDocument +from gooddata_metadata_client.model.json_api_user_out_list import JsonApiUserOutList +from gooddata_metadata_client.model.json_api_workspace_in_document import JsonApiWorkspaceInDocument +from gooddata_metadata_client.model.json_api_workspace_out_document import JsonApiWorkspaceOutDocument +from gooddata_metadata_client.model.json_api_workspace_out_list import JsonApiWorkspaceOutList + + +class OrganizationModelControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __create_entity_acls( + self, + json_api_aclin_document, + **kwargs + ): + """create_entity_acls # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_acls(json_api_aclin_document, async_req=True) + >>> result = thread.get() + + Args: + json_api_aclin_document (JsonApiACLInDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiACLOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['json_api_aclin_document'] = \ + json_api_aclin_document + return self.call_with_http_info(**kwargs) + + self.create_entity_acls = _Endpoint( + settings={ + 'response_type': (JsonApiACLOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/acls', + 'operation_id': 'create_entity_acls', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'json_api_aclin_document', + 'include', + ], + 'required': [ + 'json_api_aclin_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "SUBJECTS": "subjects", + "OBJECTS": "objects", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'json_api_aclin_document': + (JsonApiACLInDocument,), + 'include': + ([str],), + }, + 'attribute_map': { + 'include': 'include', + }, + 'location_map': { + 'json_api_aclin_document': 'body', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_acls + ) + + def __create_entity_data_sources( + self, + json_api_data_source_in_document, + **kwargs + ): + """create_entity_data_sources # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_data_sources(json_api_data_source_in_document, async_req=True) + >>> result = thread.get() + + Args: + json_api_data_source_in_document (JsonApiDataSourceInDocument): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['json_api_data_source_in_document'] = \ + json_api_data_source_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_data_sources = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/dataSources', + 'operation_id': 'create_entity_data_sources', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'json_api_data_source_in_document', + ], + 'required': [ + 'json_api_data_source_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'json_api_data_source_in_document': + (JsonApiDataSourceInDocument,), + }, + 'attribute_map': { + }, + 'location_map': { + 'json_api_data_source_in_document': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_data_sources + ) + + def __create_entity_user_groups( + self, + json_api_user_group_in_document, + **kwargs + ): + """create_entity_user_groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_user_groups(json_api_user_group_in_document, async_req=True) + >>> result = thread.get() + + Args: + json_api_user_group_in_document (JsonApiUserGroupInDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserGroupOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['json_api_user_group_in_document'] = \ + json_api_user_group_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_user_groups = _Endpoint( + settings={ + 'response_type': (JsonApiUserGroupOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/userGroups', + 'operation_id': 'create_entity_user_groups', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'json_api_user_group_in_document', + 'include', + ], + 'required': [ + 'json_api_user_group_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERGROUPS": "userGroups", + "ACLS": "acls", + "PARENTS": "parents", + "OBJECTOFACLS": "objectOfACLs", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'json_api_user_group_in_document': + (JsonApiUserGroupInDocument,), + 'include': + ([str],), + }, + 'attribute_map': { + 'include': 'include', + }, + 'location_map': { + 'json_api_user_group_in_document': 'body', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_user_groups + ) + + def __create_entity_users( + self, + json_api_user_in_document, + **kwargs + ): + """create_entity_users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_users(json_api_user_in_document, async_req=True) + >>> result = thread.get() + + Args: + json_api_user_in_document (JsonApiUserInDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['json_api_user_in_document'] = \ + json_api_user_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_users = _Endpoint( + settings={ + 'response_type': (JsonApiUserOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/users', + 'operation_id': 'create_entity_users', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'json_api_user_in_document', + 'include', + ], + 'required': [ + 'json_api_user_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERGROUPS": "userGroups", + "ACLS": "acls", + "SUBJECTOFACLS": "subjectOfACLs", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'json_api_user_in_document': + (JsonApiUserInDocument,), + 'include': + ([str],), + }, + 'attribute_map': { + 'include': 'include', + }, + 'location_map': { + 'json_api_user_in_document': 'body', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_users + ) + + def __create_entity_workspaces( + self, + json_api_workspace_in_document, + **kwargs + ): + """create_entity_workspaces # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_workspaces(json_api_workspace_in_document, async_req=True) + >>> result = thread.get() + + Args: + json_api_workspace_in_document (JsonApiWorkspaceInDocument): + + Keyword Args: + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['json_api_workspace_in_document'] = \ + json_api_workspace_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_workspaces = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces', + 'operation_id': 'create_entity_workspaces', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'json_api_workspace_in_document', + 'include', + ], + 'required': [ + 'json_api_workspace_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACES": "workspaces", + "PARENT": "parent", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'json_api_workspace_in_document': + (JsonApiWorkspaceInDocument,), + 'include': + ([str],), + }, + 'attribute_map': { + 'include': 'include', + }, + 'location_map': { + 'json_api_workspace_in_document': 'body', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_workspaces + ) + + def __delete_entity_acls( + self, + id, + **kwargs + ): + """delete_entity_acls # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_acls(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.delete_entity_acls = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/acls/{id}', + 'operation_id': 'delete_entity_acls', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_acls + ) + + def __delete_entity_data_sources( + self, + id, + **kwargs + ): + """delete_entity_data_sources # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_data_sources(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.delete_entity_data_sources = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/dataSources/{id}', + 'operation_id': 'delete_entity_data_sources', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_data_sources + ) + + def __delete_entity_user_groups( + self, + id, + **kwargs + ): + """delete_entity_user_groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_user_groups(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.delete_entity_user_groups = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/userGroups/{id}', + 'operation_id': 'delete_entity_user_groups', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_user_groups + ) + + def __delete_entity_users( + self, + id, + **kwargs + ): + """delete_entity_users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_users(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.delete_entity_users = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/users/{id}', + 'operation_id': 'delete_entity_users', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_users + ) + + def __delete_entity_workspaces( + self, + id, + **kwargs + ): + """delete_entity_workspaces # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_workspaces(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.delete_entity_workspaces = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{id}', + 'operation_id': 'delete_entity_workspaces', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_workspaces + ) + + def __get_all_entities_acls( + self, + **kwargs + ): + """get_all_entities_acls # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_acls(async_req=True) + >>> result = thread.get() + + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiACLOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_all_entities_acls = _Endpoint( + settings={ + 'response_type': (JsonApiACLOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/acls', + 'operation_id': 'get_all_entities_acls', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "SUBJECTS": "subjects", + "OBJECTS": "objects", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + }, + 'attribute_map': { + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + }, + 'location_map': { + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_acls + ) + + def __get_all_entities_data_sources( + self, + **kwargs + ): + """get_all_entities_data_sources # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_data_sources(async_req=True) + >>> result = thread.get() + + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_all_entities_data_sources = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/dataSources', + 'operation_id': 'get_all_entities_data_sources', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'predicate', + 'filter', + 'page', + 'size', + 'sort', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + }, + 'attribute_map': { + 'predicate': 'predicate', + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + }, + 'location_map': { + 'predicate': 'query', + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_data_sources + ) + + def __get_all_entities_user_groups( + self, + **kwargs + ): + """get_all_entities_user_groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_user_groups(async_req=True) + >>> result = thread.get() + + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserGroupOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_all_entities_user_groups = _Endpoint( + settings={ + 'response_type': (JsonApiUserGroupOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/userGroups', + 'operation_id': 'get_all_entities_user_groups', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERGROUPS": "userGroups", + "ACLS": "acls", + "PARENTS": "parents", + "OBJECTOFACLS": "objectOfACLs", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + }, + 'attribute_map': { + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + }, + 'location_map': { + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_user_groups + ) + + def __get_all_entities_users( + self, + **kwargs + ): + """get_all_entities_users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_users(async_req=True) + >>> result = thread.get() + + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_all_entities_users = _Endpoint( + settings={ + 'response_type': (JsonApiUserOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/users', + 'operation_id': 'get_all_entities_users', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "USERGROUPS": "userGroups", + "ACLS": "acls", + "SUBJECTOFACLS": "subjectOfACLs", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + }, + 'attribute_map': { + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + }, + 'location_map': { + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_users + ) + + def __get_all_entities_workspaces( + self, + **kwargs + ): + """get_all_entities_workspaces # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_workspaces(async_req=True) + >>> result = thread.get() + + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_all_entities_workspaces = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces', + 'operation_id': 'get_all_entities_workspaces', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'meta_include', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "WORKSPACES": "workspaces", + "PARENT": "parent", + "ALL": "ALL" + }, + ('meta_include',): { + + "CONFIG": "config", + "ALL": "all" + }, + }, + 'openapi_types': { + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_workspaces + ) + + def __get_entity_acls( + self, + id, + **kwargs + ): + """get_entity_acls # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_acls(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiACLOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.get_entity_acls = _Endpoint( + settings={ + 'response_type': (JsonApiACLOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/acls/{id}', + 'operation_id': 'get_entity_acls', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "SUBJECTS": "subjects", + "OBJECTS": "objects", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_acls + ) + + def __get_entity_data_sources( + self, + id, + **kwargs + ): + """get_entity_data_sources # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_data_sources(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.get_entity_data_sources = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/dataSources/{id}', + 'operation_id': 'get_entity_data_sources', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_data_sources + ) + + def __get_entity_user_groups( + self, + id, + **kwargs + ): + """get_entity_user_groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_user_groups(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserGroupOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.get_entity_user_groups = _Endpoint( + settings={ + 'response_type': (JsonApiUserGroupOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/userGroups/{id}', + 'operation_id': 'get_entity_user_groups', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERGROUPS": "userGroups", + "ACLS": "acls", + "PARENTS": "parents", + "OBJECTOFACLS": "objectOfACLs", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_user_groups + ) + + def __get_entity_users( + self, + id, + **kwargs + ): + """get_entity_users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_users(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.get_entity_users = _Endpoint( + settings={ + 'response_type': (JsonApiUserOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/users/{id}', + 'operation_id': 'get_entity_users', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERGROUPS": "userGroups", + "ACLS": "acls", + "SUBJECTOFACLS": "subjectOfACLs", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_users + ) + + def __get_entity_workspaces( + self, + id, + **kwargs + ): + """get_entity_workspaces # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_workspaces(id, async_req=True) + >>> result = thread.get() + + Args: + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + meta_include ([str]): Include Meta objects.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.get_entity_workspaces = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{id}', + 'operation_id': 'get_entity_workspaces', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'predicate', + 'filter', + 'include', + 'meta_include', + ], + 'required': [ + 'id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + 'meta_include', + ], + 'validation': [ + 'id', + 'meta_include', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + ('meta_include',): { + + }, + }, + 'allowed_values': { + ('include',): { + + "WORKSPACES": "workspaces", + "PARENT": "parent", + "ALL": "ALL" + }, + ('meta_include',): { + + "CONFIG": "config", + "ALL": "all" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'meta_include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'meta_include': 'metaInclude', + }, + 'location_map': { + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'meta_include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + 'meta_include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_workspaces + ) + + def __update_entity_acls( + self, + id, + json_api_aclin_document, + **kwargs + ): + """update_entity_acls # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_acls(id, json_api_aclin_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_aclin_document (JsonApiACLInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiACLOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['json_api_aclin_document'] = \ + json_api_aclin_document + return self.call_with_http_info(**kwargs) + + self.update_entity_acls = _Endpoint( + settings={ + 'response_type': (JsonApiACLOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/acls/{id}', + 'operation_id': 'update_entity_acls', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_aclin_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'id', + 'json_api_aclin_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERS": "users", + "USERGROUPS": "userGroups", + "SUBJECTS": "subjects", + "OBJECTS": "objects", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_aclin_document': + (JsonApiACLInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'json_api_aclin_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_acls + ) + + def __update_entity_data_sources( + self, + id, + json_api_data_source_in_document, + **kwargs + ): + """update_entity_data_sources # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_data_sources(id, json_api_data_source_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_data_source_in_document (JsonApiDataSourceInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiDataSourceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['json_api_data_source_in_document'] = \ + json_api_data_source_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_data_sources = _Endpoint( + settings={ + 'response_type': (JsonApiDataSourceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/dataSources/{id}', + 'operation_id': 'update_entity_data_sources', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_data_source_in_document', + 'predicate', + 'filter', + ], + 'required': [ + 'id', + 'json_api_data_source_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_data_source_in_document': + (JsonApiDataSourceInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'id': 'path', + 'json_api_data_source_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_data_sources + ) + + def __update_entity_user_groups( + self, + id, + json_api_user_group_in_document, + **kwargs + ): + """update_entity_user_groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_user_groups(id, json_api_user_group_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_user_group_in_document (JsonApiUserGroupInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserGroupOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['json_api_user_group_in_document'] = \ + json_api_user_group_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_user_groups = _Endpoint( + settings={ + 'response_type': (JsonApiUserGroupOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/userGroups/{id}', + 'operation_id': 'update_entity_user_groups', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_user_group_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'id', + 'json_api_user_group_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERGROUPS": "userGroups", + "ACLS": "acls", + "PARENTS": "parents", + "OBJECTOFACLS": "objectOfACLs", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_user_group_in_document': + (JsonApiUserGroupInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'json_api_user_group_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_user_groups + ) + + def __update_entity_users( + self, + id, + json_api_user_in_document, + **kwargs + ): + """update_entity_users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_users(id, json_api_user_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_user_in_document (JsonApiUserInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiUserOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['json_api_user_in_document'] = \ + json_api_user_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_users = _Endpoint( + settings={ + 'response_type': (JsonApiUserOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/users/{id}', + 'operation_id': 'update_entity_users', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_user_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'id', + 'json_api_user_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "USERGROUPS": "userGroups", + "ACLS": "acls", + "SUBJECTOFACLS": "subjectOfACLs", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_user_in_document': + (JsonApiUserInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'json_api_user_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_users + ) + + def __update_entity_workspaces( + self, + id, + json_api_workspace_in_document, + **kwargs + ): + """update_entity_workspaces # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_workspaces(id, json_api_workspace_in_document, async_req=True) + >>> result = thread.get() + + Args: + id (str): + json_api_workspace_in_document (JsonApiWorkspaceInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id + kwargs['json_api_workspace_in_document'] = \ + json_api_workspace_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_workspaces = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{id}', + 'operation_id': 'update_entity_workspaces', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'id', + 'json_api_workspace_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'id', + 'json_api_workspace_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + ('include',): { + + "WORKSPACES": "workspaces", + "PARENT": "parent", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'id': + (str,), + 'json_api_workspace_in_document': + (JsonApiWorkspaceInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'id': 'path', + 'json_api_workspace_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_workspaces + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/organization_redirect_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/organization_redirect_controller_api.py new file mode 100644 index 000000000..93ae21fbf --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/organization_redirect_controller_api.py @@ -0,0 +1,139 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) + + +class OrganizationRedirectControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __get_organization( + self, + **kwargs + ): + """Get current organization info # noqa: E501 + + Gets a basic information about organization. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_organization(async_req=True) + >>> result = thread.get() + + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + return self.call_with_http_info(**kwargs) + + self.get_organization = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/organization', + 'operation_id': 'get_organization', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__get_organization + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/user_model_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/user_model_controller_api.py new file mode 100644 index 000000000..930fd7a06 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/user_model_controller_api.py @@ -0,0 +1,601 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_metadata_client.model.json_api_api_token_in_document import JsonApiApiTokenInDocument +from gooddata_metadata_client.model.json_api_api_token_out_document import JsonApiApiTokenOutDocument +from gooddata_metadata_client.model.json_api_api_token_out_list import JsonApiApiTokenOutList + + +class UserModelControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __create_entity_api_tokens( + self, + user_id, + json_api_api_token_in_document, + **kwargs + ): + """create_entity_api_tokens # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_api_tokens(user_id, json_api_api_token_in_document, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + json_api_api_token_in_document (JsonApiApiTokenInDocument): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiApiTokenOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + kwargs['json_api_api_token_in_document'] = \ + json_api_api_token_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_api_tokens = _Endpoint( + settings={ + 'response_type': (JsonApiApiTokenOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/users/{userId}/apiTokens', + 'operation_id': 'create_entity_api_tokens', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'json_api_api_token_in_document', + ], + 'required': [ + 'user_id', + 'json_api_api_token_in_document', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'json_api_api_token_in_document': + (JsonApiApiTokenInDocument,), + }, + 'attribute_map': { + 'user_id': 'userId', + }, + 'location_map': { + 'user_id': 'path', + 'json_api_api_token_in_document': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_api_tokens + ) + + def __delete_entity_api_tokens( + self, + user_id, + id, + **kwargs + ): + """delete_entity_api_tokens # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_api_tokens(user_id, id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.delete_entity_api_tokens = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/users/{userId}/apiTokens/{id}', + 'operation_id': 'delete_entity_api_tokens', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'user_id', + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'user_id': 'path', + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_api_tokens + ) + + def __get_all_entities_api_tokens( + self, + user_id, + **kwargs + ): + """get_all_entities_api_tokens # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_api_tokens(user_id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiApiTokenOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_api_tokens = _Endpoint( + settings={ + 'response_type': (JsonApiApiTokenOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/users/{userId}/apiTokens', + 'operation_id': 'get_all_entities_api_tokens', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'predicate', + 'filter', + 'page', + 'size', + 'sort', + ], + 'required': [ + 'user_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + }, + 'attribute_map': { + 'user_id': 'userId', + 'predicate': 'predicate', + 'filter': 'filter', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + }, + 'location_map': { + 'user_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + }, + 'collection_format_map': { + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_api_tokens + ) + + def __get_entity_api_tokens( + self, + user_id, + id, + **kwargs + ): + """get_entity_api_tokens # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_api_tokens(user_id, id, async_req=True) + >>> result = thread.get() + + Args: + user_id (str): + id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiApiTokenOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['user_id'] = \ + user_id + kwargs['id'] = \ + id + return self.call_with_http_info(**kwargs) + + self.get_entity_api_tokens = _Endpoint( + settings={ + 'response_type': (JsonApiApiTokenOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/users/{userId}/apiTokens/{id}', + 'operation_id': 'get_entity_api_tokens', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'user_id', + 'id', + 'predicate', + 'filter', + ], + 'required': [ + 'user_id', + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + 'id', + ] + }, + root_map={ + 'validations': { + ('id',): { + + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + }, + 'allowed_values': { + }, + 'openapi_types': { + 'user_id': + (str,), + 'id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'user_id': 'userId', + 'id': 'id', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'user_id': 'path', + 'id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_api_tokens + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api/workspace_object_controller_api.py b/gooddata-metadata-client/gooddata_metadata_client/api/workspace_object_controller_api.py new file mode 100644 index 000000000..f11a8ce28 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api/workspace_object_controller_api.py @@ -0,0 +1,5617 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_client.api_client import ApiClient, Endpoint as _Endpoint +from gooddata_metadata_client.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from gooddata_metadata_client.model.json_api_analytical_dashboard_in_document import JsonApiAnalyticalDashboardInDocument +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_list import JsonApiAnalyticalDashboardOutList +from gooddata_metadata_client.model.json_api_attribute_out_document import JsonApiAttributeOutDocument +from gooddata_metadata_client.model.json_api_attribute_out_list import JsonApiAttributeOutList +from gooddata_metadata_client.model.json_api_dataset_out_document import JsonApiDatasetOutDocument +from gooddata_metadata_client.model.json_api_dataset_out_list import JsonApiDatasetOutList +from gooddata_metadata_client.model.json_api_fact_out_document import JsonApiFactOutDocument +from gooddata_metadata_client.model.json_api_fact_out_list import JsonApiFactOutList +from gooddata_metadata_client.model.json_api_filter_context_in_document import JsonApiFilterContextInDocument +from gooddata_metadata_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from gooddata_metadata_client.model.json_api_filter_context_out_list import JsonApiFilterContextOutList +from gooddata_metadata_client.model.json_api_label_out_document import JsonApiLabelOutDocument +from gooddata_metadata_client.model.json_api_label_out_list import JsonApiLabelOutList +from gooddata_metadata_client.model.json_api_metric_in_document import JsonApiMetricInDocument +from gooddata_metadata_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from gooddata_metadata_client.model.json_api_metric_out_list import JsonApiMetricOutList +from gooddata_metadata_client.model.json_api_visualization_object_in_document import JsonApiVisualizationObjectInDocument +from gooddata_metadata_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from gooddata_metadata_client.model.json_api_visualization_object_out_list import JsonApiVisualizationObjectOutList +from gooddata_metadata_client.model.json_api_workspace_data_filter_in_document import JsonApiWorkspaceDataFilterInDocument +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_list import JsonApiWorkspaceDataFilterOutList +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_document import JsonApiWorkspaceDataFilterSettingOutDocument +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_list import JsonApiWorkspaceDataFilterSettingOutList + + +class WorkspaceObjectControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __create_entity_analytical_dashboards( + self, + workspace_id, + json_api_analytical_dashboard_in_document, + **kwargs + ): + """create_entity_analytical_dashboards # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_analytical_dashboards(workspace_id, json_api_analytical_dashboard_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_analytical_dashboard_in_document (JsonApiAnalyticalDashboardInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_analytical_dashboard_in_document'] = \ + json_api_analytical_dashboard_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_analytical_dashboards = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/analyticalDashboards', + 'operation_id': 'create_entity_analytical_dashboards', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_analytical_dashboard_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'json_api_analytical_dashboard_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "FILTERCONTEXTS": "filterContexts", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_analytical_dashboard_in_document': + (JsonApiAnalyticalDashboardInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_analytical_dashboard_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_analytical_dashboards + ) + + def __create_entity_filter_contexts( + self, + workspace_id, + json_api_filter_context_in_document, + **kwargs + ): + """create_entity_filter_contexts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_filter_contexts(workspace_id, json_api_filter_context_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_filter_context_in_document (JsonApiFilterContextInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_filter_context_in_document'] = \ + json_api_filter_context_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_filter_contexts = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/filterContexts', + 'operation_id': 'create_entity_filter_contexts', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_filter_context_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'json_api_filter_context_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "DATASETS": "datasets", + "LABELS": "labels", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_filter_context_in_document': + (JsonApiFilterContextInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_filter_context_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_filter_contexts + ) + + def __create_entity_metrics( + self, + workspace_id, + json_api_metric_in_document, + **kwargs + ): + """create_entity_metrics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_metrics(workspace_id, json_api_metric_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_metric_in_document (JsonApiMetricInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_metric_in_document'] = \ + json_api_metric_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_metrics = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/metrics', + 'operation_id': 'create_entity_metrics', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_metric_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'json_api_metric_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_metric_in_document': + (JsonApiMetricInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_metric_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_metrics + ) + + def __create_entity_visualization_objects( + self, + workspace_id, + json_api_visualization_object_in_document, + **kwargs + ): + """create_entity_visualization_objects # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_visualization_objects(workspace_id, json_api_visualization_object_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_visualization_object_in_document (JsonApiVisualizationObjectInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_visualization_object_in_document'] = \ + json_api_visualization_object_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_visualization_objects = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/visualizationObjects', + 'operation_id': 'create_entity_visualization_objects', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_visualization_object_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'json_api_visualization_object_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_visualization_object_in_document': + (JsonApiVisualizationObjectInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_visualization_object_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_visualization_objects + ) + + def __create_entity_workspace_data_filters( + self, + workspace_id, + json_api_workspace_data_filter_in_document, + **kwargs + ): + """create_entity_workspace_data_filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_entity_workspace_data_filters(workspace_id, json_api_workspace_data_filter_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + json_api_workspace_data_filter_in_document (JsonApiWorkspaceDataFilterInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['json_api_workspace_data_filter_in_document'] = \ + json_api_workspace_data_filter_in_document + return self.call_with_http_info(**kwargs) + + self.create_entity_workspace_data_filters = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/workspaceDataFilters', + 'operation_id': 'create_entity_workspace_data_filters', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'json_api_workspace_data_filter_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'json_api_workspace_data_filter_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERSETTINGS": "workspaceDataFilterSettings", + "FILTERSETTINGS": "filterSettings", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'json_api_workspace_data_filter_in_document': + (JsonApiWorkspaceDataFilterInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'json_api_workspace_data_filter_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__create_entity_workspace_data_filters + ) + + def __delete_entity_analytical_dashboards( + self, + workspace_id, + object_id, + **kwargs + ): + """delete_entity_analytical_dashboards # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_analytical_dashboards(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.delete_entity_analytical_dashboards = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId}', + 'operation_id': 'delete_entity_analytical_dashboards', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_analytical_dashboards + ) + + def __delete_entity_filter_contexts( + self, + workspace_id, + object_id, + **kwargs + ): + """delete_entity_filter_contexts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_filter_contexts(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.delete_entity_filter_contexts = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/filterContexts/{objectId}', + 'operation_id': 'delete_entity_filter_contexts', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_filter_contexts + ) + + def __delete_entity_metrics( + self, + workspace_id, + object_id, + **kwargs + ): + """delete_entity_metrics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_metrics(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.delete_entity_metrics = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/metrics/{objectId}', + 'operation_id': 'delete_entity_metrics', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_metrics + ) + + def __delete_entity_visualization_objects( + self, + workspace_id, + object_id, + **kwargs + ): + """delete_entity_visualization_objects # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_visualization_objects(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.delete_entity_visualization_objects = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/visualizationObjects/{objectId}', + 'operation_id': 'delete_entity_visualization_objects', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_visualization_objects + ) + + def __delete_entity_workspace_data_filters( + self, + workspace_id, + object_id, + **kwargs + ): + """delete_entity_workspace_data_filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_entity_workspace_data_filters(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.delete_entity_workspace_data_filters = _Endpoint( + settings={ + 'response_type': None, + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId}', + 'operation_id': 'delete_entity_workspace_data_filters', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [], + 'content_type': [], + }, + api_client=api_client, + callable=__delete_entity_workspace_data_filters + ) + + def __get_all_entities_analytical_dashboards( + self, + workspace_id, + **kwargs + ): + """get_all_entities_analytical_dashboards # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_analytical_dashboards(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_analytical_dashboards = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/analyticalDashboards', + 'operation_id': 'get_all_entities_analytical_dashboards', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "FILTERCONTEXTS": "filterContexts", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_analytical_dashboards + ) + + def __get_all_entities_attributes( + self, + workspace_id, + **kwargs + ): + """get_all_entities_attributes # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_attributes(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_attributes = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/attributes', + 'operation_id': 'get_all_entities_attributes', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "DATASETS": "datasets", + "LABELS": "labels", + "DATASET": "dataset", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_attributes + ) + + def __get_all_entities_datasets( + self, + workspace_id, + **kwargs + ): + """get_all_entities_datasets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_datasets(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiDatasetOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_datasets = _Endpoint( + settings={ + 'response_type': (JsonApiDatasetOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/datasets', + 'operation_id': 'get_all_entities_datasets', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "FACTS": "facts", + "DATASETS": "datasets", + "REFERENCES": "references", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_datasets + ) + + def __get_all_entities_facts( + self, + workspace_id, + **kwargs + ): + """get_all_entities_facts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_facts(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiFactOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_facts = _Endpoint( + settings={ + 'response_type': (JsonApiFactOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/facts', + 'operation_id': 'get_all_entities_facts', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "DATASETS": "datasets", + "DATASET": "dataset", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_facts + ) + + def __get_all_entities_filter_contexts( + self, + workspace_id, + **kwargs + ): + """get_all_entities_filter_contexts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_filter_contexts(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_filter_contexts = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/filterContexts', + 'operation_id': 'get_all_entities_filter_contexts', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "DATASETS": "datasets", + "LABELS": "labels", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_filter_contexts + ) + + def __get_all_entities_labels( + self, + workspace_id, + **kwargs + ): + """get_all_entities_labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_labels(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiLabelOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_labels = _Endpoint( + settings={ + 'response_type': (JsonApiLabelOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/labels', + 'operation_id': 'get_all_entities_labels', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "ATTRIBUTE": "attribute", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_labels + ) + + def __get_all_entities_metrics( + self, + workspace_id, + **kwargs + ): + """get_all_entities_metrics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_metrics(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_metrics = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/metrics', + 'operation_id': 'get_all_entities_metrics', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_metrics + ) + + def __get_all_entities_visualization_objects( + self, + workspace_id, + **kwargs + ): + """get_all_entities_visualization_objects # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_visualization_objects(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_visualization_objects = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/visualizationObjects', + 'operation_id': 'get_all_entities_visualization_objects', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_visualization_objects + ) + + def __get_all_entities_workspace_data_filter_settings( + self, + workspace_id, + **kwargs + ): + """get_all_entities_workspace_data_filter_settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_workspace_data_filter_settings(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterSettingOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_workspace_data_filter_settings = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterSettingOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/workspaceDataFilterSettings', + 'operation_id': 'get_all_entities_workspace_data_filter_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "WORKSPACEDATAFILTER": "workspaceDataFilter", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_workspace_data_filter_settings + ) + + def __get_all_entities_workspace_data_filters( + self, + workspace_id, + **kwargs + ): + """get_all_entities_workspace_data_filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_entities_workspace_data_filters(workspace_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + page (int): Zero-based page index (0..N). [optional] if omitted the server will use the default value of 0 + size (int): The size of the page to be returned. [optional] if omitted the server will use the default value of 20 + sort ([str]): Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutList + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + return self.call_with_http_info(**kwargs) + + self.get_all_entities_workspace_data_filters = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutList,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/workspaceDataFilters', + 'operation_id': 'get_all_entities_workspace_data_filters', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'predicate', + 'filter', + 'include', + 'page', + 'size', + 'sort', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERSETTINGS": "workspaceDataFilterSettings", + "FILTERSETTINGS": "filterSettings", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'page': + (int,), + 'size': + (int,), + 'sort': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'page': 'page', + 'size': 'size', + 'sort': 'sort', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'page': 'query', + 'size': 'query', + 'sort': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + 'sort': 'multi', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_all_entities_workspace_data_filters + ) + + def __get_entity_analytical_dashboards( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_analytical_dashboards # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_analytical_dashboards(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_analytical_dashboards = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId}', + 'operation_id': 'get_entity_analytical_dashboards', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "FILTERCONTEXTS": "filterContexts", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_analytical_dashboards + ) + + def __get_entity_attributes( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_attributes # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_attributes(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiAttributeOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_attributes = _Endpoint( + settings={ + 'response_type': (JsonApiAttributeOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/attributes/{objectId}', + 'operation_id': 'get_entity_attributes', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "DATASETS": "datasets", + "LABELS": "labels", + "DATASET": "dataset", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_attributes + ) + + def __get_entity_datasets( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_datasets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_datasets(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiDatasetOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_datasets = _Endpoint( + settings={ + 'response_type': (JsonApiDatasetOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/datasets/{objectId}', + 'operation_id': 'get_entity_datasets', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "FACTS": "facts", + "DATASETS": "datasets", + "REFERENCES": "references", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_datasets + ) + + def __get_entity_facts( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_facts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_facts(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiFactOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_facts = _Endpoint( + settings={ + 'response_type': (JsonApiFactOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/facts/{objectId}', + 'operation_id': 'get_entity_facts', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "DATASETS": "datasets", + "DATASET": "dataset", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_facts + ) + + def __get_entity_filter_contexts( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_filter_contexts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_filter_contexts(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_filter_contexts = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/filterContexts/{objectId}', + 'operation_id': 'get_entity_filter_contexts', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "DATASETS": "datasets", + "LABELS": "labels", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_filter_contexts + ) + + def __get_entity_labels( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_labels(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiLabelOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_labels = _Endpoint( + settings={ + 'response_type': (JsonApiLabelOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/labels/{objectId}', + 'operation_id': 'get_entity_labels', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "ATTRIBUTE": "attribute", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_labels + ) + + def __get_entity_metrics( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_metrics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_metrics(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_metrics = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/metrics/{objectId}', + 'operation_id': 'get_entity_metrics', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_metrics + ) + + def __get_entity_visualization_objects( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_visualization_objects # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_visualization_objects(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_visualization_objects = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/visualizationObjects/{objectId}', + 'operation_id': 'get_entity_visualization_objects', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_visualization_objects + ) + + def __get_entity_workspace_data_filter_settings( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_workspace_data_filter_settings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_workspace_data_filter_settings(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterSettingOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_workspace_data_filter_settings = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterSettingOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/workspaceDataFilterSettings/{objectId}', + 'operation_id': 'get_entity_workspace_data_filter_settings', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERS": "workspaceDataFilters", + "WORKSPACEDATAFILTER": "workspaceDataFilter", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_workspace_data_filter_settings + ) + + def __get_entity_workspace_data_filters( + self, + workspace_id, + object_id, + **kwargs + ): + """get_entity_workspace_data_filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_entity_workspace_data_filters(workspace_id, object_id, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + x_gdc_validate_relations (bool): [optional] if omitted the server will use the default value of False + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + return self.call_with_http_info(**kwargs) + + self.get_entity_workspace_data_filters = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId}', + 'operation_id': 'get_entity_workspace_data_filters', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'predicate', + 'filter', + 'include', + 'x_gdc_validate_relations', + ], + 'required': [ + 'workspace_id', + 'object_id', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERSETTINGS": "workspaceDataFilterSettings", + "FILTERSETTINGS": "filterSettings", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + 'x_gdc_validate_relations': + (bool,), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + 'x_gdc_validate_relations': 'X-GDC-VALIDATE-RELATIONS', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + 'x_gdc_validate_relations': 'header', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [], + }, + api_client=api_client, + callable=__get_entity_workspace_data_filters + ) + + def __update_entity_analytical_dashboards( + self, + workspace_id, + object_id, + json_api_analytical_dashboard_in_document, + **kwargs + ): + """update_entity_analytical_dashboards # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_analytical_dashboards(workspace_id, object_id, json_api_analytical_dashboard_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_analytical_dashboard_in_document (JsonApiAnalyticalDashboardInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiAnalyticalDashboardOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_analytical_dashboard_in_document'] = \ + json_api_analytical_dashboard_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_analytical_dashboards = _Endpoint( + settings={ + 'response_type': (JsonApiAnalyticalDashboardOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/analyticalDashboards/{objectId}', + 'operation_id': 'update_entity_analytical_dashboards', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_analytical_dashboard_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_analytical_dashboard_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "VISUALIZATIONOBJECTS": "visualizationObjects", + "ANALYTICALDASHBOARDS": "analyticalDashboards", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "FILTERCONTEXTS": "filterContexts", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_analytical_dashboard_in_document': + (JsonApiAnalyticalDashboardInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_analytical_dashboard_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_analytical_dashboards + ) + + def __update_entity_filter_contexts( + self, + workspace_id, + object_id, + json_api_filter_context_in_document, + **kwargs + ): + """update_entity_filter_contexts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_filter_contexts(workspace_id, object_id, json_api_filter_context_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_filter_context_in_document (JsonApiFilterContextInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiFilterContextOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_filter_context_in_document'] = \ + json_api_filter_context_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_filter_contexts = _Endpoint( + settings={ + 'response_type': (JsonApiFilterContextOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/filterContexts/{objectId}', + 'operation_id': 'update_entity_filter_contexts', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_filter_context_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_filter_context_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "ATTRIBUTES": "attributes", + "DATASETS": "datasets", + "LABELS": "labels", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_filter_context_in_document': + (JsonApiFilterContextInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_filter_context_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_filter_contexts + ) + + def __update_entity_metrics( + self, + workspace_id, + object_id, + json_api_metric_in_document, + **kwargs + ): + """update_entity_metrics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_metrics(workspace_id, object_id, json_api_metric_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_metric_in_document (JsonApiMetricInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiMetricOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_metric_in_document'] = \ + json_api_metric_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_metrics = _Endpoint( + settings={ + 'response_type': (JsonApiMetricOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/metrics/{objectId}', + 'operation_id': 'update_entity_metrics', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_metric_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_metric_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_metric_in_document': + (JsonApiMetricInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_metric_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_metrics + ) + + def __update_entity_visualization_objects( + self, + workspace_id, + object_id, + json_api_visualization_object_in_document, + **kwargs + ): + """update_entity_visualization_objects # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_visualization_objects(workspace_id, object_id, json_api_visualization_object_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_visualization_object_in_document (JsonApiVisualizationObjectInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiVisualizationObjectOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_visualization_object_in_document'] = \ + json_api_visualization_object_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_visualization_objects = _Endpoint( + settings={ + 'response_type': (JsonApiVisualizationObjectOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/visualizationObjects/{objectId}', + 'operation_id': 'update_entity_visualization_objects', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_visualization_object_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_visualization_object_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "FACTS": "facts", + "ATTRIBUTES": "attributes", + "LABELS": "labels", + "METRICS": "metrics", + "DATASETS": "datasets", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_visualization_object_in_document': + (JsonApiVisualizationObjectInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_visualization_object_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_visualization_objects + ) + + def __update_entity_workspace_data_filters( + self, + workspace_id, + object_id, + json_api_workspace_data_filter_in_document, + **kwargs + ): + """update_entity_workspace_data_filters # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_entity_workspace_data_filters(workspace_id, object_id, json_api_workspace_data_filter_in_document, async_req=True) + >>> result = thread.get() + + Args: + workspace_id (str): + object_id (str): + json_api_workspace_data_filter_in_document (JsonApiWorkspaceDataFilterInDocument): + + Keyword Args: + predicate ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Composed query parameters used for filtering. 'id' parameter can be used for all objects. Other parameters are present according to object type (title, description,...). You can specify any object parameter and parameter of related entity up to 2nd level (for example name=John&language=english,czech&address.city=London&father.id=123).. [optional] + filter (str): Filtering parameter in RSQL. See https://github.com/jirutka/rsql-parser.You can specify any object parameter and parameter of related entity up to 2nd level (for example title=='Some Title';description=='desc'). [optional] + include ([str]): Array of included collections or individual relationships. Includes are separated by commas (e.g. include=entity1s,entity2s). Collection include represents the inclusion of every relationship between this entity and the given collection. Relationship include represents the inclusion of the particular relationships only. If single parameter \"ALL\" is present, all possible includes are used (include=ALL). __WARNING:__ Individual include types (collection, relationship or ALL) cannot be combined together.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + JsonApiWorkspaceDataFilterOutDocument + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['workspace_id'] = \ + workspace_id + kwargs['object_id'] = \ + object_id + kwargs['json_api_workspace_data_filter_in_document'] = \ + json_api_workspace_data_filter_in_document + return self.call_with_http_info(**kwargs) + + self.update_entity_workspace_data_filters = _Endpoint( + settings={ + 'response_type': (JsonApiWorkspaceDataFilterOutDocument,), + 'auth': [], + 'endpoint_path': '/api/entities/workspaces/{workspaceId}/workspaceDataFilters/{objectId}', + 'operation_id': 'update_entity_workspace_data_filters', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_in_document', + 'predicate', + 'filter', + 'include', + ], + 'required': [ + 'workspace_id', + 'object_id', + 'json_api_workspace_data_filter_in_document', + ], + 'nullable': [ + ], + 'enum': [ + 'include', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('include',): { + + "WORKSPACEDATAFILTERSETTINGS": "workspaceDataFilterSettings", + "FILTERSETTINGS": "filterSettings", + "ALL": "ALL" + }, + }, + 'openapi_types': { + 'workspace_id': + (str,), + 'object_id': + (str,), + 'json_api_workspace_data_filter_in_document': + (JsonApiWorkspaceDataFilterInDocument,), + 'predicate': + ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), + 'filter': + (str,), + 'include': + ([str],), + }, + 'attribute_map': { + 'workspace_id': 'workspaceId', + 'object_id': 'objectId', + 'predicate': 'predicate', + 'filter': 'filter', + 'include': 'include', + }, + 'location_map': { + 'workspace_id': 'path', + 'object_id': 'path', + 'json_api_workspace_data_filter_in_document': 'body', + 'predicate': 'query', + 'filter': 'query', + 'include': 'query', + }, + 'collection_format_map': { + 'include': 'csv', + } + }, + headers_map={ + 'accept': [ + 'application/vnd.gooddata.api+json' + ], + 'content_type': [ + 'application/vnd.gooddata.api+json' + ] + }, + api_client=api_client, + callable=__update_entity_workspace_data_filters + ) diff --git a/gooddata-metadata-client/gooddata_metadata_client/api_client.py b/gooddata-metadata-client/gooddata_metadata_client/api_client.py new file mode 100644 index 000000000..a69d13a40 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/api_client.py @@ -0,0 +1,849 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import json +import atexit +import mimetypes +from multiprocessing.pool import ThreadPool +import io +import os +import re +import typing +from urllib.parse import quote +from urllib3.fields import RequestField + + +from gooddata_metadata_client import rest +from gooddata_metadata_client.configuration import Configuration +from gooddata_metadata_client.exceptions import ApiTypeError, ApiValueError, ApiException +from gooddata_metadata_client.model_utils import ( + ModelNormal, + ModelSimple, + ModelComposed, + check_allowed_values, + check_validations, + date, + datetime, + deserialize_file, + file_type, + model_to_dict, + none_type, + validate_and_convert_types +) + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + if configuration is None: + configuration = Configuration.get_default_copy() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None + ): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + if header_params['Content-Type'].startswith("multipart"): + post_params = self.parameters_to_multipart(post_params, + (dict) ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # auth setting + self.update_params_for_auth(header_params, query_params, + auth_settings, resource_path, method, body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') + raise e + + self.last_response = response_data + + return_data = response_data + + if not _preload_content: + return (return_data) + return return_data + + # deserialize response data + if response_type: + if response_type != (file_type,): + encoding = "utf-8" + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + if match: + encoding = match.group(1) + response_data.data = response_data.data.decode(encoding) + + return_data = self.deserialize( + response_data, + response_type, + _check_type + ) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def parameters_to_multipart(self, params, collection_types): + """Get parameters as list of tuples, formatting as json if value is collection_types + + :param params: Parameters as list of two-tuples + :param dict collection_types: Parameter collection types + :return: Parameters as list of tuple or urllib3.fields.RequestField + """ + new_params = [] + if collection_types is None: + collection_types = (dict) + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json + v = json.dumps(v, ensure_ascii=False).encode("utf-8") + field = RequestField(k, v) + field.make_multipart(content_type="application/json; charset=utf-8") + new_params.append(field) + else: + new_params.append((k, v)) + return new_params + + @classmethod + def sanitize_for_serialization(cls, obj): + """Prepares data for transmission before it is sent with the rest client + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + If obj is io.IOBase, return the bytes + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if isinstance(obj, (ModelNormal, ModelComposed)): + return { + key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() + } + elif isinstance(obj, io.IOBase): + return cls.get_file_data_and_close_file(obj) + elif isinstance(obj, (str, int, float, none_type, bool)): + return obj + elif isinstance(obj, (datetime, date)): + return obj.isoformat() + elif isinstance(obj, ModelSimple): + return cls.sanitize_for_serialization(obj.value) + elif isinstance(obj, (list, tuple)): + return [cls.sanitize_for_serialization(item) for item in obj] + if isinstance(obj, dict): + return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} + raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + + def deserialize(self, response, response_type, _check_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param _check_type: boolean, whether to check the types of the data + received from the server + :type _check_type: bool + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == (file_type,): + content_disposition = response.getheader("Content-Disposition") + return deserialize_file(response.data, self.configuration, + content_disposition=content_disposition) + + # fetch data from response object + try: + received_data = json.loads(response.data) + except ValueError: + received_data = response.data + + # store our data under the key of 'received_data' so users have some + # context if they are deserializing a string and the data type is wrong + deserialized_data = validate_and_convert_types( + received_data, + response_type, + ['received_data'], + True, + _check_type, + configuration=self.configuration + ) + return deserialized_data + + def call_api( + self, + resource_path: str, + method: str, + path_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + header_params: typing.Optional[typing.Dict[str, typing.Any]] = None, + body: typing.Optional[typing.Any] = None, + post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None, + files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None, + response_type: typing.Optional[typing.Tuple[typing.Any]] = None, + auth_settings: typing.Optional[typing.List[str]] = None, + async_req: typing.Optional[bool] = None, + _return_http_data_only: typing.Optional[bool] = None, + collection_formats: typing.Optional[typing.Dict[str, str]] = None, + _preload_content: bool = True, + _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + _host: typing.Optional[str] = None, + _check_type: typing.Optional[bool] = None + ): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: For the response, a tuple containing: + valid classes + a list containing valid classes (for list schemas) + a dict containing a tuple of valid classes as the value + Example values: + (str,) + (Pet,) + (float, none_type) + ([int, none_type],) + ({str: (bool, str, int, float, date, datetime, str, none_type)},) + :param files: key -> field name, value -> a list of open file + objects for `multipart/form-data`. + :type files: dict + :param async_req bool: execute request asynchronously + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :type collection_formats: dict, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _check_type: boolean describing if the data back from the server + should have its type checked. + :type _check_type: bool, optional + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _check_type) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _check_type)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + @staticmethod + def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: + file_data = file_instance.read() + file_instance.close() + return file_data + + def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None): + """Builds form parameters. + + :param files: None or a dict with key=param_name and + value is a list of open file objects + :return: List of tuples of form parameters with file data + """ + if files is None: + return [] + + params = [] + for param_name, file_instances in files.items(): + if file_instances is None: + # if the file field is nullable, skip None values + continue + for file_instance in file_instances: + if file_instance is None: + # if the file field is nullable, skip None values + continue + if file_instance.closed is True: + raise ApiValueError( + "Cannot read a closed file. The passed in file_type " + "for %s must be open." % param_name + ) + filename = os.path.basename(file_instance.name) + filedata = self.get_file_data_and_close_file(file_instance) + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([param_name, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings, + resource_path, method, body): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :param resource_path: A string representation of the HTTP request resource path. + :param method: A string representation of the HTTP request method. + :param body: A object representing the body of the HTTP request. + The object type is the return value of _encoder.default(). + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + +class Endpoint(object): + def __init__(self, settings=None, params_map=None, root_map=None, + headers_map=None, api_client=None, callable=None): + """Creates an endpoint + + Args: + settings (dict): see below key value pairs + 'response_type' (tuple/None): response type + 'auth' (list): a list of auth type keys + 'endpoint_path' (str): the endpoint path + 'operation_id' (str): endpoint string identifier + 'http_method' (str): POST/PUT/PATCH/GET etc + 'servers' (list): list of str servers that this endpoint is at + params_map (dict): see below key value pairs + 'all' (list): list of str endpoint parameter names + 'required' (list): list of required parameter names + 'nullable' (list): list of nullable parameter names + 'enum' (list): list of parameters with enum values + 'validation' (list): list of parameters with validations + root_map + 'validations' (dict): the dict mapping endpoint parameter tuple + paths to their validation dictionaries + 'allowed_values' (dict): the dict mapping endpoint parameter + tuple paths to their allowed_values (enum) dictionaries + 'openapi_types' (dict): param_name to openapi type + 'attribute_map' (dict): param_name to camelCase name + 'location_map' (dict): param_name to 'body', 'file', 'form', + 'header', 'path', 'query' + collection_format_map (dict): param_name to `csv` etc. + headers_map (dict): see below key value pairs + 'accept' (list): list of Accept header strings + 'content_type' (list): list of Content-Type header strings + api_client (ApiClient) api client instance + callable (function): the function which is invoked when the + Endpoint is called + """ + self.settings = settings + self.params_map = params_map + self.params_map['all'].extend([ + 'async_req', + '_host_index', + '_preload_content', + '_request_timeout', + '_return_http_data_only', + '_check_input_type', + '_check_return_type' + ]) + self.params_map['nullable'].extend(['_request_timeout']) + self.validations = root_map['validations'] + self.allowed_values = root_map['allowed_values'] + self.openapi_types = root_map['openapi_types'] + extra_types = { + 'async_req': (bool,), + '_host_index': (none_type, int), + '_preload_content': (bool,), + '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,) + } + self.openapi_types.update(extra_types) + self.attribute_map = root_map['attribute_map'] + self.location_map = root_map['location_map'] + self.collection_format_map = root_map['collection_format_map'] + self.headers_map = headers_map + self.api_client = api_client + self.callable = callable + + def __validate_inputs(self, kwargs): + for param in self.params_map['enum']: + if param in kwargs: + check_allowed_values( + self.allowed_values, + (param,), + kwargs[param] + ) + + for param in self.params_map['validation']: + if param in kwargs: + check_validations( + self.validations, + (param,), + kwargs[param], + configuration=self.api_client.configuration + ) + + if kwargs['_check_input_type'] is False: + return + + for key, value in kwargs.items(): + fixed_val = validate_and_convert_types( + value, + self.openapi_types[key], + [key], + False, + kwargs['_check_input_type'], + configuration=self.api_client.configuration + ) + kwargs[key] = fixed_val + + def __gather_params(self, kwargs): + params = { + 'body': None, + 'collection_format': {}, + 'file': {}, + 'form': [], + 'header': {}, + 'path': {}, + 'query': [] + } + + for param_name, param_value in kwargs.items(): + param_location = self.location_map.get(param_name) + if param_location is None: + continue + if param_location: + if param_location == 'body': + params['body'] = param_value + continue + base_name = self.attribute_map[param_name] + if (param_location == 'form' and + self.openapi_types[param_name] == (file_type,)): + params['file'][param_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): + # param_value is already a list + params['file'][param_name] = param_value + elif param_location in {'form', 'query'}: + param_value_full = (base_name, param_value) + params[param_location].append(param_value_full) + if param_location not in {'form', 'query'}: + params[param_location][base_name] = param_value + collection_format = self.collection_format_map.get(param_name) + if collection_format: + params['collection_format'][base_name] = collection_format + + return params + + def __call__(self, *args, **kwargs): + """ This method is invoked when endpoints are called + Example: + + api_instance = DataSourceActionsControllerApi() + api_instance.generate_logical_model # this is an instance of the class Endpoint + api_instance.generate_logical_model() # this invokes api_instance.generate_logical_model.__call__() + which then invokes the callable functions stored in that endpoint at + api_instance.generate_logical_model.callable or self.callable in this class + + """ + return self.callable(self, *args, **kwargs) + + def call_with_http_info(self, **kwargs): + + try: + index = self.api_client.configuration.server_operation_index.get( + self.settings['operation_id'], self.api_client.configuration.server_index + ) if kwargs['_host_index'] is None else kwargs['_host_index'] + server_variables = self.api_client.configuration.server_operation_variables.get( + self.settings['operation_id'], self.api_client.configuration.server_variables + ) + _host = self.api_client.configuration.get_host_from_settings( + index, variables=server_variables, servers=self.settings['servers'] + ) + except IndexError: + if self.settings['servers']: + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(self.settings['servers']) + ) + _host = None + + for key, value in kwargs.items(): + if key not in self.params_map['all']: + raise ApiTypeError( + "Got an unexpected parameter '%s'" + " to method `%s`" % + (key, self.settings['operation_id']) + ) + # only throw this nullable ApiValueError if _check_input_type + # is False, if _check_input_type==True we catch this case + # in self.__validate_inputs + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): + raise ApiValueError( + "Value may not be None for non-nullable parameter `%s`" + " when calling `%s`" % + (key, self.settings['operation_id']) + ) + + for key in self.params_map['required']: + if key not in kwargs.keys(): + raise ApiValueError( + "Missing the required parameter `%s` when calling " + "`%s`" % (key, self.settings['operation_id']) + ) + + self.__validate_inputs(kwargs) + + params = self.__gather_params(kwargs) + + accept_headers_list = self.headers_map['accept'] + if accept_headers_list: + params['header']['Accept'] = self.api_client.select_header_accept( + accept_headers_list) + + content_type_headers_list = self.headers_map['content_type'] + if content_type_headers_list: + header_list = self.api_client.select_header_content_type( + content_type_headers_list) + params['header']['Content-Type'] = header_list + + return self.api_client.call_api( + self.settings['endpoint_path'], self.settings['http_method'], + params['path'], + params['query'], + params['header'], + body=params['body'], + post_params=params['form'], + files=params['file'], + response_type=self.settings['response_type'], + auth_settings=self.settings['auth'], + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], + _host=_host, + collection_formats=params['collection_format']) diff --git a/gooddata-metadata-client/gooddata_metadata_client/apis/__init__.py b/gooddata-metadata-client/gooddata_metadata_client/apis/__init__.py new file mode 100644 index 000000000..09bb0b051 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/apis/__init__.py @@ -0,0 +1,26 @@ + +# flake8: noqa + +# Import all APIs into this package. +# If you have many APIs here with many many models used in each API this may +# raise a `RecursionError`. +# In order to avoid this, import only the API that you directly need like: +# +# from .api.data_source_actions_controller_api import DataSourceActionsControllerApi +# +# or import this package, but before doing it, use: +# +# import sys +# sys.setrecursionlimit(n) + +# Import APIs into API package: +from gooddata_metadata_client.api.data_source_actions_controller_api import DataSourceActionsControllerApi +from gooddata_metadata_client.api.data_source_entities_controller_api import DataSourceEntitiesControllerApi +from gooddata_metadata_client.api.data_source_layout_controller_api import DataSourceLayoutControllerApi +from gooddata_metadata_client.api.declarative_layout_controller_api import DeclarativeLayoutControllerApi +from gooddata_metadata_client.api.options_controller_api import OptionsControllerApi +from gooddata_metadata_client.api.organization_controller_api import OrganizationControllerApi +from gooddata_metadata_client.api.organization_model_controller_api import OrganizationModelControllerApi +from gooddata_metadata_client.api.organization_redirect_controller_api import OrganizationRedirectControllerApi +from gooddata_metadata_client.api.user_model_controller_api import UserModelControllerApi +from gooddata_metadata_client.api.workspace_object_controller_api import WorkspaceObjectControllerApi diff --git a/gooddata-metadata-client/gooddata_metadata_client/configuration.py b/gooddata-metadata-client/gooddata_metadata_client/configuration.py new file mode 100644 index 000000000..36ca152d9 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/configuration.py @@ -0,0 +1,443 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +from http import client as http_client +from gooddata_metadata_client.exceptions import ApiValueError + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format + + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + access_token=None, + username=None, password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "https://staging.anywhere.gooddata.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.access_token = access_token + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.disabled_client_side_validations = disabled_client_side_validations + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("gooddata_metadata_client") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + # Options to pass down to the underlying urllib3 socket + self.socket_options = None + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + self._disabled_client_side_validations = s + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on http_client debug + http_client.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off http_client debug + http_client.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: v0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://staging.anywhere.gooddata.com", + 'description': "Generated server url", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/gooddata-metadata-client/gooddata_metadata_client/exceptions.py b/gooddata-metadata-client/gooddata_metadata_client/exceptions.py new file mode 100644 index 000000000..b2ac2507e --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/exceptions.py @@ -0,0 +1,159 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/__init__.py b/gooddata-metadata-client/gooddata_metadata_client/model/__init__.py new file mode 100644 index 000000000..cfe32b784 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/__init__.py @@ -0,0 +1,5 @@ +# we can not import model classes here because that would create a circular +# reference which would not work in python2 +# do not import all models into this module because that uses a lot of memory and stack frames +# if you need the ability to import all models from one package, import them with +# from {{packageName}.models import ModelA, ModelB diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/data_source_table_identifier.py b/gooddata-metadata-client/gooddata_metadata_client/model/data_source_table_identifier.py new file mode 100644 index 000000000..0de283da9 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/data_source_table_identifier.py @@ -0,0 +1,278 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DataSourceTableIdentifier(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASOURCE': "dataSource", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'data_source_id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'data_source_id': 'dataSourceId', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, data_source_id, *args, **kwargs): # noqa: E501 + """DataSourceTableIdentifier - a model defined in OpenAPI + + Args: + id (str): ID of table. + data_source_id (str): Data source ID. + + Keyword Args: + type (str): Data source entity type.. defaults to "dataSource", must be one of ["dataSource", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataSource") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.data_source_id = data_source_id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, data_source_id, *args, **kwargs): # noqa: E501 + """DataSourceTableIdentifier - a model defined in OpenAPI + + Args: + id (str): ID of table. + data_source_id (str): Data source ID. + + Keyword Args: + type (str): Data source entity type.. defaults to "dataSource", must be one of ["dataSource", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataSource") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.data_source_id = data_source_id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/dataset_reference_identifier.py b/gooddata-metadata-client/gooddata_metadata_client/model/dataset_reference_identifier.py new file mode 100644 index 000000000..f1bfa9955 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/dataset_reference_identifier.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DatasetReferenceIdentifier(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASET': "dataset", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """DatasetReferenceIdentifier - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataset") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """DatasetReferenceIdentifier - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataset") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytical_dashboard.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytical_dashboard.py new file mode 100644 index 000000000..dc72f6b9d --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytical_dashboard.py @@ -0,0 +1,283 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DeclarativeAnalyticalDashboard(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 = { + ('tags',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'content': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'content': 'content', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, content, *args, **kwargs): # noqa: E501 + """DeclarativeAnalyticalDashboard - a model defined in OpenAPI + + Args: + id (str): Analytical dashboard ID. + title (str): Analytical dashboard title. + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A server agnostic definition of the visualization object in JSON format. + + 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,) + description (str): Analytical dashboard description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.content = content + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, content, *args, **kwargs): # noqa: E501 + """DeclarativeAnalyticalDashboard - a model defined in OpenAPI + + Args: + id (str): Analytical dashboard ID. + title (str): Analytical dashboard title. + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A server agnostic definition of the visualization object in JSON format. + + 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,) + description (str): Analytical dashboard description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.content = content + 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-metadata-client/gooddata_metadata_client/model/declarative_analytics.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytics.py new file mode 100644 index 000000000..b88427d52 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytics.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_analytics_layer import DeclarativeAnalyticsLayer + globals()['DeclarativeAnalyticsLayer'] = DeclarativeAnalyticsLayer + + +class DeclarativeAnalytics(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'analytics': (DeclarativeAnalyticsLayer,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'analytics': 'analytics', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, analytics, *args, **kwargs): # noqa: E501 + """DeclarativeAnalytics - a model defined in OpenAPI + + Args: + analytics (DeclarativeAnalyticsLayer): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.analytics = analytics + 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, analytics, *args, **kwargs): # noqa: E501 + """DeclarativeAnalytics - a model defined in OpenAPI + + Args: + analytics (DeclarativeAnalyticsLayer): + + 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: + 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.analytics = analytics + 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-metadata-client/gooddata_metadata_client/model/declarative_analytics_layer.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytics_layer.py new file mode 100644 index 000000000..8258cf8b6 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_analytics_layer.py @@ -0,0 +1,291 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_analytical_dashboard import DeclarativeAnalyticalDashboard + from gooddata_metadata_client.model.declarative_filter_context import DeclarativeFilterContext + from gooddata_metadata_client.model.declarative_metric import DeclarativeMetric + from gooddata_metadata_client.model.declarative_visualization_object import DeclarativeVisualizationObject + globals()['DeclarativeAnalyticalDashboard'] = DeclarativeAnalyticalDashboard + globals()['DeclarativeFilterContext'] = DeclarativeFilterContext + globals()['DeclarativeMetric'] = DeclarativeMetric + globals()['DeclarativeVisualizationObject'] = DeclarativeVisualizationObject + + +class DeclarativeAnalyticsLayer(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'analytical_dashboards': ([DeclarativeAnalyticalDashboard],), # noqa: E501 + 'filter_contexts': ([DeclarativeFilterContext],), # noqa: E501 + 'metrics': ([DeclarativeMetric],), # noqa: E501 + 'visualization_objects': ([DeclarativeVisualizationObject],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'analytical_dashboards': 'analyticalDashboards', # noqa: E501 + 'filter_contexts': 'filterContexts', # noqa: E501 + 'metrics': 'metrics', # noqa: E501 + 'visualization_objects': 'visualizationObjects', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, analytical_dashboards, filter_contexts, metrics, visualization_objects, *args, **kwargs): # noqa: E501 + """DeclarativeAnalyticsLayer - a model defined in OpenAPI + + Args: + analytical_dashboards ([DeclarativeAnalyticalDashboard]): A list of analytical dashboards available in the model. + filter_contexts ([DeclarativeFilterContext]): A list of filter contexts available in the model. + metrics ([DeclarativeMetric]): A list of metrics available in the model. + visualization_objects ([DeclarativeVisualizationObject]): A list of visualization objects available in the model. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.analytical_dashboards = analytical_dashboards + self.filter_contexts = filter_contexts + self.metrics = metrics + self.visualization_objects = visualization_objects + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, analytical_dashboards, filter_contexts, metrics, visualization_objects, *args, **kwargs): # noqa: E501 + """DeclarativeAnalyticsLayer - a model defined in OpenAPI + + Args: + analytical_dashboards ([DeclarativeAnalyticalDashboard]): A list of analytical dashboards available in the model. + filter_contexts ([DeclarativeFilterContext]): A list of filter contexts available in the model. + metrics ([DeclarativeMetric]): A list of metrics available in the model. + visualization_objects ([DeclarativeVisualizationObject]): A list of visualization objects available in the model. + + 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: + 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.analytical_dashboards = analytical_dashboards + self.filter_contexts = filter_contexts + self.metrics = metrics + self.visualization_objects = visualization_objects + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/declarative_attribute.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_attribute.py new file mode 100644 index 000000000..a2e608b02 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_attribute.py @@ -0,0 +1,289 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_label import DeclarativeLabel + globals()['DeclarativeLabel'] = DeclarativeLabel + + +class DeclarativeAttribute(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 = { + ('tags',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'labels': ([DeclarativeLabel],), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'labels': 'labels', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, labels, *args, **kwargs): # noqa: E501 + """DeclarativeAttribute - a model defined in OpenAPI + + Args: + id (str): Attribute ID. + title (str): Attribute title. + labels ([DeclarativeLabel]): An array of attribute labels. + + 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,) + description (str): Attribute description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.labels = labels + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, labels, *args, **kwargs): # noqa: E501 + """DeclarativeAttribute - a model defined in OpenAPI + + Args: + id (str): Attribute ID. + title (str): Attribute title. + labels ([DeclarativeLabel]): An array of attribute labels. + + 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,) + description (str): Attribute description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.labels = labels + 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-metadata-client/gooddata_metadata_client/model/declarative_column.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_column.py new file mode 100644 index 000000000..5456e4799 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_column.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DeclarativeColumn(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 = { + ('data_type',): { + 'INT': "INT", + 'STRING': "STRING", + 'DATE': "DATE", + 'NUMERIC': "NUMERIC", + 'TIMESTAMP': "TIMESTAMP", + 'BOOLEAN': "BOOLEAN", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'data_type': (str,), # noqa: E501 + 'is_primary_key': (bool,), # noqa: E501 + 'referenced_table_id': (str,), # noqa: E501 + 'referenced_table_column': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'data_type': 'dataType', # noqa: E501 + 'is_primary_key': 'isPrimaryKey', # noqa: E501 + 'referenced_table_id': 'referencedTableId', # noqa: E501 + 'referenced_table_column': 'referencedTableColumn', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, data_type, *args, **kwargs): # noqa: E501 + """DeclarativeColumn - a model defined in OpenAPI + + Args: + name (str): Column name + data_type (str): Column type + + 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,) + is_primary_key (bool): Is column part of primary key?. [optional] # noqa: E501 + referenced_table_id (str): Referenced table (Foreign key). [optional] # noqa: E501 + referenced_table_column (str): Referenced table (Foreign key). [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.data_type = data_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, data_type, *args, **kwargs): # noqa: E501 + """DeclarativeColumn - a model defined in OpenAPI + + Args: + name (str): Column name + data_type (str): Column type + + 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,) + is_primary_key (bool): Is column part of primary key?. [optional] # noqa: E501 + referenced_table_id (str): Referenced table (Foreign key). [optional] # noqa: E501 + referenced_table_column (str): Referenced table (Foreign key). [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.data_type = data_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/declarative_data_source.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_data_source.py new file mode 100644 index 000000000..d487d348d --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_data_source.py @@ -0,0 +1,319 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_tables import DeclarativeTables + globals()['DeclarativeTables'] = DeclarativeTables + + +class DeclarativeDataSource(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'POSTGRESQL': "POSTGRESQL", + 'REDSHIFT': "REDSHIFT", + 'VERTICA': "VERTICA", + 'SNOWFLAKE': "SNOWFLAKE", + 'ADS': "ADS", + 'BIGQUERY': "BIGQUERY", + 'MSSQL': "MSSQL", + 'PRESTO': "PRESTO", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'schema': (str,), # noqa: E501 + 'pdm': (DeclarativeTables,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'password': (str,), # noqa: E501 + 'token': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + 'url': 'url', # noqa: E501 + 'schema': 'schema', # noqa: E501 + 'pdm': 'pdm', # noqa: E501 + 'username': 'username', # noqa: E501 + 'password': 'password', # noqa: E501 + 'token': 'token', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, name, type, url, schema, pdm, *args, **kwargs): # noqa: E501 + """DeclarativeDataSource - a model defined in OpenAPI + + Args: + id (str): Data source ID. + name (str): Name of the data source. + type (str): Type of database. + url (str): An connection string relevant to type of database. + schema (str): A scheme/database with the data. + pdm (DeclarativeTables): + + 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,) + username (str): User with permission connect the data source/database.. [optional] # noqa: E501 + password (str): Password for the data-source user, property is never returned back.. [optional] # noqa: E501 + token (str): Token as an alternative to username and password.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.name = name + self.type = type + self.url = url + self.schema = schema + self.pdm = pdm + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, name, type, url, schema, pdm, *args, **kwargs): # noqa: E501 + """DeclarativeDataSource - a model defined in OpenAPI + + Args: + id (str): Data source ID. + name (str): Name of the data source. + type (str): Type of database. + url (str): An connection string relevant to type of database. + schema (str): A scheme/database with the data. + pdm (DeclarativeTables): + + 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,) + username (str): User with permission connect the data source/database.. [optional] # noqa: E501 + password (str): Password for the data-source user, property is never returned back.. [optional] # noqa: E501 + token (str): Token as an alternative to username and password.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.name = name + self.type = type + self.url = url + self.schema = schema + self.pdm = pdm + 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-metadata-client/gooddata_metadata_client/model/declarative_data_sources.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_data_sources.py new file mode 100644 index 000000000..86b91f3d4 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_data_sources.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_data_source import DeclarativeDataSource + globals()['DeclarativeDataSource'] = DeclarativeDataSource + + +class DeclarativeDataSources(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data_sources': ([DeclarativeDataSource],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data_sources': 'dataSources', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data_sources, *args, **kwargs): # noqa: E501 + """DeclarativeDataSources - a model defined in OpenAPI + + Args: + data_sources ([DeclarativeDataSource]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data_sources = data_sources + 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, data_sources, *args, **kwargs): # noqa: E501 + """DeclarativeDataSources - a model defined in OpenAPI + + Args: + data_sources ([DeclarativeDataSource]): + + 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: + 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.data_sources = data_sources + 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-metadata-client/gooddata_metadata_client/model/declarative_dataset.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_dataset.py new file mode 100644 index 000000000..28eca2a75 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_dataset.py @@ -0,0 +1,319 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.data_source_table_identifier import DataSourceTableIdentifier + from gooddata_metadata_client.model.declarative_attribute import DeclarativeAttribute + from gooddata_metadata_client.model.declarative_fact import DeclarativeFact + from gooddata_metadata_client.model.declarative_reference import DeclarativeReference + from gooddata_metadata_client.model.grain_identifier import GrainIdentifier + globals()['DataSourceTableIdentifier'] = DataSourceTableIdentifier + globals()['DeclarativeAttribute'] = DeclarativeAttribute + globals()['DeclarativeFact'] = DeclarativeFact + globals()['DeclarativeReference'] = DeclarativeReference + globals()['GrainIdentifier'] = GrainIdentifier + + +class DeclarativeDataset(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 = { + ('tags',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'grain': ([GrainIdentifier],), # noqa: E501 + 'attributes': ([DeclarativeAttribute],), # noqa: E501 + 'facts': ([DeclarativeFact],), # noqa: E501 + 'references': ([DeclarativeReference],), # noqa: E501 + 'description': (str,), # noqa: E501 + 'data_source_table_id': (DataSourceTableIdentifier,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'grain': 'grain', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'facts': 'facts', # noqa: E501 + 'references': 'references', # noqa: E501 + 'description': 'description', # noqa: E501 + 'data_source_table_id': 'dataSourceTableId', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, grain, attributes, facts, references, *args, **kwargs): # noqa: E501 + """DeclarativeDataset - a model defined in OpenAPI + + Args: + id (str): The Dataset ID. This ID is further used to refer to this instance of dataset. + title (str): A dataset title. + grain ([GrainIdentifier]): An array of grain identifiers. + attributes ([DeclarativeAttribute]): An array of attributes. + facts ([DeclarativeFact]): An array of facts. + references ([DeclarativeReference]): An array of references. + + 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,) + description (str): A dataset description.. [optional] # noqa: E501 + data_source_table_id (DataSourceTableIdentifier): [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.grain = grain + self.attributes = attributes + self.facts = facts + self.references = references + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, grain, attributes, facts, references, *args, **kwargs): # noqa: E501 + """DeclarativeDataset - a model defined in OpenAPI + + Args: + id (str): The Dataset ID. This ID is further used to refer to this instance of dataset. + title (str): A dataset title. + grain ([GrainIdentifier]): An array of grain identifiers. + attributes ([DeclarativeAttribute]): An array of attributes. + facts ([DeclarativeFact]): An array of facts. + references ([DeclarativeReference]): An array of references. + + 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,) + description (str): A dataset description.. [optional] # noqa: E501 + data_source_table_id (DataSourceTableIdentifier): [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.grain = grain + self.attributes = attributes + self.facts = facts + self.references = references + 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-metadata-client/gooddata_metadata_client/model/declarative_date_dataset.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_date_dataset.py new file mode 100644 index 000000000..58e8ea67a --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_date_dataset.py @@ -0,0 +1,312 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.granularities_formatting import GranularitiesFormatting + globals()['GranularitiesFormatting'] = GranularitiesFormatting + + +class DeclarativeDateDataset(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 = { + ('granularities',): { + '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 = { + ('tags',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'granularities_formatting': (GranularitiesFormatting,), # noqa: E501 + 'granularities': ([str],), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'granularities_formatting': 'granularitiesFormatting', # noqa: E501 + 'granularities': 'granularities', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, granularities_formatting, granularities, *args, **kwargs): # noqa: E501 + """DeclarativeDateDataset - a model defined in OpenAPI + + Args: + id (str): Date dataset ID. + title (str): Date dataset title. + granularities_formatting (GranularitiesFormatting): + granularities ([str]): An array of date granularities. All listed granularities will be available for date dataset. + + 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,) + description (str): Date dataset description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.granularities_formatting = granularities_formatting + self.granularities = granularities + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, granularities_formatting, granularities, *args, **kwargs): # noqa: E501 + """DeclarativeDateDataset - a model defined in OpenAPI + + Args: + id (str): Date dataset ID. + title (str): Date dataset title. + granularities_formatting (GranularitiesFormatting): + granularities ([str]): An array of date granularities. All listed granularities will be available for date dataset. + + 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,) + description (str): Date dataset description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.granularities_formatting = granularities_formatting + self.granularities = granularities + 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-metadata-client/gooddata_metadata_client/model/declarative_fact.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_fact.py new file mode 100644 index 000000000..6a81114ee --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_fact.py @@ -0,0 +1,283 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DeclarativeFact(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 = { + ('tags',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'source_column': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'source_column': 'sourceColumn', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, source_column, *args, **kwargs): # noqa: E501 + """DeclarativeFact - a model defined in OpenAPI + + Args: + id (str): Fact ID. + title (str): Fact title. + source_column (str): A name of the source column in the table. + + 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,) + description (str): Fact description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.source_column = source_column + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, source_column, *args, **kwargs): # noqa: E501 + """DeclarativeFact - a model defined in OpenAPI + + Args: + id (str): Fact ID. + title (str): Fact title. + source_column (str): A name of the source column in the table. + + 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,) + description (str): Fact description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.source_column = source_column + 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-metadata-client/gooddata_metadata_client/model/declarative_filter_context.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_filter_context.py new file mode 100644 index 000000000..cfaef8264 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_filter_context.py @@ -0,0 +1,283 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DeclarativeFilterContext(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 = { + ('tags',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'content': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'content': 'content', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, content, *args, **kwargs): # noqa: E501 + """DeclarativeFilterContext - a model defined in OpenAPI + + Args: + id (str): Filter Context ID. + title (str): Filter Context title. + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A server agnostic definition of the visualization object in JSON format. + + 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,) + description (str): Filter Context description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.content = content + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, content, *args, **kwargs): # noqa: E501 + """DeclarativeFilterContext - a model defined in OpenAPI + + Args: + id (str): Filter Context ID. + title (str): Filter Context title. + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A server agnostic definition of the visualization object in JSON format. + + 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,) + description (str): Filter Context description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.content = content + 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-metadata-client/gooddata_metadata_client/model/declarative_label.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_label.py new file mode 100644 index 000000000..70099ff7c --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_label.py @@ -0,0 +1,289 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DeclarativeLabel(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 = { + ('tags',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'primary': (bool,), # noqa: E501 + 'source_column': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'primary': 'primary', # noqa: E501 + 'source_column': 'sourceColumn', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, primary, source_column, *args, **kwargs): # noqa: E501 + """DeclarativeLabel - a model defined in OpenAPI + + Args: + id (str): Label ID. + title (str): Label title. + primary (bool): A flag indicating whether the label should be treated as a primary one. + source_column (str): A name of the source column in the table. + + 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,) + description (str): Label description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.primary = primary + self.source_column = source_column + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, primary, source_column, *args, **kwargs): # noqa: E501 + """DeclarativeLabel - a model defined in OpenAPI + + Args: + id (str): Label ID. + title (str): Label title. + primary (bool): A flag indicating whether the label should be treated as a primary one. + source_column (str): A name of the source column in the table. + + 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,) + description (str): Label description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.primary = primary + self.source_column = source_column + 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-metadata-client/gooddata_metadata_client/model/declarative_ldm.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_ldm.py new file mode 100644 index 000000000..a89fb763f --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_ldm.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_dataset import DeclarativeDataset + from gooddata_metadata_client.model.declarative_date_dataset import DeclarativeDateDataset + globals()['DeclarativeDataset'] = DeclarativeDataset + globals()['DeclarativeDateDataset'] = DeclarativeDateDataset + + +class DeclarativeLdm(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'datasets': ([DeclarativeDataset],), # noqa: E501 + 'date_instances': ([DeclarativeDateDataset],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'datasets': 'datasets', # noqa: E501 + 'date_instances': 'dateInstances', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, datasets, date_instances, *args, **kwargs): # noqa: E501 + """DeclarativeLdm - a model defined in OpenAPI + + Args: + datasets ([DeclarativeDataset]): An array containing datasets. + date_instances ([DeclarativeDateDataset]): An array containing date-related datasets. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.datasets = datasets + self.date_instances = date_instances + 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, datasets, date_instances, *args, **kwargs): # noqa: E501 + """DeclarativeLdm - a model defined in OpenAPI + + Args: + datasets ([DeclarativeDataset]): An array containing datasets. + date_instances ([DeclarativeDateDataset]): An array containing date-related datasets. + + 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: + 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.datasets = datasets + self.date_instances = date_instances + 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-metadata-client/gooddata_metadata_client/model/declarative_metric.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_metric.py new file mode 100644 index 000000000..8e4e8e406 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_metric.py @@ -0,0 +1,283 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DeclarativeMetric(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 = { + ('tags',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'content': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'content': 'content', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, content, *args, **kwargs): # noqa: E501 + """DeclarativeMetric - a model defined in OpenAPI + + Args: + id (str): Metric ID. + title (str): Metric title. + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A server agnostic definition of the visualization object in JSON format. + + 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,) + description (str): Metric description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.content = content + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, content, *args, **kwargs): # noqa: E501 + """DeclarativeMetric - a model defined in OpenAPI + + Args: + id (str): Metric ID. + title (str): Metric title. + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A server agnostic definition of the visualization object in JSON format. + + 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,) + description (str): Metric description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.content = content + 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-metadata-client/gooddata_metadata_client/model/declarative_model.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_model.py new file mode 100644 index 000000000..310f31c06 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_model.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_ldm import DeclarativeLdm + globals()['DeclarativeLdm'] = DeclarativeLdm + + +class DeclarativeModel(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'ldm': (DeclarativeLdm,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ldm': 'ldm', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, ldm, *args, **kwargs): # noqa: E501 + """DeclarativeModel - a model defined in OpenAPI + + Args: + ldm (DeclarativeLdm): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.ldm = ldm + 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, ldm, *args, **kwargs): # noqa: E501 + """DeclarativeModel - a model defined in OpenAPI + + Args: + ldm (DeclarativeLdm): + + 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: + 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.ldm = ldm + 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-metadata-client/gooddata_metadata_client/model/declarative_organization.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_organization.py new file mode 100644 index 000000000..242a31633 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_organization.py @@ -0,0 +1,307 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_data_source import DeclarativeDataSource + from gooddata_metadata_client.model.declarative_organization_info import DeclarativeOrganizationInfo + from gooddata_metadata_client.model.declarative_user import DeclarativeUser + from gooddata_metadata_client.model.declarative_user_group import DeclarativeUserGroup + from gooddata_metadata_client.model.declarative_workspace import DeclarativeWorkspace + from gooddata_metadata_client.model.declarative_workspace_data_filter import DeclarativeWorkspaceDataFilter + globals()['DeclarativeDataSource'] = DeclarativeDataSource + globals()['DeclarativeOrganizationInfo'] = DeclarativeOrganizationInfo + globals()['DeclarativeUser'] = DeclarativeUser + globals()['DeclarativeUserGroup'] = DeclarativeUserGroup + globals()['DeclarativeWorkspace'] = DeclarativeWorkspace + globals()['DeclarativeWorkspaceDataFilter'] = DeclarativeWorkspaceDataFilter + + +class DeclarativeOrganization(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'organization': (DeclarativeOrganizationInfo,), # noqa: E501 + 'users': ([DeclarativeUser],), # noqa: E501 + 'user_groups': ([DeclarativeUserGroup],), # noqa: E501 + 'data_sources': ([DeclarativeDataSource],), # noqa: E501 + 'workspaces': ([DeclarativeWorkspace],), # noqa: E501 + 'workspace_data_filters': ([DeclarativeWorkspaceDataFilter],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'organization': 'organization', # noqa: E501 + 'users': 'users', # noqa: E501 + 'user_groups': 'userGroups', # noqa: E501 + 'data_sources': 'dataSources', # noqa: E501 + 'workspaces': 'workspaces', # noqa: E501 + 'workspace_data_filters': 'workspaceDataFilters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, organization, users, user_groups, data_sources, workspaces, workspace_data_filters, *args, **kwargs): # noqa: E501 + """DeclarativeOrganization - a model defined in OpenAPI + + Args: + organization (DeclarativeOrganizationInfo): + users ([DeclarativeUser]): + user_groups ([DeclarativeUserGroup]): + data_sources ([DeclarativeDataSource]): + workspaces ([DeclarativeWorkspace]): + workspace_data_filters ([DeclarativeWorkspaceDataFilter]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.organization = organization + self.users = users + self.user_groups = user_groups + self.data_sources = data_sources + self.workspaces = workspaces + self.workspace_data_filters = workspace_data_filters + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, organization, users, user_groups, data_sources, workspaces, workspace_data_filters, *args, **kwargs): # noqa: E501 + """DeclarativeOrganization - a model defined in OpenAPI + + Args: + organization (DeclarativeOrganizationInfo): + users ([DeclarativeUser]): + user_groups ([DeclarativeUserGroup]): + data_sources ([DeclarativeDataSource]): + workspaces ([DeclarativeWorkspace]): + workspace_data_filters ([DeclarativeWorkspaceDataFilter]): + + 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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.organization = organization + self.users = users + self.user_groups = user_groups + self.data_sources = data_sources + self.workspaces = workspaces + self.workspace_data_filters = workspace_data_filters + 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-metadata-client/gooddata_metadata_client/model/declarative_organization_info.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_organization_info.py new file mode 100644 index 000000000..85577ff16 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_organization_info.py @@ -0,0 +1,285 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DeclarativeOrganizationInfo(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'hostname': (str,), # noqa: E501 + 'oauth_issuer_location': (str,), # noqa: E501 + 'oauth_client_id': (str,), # noqa: E501 + 'oauth_client_secret': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'hostname': 'hostname', # noqa: E501 + 'oauth_issuer_location': 'oauthIssuerLocation', # noqa: E501 + 'oauth_client_id': 'oauthClientId', # noqa: E501 + 'oauth_client_secret': 'oauthClientSecret', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, name, hostname, *args, **kwargs): # noqa: E501 + """DeclarativeOrganizationInfo - a model defined in OpenAPI + + Args: + id (str): Identifier of the organization. + name (str): Formal name of the organization. + hostname (str): Formal hostname used in deployment. + + 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,) + oauth_issuer_location (str): URI of the authentication provider.. [optional] # noqa: E501 + oauth_client_id (str): Identifier of the authentication provider. [optional] # noqa: E501 + oauth_client_secret (str): Communication secret of the authentication provider (never returned back).. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.name = name + self.hostname = hostname + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, name, hostname, *args, **kwargs): # noqa: E501 + """DeclarativeOrganizationInfo - a model defined in OpenAPI + + Args: + id (str): Identifier of the organization. + name (str): Formal name of the organization. + hostname (str): Formal hostname used in deployment. + + 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,) + oauth_issuer_location (str): URI of the authentication provider.. [optional] # noqa: E501 + oauth_client_id (str): Identifier of the authentication provider. [optional] # noqa: E501 + oauth_client_secret (str): Communication secret of the authentication provider (never returned back).. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.name = name + self.hostname = hostname + 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-metadata-client/gooddata_metadata_client/model/declarative_pdm.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_pdm.py new file mode 100644 index 000000000..a0048d581 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_pdm.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_tables import DeclarativeTables + globals()['DeclarativeTables'] = DeclarativeTables + + +class DeclarativePdm(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'pdm': (DeclarativeTables,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'pdm': 'pdm', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pdm, *args, **kwargs): # noqa: E501 + """DeclarativePdm - a model defined in OpenAPI + + Args: + pdm (DeclarativeTables): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.pdm = pdm + 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, pdm, *args, **kwargs): # noqa: E501 + """DeclarativePdm - a model defined in OpenAPI + + Args: + pdm (DeclarativeTables): + + 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: + 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.pdm = pdm + 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-metadata-client/gooddata_metadata_client/model/declarative_reference.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_reference.py new file mode 100644 index 000000000..3178407b8 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_reference.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.reference_identifier import ReferenceIdentifier + globals()['ReferenceIdentifier'] = ReferenceIdentifier + + +class DeclarativeReference(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'identifier': (ReferenceIdentifier,), # noqa: E501 + 'multivalue': (bool,), # noqa: E501 + 'source_columns': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'identifier': 'identifier', # noqa: E501 + 'multivalue': 'multivalue', # noqa: E501 + 'source_columns': 'sourceColumns', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, identifier, multivalue, source_columns, *args, **kwargs): # noqa: E501 + """DeclarativeReference - a model defined in OpenAPI + + Args: + identifier (ReferenceIdentifier): + multivalue (bool): The multi-value flag enables many-to-many cardinality for references. + source_columns ([str]): An array of source column names for a given reference. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.identifier = identifier + self.multivalue = multivalue + self.source_columns = source_columns + 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, identifier, multivalue, source_columns, *args, **kwargs): # noqa: E501 + """DeclarativeReference - a model defined in OpenAPI + + Args: + identifier (ReferenceIdentifier): + multivalue (bool): The multi-value flag enables many-to-many cardinality for references. + source_columns ([str]): An array of source column names for a given reference. + + 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: + 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.identifier = identifier + self.multivalue = multivalue + self.source_columns = source_columns + 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-metadata-client/gooddata_metadata_client/model/declarative_table.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_table.py new file mode 100644 index 000000000..37c2ddab4 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_table.py @@ -0,0 +1,285 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_column import DeclarativeColumn + globals()['DeclarativeColumn'] = DeclarativeColumn + + +class DeclarativeTable(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'path': ([str],), # noqa: E501 + 'type': (str,), # noqa: E501 + 'columns': ([DeclarativeColumn],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'path': 'path', # noqa: E501 + 'type': 'type', # noqa: E501 + 'columns': 'columns', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, path, type, columns, *args, **kwargs): # noqa: E501 + """DeclarativeTable - a model defined in OpenAPI + + Args: + id (str): Table id. + path ([str]): Path to table. + type (str): Table type: TABLE or VIEW. + columns ([DeclarativeColumn]): An array of physical columns + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.path = path + self.type = type + self.columns = columns + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, path, type, columns, *args, **kwargs): # noqa: E501 + """DeclarativeTable - a model defined in OpenAPI + + Args: + id (str): Table id. + path ([str]): Path to table. + type (str): Table type: TABLE or VIEW. + columns ([DeclarativeColumn]): An array of physical columns + + 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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.path = path + self.type = type + self.columns = columns + 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-metadata-client/gooddata_metadata_client/model/declarative_tables.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_tables.py new file mode 100644 index 000000000..213696d76 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_tables.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_table import DeclarativeTable + globals()['DeclarativeTable'] = DeclarativeTable + + +class DeclarativeTables(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'tables': ([DeclarativeTable],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'tables': 'tables', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, tables, *args, **kwargs): # noqa: E501 + """DeclarativeTables - a model defined in OpenAPI + + Args: + tables ([DeclarativeTable]): An array of physical database tables. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.tables = tables + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, tables, *args, **kwargs): # noqa: E501 + """DeclarativeTables - a model defined in OpenAPI + + Args: + tables ([DeclarativeTable]): An array of physical database tables. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.tables = tables + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/declarative_user.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_user.py new file mode 100644 index 000000000..60bbef914 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_user.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.user_group_identifier import UserGroupIdentifier + globals()['UserGroupIdentifier'] = UserGroupIdentifier + + +class DeclarativeUser(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'auth_id': (str,), # noqa: E501 + 'user_groups': ([UserGroupIdentifier],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'auth_id': 'authId', # noqa: E501 + 'user_groups': 'userGroups', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """DeclarativeUser - a model defined in OpenAPI + + Args: + id (str): User identifier. + + 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,) + auth_id (str): User identification in the authentication manager.. [optional] # noqa: E501 + user_groups ([UserGroupIdentifier]): [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """DeclarativeUser - a model defined in OpenAPI + + Args: + id (str): User identifier. + + 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,) + auth_id (str): User identification in the authentication manager.. [optional] # noqa: E501 + user_groups ([UserGroupIdentifier]): [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + 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-metadata-client/gooddata_metadata_client/model/declarative_user_group.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_user_group.py new file mode 100644 index 000000000..6f43b2363 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_user_group.py @@ -0,0 +1,271 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.user_group_identifier import UserGroupIdentifier + globals()['UserGroupIdentifier'] = UserGroupIdentifier + + +class DeclarativeUserGroup(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'parents': ([UserGroupIdentifier],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'parents': 'parents', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """DeclarativeUserGroup - a model defined in OpenAPI + + Args: + id (str): UserGroup identifier. + + 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,) + parents ([UserGroupIdentifier]): [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """DeclarativeUserGroup - a model defined in OpenAPI + + Args: + id (str): UserGroup identifier. + + 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,) + parents ([UserGroupIdentifier]): [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + 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-metadata-client/gooddata_metadata_client/model/declarative_user_groups.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_user_groups.py new file mode 100644 index 000000000..9212c6e5e --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_user_groups.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_user_group import DeclarativeUserGroup + globals()['DeclarativeUserGroup'] = DeclarativeUserGroup + + +class DeclarativeUserGroups(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'user_groups': ([DeclarativeUserGroup],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'user_groups': 'userGroups', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, user_groups, *args, **kwargs): # noqa: E501 + """DeclarativeUserGroups - a model defined in OpenAPI + + Args: + user_groups ([DeclarativeUserGroup]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.user_groups = user_groups + 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, user_groups, *args, **kwargs): # noqa: E501 + """DeclarativeUserGroups - a model defined in OpenAPI + + Args: + user_groups ([DeclarativeUserGroup]): + + 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: + 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.user_groups = user_groups + 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-metadata-client/gooddata_metadata_client/model/declarative_users.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_users.py new file mode 100644 index 000000000..0aef9101a --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_users.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_user import DeclarativeUser + globals()['DeclarativeUser'] = DeclarativeUser + + +class DeclarativeUsers(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'users': ([DeclarativeUser],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'users': 'users', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, users, *args, **kwargs): # noqa: E501 + """DeclarativeUsers - a model defined in OpenAPI + + Args: + users ([DeclarativeUser]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.users = users + 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, users, *args, **kwargs): # noqa: E501 + """DeclarativeUsers - a model defined in OpenAPI + + Args: + users ([DeclarativeUser]): + + 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: + 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.users = users + 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-metadata-client/gooddata_metadata_client/model/declarative_visualization_object.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_visualization_object.py new file mode 100644 index 000000000..43f566974 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_visualization_object.py @@ -0,0 +1,283 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class DeclarativeVisualizationObject(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 = { + ('tags',): { + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'content': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'content': 'content', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, content, *args, **kwargs): # noqa: E501 + """DeclarativeVisualizationObject - a model defined in OpenAPI + + Args: + id (str): Visualization object ID. + title (str): Visualization object title. + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A server agnostic definition of the visualization object in JSON format. + + 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,) + description (str): Visualization object description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.content = content + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, content, *args, **kwargs): # noqa: E501 + """DeclarativeVisualizationObject - a model defined in OpenAPI + + Args: + id (str): Visualization object ID. + title (str): Visualization object title. + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): A server agnostic definition of the visualization object in JSON format. + + 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,) + description (str): Visualization object description.. [optional] # noqa: E501 + tags ([str]): A list of tags.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.content = content + 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-metadata-client/gooddata_metadata_client/model/declarative_workspace.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace.py new file mode 100644 index 000000000..ddffad04e --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace.py @@ -0,0 +1,285 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_workspace_model import DeclarativeWorkspaceModel + from gooddata_metadata_client.model.workspace_identifier import WorkspaceIdentifier + globals()['DeclarativeWorkspaceModel'] = DeclarativeWorkspaceModel + globals()['WorkspaceIdentifier'] = WorkspaceIdentifier + + +class DeclarativeWorkspace(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'model': (DeclarativeWorkspaceModel,), # noqa: E501 + 'parent': (WorkspaceIdentifier,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'model': 'model', # noqa: E501 + 'parent': 'parent', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, name, model, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspace - a model defined in OpenAPI + + Args: + id (str): Identifier of a workspace + name (str): Name of a workspace to view. + model (DeclarativeWorkspaceModel): + + 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,) + parent (WorkspaceIdentifier): [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.name = name + self.model = model + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, name, model, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspace - a model defined in OpenAPI + + Args: + id (str): Identifier of a workspace + name (str): Name of a workspace to view. + model (DeclarativeWorkspaceModel): + + 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,) + parent (WorkspaceIdentifier): [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.name = name + self.model = model + 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-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filter.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filter.py new file mode 100644 index 000000000..a233a640c --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filter.py @@ -0,0 +1,301 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_workspace_data_filter_setting import DeclarativeWorkspaceDataFilterSetting + from gooddata_metadata_client.model.workspace_identifier import WorkspaceIdentifier + globals()['DeclarativeWorkspaceDataFilterSetting'] = DeclarativeWorkspaceDataFilterSetting + globals()['WorkspaceIdentifier'] = WorkspaceIdentifier + + +class DeclarativeWorkspaceDataFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'column_name': (str,), # noqa: E501 + 'data_source_id': (str,), # noqa: E501 + 'workspace_data_filter_settings': ([DeclarativeWorkspaceDataFilterSetting],), # noqa: E501 + 'description': (str,), # noqa: E501 + 'workspace': (WorkspaceIdentifier,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'column_name': 'columnName', # noqa: E501 + 'data_source_id': 'dataSourceId', # noqa: E501 + 'workspace_data_filter_settings': 'workspaceDataFilterSettings', # noqa: E501 + 'description': 'description', # noqa: E501 + 'workspace': 'workspace', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, column_name, data_source_id, workspace_data_filter_settings, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaceDataFilter - a model defined in OpenAPI + + Args: + id (str): Workspace Data Filters ID. This ID is further used to refer to this instance. + title (str): Workspace Data Filters title. + column_name (str): Workspace Data Filters column name. Data are filtered using this physical column. + data_source_id (str): Data source ID. Workspace Data Filters must always be connected to single data source. + workspace_data_filter_settings ([DeclarativeWorkspaceDataFilterSetting]): Filter settings specifying values of filters valid for the workspace. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str): Workspace Data Filters description.. [optional] # noqa: E501 + workspace (WorkspaceIdentifier): [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.column_name = column_name + self.data_source_id = data_source_id + self.workspace_data_filter_settings = workspace_data_filter_settings + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, column_name, data_source_id, workspace_data_filter_settings, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaceDataFilter - a model defined in OpenAPI + + Args: + id (str): Workspace Data Filters ID. This ID is further used to refer to this instance. + title (str): Workspace Data Filters title. + column_name (str): Workspace Data Filters column name. Data are filtered using this physical column. + data_source_id (str): Data source ID. Workspace Data Filters must always be connected to single data source. + workspace_data_filter_settings ([DeclarativeWorkspaceDataFilterSetting]): Filter settings specifying values of filters valid for the workspace. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + description (str): Workspace Data Filters description.. [optional] # noqa: E501 + workspace (WorkspaceIdentifier): [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.column_name = column_name + self.data_source_id = data_source_id + self.workspace_data_filter_settings = workspace_data_filter_settings + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filter_setting.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filter_setting.py new file mode 100644 index 000000000..b6719b5f9 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filter_setting.py @@ -0,0 +1,289 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.workspace_identifier import WorkspaceIdentifier + globals()['WorkspaceIdentifier'] = WorkspaceIdentifier + + +class DeclarativeWorkspaceDataFilterSetting(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'filter_values': ([str],), # noqa: E501 + 'workspace': (WorkspaceIdentifier,), # noqa: E501 + 'description': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'title': 'title', # noqa: E501 + 'filter_values': 'filterValues', # noqa: E501 + 'workspace': 'workspace', # noqa: E501 + 'description': 'description', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, title, filter_values, workspace, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaceDataFilterSetting - a model defined in OpenAPI + + Args: + id (str): Workspace Data Filters ID. This ID is further used to refer to this instance. + title (str): Workspace Data Filters setting title. + filter_values ([str]): Only those rows are returned, where columnName from filter matches those values. + workspace (WorkspaceIdentifier): + + 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,) + description (str): Workspace Data Filters setting description.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.filter_values = filter_values + self.workspace = workspace + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, title, filter_values, workspace, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaceDataFilterSetting - a model defined in OpenAPI + + Args: + id (str): Workspace Data Filters ID. This ID is further used to refer to this instance. + title (str): Workspace Data Filters setting title. + filter_values ([str]): Only those rows are returned, where columnName from filter matches those values. + workspace (WorkspaceIdentifier): + + 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,) + description (str): Workspace Data Filters setting description.. [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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.title = title + self.filter_values = filter_values + self.workspace = workspace + 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-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filters.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filters.py new file mode 100644 index 000000000..a89bb6446 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_data_filters.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_workspace_data_filter import DeclarativeWorkspaceDataFilter + globals()['DeclarativeWorkspaceDataFilter'] = DeclarativeWorkspaceDataFilter + + +class DeclarativeWorkspaceDataFilters(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'workspace_data_filters': ([DeclarativeWorkspaceDataFilter],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'workspace_data_filters': 'workspaceDataFilters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, workspace_data_filters, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaceDataFilters - a model defined in OpenAPI + + Args: + workspace_data_filters ([DeclarativeWorkspaceDataFilter]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.workspace_data_filters = workspace_data_filters + 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, workspace_data_filters, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaceDataFilters - a model defined in OpenAPI + + Args: + workspace_data_filters ([DeclarativeWorkspaceDataFilter]): + + 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: + 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.workspace_data_filters = workspace_data_filters + 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-metadata-client/gooddata_metadata_client/model/declarative_workspace_model.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_model.py new file mode 100644 index 000000000..599e93d77 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspace_model.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_analytics_layer import DeclarativeAnalyticsLayer + from gooddata_metadata_client.model.declarative_ldm import DeclarativeLdm + globals()['DeclarativeAnalyticsLayer'] = DeclarativeAnalyticsLayer + globals()['DeclarativeLdm'] = DeclarativeLdm + + +class DeclarativeWorkspaceModel(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'ldm': (DeclarativeLdm,), # noqa: E501 + 'analytics': (DeclarativeAnalyticsLayer,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'ldm': 'ldm', # noqa: E501 + 'analytics': 'analytics', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, ldm, analytics, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaceModel - a model defined in OpenAPI + + Args: + ldm (DeclarativeLdm): + analytics (DeclarativeAnalyticsLayer): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.ldm = ldm + self.analytics = analytics + 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, ldm, analytics, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaceModel - a model defined in OpenAPI + + Args: + ldm (DeclarativeLdm): + analytics (DeclarativeAnalyticsLayer): + + 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: + 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.ldm = ldm + self.analytics = analytics + 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-metadata-client/gooddata_metadata_client/model/declarative_workspaces.py b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspaces.py new file mode 100644 index 000000000..a4d8a98da --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/declarative_workspaces.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.declarative_workspace import DeclarativeWorkspace + from gooddata_metadata_client.model.declarative_workspace_data_filter import DeclarativeWorkspaceDataFilter + globals()['DeclarativeWorkspace'] = DeclarativeWorkspace + globals()['DeclarativeWorkspaceDataFilter'] = DeclarativeWorkspaceDataFilter + + +class DeclarativeWorkspaces(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'workspaces': ([DeclarativeWorkspace],), # noqa: E501 + 'workspace_data_filters': ([DeclarativeWorkspaceDataFilter],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'workspaces': 'workspaces', # noqa: E501 + 'workspace_data_filters': 'workspaceDataFilters', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, workspaces, workspace_data_filters, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaces - a model defined in OpenAPI + + Args: + workspaces ([DeclarativeWorkspace]): + workspace_data_filters ([DeclarativeWorkspaceDataFilter]): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.workspaces = workspaces + self.workspace_data_filters = workspace_data_filters + 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, workspaces, workspace_data_filters, *args, **kwargs): # noqa: E501 + """DeclarativeWorkspaces - a model defined in OpenAPI + + Args: + workspaces ([DeclarativeWorkspace]): + workspace_data_filters ([DeclarativeWorkspaceDataFilter]): + + 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: + 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.workspaces = workspaces + self.workspace_data_filters = workspace_data_filters + 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-metadata-client/gooddata_metadata_client/model/generate_ldm_request.py b/gooddata-metadata-client/gooddata_metadata_client/model/generate_ldm_request.py new file mode 100644 index 000000000..09eac437b --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/generate_ldm_request.py @@ -0,0 +1,305 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class GenerateLdmRequest(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 { + 'separator': (str,), # noqa: E501 + 'table_prefix': (str,), # noqa: E501 + 'view_prefix': (str,), # noqa: E501 + 'primary_label_prefix': (str,), # noqa: E501 + 'secondary_label_prefix': (str,), # noqa: E501 + 'fact_prefix': (str,), # noqa: E501 + 'date_granularities': (str,), # noqa: E501 + 'grain_prefix': (str,), # noqa: E501 + 'reference_prefix': (str,), # noqa: E501 + 'grain_reference_prefix': (str,), # noqa: E501 + 'denorm_prefix': (str,), # noqa: E501 + 'wdf_prefix': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'separator': 'separator', # noqa: E501 + 'table_prefix': 'tablePrefix', # noqa: E501 + 'view_prefix': 'viewPrefix', # noqa: E501 + 'primary_label_prefix': 'primaryLabelPrefix', # noqa: E501 + 'secondary_label_prefix': 'secondaryLabelPrefix', # noqa: E501 + 'fact_prefix': 'factPrefix', # noqa: E501 + 'date_granularities': 'dateGranularities', # noqa: E501 + 'grain_prefix': 'grainPrefix', # noqa: E501 + 'reference_prefix': 'referencePrefix', # noqa: E501 + 'grain_reference_prefix': 'grainReferencePrefix', # noqa: E501 + 'denorm_prefix': 'denormPrefix', # noqa: E501 + 'wdf_prefix': 'wdfPrefix', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, separator, *args, **kwargs): # noqa: E501 + """GenerateLdmRequest - a model defined in OpenAPI + + Args: + separator (str): A separator between prefixes and the names. Default is \"__\". + + 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,) + table_prefix (str): Tables starting with this prefix will be included. The prefix is then followed by the value of `separator` parameter. Given the table prefix is `out_table` and separator is `__`, the table with name like `out_table__customers` will be scanned.. [optional] # noqa: E501 + view_prefix (str): Views starting with this prefix will be included. The prefix is then followed by the value of `separator` parameter. Given the view prefix is `out_view` and separator is `__`, the table with name like `out_view__us_customers` will be scanned.. [optional] # noqa: E501 + primary_label_prefix (str): Columns starting with this prefix will be considered as primary labels. The prefix is then followed by the value of `separator` parameter. Given the primary label prefix is `pl` and separator is `__`, the columns with name like `pl__country_id` will be considered as primary labels.. [optional] # noqa: E501 + secondary_label_prefix (str): Columns starting with this prefix will be considered as secondary labels. The prefix is then followed by the value of `separator` parameter. Given the secondary label prefix is `sl` and separator is `__`, the columns with name like `sl__country_id_country_name` will be considered as secondary labels.. [optional] # noqa: E501 + fact_prefix (str): Columns starting with this prefix will be considered as facts. The prefix is then followed by the value of `separator` parameter. Given the fact prefix is `f` and separator is `__`, the columns with name like `f__sold` will be considered as facts.. [optional] # noqa: E501 + date_granularities (str): Option to control date granularities for date datasets. Empty value enables common date granularities (DAY, WEEK, MONTH, QUARTER, YEAR). Default value is `all` which enables all available date granularities, including time granularities (like hours, minutes).. [optional] # noqa: E501 + grain_prefix (str): Columns starting with this prefix will be considered as grains. The prefix is then followed by the value of `separator` parameter. Given the grain prefix is `g` and separator is `__`, the columns with name like `g__name` will be considered as grains.. [optional] # noqa: E501 + reference_prefix (str): Columns starting with this prefix will be considered as references. The prefix is then followed by the value of `separator` parameter. Given the reference prefix is `r` and separator is `__`, the columns with name like `r__customer_name` will be considered as references.. [optional] # noqa: E501 + grain_reference_prefix (str): Columns starting with this prefix will be considered as grain references. The prefix is then followed by the value of `separator` parameter. Given the reference prefix is `gr` and separator is `__`, the columns with name like `gr__customer_name` will be considered as grain references.. [optional] # noqa: E501 + denorm_prefix (str): Columns starting with this prefix will be considered as denormalization references. The prefix is then followed by the value of `separator` parameter. Given the denormalization reference prefix is `dr` and separator is `__`, the columns with name like `dr__customer_name` will be considered as denormalization references.. [optional] # noqa: E501 + wdf_prefix (str): Column serving as workspace data filter. No labels are auto generated for such columns.. [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: + 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.separator = separator + 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, separator, *args, **kwargs): # noqa: E501 + """GenerateLdmRequest - a model defined in OpenAPI + + Args: + separator (str): A separator between prefixes and the names. Default is \"__\". + + 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,) + table_prefix (str): Tables starting with this prefix will be included. The prefix is then followed by the value of `separator` parameter. Given the table prefix is `out_table` and separator is `__`, the table with name like `out_table__customers` will be scanned.. [optional] # noqa: E501 + view_prefix (str): Views starting with this prefix will be included. The prefix is then followed by the value of `separator` parameter. Given the view prefix is `out_view` and separator is `__`, the table with name like `out_view__us_customers` will be scanned.. [optional] # noqa: E501 + primary_label_prefix (str): Columns starting with this prefix will be considered as primary labels. The prefix is then followed by the value of `separator` parameter. Given the primary label prefix is `pl` and separator is `__`, the columns with name like `pl__country_id` will be considered as primary labels.. [optional] # noqa: E501 + secondary_label_prefix (str): Columns starting with this prefix will be considered as secondary labels. The prefix is then followed by the value of `separator` parameter. Given the secondary label prefix is `sl` and separator is `__`, the columns with name like `sl__country_id_country_name` will be considered as secondary labels.. [optional] # noqa: E501 + fact_prefix (str): Columns starting with this prefix will be considered as facts. The prefix is then followed by the value of `separator` parameter. Given the fact prefix is `f` and separator is `__`, the columns with name like `f__sold` will be considered as facts.. [optional] # noqa: E501 + date_granularities (str): Option to control date granularities for date datasets. Empty value enables common date granularities (DAY, WEEK, MONTH, QUARTER, YEAR). Default value is `all` which enables all available date granularities, including time granularities (like hours, minutes).. [optional] # noqa: E501 + grain_prefix (str): Columns starting with this prefix will be considered as grains. The prefix is then followed by the value of `separator` parameter. Given the grain prefix is `g` and separator is `__`, the columns with name like `g__name` will be considered as grains.. [optional] # noqa: E501 + reference_prefix (str): Columns starting with this prefix will be considered as references. The prefix is then followed by the value of `separator` parameter. Given the reference prefix is `r` and separator is `__`, the columns with name like `r__customer_name` will be considered as references.. [optional] # noqa: E501 + grain_reference_prefix (str): Columns starting with this prefix will be considered as grain references. The prefix is then followed by the value of `separator` parameter. Given the reference prefix is `gr` and separator is `__`, the columns with name like `gr__customer_name` will be considered as grain references.. [optional] # noqa: E501 + denorm_prefix (str): Columns starting with this prefix will be considered as denormalization references. The prefix is then followed by the value of `separator` parameter. Given the denormalization reference prefix is `dr` and separator is `__`, the columns with name like `dr__customer_name` will be considered as denormalization references.. [optional] # noqa: E501 + wdf_prefix (str): Column serving as workspace data filter. No labels are auto generated for such columns.. [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: + 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.separator = separator + 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-metadata-client/gooddata_metadata_client/model/grain_identifier.py b/gooddata-metadata-client/gooddata_metadata_client/model/grain_identifier.py new file mode 100644 index 000000000..6a7319f36 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/grain_identifier.py @@ -0,0 +1,271 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class GrainIdentifier(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ATTRIBUTE': "attribute", + 'DATASET': "dataset", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, type, *args, **kwargs): # noqa: E501 + """GrainIdentifier - a model defined in OpenAPI + + Args: + id (str): Grain ID. + type (str): A type of the grain. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, type, *args, **kwargs): # noqa: E501 + """GrainIdentifier - a model defined in OpenAPI + + Args: + id (str): Grain ID. + type (str): A type of the grain. + + 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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/granularities_formatting.py b/gooddata-metadata-client/gooddata_metadata_client/model/granularities_formatting.py new file mode 100644 index 000000000..c65a02a39 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/granularities_formatting.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class GranularitiesFormatting(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title_base': (str,), # noqa: E501 + 'title_pattern': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title_base': 'titleBase', # noqa: E501 + 'title_pattern': 'titlePattern', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, title_base, title_pattern, *args, **kwargs): # noqa: E501 + """GranularitiesFormatting - a model defined in OpenAPI + + Args: + title_base (str): Title base is used as a token in title pattern. If left empty, it is replaced by date dataset title. + title_pattern (str): This pattern is used to generate the title of attributes and labels that result from the granularities. There are two tokens available: * `%titleBase` - represents shared part by all titles, or title of Date Dataset if left empty * `%granularityTitle` - represents `DateGranularity` built-in title + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title_base = title_base + self.title_pattern = title_pattern + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, title_base, title_pattern, *args, **kwargs): # noqa: E501 + """GranularitiesFormatting - a model defined in OpenAPI + + Args: + title_base (str): Title base is used as a token in title pattern. If left empty, it is replaced by date dataset title. + title_pattern (str): This pattern is used to generate the title of attributes and labels that result from the granularities. There are two tokens available: * `%titleBase` - represents shared part by all titles, or title of Date Dataset if left empty * `%granularityTitle` - represents `DateGranularity` built-in title + + 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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.title_base = title_base + self.title_pattern = title_pattern + 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-metadata-client/gooddata_metadata_client/model/json_api_acl_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out.py new file mode 100644 index 000000000..366a56591 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_acl_out_attributes import JsonApiACLOutAttributes + from gooddata_metadata_client.model.json_api_acl_out_relationships import JsonApiACLOutRelationships + globals()['JsonApiACLOutAttributes'] = JsonApiACLOutAttributes + globals()['JsonApiACLOutRelationships'] = JsonApiACLOutRelationships + + +class JsonApiACLOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ACL': "acl", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiACLOutAttributes,), # noqa: E501 + 'relationships': (JsonApiACLOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiACLOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "acl", must be one of ["acl", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiACLOutAttributes): [optional] # noqa: E501 + relationships (JsonApiACLOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "acl") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiACLOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "acl", must be one of ["acl", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiACLOutAttributes): [optional] # noqa: E501 + relationships (JsonApiACLOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "acl") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_attributes.py new file mode 100644 index 000000000..05eb13d38 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_attributes.py @@ -0,0 +1,270 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiACLOutAttributes(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 = { + ('access',): { + 'FULL_ACCESS': "FULL_ACCESS", + }, + ('control',): { + 'ALLOW': "ALLOW", + 'DENY': "DENY", + }, + } + + 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 { + 'access': (str,), # noqa: E501 + 'priority': (int,), # noqa: E501 + 'control': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'access': 'access', # noqa: E501 + 'priority': 'priority', # noqa: E501 + 'control': 'control', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiACLOutAttributes - 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,) + access (str): [optional] if omitted the server will use the default value of "FULL_ACCESS" # noqa: E501 + priority (int): [optional] # noqa: E501 + control (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: + 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 + """JsonApiACLOutAttributes - 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,) + access (str): [optional] if omitted the server will use the default value of "FULL_ACCESS" # noqa: E501 + priority (int): [optional] # noqa: E501 + control (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: + 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-metadata-client/gooddata_metadata_client/model/json_api_acl_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_document.py new file mode 100644 index 000000000..8985a51e4 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_acl_out import JsonApiACLOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiACLOut'] = JsonApiACLOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiACLOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiACLOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiACLOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiACLOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiACLOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiACLOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_list.py new file mode 100644 index 000000000..9f37706c7 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_acl_out_with_links import JsonApiACLOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiACLOutWithLinks'] = JsonApiACLOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiACLOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiACLOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiACLOutList - a model defined in OpenAPI + + Args: + data ([JsonApiACLOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiACLOutList - a model defined in OpenAPI + + Args: + data ([JsonApiACLOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships.py new file mode 100644 index 000000000..4be4ad3d5 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_acl_out_relationships_objects import JsonApiACLOutRelationshipsObjects + from gooddata_metadata_client.model.json_api_acl_out_relationships_subjects import JsonApiACLOutRelationshipsSubjects + globals()['JsonApiACLOutRelationshipsObjects'] = JsonApiACLOutRelationshipsObjects + globals()['JsonApiACLOutRelationshipsSubjects'] = JsonApiACLOutRelationshipsSubjects + + +class JsonApiACLOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'subjects': (JsonApiACLOutRelationshipsSubjects,), # noqa: E501 + 'objects': (JsonApiACLOutRelationshipsObjects,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'subjects': 'subjects', # noqa: E501 + 'objects': 'objects', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiACLOutRelationships - 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,) + subjects (JsonApiACLOutRelationshipsSubjects): [optional] # noqa: E501 + objects (JsonApiACLOutRelationshipsObjects): [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: + 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 + """JsonApiACLOutRelationships - 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,) + subjects (JsonApiACLOutRelationshipsSubjects): [optional] # noqa: E501 + objects (JsonApiACLOutRelationshipsObjects): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships_objects.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships_objects.py new file mode 100644 index 000000000..9225e1b75 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships_objects.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_to_many_linkage import JsonApiUserGroupToManyLinkage + globals()['JsonApiUserGroupToManyLinkage'] = JsonApiUserGroupToManyLinkage + + +class JsonApiACLOutRelationshipsObjects(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiUserGroupToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiACLOutRelationshipsObjects - a model defined in OpenAPI + + Args: + data (JsonApiUserGroupToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiACLOutRelationshipsObjects - a model defined in OpenAPI + + Args: + data (JsonApiUserGroupToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships_subjects.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships_subjects.py new file mode 100644 index 000000000..4b1cdf760 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_relationships_subjects.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_to_many_linkage import JsonApiUserToManyLinkage + globals()['JsonApiUserToManyLinkage'] = JsonApiUserToManyLinkage + + +class JsonApiACLOutRelationshipsSubjects(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiUserToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiACLOutRelationshipsSubjects - a model defined in OpenAPI + + Args: + data (JsonApiUserToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiACLOutRelationshipsSubjects - a model defined in OpenAPI + + Args: + data (JsonApiUserToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_with_links.py new file mode 100644 index 000000000..484cbb9e8 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_acl_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_acl_out import JsonApiACLOut + from gooddata_metadata_client.model.json_api_acl_out_attributes import JsonApiACLOutAttributes + from gooddata_metadata_client.model.json_api_acl_out_relationships import JsonApiACLOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiACLOut'] = JsonApiACLOut + globals()['JsonApiACLOutAttributes'] = JsonApiACLOutAttributes + globals()['JsonApiACLOutRelationships'] = JsonApiACLOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiACLOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ACL': "acl", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiACLOutAttributes,), # noqa: E501 + 'relationships': (JsonApiACLOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiACLOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "acl", must be one of ["acl", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiACLOutAttributes): [optional] # noqa: E501 + relationships (JsonApiACLOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "acl") + _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: + 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 + """JsonApiACLOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "acl", must be one of ["acl", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiACLOutAttributes): [optional] # noqa: E501 + relationships (JsonApiACLOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "acl") + _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: + 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 beause 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': [ + JsonApiACLOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_aclin.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_aclin.py new file mode 100644 index 000000000..fce0bba7f --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_aclin.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_acl_out_attributes import JsonApiACLOutAttributes + from gooddata_metadata_client.model.json_api_acl_out_relationships import JsonApiACLOutRelationships + globals()['JsonApiACLOutAttributes'] = JsonApiACLOutAttributes + globals()['JsonApiACLOutRelationships'] = JsonApiACLOutRelationships + + +class JsonApiACLIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ACL': "acl", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiACLOutAttributes,), # noqa: E501 + 'relationships': (JsonApiACLOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiACLIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "acl", must be one of ["acl", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiACLOutAttributes): [optional] # noqa: E501 + relationships (JsonApiACLOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "acl") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiACLIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "acl", must be one of ["acl", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiACLOutAttributes): [optional] # noqa: E501 + relationships (JsonApiACLOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "acl") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_aclin_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_aclin_document.py new file mode 100644 index 000000000..2dcc94d73 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_aclin_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_aclin import JsonApiACLIn + globals()['JsonApiACLIn'] = JsonApiACLIn + + +class JsonApiACLInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiACLIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiACLInDocument - a model defined in OpenAPI + + Args: + data (JsonApiACLIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiACLInDocument - a model defined in OpenAPI + + Args: + data (JsonApiACLIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_in.py new file mode 100644 index 000000000..cf2e6da54 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_in.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes + globals()['JsonApiAnalyticalDashboardOutAttributes'] = JsonApiAnalyticalDashboardOutAttributes + + +class JsonApiAnalyticalDashboardIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ANALYTICALDASHBOARD': "analyticalDashboard", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAnalyticalDashboardOutAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "analyticalDashboard", must be one of ["analyticalDashboard", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "analyticalDashboard") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "analyticalDashboard", must be one of ["analyticalDashboard", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "analyticalDashboard") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_in_document.py new file mode 100644 index 000000000..ecfb477dd --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_in import JsonApiAnalyticalDashboardIn + globals()['JsonApiAnalyticalDashboardIn'] = JsonApiAnalyticalDashboardIn + + +class JsonApiAnalyticalDashboardInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiAnalyticalDashboardIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardInDocument - a model defined in OpenAPI + + Args: + data (JsonApiAnalyticalDashboardIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardInDocument - a model defined in OpenAPI + + Args: + data (JsonApiAnalyticalDashboardIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_linkage.py new file mode 100644 index 000000000..09abdf26c --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiAnalyticalDashboardLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ANALYTICALDASHBOARD': "analyticalDashboard", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "analyticalDashboard", must be one of ["analyticalDashboard", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "analyticalDashboard") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "analyticalDashboard", must be one of ["analyticalDashboard", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "analyticalDashboard") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out.py new file mode 100644 index 000000000..f7497adf4 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships import JsonApiAnalyticalDashboardOutRelationships + globals()['JsonApiAnalyticalDashboardOutAttributes'] = JsonApiAnalyticalDashboardOutAttributes + globals()['JsonApiAnalyticalDashboardOutRelationships'] = JsonApiAnalyticalDashboardOutRelationships + + +class JsonApiAnalyticalDashboardOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ANALYTICALDASHBOARD': "analyticalDashboard", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAnalyticalDashboardOutAttributes,), # noqa: E501 + 'relationships': (JsonApiAnalyticalDashboardOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "analyticalDashboard", must be one of ["analyticalDashboard", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiAnalyticalDashboardOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "analyticalDashboard") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "analyticalDashboard", must be one of ["analyticalDashboard", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiAnalyticalDashboardOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "analyticalDashboard") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_attributes.py new file mode 100644 index 000000000..a8df7098d --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_attributes.py @@ -0,0 +1,271 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiAnalyticalDashboardOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'are_relations_valid': (bool,), # noqa: E501 + 'content': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'are_relations_valid': 'areRelationsValid', # noqa: E501 + 'content': 'content', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + are_relations_valid (bool): [optional] # noqa: E501 + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Free-form JSON content.. [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: + 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 + """JsonApiAnalyticalDashboardOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + are_relations_valid (bool): [optional] # noqa: E501 + content ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Free-form JSON content.. [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_document.py new file mode 100644 index 000000000..956c5302f --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out import JsonApiAnalyticalDashboardOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiAnalyticalDashboardOut'] = JsonApiAnalyticalDashboardOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiAnalyticalDashboardOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiAnalyticalDashboardOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiAnalyticalDashboardOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiAnalyticalDashboardOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_list.py new file mode 100644 index 000000000..c4a9c6297 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_with_links import JsonApiAnalyticalDashboardOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiAnalyticalDashboardOutWithLinks'] = JsonApiAnalyticalDashboardOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiAnalyticalDashboardOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiAnalyticalDashboardOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutList - a model defined in OpenAPI + + Args: + data ([JsonApiAnalyticalDashboardOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutList - a model defined in OpenAPI + + Args: + data ([JsonApiAnalyticalDashboardOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships.py new file mode 100644 index 000000000..7f493ad4a --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships.py @@ -0,0 +1,291 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_analytical_dashboards import JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_filter_contexts import JsonApiAnalyticalDashboardOutRelationshipsFilterContexts + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_metrics import JsonApiAnalyticalDashboardOutRelationshipsMetrics + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_visualization_objects import JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects + globals()['JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards'] = JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards + globals()['JsonApiAnalyticalDashboardOutRelationshipsDatasets'] = JsonApiAnalyticalDashboardOutRelationshipsDatasets + globals()['JsonApiAnalyticalDashboardOutRelationshipsFilterContexts'] = JsonApiAnalyticalDashboardOutRelationshipsFilterContexts + globals()['JsonApiAnalyticalDashboardOutRelationshipsLabels'] = JsonApiAnalyticalDashboardOutRelationshipsLabels + globals()['JsonApiAnalyticalDashboardOutRelationshipsMetrics'] = JsonApiAnalyticalDashboardOutRelationshipsMetrics + globals()['JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects'] = JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects + + +class JsonApiAnalyticalDashboardOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'visualization_objects': (JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects,), # noqa: E501 + 'analytical_dashboards': (JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards,), # noqa: E501 + 'labels': (JsonApiAnalyticalDashboardOutRelationshipsLabels,), # noqa: E501 + 'metrics': (JsonApiAnalyticalDashboardOutRelationshipsMetrics,), # noqa: E501 + 'datasets': (JsonApiAnalyticalDashboardOutRelationshipsDatasets,), # noqa: E501 + 'filter_contexts': (JsonApiAnalyticalDashboardOutRelationshipsFilterContexts,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'visualization_objects': 'visualizationObjects', # noqa: E501 + 'analytical_dashboards': 'analyticalDashboards', # noqa: E501 + 'labels': 'labels', # noqa: E501 + 'metrics': 'metrics', # noqa: E501 + 'datasets': 'datasets', # noqa: E501 + 'filter_contexts': 'filterContexts', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationships - 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,) + visualization_objects (JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects): [optional] # noqa: E501 + analytical_dashboards (JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [optional] # noqa: E501 + metrics (JsonApiAnalyticalDashboardOutRelationshipsMetrics): [optional] # noqa: E501 + datasets (JsonApiAnalyticalDashboardOutRelationshipsDatasets): [optional] # noqa: E501 + filter_contexts (JsonApiAnalyticalDashboardOutRelationshipsFilterContexts): [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: + 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 + """JsonApiAnalyticalDashboardOutRelationships - 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,) + visualization_objects (JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects): [optional] # noqa: E501 + analytical_dashboards (JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [optional] # noqa: E501 + metrics (JsonApiAnalyticalDashboardOutRelationshipsMetrics): [optional] # noqa: E501 + datasets (JsonApiAnalyticalDashboardOutRelationshipsDatasets): [optional] # noqa: E501 + filter_contexts (JsonApiAnalyticalDashboardOutRelationshipsFilterContexts): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_analytical_dashboards.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_analytical_dashboards.py new file mode 100644 index 000000000..e25739d8c --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_analytical_dashboards.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_to_many_linkage import JsonApiAnalyticalDashboardToManyLinkage + globals()['JsonApiAnalyticalDashboardToManyLinkage'] = JsonApiAnalyticalDashboardToManyLinkage + + +class JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiAnalyticalDashboardToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards - a model defined in OpenAPI + + Args: + data (JsonApiAnalyticalDashboardToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards - a model defined in OpenAPI + + Args: + data (JsonApiAnalyticalDashboardToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_datasets.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_datasets.py new file mode 100644 index 000000000..c97875ae7 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_datasets.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_dataset_to_many_linkage import JsonApiDatasetToManyLinkage + globals()['JsonApiDatasetToManyLinkage'] = JsonApiDatasetToManyLinkage + + +class JsonApiAnalyticalDashboardOutRelationshipsDatasets(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiDatasetToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsDatasets - a model defined in OpenAPI + + Args: + data (JsonApiDatasetToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsDatasets - a model defined in OpenAPI + + Args: + data (JsonApiDatasetToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_filter_contexts.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_filter_contexts.py new file mode 100644 index 000000000..69857eeaa --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_filter_contexts.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_filter_context_to_many_linkage import JsonApiFilterContextToManyLinkage + globals()['JsonApiFilterContextToManyLinkage'] = JsonApiFilterContextToManyLinkage + + +class JsonApiAnalyticalDashboardOutRelationshipsFilterContexts(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiFilterContextToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsFilterContexts - a model defined in OpenAPI + + Args: + data (JsonApiFilterContextToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsFilterContexts - a model defined in OpenAPI + + Args: + data (JsonApiFilterContextToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_labels.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_labels.py new file mode 100644 index 000000000..a45c66c09 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_labels.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_label_to_many_linkage import JsonApiLabelToManyLinkage + globals()['JsonApiLabelToManyLinkage'] = JsonApiLabelToManyLinkage + + +class JsonApiAnalyticalDashboardOutRelationshipsLabels(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiLabelToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsLabels - a model defined in OpenAPI + + Args: + data (JsonApiLabelToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsLabels - a model defined in OpenAPI + + Args: + data (JsonApiLabelToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_metrics.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_metrics.py new file mode 100644 index 000000000..0b6bb41e7 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_metrics.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_metric_to_many_linkage import JsonApiMetricToManyLinkage + globals()['JsonApiMetricToManyLinkage'] = JsonApiMetricToManyLinkage + + +class JsonApiAnalyticalDashboardOutRelationshipsMetrics(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiMetricToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsMetrics - a model defined in OpenAPI + + Args: + data (JsonApiMetricToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsMetrics - a model defined in OpenAPI + + Args: + data (JsonApiMetricToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_visualization_objects.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_visualization_objects.py new file mode 100644 index 000000000..22c44cda1 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_relationships_visualization_objects.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_visualization_object_to_many_linkage import JsonApiVisualizationObjectToManyLinkage + globals()['JsonApiVisualizationObjectToManyLinkage'] = JsonApiVisualizationObjectToManyLinkage + + +class JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiVisualizationObjectToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects - a model defined in OpenAPI + + Args: + data (JsonApiVisualizationObjectToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects - a model defined in OpenAPI + + Args: + data (JsonApiVisualizationObjectToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_with_links.py new file mode 100644 index 000000000..18e4dcceb --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out import JsonApiAnalyticalDashboardOut + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships import JsonApiAnalyticalDashboardOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiAnalyticalDashboardOut'] = JsonApiAnalyticalDashboardOut + globals()['JsonApiAnalyticalDashboardOutAttributes'] = JsonApiAnalyticalDashboardOutAttributes + globals()['JsonApiAnalyticalDashboardOutRelationships'] = JsonApiAnalyticalDashboardOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiAnalyticalDashboardOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ANALYTICALDASHBOARD': "analyticalDashboard", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAnalyticalDashboardOutAttributes,), # noqa: E501 + 'relationships': (JsonApiAnalyticalDashboardOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiAnalyticalDashboardOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "analyticalDashboard", must be one of ["analyticalDashboard", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiAnalyticalDashboardOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "analyticalDashboard") + _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: + 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 + """JsonApiAnalyticalDashboardOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "analyticalDashboard", must be one of ["analyticalDashboard", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiAnalyticalDashboardOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "analyticalDashboard") + _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: + 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 beause 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': [ + JsonApiAnalyticalDashboardOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_to_many_linkage.py new file mode 100644 index 000000000..a9364a573 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_analytical_dashboard_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_linkage import JsonApiAnalyticalDashboardLinkage + globals()['JsonApiAnalyticalDashboardLinkage'] = JsonApiAnalyticalDashboardLinkage + + +class JsonApiAnalyticalDashboardToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiAnalyticalDashboardLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiAnalyticalDashboardToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiAnalyticalDashboardLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiAnalyticalDashboardLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiAnalyticalDashboardToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiAnalyticalDashboardLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiAnalyticalDashboardLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_in.py new file mode 100644 index 000000000..2d1cc3e51 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_in.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiApiTokenIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'APITOKEN': "apiToken", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "apiToken", must be one of ["apiToken", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "apiToken") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "apiToken", must be one of ["apiToken", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "apiToken") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_in_document.py new file mode 100644 index 000000000..89e2300c3 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_api_token_in import JsonApiApiTokenIn + globals()['JsonApiApiTokenIn'] = JsonApiApiTokenIn + + +class JsonApiApiTokenInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiApiTokenIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenInDocument - a model defined in OpenAPI + + Args: + data (JsonApiApiTokenIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenInDocument - a model defined in OpenAPI + + Args: + data (JsonApiApiTokenIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out.py new file mode 100644 index 000000000..9a17785d1 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_api_token_out_attributes import JsonApiApiTokenOutAttributes + globals()['JsonApiApiTokenOutAttributes'] = JsonApiApiTokenOutAttributes + + +class JsonApiApiTokenOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'APITOKEN': "apiToken", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiApiTokenOutAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "apiToken", must be one of ["apiToken", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiApiTokenOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "apiToken") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "apiToken", must be one of ["apiToken", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiApiTokenOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "apiToken") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_attributes.py new file mode 100644 index 000000000..fab5d3404 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_attributes.py @@ -0,0 +1,255 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiApiTokenOutAttributes(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 { + 'bearer_token': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'bearer_token': 'bearerToken', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenOutAttributes - 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,) + bearer_token (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: + 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 + """JsonApiApiTokenOutAttributes - 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,) + bearer_token (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: + 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-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_document.py new file mode 100644 index 000000000..7986ed101 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_document.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_api_token_out import JsonApiApiTokenOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiApiTokenOut'] = JsonApiApiTokenOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiApiTokenOutDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiApiTokenOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiApiTokenOut): + + 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,) + links (ObjectLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiApiTokenOut): + + 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,) + links (ObjectLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_list.py new file mode 100644 index 000000000..45ff01c53 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_list.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_api_token_out_with_links import JsonApiApiTokenOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiApiTokenOutWithLinks'] = JsonApiApiTokenOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiApiTokenOutList(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 = { + ('data',): { + }, + } + + @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 { + 'data': ([JsonApiApiTokenOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenOutList - a model defined in OpenAPI + + Args: + data ([JsonApiApiTokenOutWithLinks]): + + 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,) + links (ListLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenOutList - a model defined in OpenAPI + + Args: + data ([JsonApiApiTokenOutWithLinks]): + + 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,) + links (ListLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_with_links.py new file mode 100644 index 000000000..26f336a42 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_api_token_out_with_links.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_api_token_out import JsonApiApiTokenOut + from gooddata_metadata_client.model.json_api_api_token_out_attributes import JsonApiApiTokenOutAttributes + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiApiTokenOut'] = JsonApiApiTokenOut + globals()['JsonApiApiTokenOutAttributes'] = JsonApiApiTokenOutAttributes + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiApiTokenOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'APITOKEN': "apiToken", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiApiTokenOutAttributes,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiApiTokenOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "apiToken", must be one of ["apiToken", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiApiTokenOutAttributes): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "apiToken") + _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: + 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 + """JsonApiApiTokenOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "apiToken", must be one of ["apiToken", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiApiTokenOutAttributes): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "apiToken") + _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: + 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 beause 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': [ + JsonApiApiTokenOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_linkage.py new file mode 100644 index 000000000..acddf21ee --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiAttributeLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ATTRIBUTE': "attribute", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiAttributeLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "attribute", must be one of ["attribute", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "attribute") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiAttributeLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "attribute", must be one of ["attribute", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "attribute") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out.py new file mode 100644 index 000000000..18dd166df --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_attribute_out_attributes import JsonApiAttributeOutAttributes + from gooddata_metadata_client.model.json_api_attribute_out_relationships import JsonApiAttributeOutRelationships + globals()['JsonApiAttributeOutAttributes'] = JsonApiAttributeOutAttributes + globals()['JsonApiAttributeOutRelationships'] = JsonApiAttributeOutRelationships + + +class JsonApiAttributeOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ATTRIBUTE': "attribute", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAttributeOutAttributes,), # noqa: E501 + 'relationships': (JsonApiAttributeOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "attribute", must be one of ["attribute", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAttributeOutAttributes): [optional] # noqa: E501 + relationships (JsonApiAttributeOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "attribute") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "attribute", must be one of ["attribute", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAttributeOutAttributes): [optional] # noqa: E501 + relationships (JsonApiAttributeOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "attribute") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_attributes.py new file mode 100644 index 000000000..e02f123a0 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_attributes.py @@ -0,0 +1,288 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiAttributeOutAttributes(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 { + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'granularity': (str,), # noqa: E501 + 'are_relations_valid': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'granularity': 'granularity', # noqa: E501 + 'are_relations_valid': 'areRelationsValid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + granularity (str): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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 + """JsonApiAttributeOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + granularity (str): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_document.py new file mode 100644 index 000000000..2e5a50b2e --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_attribute_out import JsonApiAttributeOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiAttributeOut'] = JsonApiAttributeOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiAttributeOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiAttributeOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiAttributeOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiAttributeOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_list.py new file mode 100644 index 000000000..3537fc322 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiAttributeOutWithLinks'] = JsonApiAttributeOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiAttributeOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiAttributeOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOutList - a model defined in OpenAPI + + Args: + data ([JsonApiAttributeOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOutList - a model defined in OpenAPI + + Args: + data ([JsonApiAttributeOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_relationships.py new file mode 100644 index 000000000..47105e028 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_relationships.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels + from gooddata_metadata_client.model.json_api_attribute_out_relationships_dataset import JsonApiAttributeOutRelationshipsDataset + globals()['JsonApiAnalyticalDashboardOutRelationshipsLabels'] = JsonApiAnalyticalDashboardOutRelationshipsLabels + globals()['JsonApiAttributeOutRelationshipsDataset'] = JsonApiAttributeOutRelationshipsDataset + + +class JsonApiAttributeOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dataset': (JsonApiAttributeOutRelationshipsDataset,), # noqa: E501 + 'labels': (JsonApiAnalyticalDashboardOutRelationshipsLabels,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dataset': 'dataset', # noqa: E501 + 'labels': 'labels', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOutRelationships - 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,) + dataset (JsonApiAttributeOutRelationshipsDataset): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [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: + 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 + """JsonApiAttributeOutRelationships - 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,) + dataset (JsonApiAttributeOutRelationshipsDataset): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_relationships_dataset.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_relationships_dataset.py new file mode 100644 index 000000000..ee0868e9f --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_relationships_dataset.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_dataset_to_one_linkage import JsonApiDatasetToOneLinkage + globals()['JsonApiDatasetToOneLinkage'] = JsonApiDatasetToOneLinkage + + +class JsonApiAttributeOutRelationshipsDataset(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiDatasetToOneLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOutRelationshipsDataset - a model defined in OpenAPI + + Args: + data (JsonApiDatasetToOneLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOutRelationshipsDataset - a model defined in OpenAPI + + Args: + data (JsonApiDatasetToOneLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_with_links.py new file mode 100644 index 000000000..db6b0fdd4 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_attribute_out import JsonApiAttributeOut + from gooddata_metadata_client.model.json_api_attribute_out_attributes import JsonApiAttributeOutAttributes + from gooddata_metadata_client.model.json_api_attribute_out_relationships import JsonApiAttributeOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiAttributeOut'] = JsonApiAttributeOut + globals()['JsonApiAttributeOutAttributes'] = JsonApiAttributeOutAttributes + globals()['JsonApiAttributeOutRelationships'] = JsonApiAttributeOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiAttributeOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ATTRIBUTE': "attribute", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAttributeOutAttributes,), # noqa: E501 + 'relationships': (JsonApiAttributeOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiAttributeOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "attribute", must be one of ["attribute", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAttributeOutAttributes): [optional] # noqa: E501 + relationships (JsonApiAttributeOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "attribute") + _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: + 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 + """JsonApiAttributeOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "attribute", must be one of ["attribute", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAttributeOutAttributes): [optional] # noqa: E501 + relationships (JsonApiAttributeOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "attribute") + _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: + 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 beause 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': [ + JsonApiAttributeOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_to_many_linkage.py new file mode 100644 index 000000000..a78596630 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_attribute_linkage import JsonApiAttributeLinkage + globals()['JsonApiAttributeLinkage'] = JsonApiAttributeLinkage + + +class JsonApiAttributeToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiAttributeLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiAttributeToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiAttributeLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiAttributeLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiAttributeToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiAttributeLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiAttributeLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_to_one_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_to_one_linkage.py new file mode 100644 index 000000000..687bf3daf --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_attribute_to_one_linkage.py @@ -0,0 +1,318 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_attribute_linkage import JsonApiAttributeLinkage + globals()['JsonApiAttributeLinkage'] = JsonApiAttributeLinkage + + +class JsonApiAttributeToOneLinkage(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ATTRIBUTE': "attribute", + }, + } + + 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 = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiAttributeToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "attribute" # 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: + 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 + """JsonApiAttributeToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "attribute" # 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: + 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 beause 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': [ + JsonApiAttributeLinkage, + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_in.py new file mode 100644 index 000000000..e0ff133d8 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_in.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_cookie_security_configuration_out_attributes import JsonApiCookieSecurityConfigurationOutAttributes + globals()['JsonApiCookieSecurityConfigurationOutAttributes'] = JsonApiCookieSecurityConfigurationOutAttributes + + +class JsonApiCookieSecurityConfigurationIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'COOKIESECURITYCONFIGURATION': "cookieSecurityConfiguration", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiCookieSecurityConfigurationOutAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiCookieSecurityConfigurationIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "cookieSecurityConfiguration", must be one of ["cookieSecurityConfiguration", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiCookieSecurityConfigurationOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "cookieSecurityConfiguration") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiCookieSecurityConfigurationIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "cookieSecurityConfiguration", must be one of ["cookieSecurityConfiguration", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiCookieSecurityConfigurationOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "cookieSecurityConfiguration") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_in_document.py new file mode 100644 index 000000000..14599dfc9 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_cookie_security_configuration_in import JsonApiCookieSecurityConfigurationIn + globals()['JsonApiCookieSecurityConfigurationIn'] = JsonApiCookieSecurityConfigurationIn + + +class JsonApiCookieSecurityConfigurationInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiCookieSecurityConfigurationIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiCookieSecurityConfigurationInDocument - a model defined in OpenAPI + + Args: + data (JsonApiCookieSecurityConfigurationIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiCookieSecurityConfigurationInDocument - a model defined in OpenAPI + + Args: + data (JsonApiCookieSecurityConfigurationIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out.py new file mode 100644 index 000000000..bba15a3ed --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_cookie_security_configuration_out_attributes import JsonApiCookieSecurityConfigurationOutAttributes + globals()['JsonApiCookieSecurityConfigurationOutAttributes'] = JsonApiCookieSecurityConfigurationOutAttributes + + +class JsonApiCookieSecurityConfigurationOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'COOKIESECURITYCONFIGURATION': "cookieSecurityConfiguration", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiCookieSecurityConfigurationOutAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiCookieSecurityConfigurationOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "cookieSecurityConfiguration", must be one of ["cookieSecurityConfiguration", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiCookieSecurityConfigurationOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "cookieSecurityConfiguration") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiCookieSecurityConfigurationOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "cookieSecurityConfiguration", must be one of ["cookieSecurityConfiguration", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiCookieSecurityConfigurationOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "cookieSecurityConfiguration") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out_attributes.py new file mode 100644 index 000000000..22281523e --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out_attributes.py @@ -0,0 +1,259 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiCookieSecurityConfigurationOutAttributes(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 { + 'last_rotation': (datetime,), # noqa: E501 + 'rotation_interval': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'last_rotation': 'lastRotation', # noqa: E501 + 'rotation_interval': 'rotationInterval', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiCookieSecurityConfigurationOutAttributes - 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,) + last_rotation (datetime): [optional] # noqa: E501 + rotation_interval (str): Length of interval between automatic rotations expressed in format of ISO 8601 duration. [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: + 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 + """JsonApiCookieSecurityConfigurationOutAttributes - 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,) + last_rotation (datetime): [optional] # noqa: E501 + rotation_interval (str): Length of interval between automatic rotations expressed in format of ISO 8601 duration. [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out_document.py new file mode 100644 index 000000000..b64d8da3b --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_cookie_security_configuration_out_document.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_cookie_security_configuration_out import JsonApiCookieSecurityConfigurationOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiCookieSecurityConfigurationOut'] = JsonApiCookieSecurityConfigurationOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiCookieSecurityConfigurationOutDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiCookieSecurityConfigurationOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiCookieSecurityConfigurationOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiCookieSecurityConfigurationOut): + + 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,) + links (ObjectLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiCookieSecurityConfigurationOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiCookieSecurityConfigurationOut): + + 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,) + links (ObjectLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in.py new file mode 100644 index 000000000..6754a716c --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in.py @@ -0,0 +1,289 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_in_attributes import JsonApiDataSourceInAttributes + globals()['JsonApiDataSourceInAttributes'] = JsonApiDataSourceInAttributes + + +class JsonApiDataSourceIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASOURCE': "dataSource", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiDataSourceInAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiDataSourceInAttributes): + + Keyword Args: + type (str): Object type. defaults to "dataSource", must be one of ["dataSource", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataSource") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiDataSourceInAttributes): + + Keyword Args: + type (str): Object type. defaults to "dataSource", must be one of ["dataSource", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataSource") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + 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-metadata-client/gooddata_metadata_client/model/json_api_data_source_in_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in_attributes.py new file mode 100644 index 000000000..7344a4fd7 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in_attributes.py @@ -0,0 +1,301 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiDataSourceInAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'POSTGRESQL': "POSTGRESQL", + 'REDSHIFT': "REDSHIFT", + 'VERTICA': "VERTICA", + 'SNOWFLAKE': "SNOWFLAKE", + 'ADS': "ADS", + 'BIGQUERY': "BIGQUERY", + 'MSSQL': "MSSQL", + 'PRESTO': "PRESTO", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'schema': (str,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'password': (str,), # noqa: E501 + 'token': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + 'url': 'url', # noqa: E501 + 'schema': 'schema', # noqa: E501 + 'username': 'username', # noqa: E501 + 'password': 'password', # noqa: E501 + 'token': 'token', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, type, url, schema, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceInAttributes - a model defined in OpenAPI + + Args: + name (str): + type (str): + url (str): + schema (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + username (str): [optional] # noqa: E501 + password (str): [optional] # noqa: E501 + token (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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.type = type + self.url = url + self.schema = schema + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, type, url, schema, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceInAttributes - a model defined in OpenAPI + + Args: + name (str): + type (str): + url (str): + schema (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + username (str): [optional] # noqa: E501 + password (str): [optional] # noqa: E501 + token (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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.type = type + self.url = url + self.schema = schema + 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-metadata-client/gooddata_metadata_client/model/json_api_data_source_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in_document.py new file mode 100644 index 000000000..d83334472 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_in import JsonApiDataSourceIn + globals()['JsonApiDataSourceIn'] = JsonApiDataSourceIn + + +class JsonApiDataSourceInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiDataSourceIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceInDocument - a model defined in OpenAPI + + Args: + data (JsonApiDataSourceIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceInDocument - a model defined in OpenAPI + + Args: + data (JsonApiDataSourceIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out.py new file mode 100644 index 000000000..461127d82 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out.py @@ -0,0 +1,289 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_out_attributes import JsonApiDataSourceOutAttributes + globals()['JsonApiDataSourceOutAttributes'] = JsonApiDataSourceOutAttributes + + +class JsonApiDataSourceOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASOURCE': "dataSource", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiDataSourceOutAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiDataSourceOutAttributes): + + Keyword Args: + type (str): Object type. defaults to "dataSource", must be one of ["dataSource", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataSource") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiDataSourceOutAttributes): + + Keyword Args: + type (str): Object type. defaults to "dataSource", must be one of ["dataSource", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataSource") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + 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-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_attributes.py new file mode 100644 index 000000000..2685c191a --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_attributes.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiDataSourceOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'POSTGRESQL': "POSTGRESQL", + 'REDSHIFT': "REDSHIFT", + 'VERTICA': "VERTICA", + 'SNOWFLAKE': "SNOWFLAKE", + 'ADS': "ADS", + 'BIGQUERY': "BIGQUERY", + 'MSSQL': "MSSQL", + 'PRESTO': "PRESTO", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'url': (str,), # noqa: E501 + 'schema': (str,), # noqa: E501 + 'username': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'type': 'type', # noqa: E501 + 'url': 'url', # noqa: E501 + 'schema': 'schema', # noqa: E501 + 'username': 'username', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, type, url, schema, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceOutAttributes - a model defined in OpenAPI + + Args: + name (str): + type (str): + url (str): + schema (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + username (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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.type = type + self.url = url + self.schema = schema + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, type, url, schema, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceOutAttributes - a model defined in OpenAPI + + Args: + name (str): + type (str): + url (str): + schema (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + username (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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.type = type + self.url = url + self.schema = schema + 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-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_document.py new file mode 100644 index 000000000..3be7f6479 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_document.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_out import JsonApiDataSourceOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiDataSourceOut'] = JsonApiDataSourceOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiDataSourceOutDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiDataSourceOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiDataSourceOut): + + 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,) + links (ObjectLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiDataSourceOut): + + 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,) + links (ObjectLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_list.py new file mode 100644 index 000000000..78456ab60 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_list.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_out_with_links import JsonApiDataSourceOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiDataSourceOutWithLinks'] = JsonApiDataSourceOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiDataSourceOutList(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 = { + ('data',): { + }, + } + + @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 { + 'data': ([JsonApiDataSourceOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceOutList - a model defined in OpenAPI + + Args: + data ([JsonApiDataSourceOutWithLinks]): + + 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,) + links (ListLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceOutList - a model defined in OpenAPI + + Args: + data ([JsonApiDataSourceOutWithLinks]): + + 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,) + links (ListLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_with_links.py new file mode 100644 index 000000000..553f40348 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_out_with_links.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_out import JsonApiDataSourceOut + from gooddata_metadata_client.model.json_api_data_source_out_attributes import JsonApiDataSourceOutAttributes + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiDataSourceOut'] = JsonApiDataSourceOut + globals()['JsonApiDataSourceOutAttributes'] = JsonApiDataSourceOutAttributes + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiDataSourceOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASOURCE': "dataSource", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiDataSourceOutAttributes,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "dataSource", must be one of ["dataSource", ] # noqa: E501 + attributes (JsonApiDataSourceOutAttributes): + _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,) + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataSource") + _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: + 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 + """JsonApiDataSourceOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "dataSource", must be one of ["dataSource", ] # noqa: E501 + attributes (JsonApiDataSourceOutAttributes): + _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,) + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataSource") + _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: + 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 beause 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': [ + JsonApiDataSourceOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out.py new file mode 100644 index 000000000..b90349dd1 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_table_out_attributes import JsonApiDataSourceTableOutAttributes + globals()['JsonApiDataSourceTableOutAttributes'] = JsonApiDataSourceTableOutAttributes + + +class JsonApiDataSourceTableOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASOURCETABLE': "dataSourceTable", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiDataSourceTableOutAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "dataSourceTable", must be one of ["dataSourceTable", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiDataSourceTableOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataSourceTable") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "dataSourceTable", must be one of ["dataSourceTable", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiDataSourceTableOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataSourceTable") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_attributes.py new file mode 100644 index 000000000..d77f73910 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_attributes.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_table_out_attributes_columns import JsonApiDataSourceTableOutAttributesColumns + globals()['JsonApiDataSourceTableOutAttributesColumns'] = JsonApiDataSourceTableOutAttributesColumns + + +class JsonApiDataSourceTableOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'TABLE': "TABLE", + 'VIEW': "VIEW", + }, + } + + 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 { + 'path': ([str],), # noqa: E501 + 'type': (str,), # noqa: E501 + 'columns': ([JsonApiDataSourceTableOutAttributesColumns],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'path': 'path', # noqa: E501 + 'type': 'type', # noqa: E501 + 'columns': 'columns', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOutAttributes - 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,) + path ([str]): Path to table.. [optional] # noqa: E501 + type (str): [optional] # noqa: E501 + columns ([JsonApiDataSourceTableOutAttributesColumns]): [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: + 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 + """JsonApiDataSourceTableOutAttributes - 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,) + path ([str]): Path to table.. [optional] # noqa: E501 + type (str): [optional] # noqa: E501 + columns ([JsonApiDataSourceTableOutAttributesColumns]): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_attributes_columns.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_attributes_columns.py new file mode 100644 index 000000000..9648efe34 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_attributes_columns.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiDataSourceTableOutAttributesColumns(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 = { + ('data_type',): { + 'INT': "INT", + 'STRING': "STRING", + 'DATE': "DATE", + 'NUMERIC': "NUMERIC", + 'TIMESTAMP': "TIMESTAMP", + 'BOOLEAN': "BOOLEAN", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'data_type': (str,), # noqa: E501 + 'is_primary_key': (bool,), # noqa: E501 + 'referenced_table_id': (str,), # noqa: E501 + 'referenced_table_column': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'data_type': 'dataType', # noqa: E501 + 'is_primary_key': 'isPrimaryKey', # noqa: E501 + 'referenced_table_id': 'referencedTableId', # noqa: E501 + 'referenced_table_column': 'referencedTableColumn', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, data_type, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOutAttributesColumns - a model defined in OpenAPI + + Args: + name (str): + data_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + is_primary_key (bool): [optional] # noqa: E501 + referenced_table_id (str): [optional] # noqa: E501 + referenced_table_column (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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.data_type = data_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, name, data_type, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOutAttributesColumns - a model defined in OpenAPI + + Args: + name (str): + data_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + is_primary_key (bool): [optional] # noqa: E501 + referenced_table_id (str): [optional] # noqa: E501 + referenced_table_column (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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.name = name + self.data_type = data_type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_document.py new file mode 100644 index 000000000..90fbd43ba --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_document.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_table_out import JsonApiDataSourceTableOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiDataSourceTableOut'] = JsonApiDataSourceTableOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiDataSourceTableOutDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiDataSourceTableOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiDataSourceTableOut): + + 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,) + links (ObjectLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiDataSourceTableOut): + + 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,) + links (ObjectLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_list.py new file mode 100644 index 000000000..20397f004 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_list.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_table_out_with_links import JsonApiDataSourceTableOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiDataSourceTableOutWithLinks'] = JsonApiDataSourceTableOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiDataSourceTableOutList(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 = { + ('data',): { + }, + } + + @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 { + 'data': ([JsonApiDataSourceTableOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOutList - a model defined in OpenAPI + + Args: + data ([JsonApiDataSourceTableOutWithLinks]): + + 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,) + links (ListLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOutList - a model defined in OpenAPI + + Args: + data ([JsonApiDataSourceTableOutWithLinks]): + + 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,) + links (ListLinks): [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_with_links.py new file mode 100644 index 000000000..495111f90 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_data_source_table_out_with_links.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_data_source_table_out import JsonApiDataSourceTableOut + from gooddata_metadata_client.model.json_api_data_source_table_out_attributes import JsonApiDataSourceTableOutAttributes + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiDataSourceTableOut'] = JsonApiDataSourceTableOut + globals()['JsonApiDataSourceTableOutAttributes'] = JsonApiDataSourceTableOutAttributes + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiDataSourceTableOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASOURCETABLE': "dataSourceTable", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiDataSourceTableOutAttributes,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiDataSourceTableOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "dataSourceTable", must be one of ["dataSourceTable", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiDataSourceTableOutAttributes): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataSourceTable") + _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: + 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 + """JsonApiDataSourceTableOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "dataSourceTable", must be one of ["dataSourceTable", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiDataSourceTableOutAttributes): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataSourceTable") + _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: + 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 beause 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': [ + JsonApiDataSourceTableOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_linkage.py new file mode 100644 index 000000000..1d0a47a25 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiDatasetLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASET': "dataset", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiDatasetLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataset") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiDatasetLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataset") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out.py new file mode 100644 index 000000000..f82ad0cef --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out.py @@ -0,0 +1,295 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_dataset_out_attributes import JsonApiDatasetOutAttributes + from gooddata_metadata_client.model.json_api_dataset_out_relationships import JsonApiDatasetOutRelationships + globals()['JsonApiDatasetOutAttributes'] = JsonApiDatasetOutAttributes + globals()['JsonApiDatasetOutRelationships'] = JsonApiDatasetOutRelationships + + +class JsonApiDatasetOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASET': "dataset", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiDatasetOutAttributes,), # noqa: E501 + 'relationships': (JsonApiDatasetOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiDatasetOutAttributes): + + Keyword Args: + type (str): Object type. defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + relationships (JsonApiDatasetOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataset") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiDatasetOutAttributes): + + Keyword Args: + type (str): Object type. defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + relationships (JsonApiDatasetOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataset") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + 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-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes.py new file mode 100644 index 000000000..5931d0ad7 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes.py @@ -0,0 +1,301 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_dataset_out_attributes_grain import JsonApiDatasetOutAttributesGrain + from gooddata_metadata_client.model.json_api_dataset_out_attributes_reference_properties import JsonApiDatasetOutAttributesReferenceProperties + globals()['JsonApiDatasetOutAttributesGrain'] = JsonApiDatasetOutAttributesGrain + globals()['JsonApiDatasetOutAttributesReferenceProperties'] = JsonApiDatasetOutAttributesReferenceProperties + + +class JsonApiDatasetOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'NORMAL': "NORMAL", + 'DATE': "DATE", + }, + } + + 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 { + 'type': (str,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'grain': ([JsonApiDatasetOutAttributesGrain],), # noqa: E501 + 'reference_properties': ([JsonApiDatasetOutAttributesReferenceProperties],), # noqa: E501 + 'data_source_table_id': (str,), # noqa: E501 + 'are_relations_valid': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'type': 'type', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'grain': 'grain', # noqa: E501 + 'reference_properties': 'referenceProperties', # noqa: E501 + 'data_source_table_id': 'dataSourceTableId', # noqa: E501 + 'are_relations_valid': 'areRelationsValid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutAttributes - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + grain ([JsonApiDatasetOutAttributesGrain]): [optional] # noqa: E501 + reference_properties ([JsonApiDatasetOutAttributesReferenceProperties]): [optional] # noqa: E501 + data_source_table_id (str): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, type, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutAttributes - a model defined in OpenAPI + + Args: + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + grain ([JsonApiDatasetOutAttributesGrain]): [optional] # noqa: E501 + reference_properties ([JsonApiDatasetOutAttributesReferenceProperties]): [optional] # noqa: E501 + data_source_table_id (str): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes_grain.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes_grain.py new file mode 100644 index 000000000..b21c2dead --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes_grain.py @@ -0,0 +1,271 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiDatasetOutAttributesGrain(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ATTRIBUTE': "attribute", + 'DATASET': "dataset", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, type, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutAttributesGrain - a model defined in OpenAPI + + Args: + id (str): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, type, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutAttributesGrain - a model defined in OpenAPI + + Args: + id (str): + type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes_reference_properties.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes_reference_properties.py new file mode 100644 index 000000000..0fa368a1d --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_attributes_reference_properties.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.dataset_reference_identifier import DatasetReferenceIdentifier + globals()['DatasetReferenceIdentifier'] = DatasetReferenceIdentifier + + +class JsonApiDatasetOutAttributesReferenceProperties(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'identifier': (DatasetReferenceIdentifier,), # noqa: E501 + 'multivalue': (bool,), # noqa: E501 + 'source_columns': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'identifier': 'identifier', # noqa: E501 + 'multivalue': 'multivalue', # noqa: E501 + 'source_columns': 'sourceColumns', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, identifier, multivalue, source_columns, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutAttributesReferenceProperties - a model defined in OpenAPI + + Args: + identifier (DatasetReferenceIdentifier): + multivalue (bool): + source_columns ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.identifier = identifier + self.multivalue = multivalue + self.source_columns = source_columns + 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, identifier, multivalue, source_columns, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutAttributesReferenceProperties - a model defined in OpenAPI + + Args: + identifier (DatasetReferenceIdentifier): + multivalue (bool): + source_columns ([str]): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.identifier = identifier + self.multivalue = multivalue + self.source_columns = source_columns + 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-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_document.py new file mode 100644 index 000000000..fe7430267 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_dataset_out import JsonApiDatasetOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiDatasetOut'] = JsonApiDatasetOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiDatasetOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiDatasetOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiDatasetOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiDatasetOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_list.py new file mode 100644 index 000000000..688d5288e --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiDatasetOutWithLinks'] = JsonApiDatasetOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiDatasetOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiDatasetOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutList - a model defined in OpenAPI + + Args: + data ([JsonApiDatasetOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutList - a model defined in OpenAPI + + Args: + data ([JsonApiDatasetOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships.py new file mode 100644 index 000000000..70a588cf0 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets + from gooddata_metadata_client.model.json_api_dataset_out_relationships_attributes import JsonApiDatasetOutRelationshipsAttributes + from gooddata_metadata_client.model.json_api_dataset_out_relationships_facts import JsonApiDatasetOutRelationshipsFacts + globals()['JsonApiAnalyticalDashboardOutRelationshipsDatasets'] = JsonApiAnalyticalDashboardOutRelationshipsDatasets + globals()['JsonApiDatasetOutRelationshipsAttributes'] = JsonApiDatasetOutRelationshipsAttributes + globals()['JsonApiDatasetOutRelationshipsFacts'] = JsonApiDatasetOutRelationshipsFacts + + +class JsonApiDatasetOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attributes': (JsonApiDatasetOutRelationshipsAttributes,), # noqa: E501 + 'facts': (JsonApiDatasetOutRelationshipsFacts,), # noqa: E501 + 'references': (JsonApiAnalyticalDashboardOutRelationshipsDatasets,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attributes': 'attributes', # noqa: E501 + 'facts': 'facts', # noqa: E501 + 'references': 'references', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutRelationships - 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,) + attributes (JsonApiDatasetOutRelationshipsAttributes): [optional] # noqa: E501 + facts (JsonApiDatasetOutRelationshipsFacts): [optional] # noqa: E501 + references (JsonApiAnalyticalDashboardOutRelationshipsDatasets): [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: + 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 + """JsonApiDatasetOutRelationships - 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,) + attributes (JsonApiDatasetOutRelationshipsAttributes): [optional] # noqa: E501 + facts (JsonApiDatasetOutRelationshipsFacts): [optional] # noqa: E501 + references (JsonApiAnalyticalDashboardOutRelationshipsDatasets): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships_attributes.py new file mode 100644 index 000000000..cd93d4700 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships_attributes.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_attribute_to_many_linkage import JsonApiAttributeToManyLinkage + globals()['JsonApiAttributeToManyLinkage'] = JsonApiAttributeToManyLinkage + + +class JsonApiDatasetOutRelationshipsAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiAttributeToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutRelationshipsAttributes - a model defined in OpenAPI + + Args: + data (JsonApiAttributeToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutRelationshipsAttributes - a model defined in OpenAPI + + Args: + data (JsonApiAttributeToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships_facts.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships_facts.py new file mode 100644 index 000000000..309d5cb9f --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_relationships_facts.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_fact_to_many_linkage import JsonApiFactToManyLinkage + globals()['JsonApiFactToManyLinkage'] = JsonApiFactToManyLinkage + + +class JsonApiDatasetOutRelationshipsFacts(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiFactToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutRelationshipsFacts - a model defined in OpenAPI + + Args: + data (JsonApiFactToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutRelationshipsFacts - a model defined in OpenAPI + + Args: + data (JsonApiFactToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_with_links.py new file mode 100644 index 000000000..53b3eccfb --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_dataset_out import JsonApiDatasetOut + from gooddata_metadata_client.model.json_api_dataset_out_attributes import JsonApiDatasetOutAttributes + from gooddata_metadata_client.model.json_api_dataset_out_relationships import JsonApiDatasetOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiDatasetOut'] = JsonApiDatasetOut + globals()['JsonApiDatasetOutAttributes'] = JsonApiDatasetOutAttributes + globals()['JsonApiDatasetOutRelationships'] = JsonApiDatasetOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiDatasetOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASET': "dataset", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiDatasetOutAttributes,), # noqa: E501 + 'relationships': (JsonApiDatasetOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiDatasetOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + attributes (JsonApiDatasetOutAttributes): + _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,) + relationships (JsonApiDatasetOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataset") + _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: + 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 + """JsonApiDatasetOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + attributes (JsonApiDatasetOutAttributes): + _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,) + relationships (JsonApiDatasetOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "dataset") + _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: + 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 beause 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': [ + JsonApiDatasetOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_to_many_linkage.py new file mode 100644 index 000000000..82f379fa0 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_dataset_linkage import JsonApiDatasetLinkage + globals()['JsonApiDatasetLinkage'] = JsonApiDatasetLinkage + + +class JsonApiDatasetToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiDatasetLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiDatasetToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiDatasetLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiDatasetLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiDatasetToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiDatasetLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiDatasetLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_to_one_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_to_one_linkage.py new file mode 100644 index 000000000..2705a4cdd --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_dataset_to_one_linkage.py @@ -0,0 +1,318 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_dataset_linkage import JsonApiDatasetLinkage + globals()['JsonApiDatasetLinkage'] = JsonApiDatasetLinkage + + +class JsonApiDatasetToOneLinkage(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASET': "dataset", + }, + } + + 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 = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiDatasetToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "dataset" # 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: + 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 + """JsonApiDatasetToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "dataset" # 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: + 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 beause 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': [ + JsonApiDatasetLinkage, + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_linkage.py new file mode 100644 index 000000000..1186e5e95 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiFactLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'FACT': "fact", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiFactLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "fact", must be one of ["fact", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "fact") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiFactLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "fact", must be one of ["fact", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "fact") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out.py new file mode 100644 index 000000000..7d76bf9bd --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_fact_out_attributes import JsonApiFactOutAttributes + from gooddata_metadata_client.model.json_api_fact_out_relationships import JsonApiFactOutRelationships + globals()['JsonApiFactOutAttributes'] = JsonApiFactOutAttributes + globals()['JsonApiFactOutRelationships'] = JsonApiFactOutRelationships + + +class JsonApiFactOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'FACT': "fact", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiFactOutAttributes,), # noqa: E501 + 'relationships': (JsonApiFactOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiFactOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "fact", must be one of ["fact", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiFactOutAttributes): [optional] # noqa: E501 + relationships (JsonApiFactOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "fact") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiFactOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "fact", must be one of ["fact", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiFactOutAttributes): [optional] # noqa: E501 + relationships (JsonApiFactOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "fact") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_attributes.py new file mode 100644 index 000000000..8c843a4e2 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_attributes.py @@ -0,0 +1,271 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiFactOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'source_column': (str,), # noqa: E501 + 'are_relations_valid': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'source_column': 'sourceColumn', # noqa: E501 + 'are_relations_valid': 'areRelationsValid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiFactOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + source_column (str): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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 + """JsonApiFactOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + source_column (str): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_fact_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_document.py new file mode 100644 index 000000000..db1d8f6b0 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_fact_out import JsonApiFactOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiFactOut'] = JsonApiFactOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiFactOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiFactOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiFactOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiFactOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiFactOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiFactOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_list.py new file mode 100644 index 000000000..8727d0ab0 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_fact_out_with_links import JsonApiFactOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiFactOutWithLinks'] = JsonApiFactOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiFactOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiFactOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiFactOutList - a model defined in OpenAPI + + Args: + data ([JsonApiFactOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiFactOutList - a model defined in OpenAPI + + Args: + data ([JsonApiFactOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_relationships.py new file mode 100644 index 000000000..fba20e5f8 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_relationships.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_attribute_out_relationships_dataset import JsonApiAttributeOutRelationshipsDataset + globals()['JsonApiAttributeOutRelationshipsDataset'] = JsonApiAttributeOutRelationshipsDataset + + +class JsonApiFactOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'dataset': (JsonApiAttributeOutRelationshipsDataset,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'dataset': 'dataset', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiFactOutRelationships - 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,) + dataset (JsonApiAttributeOutRelationshipsDataset): [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: + 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 + """JsonApiFactOutRelationships - 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,) + dataset (JsonApiAttributeOutRelationshipsDataset): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_fact_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_with_links.py new file mode 100644 index 000000000..c42a4e105 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_fact_out import JsonApiFactOut + from gooddata_metadata_client.model.json_api_fact_out_attributes import JsonApiFactOutAttributes + from gooddata_metadata_client.model.json_api_fact_out_relationships import JsonApiFactOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiFactOut'] = JsonApiFactOut + globals()['JsonApiFactOutAttributes'] = JsonApiFactOutAttributes + globals()['JsonApiFactOutRelationships'] = JsonApiFactOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiFactOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'FACT': "fact", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiFactOutAttributes,), # noqa: E501 + 'relationships': (JsonApiFactOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiFactOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "fact", must be one of ["fact", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiFactOutAttributes): [optional] # noqa: E501 + relationships (JsonApiFactOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "fact") + _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: + 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 + """JsonApiFactOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "fact", must be one of ["fact", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiFactOutAttributes): [optional] # noqa: E501 + relationships (JsonApiFactOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "fact") + _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: + 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 beause 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': [ + JsonApiFactOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_to_many_linkage.py new file mode 100644 index 000000000..861fb1d02 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_fact_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_fact_linkage import JsonApiFactLinkage + globals()['JsonApiFactLinkage'] = JsonApiFactLinkage + + +class JsonApiFactToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiFactLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiFactToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiFactLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiFactLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiFactToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiFactLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiFactLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_in.py new file mode 100644 index 000000000..0d8d15fc8 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_in.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes + globals()['JsonApiAnalyticalDashboardOutAttributes'] = JsonApiAnalyticalDashboardOutAttributes + + +class JsonApiFilterContextIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'FILTERCONTEXT': "filterContext", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAnalyticalDashboardOutAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "filterContext", must be one of ["filterContext", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "filterContext") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "filterContext", must be one of ["filterContext", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "filterContext") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_in_document.py new file mode 100644 index 000000000..245257963 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_filter_context_in import JsonApiFilterContextIn + globals()['JsonApiFilterContextIn'] = JsonApiFilterContextIn + + +class JsonApiFilterContextInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiFilterContextIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextInDocument - a model defined in OpenAPI + + Args: + data (JsonApiFilterContextIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextInDocument - a model defined in OpenAPI + + Args: + data (JsonApiFilterContextIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_linkage.py new file mode 100644 index 000000000..46a627c02 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiFilterContextLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'FILTERCONTEXT': "filterContext", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "filterContext", must be one of ["filterContext", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "filterContext") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "filterContext", must be one of ["filterContext", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "filterContext") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out.py new file mode 100644 index 000000000..2bdbf3985 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes + from gooddata_metadata_client.model.json_api_filter_context_out_relationships import JsonApiFilterContextOutRelationships + globals()['JsonApiAnalyticalDashboardOutAttributes'] = JsonApiAnalyticalDashboardOutAttributes + globals()['JsonApiFilterContextOutRelationships'] = JsonApiFilterContextOutRelationships + + +class JsonApiFilterContextOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'FILTERCONTEXT': "filterContext", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAnalyticalDashboardOutAttributes,), # noqa: E501 + 'relationships': (JsonApiFilterContextOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "filterContext", must be one of ["filterContext", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiFilterContextOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "filterContext") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "filterContext", must be one of ["filterContext", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiFilterContextOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "filterContext") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_document.py new file mode 100644 index 000000000..b52993fd3 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_filter_context_out import JsonApiFilterContextOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiFilterContextOut'] = JsonApiFilterContextOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiFilterContextOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiFilterContextOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiFilterContextOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiFilterContextOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_list.py new file mode 100644 index 000000000..eca5d3363 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_filter_context_out_with_links import JsonApiFilterContextOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiFilterContextOutWithLinks'] = JsonApiFilterContextOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiFilterContextOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiFilterContextOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextOutList - a model defined in OpenAPI + + Args: + data ([JsonApiFilterContextOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextOutList - a model defined in OpenAPI + + Args: + data ([JsonApiFilterContextOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_relationships.py new file mode 100644 index 000000000..9cce809d7 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_relationships.py @@ -0,0 +1,273 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels + from gooddata_metadata_client.model.json_api_dataset_out_relationships_attributes import JsonApiDatasetOutRelationshipsAttributes + globals()['JsonApiAnalyticalDashboardOutRelationshipsDatasets'] = JsonApiAnalyticalDashboardOutRelationshipsDatasets + globals()['JsonApiAnalyticalDashboardOutRelationshipsLabels'] = JsonApiAnalyticalDashboardOutRelationshipsLabels + globals()['JsonApiDatasetOutRelationshipsAttributes'] = JsonApiDatasetOutRelationshipsAttributes + + +class JsonApiFilterContextOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attributes': (JsonApiDatasetOutRelationshipsAttributes,), # noqa: E501 + 'datasets': (JsonApiAnalyticalDashboardOutRelationshipsDatasets,), # noqa: E501 + 'labels': (JsonApiAnalyticalDashboardOutRelationshipsLabels,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attributes': 'attributes', # noqa: E501 + 'datasets': 'datasets', # noqa: E501 + 'labels': 'labels', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextOutRelationships - 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,) + attributes (JsonApiDatasetOutRelationshipsAttributes): [optional] # noqa: E501 + datasets (JsonApiAnalyticalDashboardOutRelationshipsDatasets): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [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: + 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 + """JsonApiFilterContextOutRelationships - 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,) + attributes (JsonApiDatasetOutRelationshipsAttributes): [optional] # noqa: E501 + datasets (JsonApiAnalyticalDashboardOutRelationshipsDatasets): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_with_links.py new file mode 100644 index 000000000..9f5250f2e --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes + from gooddata_metadata_client.model.json_api_filter_context_out import JsonApiFilterContextOut + from gooddata_metadata_client.model.json_api_filter_context_out_relationships import JsonApiFilterContextOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiAnalyticalDashboardOutAttributes'] = JsonApiAnalyticalDashboardOutAttributes + globals()['JsonApiFilterContextOut'] = JsonApiFilterContextOut + globals()['JsonApiFilterContextOutRelationships'] = JsonApiFilterContextOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiFilterContextOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'FILTERCONTEXT': "filterContext", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAnalyticalDashboardOutAttributes,), # noqa: E501 + 'relationships': (JsonApiFilterContextOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiFilterContextOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "filterContext", must be one of ["filterContext", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiFilterContextOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "filterContext") + _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: + 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 + """JsonApiFilterContextOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "filterContext", must be one of ["filterContext", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiFilterContextOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "filterContext") + _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: + 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 beause 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': [ + JsonApiFilterContextOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_to_many_linkage.py new file mode 100644 index 000000000..edf9a9192 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_filter_context_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_filter_context_linkage import JsonApiFilterContextLinkage + globals()['JsonApiFilterContextLinkage'] = JsonApiFilterContextLinkage + + +class JsonApiFilterContextToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiFilterContextLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiFilterContextToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiFilterContextLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiFilterContextLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiFilterContextToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiFilterContextLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiFilterContextLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_linkage.py new file mode 100644 index 000000000..e3edf9164 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiLabelLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'LABEL': "label", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiLabelLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "label", must be one of ["label", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "label") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiLabelLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "label", must be one of ["label", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "label") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out.py new file mode 100644 index 000000000..15e723b17 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_label_out_attributes import JsonApiLabelOutAttributes + from gooddata_metadata_client.model.json_api_label_out_relationships import JsonApiLabelOutRelationships + globals()['JsonApiLabelOutAttributes'] = JsonApiLabelOutAttributes + globals()['JsonApiLabelOutRelationships'] = JsonApiLabelOutRelationships + + +class JsonApiLabelOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'LABEL': "label", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiLabelOutAttributes,), # noqa: E501 + 'relationships': (JsonApiLabelOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiLabelOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "label", must be one of ["label", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiLabelOutAttributes): [optional] # noqa: E501 + relationships (JsonApiLabelOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "label") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiLabelOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "label", must be one of ["label", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiLabelOutAttributes): [optional] # noqa: E501 + relationships (JsonApiLabelOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "label") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_attributes.py new file mode 100644 index 000000000..3d21bd4d9 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_attributes.py @@ -0,0 +1,275 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiLabelOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'primary': (bool,), # noqa: E501 + 'source_column': (str,), # noqa: E501 + 'are_relations_valid': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'primary': 'primary', # noqa: E501 + 'source_column': 'sourceColumn', # noqa: E501 + 'are_relations_valid': 'areRelationsValid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiLabelOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + primary (bool): [optional] # noqa: E501 + source_column (str): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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 + """JsonApiLabelOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + primary (bool): [optional] # noqa: E501 + source_column (str): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_label_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_document.py new file mode 100644 index 000000000..d6a89d647 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_label_out import JsonApiLabelOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiLabelOut'] = JsonApiLabelOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiLabelOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiLabelOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiLabelOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiLabelOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiLabelOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiLabelOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_list.py new file mode 100644 index 000000000..8261c8da8 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_label_out_with_links import JsonApiLabelOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiLabelOutWithLinks'] = JsonApiLabelOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiLabelOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiLabelOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiLabelOutList - a model defined in OpenAPI + + Args: + data ([JsonApiLabelOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiLabelOutList - a model defined in OpenAPI + + Args: + data ([JsonApiLabelOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_relationships.py new file mode 100644 index 000000000..70078bc52 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_relationships.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_label_out_relationships_attribute import JsonApiLabelOutRelationshipsAttribute + globals()['JsonApiLabelOutRelationshipsAttribute'] = JsonApiLabelOutRelationshipsAttribute + + +class JsonApiLabelOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'attribute': (JsonApiLabelOutRelationshipsAttribute,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'attribute': 'attribute', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiLabelOutRelationships - 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,) + attribute (JsonApiLabelOutRelationshipsAttribute): [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: + 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 + """JsonApiLabelOutRelationships - 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,) + attribute (JsonApiLabelOutRelationshipsAttribute): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_label_out_relationships_attribute.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_relationships_attribute.py new file mode 100644 index 000000000..7b5b96a92 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_relationships_attribute.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_attribute_to_one_linkage import JsonApiAttributeToOneLinkage + globals()['JsonApiAttributeToOneLinkage'] = JsonApiAttributeToOneLinkage + + +class JsonApiLabelOutRelationshipsAttribute(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiAttributeToOneLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiLabelOutRelationshipsAttribute - a model defined in OpenAPI + + Args: + data (JsonApiAttributeToOneLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiLabelOutRelationshipsAttribute - a model defined in OpenAPI + + Args: + data (JsonApiAttributeToOneLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_with_links.py new file mode 100644 index 000000000..8ca040ea1 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_label_out import JsonApiLabelOut + from gooddata_metadata_client.model.json_api_label_out_attributes import JsonApiLabelOutAttributes + from gooddata_metadata_client.model.json_api_label_out_relationships import JsonApiLabelOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiLabelOut'] = JsonApiLabelOut + globals()['JsonApiLabelOutAttributes'] = JsonApiLabelOutAttributes + globals()['JsonApiLabelOutRelationships'] = JsonApiLabelOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiLabelOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'LABEL': "label", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiLabelOutAttributes,), # noqa: E501 + 'relationships': (JsonApiLabelOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiLabelOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "label", must be one of ["label", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiLabelOutAttributes): [optional] # noqa: E501 + relationships (JsonApiLabelOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "label") + _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: + 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 + """JsonApiLabelOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "label", must be one of ["label", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiLabelOutAttributes): [optional] # noqa: E501 + relationships (JsonApiLabelOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "label") + _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: + 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 beause 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': [ + JsonApiLabelOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_to_many_linkage.py new file mode 100644 index 000000000..7e1ba5847 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_label_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_label_linkage import JsonApiLabelLinkage + globals()['JsonApiLabelLinkage'] = JsonApiLabelLinkage + + +class JsonApiLabelToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiLabelLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiLabelToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiLabelLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiLabelLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiLabelToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiLabelLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiLabelLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_in.py new file mode 100644 index 000000000..b9cee73be --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_in.py @@ -0,0 +1,289 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_metric_out_attributes import JsonApiMetricOutAttributes + globals()['JsonApiMetricOutAttributes'] = JsonApiMetricOutAttributes + + +class JsonApiMetricIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'METRIC': "metric", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiMetricOutAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiMetricIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiMetricOutAttributes): + + Keyword Args: + type (str): Object type. defaults to "metric", must be one of ["metric", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "metric") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiMetricIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiMetricOutAttributes): + + Keyword Args: + type (str): Object type. defaults to "metric", must be one of ["metric", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "metric") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + 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-metadata-client/gooddata_metadata_client/model/json_api_metric_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_in_document.py new file mode 100644 index 000000000..657f9ede7 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_metric_in import JsonApiMetricIn + globals()['JsonApiMetricIn'] = JsonApiMetricIn + + +class JsonApiMetricInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiMetricIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiMetricInDocument - a model defined in OpenAPI + + Args: + data (JsonApiMetricIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiMetricInDocument - a model defined in OpenAPI + + Args: + data (JsonApiMetricIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_linkage.py new file mode 100644 index 000000000..060db30a3 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiMetricLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'METRIC': "metric", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiMetricLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "metric", must be one of ["metric", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "metric") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiMetricLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "metric", must be one of ["metric", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "metric") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out.py new file mode 100644 index 000000000..01712c1bc --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out.py @@ -0,0 +1,295 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_metric_out_attributes import JsonApiMetricOutAttributes + from gooddata_metadata_client.model.json_api_metric_out_relationships import JsonApiMetricOutRelationships + globals()['JsonApiMetricOutAttributes'] = JsonApiMetricOutAttributes + globals()['JsonApiMetricOutRelationships'] = JsonApiMetricOutRelationships + + +class JsonApiMetricOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'METRIC': "metric", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiMetricOutAttributes,), # noqa: E501 + 'relationships': (JsonApiMetricOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiMetricOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiMetricOutAttributes): + + Keyword Args: + type (str): Object type. defaults to "metric", must be one of ["metric", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + relationships (JsonApiMetricOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "metric") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, attributes, *args, **kwargs): # noqa: E501 + """JsonApiMetricOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + attributes (JsonApiMetricOutAttributes): + + Keyword Args: + type (str): Object type. defaults to "metric", must be one of ["metric", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + relationships (JsonApiMetricOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "metric") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + self.attributes = attributes + 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-metadata-client/gooddata_metadata_client/model/json_api_metric_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_attributes.py new file mode 100644 index 000000000..958eec45e --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_attributes.py @@ -0,0 +1,283 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_metric_out_attributes_content import JsonApiMetricOutAttributesContent + globals()['JsonApiMetricOutAttributesContent'] = JsonApiMetricOutAttributesContent + + +class JsonApiMetricOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'content': (JsonApiMetricOutAttributesContent,), # noqa: E501 + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + 'are_relations_valid': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'content': 'content', # noqa: E501 + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'tags': 'tags', # noqa: E501 + 'are_relations_valid': 'areRelationsValid', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, content, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutAttributes - a model defined in OpenAPI + + Args: + content (JsonApiMetricOutAttributesContent): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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.content = content + 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, content, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutAttributes - a model defined in OpenAPI + + Args: + content (JsonApiMetricOutAttributesContent): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + tags ([str]): [optional] # noqa: E501 + are_relations_valid (bool): [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: + 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.content = content + 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-metadata-client/gooddata_metadata_client/model/json_api_metric_out_attributes_content.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_attributes_content.py new file mode 100644 index 000000000..7295715b2 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_attributes_content.py @@ -0,0 +1,265 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiMetricOutAttributesContent(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 { + 'maql': (str,), # noqa: E501 + 'format': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'maql': 'maql', # noqa: E501 + 'format': 'format', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, maql, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutAttributesContent - a model defined in OpenAPI + + Args: + maql (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + format (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: + 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.maql = maql + 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, maql, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutAttributesContent - a model defined in OpenAPI + + Args: + maql (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + format (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: + 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.maql = maql + 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-metadata-client/gooddata_metadata_client/model/json_api_metric_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_document.py new file mode 100644 index 000000000..07c5d71e0 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_metric_out import JsonApiMetricOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiMetricOut'] = JsonApiMetricOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiMetricOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiMetricOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiMetricOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiMetricOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_list.py new file mode 100644 index 000000000..7118fb0e3 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_metric_out_with_links import JsonApiMetricOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiMetricOutWithLinks'] = JsonApiMetricOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiMetricOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiMetricOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutList - a model defined in OpenAPI + + Args: + data ([JsonApiMetricOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutList - a model defined in OpenAPI + + Args: + data ([JsonApiMetricOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_relationships.py new file mode 100644 index 000000000..f509eaf5d --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_relationships.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_metrics import JsonApiAnalyticalDashboardOutRelationshipsMetrics + from gooddata_metadata_client.model.json_api_dataset_out_relationships_attributes import JsonApiDatasetOutRelationshipsAttributes + from gooddata_metadata_client.model.json_api_dataset_out_relationships_facts import JsonApiDatasetOutRelationshipsFacts + globals()['JsonApiAnalyticalDashboardOutRelationshipsLabels'] = JsonApiAnalyticalDashboardOutRelationshipsLabels + globals()['JsonApiAnalyticalDashboardOutRelationshipsMetrics'] = JsonApiAnalyticalDashboardOutRelationshipsMetrics + globals()['JsonApiDatasetOutRelationshipsAttributes'] = JsonApiDatasetOutRelationshipsAttributes + globals()['JsonApiDatasetOutRelationshipsFacts'] = JsonApiDatasetOutRelationshipsFacts + + +class JsonApiMetricOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'facts': (JsonApiDatasetOutRelationshipsFacts,), # noqa: E501 + 'attributes': (JsonApiDatasetOutRelationshipsAttributes,), # noqa: E501 + 'labels': (JsonApiAnalyticalDashboardOutRelationshipsLabels,), # noqa: E501 + 'metrics': (JsonApiAnalyticalDashboardOutRelationshipsMetrics,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'facts': 'facts', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'labels': 'labels', # noqa: E501 + 'metrics': 'metrics', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutRelationships - 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,) + facts (JsonApiDatasetOutRelationshipsFacts): [optional] # noqa: E501 + attributes (JsonApiDatasetOutRelationshipsAttributes): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [optional] # noqa: E501 + metrics (JsonApiAnalyticalDashboardOutRelationshipsMetrics): [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: + 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 + """JsonApiMetricOutRelationships - 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,) + facts (JsonApiDatasetOutRelationshipsFacts): [optional] # noqa: E501 + attributes (JsonApiDatasetOutRelationshipsAttributes): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [optional] # noqa: E501 + metrics (JsonApiAnalyticalDashboardOutRelationshipsMetrics): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_metric_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_with_links.py new file mode 100644 index 000000000..d86446489 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_metric_out import JsonApiMetricOut + from gooddata_metadata_client.model.json_api_metric_out_attributes import JsonApiMetricOutAttributes + from gooddata_metadata_client.model.json_api_metric_out_relationships import JsonApiMetricOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiMetricOut'] = JsonApiMetricOut + globals()['JsonApiMetricOutAttributes'] = JsonApiMetricOutAttributes + globals()['JsonApiMetricOutRelationships'] = JsonApiMetricOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiMetricOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'METRIC': "metric", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiMetricOutAttributes,), # noqa: E501 + 'relationships': (JsonApiMetricOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiMetricOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "metric", must be one of ["metric", ] # noqa: E501 + attributes (JsonApiMetricOutAttributes): + _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,) + relationships (JsonApiMetricOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "metric") + _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: + 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 + """JsonApiMetricOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "metric", must be one of ["metric", ] # noqa: E501 + attributes (JsonApiMetricOutAttributes): + _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,) + relationships (JsonApiMetricOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "metric") + _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: + 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 beause 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': [ + JsonApiMetricOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_to_many_linkage.py new file mode 100644 index 000000000..fd3eb5f28 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_metric_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_metric_linkage import JsonApiMetricLinkage + globals()['JsonApiMetricLinkage'] = JsonApiMetricLinkage + + +class JsonApiMetricToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiMetricLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiMetricToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiMetricLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiMetricLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiMetricToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiMetricLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiMetricLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in.py new file mode 100644 index 000000000..45afc3426 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_organization_in_attributes import JsonApiOrganizationInAttributes + globals()['JsonApiOrganizationInAttributes'] = JsonApiOrganizationInAttributes + + +class JsonApiOrganizationIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ORGANIZATION': "organization", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiOrganizationInAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "organization", must be one of ["organization", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiOrganizationInAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "organization") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "organization", must be one of ["organization", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiOrganizationInAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "organization") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in_attributes.py new file mode 100644 index 000000000..f32eb73c8 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in_attributes.py @@ -0,0 +1,271 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiOrganizationInAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'hostname': (str,), # noqa: E501 + 'oauth_issuer_location': (str,), # noqa: E501 + 'oauth_client_id': (str,), # noqa: E501 + 'oauth_client_secret': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'hostname': 'hostname', # noqa: E501 + 'oauth_issuer_location': 'oauthIssuerLocation', # noqa: E501 + 'oauth_client_id': 'oauthClientId', # noqa: E501 + 'oauth_client_secret': 'oauthClientSecret', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationInAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): [optional] # noqa: E501 + hostname (str): [optional] # noqa: E501 + oauth_issuer_location (str): [optional] # noqa: E501 + oauth_client_id (str): [optional] # noqa: E501 + oauth_client_secret (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: + 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 + """JsonApiOrganizationInAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): [optional] # noqa: E501 + hostname (str): [optional] # noqa: E501 + oauth_issuer_location (str): [optional] # noqa: E501 + oauth_client_id (str): [optional] # noqa: E501 + oauth_client_secret (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: + 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-metadata-client/gooddata_metadata_client/model/json_api_organization_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in_document.py new file mode 100644 index 000000000..8424b27f9 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_organization_in import JsonApiOrganizationIn + globals()['JsonApiOrganizationIn'] = JsonApiOrganizationIn + + +class JsonApiOrganizationInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiOrganizationIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationInDocument - a model defined in OpenAPI + + Args: + data (JsonApiOrganizationIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationInDocument - a model defined in OpenAPI + + Args: + data (JsonApiOrganizationIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out.py new file mode 100644 index 000000000..7f7854dfe --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_organization_out_attributes import JsonApiOrganizationOutAttributes + from gooddata_metadata_client.model.json_api_organization_out_relationships import JsonApiOrganizationOutRelationships + globals()['JsonApiOrganizationOutAttributes'] = JsonApiOrganizationOutAttributes + globals()['JsonApiOrganizationOutRelationships'] = JsonApiOrganizationOutRelationships + + +class JsonApiOrganizationOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'ORGANIZATION': "organization", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiOrganizationOutAttributes,), # noqa: E501 + 'relationships': (JsonApiOrganizationOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "organization", must be one of ["organization", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiOrganizationOutAttributes): [optional] # noqa: E501 + relationships (JsonApiOrganizationOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "organization") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "organization", must be one of ["organization", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiOrganizationOutAttributes): [optional] # noqa: E501 + relationships (JsonApiOrganizationOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "organization") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_attributes.py new file mode 100644 index 000000000..a8ce89b76 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_attributes.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiOrganizationOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'hostname': (str,), # noqa: E501 + 'oauth_issuer_location': (str,), # noqa: E501 + 'oauth_client_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'hostname': 'hostname', # noqa: E501 + 'oauth_issuer_location': 'oauthIssuerLocation', # noqa: E501 + 'oauth_client_id': 'oauthClientId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): [optional] # noqa: E501 + hostname (str): [optional] # noqa: E501 + oauth_issuer_location (str): [optional] # noqa: E501 + oauth_client_id (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: + 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 + """JsonApiOrganizationOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): [optional] # noqa: E501 + hostname (str): [optional] # noqa: E501 + oauth_issuer_location (str): [optional] # noqa: E501 + oauth_client_id (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: + 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-metadata-client/gooddata_metadata_client/model/json_api_organization_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_document.py new file mode 100644 index 000000000..edd9a1eb2 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_organization_out import JsonApiOrganizationOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiOrganizationOut'] = JsonApiOrganizationOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiOrganizationOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiOrganizationOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiOrganizationOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiOrganizationOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships.py new file mode 100644 index 000000000..3aab8e514 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_organization_out_relationships_bootstrap_user import JsonApiOrganizationOutRelationshipsBootstrapUser + from gooddata_metadata_client.model.json_api_organization_out_relationships_bootstrap_user_group import JsonApiOrganizationOutRelationshipsBootstrapUserGroup + globals()['JsonApiOrganizationOutRelationshipsBootstrapUser'] = JsonApiOrganizationOutRelationshipsBootstrapUser + globals()['JsonApiOrganizationOutRelationshipsBootstrapUserGroup'] = JsonApiOrganizationOutRelationshipsBootstrapUserGroup + + +class JsonApiOrganizationOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'bootstrap_user': (JsonApiOrganizationOutRelationshipsBootstrapUser,), # noqa: E501 + 'bootstrap_user_group': (JsonApiOrganizationOutRelationshipsBootstrapUserGroup,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'bootstrap_user': 'bootstrapUser', # noqa: E501 + 'bootstrap_user_group': 'bootstrapUserGroup', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOutRelationships - 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,) + bootstrap_user (JsonApiOrganizationOutRelationshipsBootstrapUser): [optional] # noqa: E501 + bootstrap_user_group (JsonApiOrganizationOutRelationshipsBootstrapUserGroup): [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: + 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 + """JsonApiOrganizationOutRelationships - 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,) + bootstrap_user (JsonApiOrganizationOutRelationshipsBootstrapUser): [optional] # noqa: E501 + bootstrap_user_group (JsonApiOrganizationOutRelationshipsBootstrapUserGroup): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user.py new file mode 100644 index 000000000..44a8c8ab6 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_to_one_linkage import JsonApiUserToOneLinkage + globals()['JsonApiUserToOneLinkage'] = JsonApiUserToOneLinkage + + +class JsonApiOrganizationOutRelationshipsBootstrapUser(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiUserToOneLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOutRelationshipsBootstrapUser - a model defined in OpenAPI + + Args: + data (JsonApiUserToOneLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOutRelationshipsBootstrapUser - a model defined in OpenAPI + + Args: + data (JsonApiUserToOneLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user_group.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user_group.py new file mode 100644 index 000000000..d96a37259 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_organization_out_relationships_bootstrap_user_group.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_to_one_linkage import JsonApiUserGroupToOneLinkage + globals()['JsonApiUserGroupToOneLinkage'] = JsonApiUserGroupToOneLinkage + + +class JsonApiOrganizationOutRelationshipsBootstrapUserGroup(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiUserGroupToOneLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOutRelationshipsBootstrapUserGroup - a model defined in OpenAPI + + Args: + data (JsonApiUserGroupToOneLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiOrganizationOutRelationshipsBootstrapUserGroup - a model defined in OpenAPI + + Args: + data (JsonApiUserGroupToOneLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_in.py new file mode 100644 index 000000000..9811ecc89 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_in.py @@ -0,0 +1,291 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_out_relationships import JsonApiUserGroupOutRelationships + globals()['JsonApiUserGroupOutRelationships'] = JsonApiUserGroupOutRelationships + + +class JsonApiUserGroupIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USERGROUP': "userGroup", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'relationships': (JsonApiUserGroupOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + relationships (JsonApiUserGroupOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "userGroup") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + relationships (JsonApiUserGroupOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "userGroup") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_in_document.py new file mode 100644 index 000000000..fbeae15fa --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_in import JsonApiUserGroupIn + globals()['JsonApiUserGroupIn'] = JsonApiUserGroupIn + + +class JsonApiUserGroupInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiUserGroupIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupInDocument - a model defined in OpenAPI + + Args: + data (JsonApiUserGroupIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupInDocument - a model defined in OpenAPI + + Args: + data (JsonApiUserGroupIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_linkage.py new file mode 100644 index 000000000..be73f1a7d --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiUserGroupLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USERGROUP': "userGroup", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "userGroup") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "userGroup") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out.py new file mode 100644 index 000000000..3c932e150 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out.py @@ -0,0 +1,291 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_out_relationships import JsonApiUserGroupOutRelationships + globals()['JsonApiUserGroupOutRelationships'] = JsonApiUserGroupOutRelationships + + +class JsonApiUserGroupOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USERGROUP': "userGroup", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'relationships': (JsonApiUserGroupOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + relationships (JsonApiUserGroupOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "userGroup") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + relationships (JsonApiUserGroupOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "userGroup") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_document.py new file mode 100644 index 000000000..c4c009bef --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_out import JsonApiUserGroupOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiUserGroupOut'] = JsonApiUserGroupOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiUserGroupOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiUserGroupOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiUserGroupOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiUserGroupOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_list.py new file mode 100644 index 000000000..7cb41cec9 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_out_with_links import JsonApiUserGroupOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiUserGroupOutWithLinks'] = JsonApiUserGroupOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiUserGroupOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiUserGroupOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupOutList - a model defined in OpenAPI + + Args: + data ([JsonApiUserGroupOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupOutList - a model defined in OpenAPI + + Args: + data ([JsonApiUserGroupOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_relationships.py new file mode 100644 index 000000000..39af866e9 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_relationships.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_acl_out_relationships_objects import JsonApiACLOutRelationshipsObjects + globals()['JsonApiACLOutRelationshipsObjects'] = JsonApiACLOutRelationshipsObjects + + +class JsonApiUserGroupOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'parents': (JsonApiACLOutRelationshipsObjects,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'parents': 'parents', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupOutRelationships - 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,) + parents (JsonApiACLOutRelationshipsObjects): [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: + 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 + """JsonApiUserGroupOutRelationships - 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,) + parents (JsonApiACLOutRelationshipsObjects): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_with_links.py new file mode 100644 index 000000000..18b5855fb --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_out_with_links.py @@ -0,0 +1,344 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_out import JsonApiUserGroupOut + from gooddata_metadata_client.model.json_api_user_group_out_relationships import JsonApiUserGroupOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiUserGroupOut'] = JsonApiUserGroupOut + globals()['JsonApiUserGroupOutRelationships'] = JsonApiUserGroupOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiUserGroupOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USERGROUP': "userGroup", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'relationships': (JsonApiUserGroupOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + relationships (JsonApiUserGroupOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "userGroup") + _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: + 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 + """JsonApiUserGroupOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + relationships (JsonApiUserGroupOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "userGroup") + _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: + 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 beause 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': [ + JsonApiUserGroupOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_to_many_linkage.py new file mode 100644 index 000000000..a6a62ace8 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_linkage import JsonApiUserGroupLinkage + globals()['JsonApiUserGroupLinkage'] = JsonApiUserGroupLinkage + + +class JsonApiUserGroupToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiUserGroupLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiUserGroupToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiUserGroupLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiUserGroupLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiUserGroupToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiUserGroupLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiUserGroupLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_to_one_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_to_one_linkage.py new file mode 100644 index 000000000..ddaaefab3 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_group_to_one_linkage.py @@ -0,0 +1,318 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_group_linkage import JsonApiUserGroupLinkage + globals()['JsonApiUserGroupLinkage'] = JsonApiUserGroupLinkage + + +class JsonApiUserGroupToOneLinkage(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USERGROUP': "userGroup", + }, + } + + 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 = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiUserGroupToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "userGroup" # 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: + 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 + """JsonApiUserGroupToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "userGroup" # 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: + 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 beause 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': [ + JsonApiUserGroupLinkage, + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_in.py new file mode 100644 index 000000000..050bcd43c --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_in.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_out_attributes import JsonApiUserOutAttributes + from gooddata_metadata_client.model.json_api_user_out_relationships import JsonApiUserOutRelationships + globals()['JsonApiUserOutAttributes'] = JsonApiUserOutAttributes + globals()['JsonApiUserOutRelationships'] = JsonApiUserOutRelationships + + +class JsonApiUserIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USER': "user", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiUserOutAttributes,), # noqa: E501 + 'relationships': (JsonApiUserOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiUserIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "user", must be one of ["user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiUserOutAttributes): [optional] # noqa: E501 + relationships (JsonApiUserOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "user") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiUserIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "user", must be one of ["user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiUserOutAttributes): [optional] # noqa: E501 + relationships (JsonApiUserOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "user") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_in_document.py new file mode 100644 index 000000000..005ec4b65 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_in import JsonApiUserIn + globals()['JsonApiUserIn'] = JsonApiUserIn + + +class JsonApiUserInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiUserIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiUserInDocument - a model defined in OpenAPI + + Args: + data (JsonApiUserIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiUserInDocument - a model defined in OpenAPI + + Args: + data (JsonApiUserIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_linkage.py new file mode 100644 index 000000000..751977178 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiUserLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USER': "user", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiUserLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "user", must be one of ["user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "user") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiUserLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "user", must be one of ["user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "user") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out.py new file mode 100644 index 000000000..bd69db3c2 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_out_attributes import JsonApiUserOutAttributes + from gooddata_metadata_client.model.json_api_user_out_relationships import JsonApiUserOutRelationships + globals()['JsonApiUserOutAttributes'] = JsonApiUserOutAttributes + globals()['JsonApiUserOutRelationships'] = JsonApiUserOutRelationships + + +class JsonApiUserOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USER': "user", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiUserOutAttributes,), # noqa: E501 + 'relationships': (JsonApiUserOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiUserOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "user", must be one of ["user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiUserOutAttributes): [optional] # noqa: E501 + relationships (JsonApiUserOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "user") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiUserOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "user", must be one of ["user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiUserOutAttributes): [optional] # noqa: E501 + relationships (JsonApiUserOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "user") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_attributes.py new file mode 100644 index 000000000..1a6969e12 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_attributes.py @@ -0,0 +1,255 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiUserOutAttributes(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 { + 'authentication_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'authentication_id': 'authenticationId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiUserOutAttributes - 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,) + authentication_id (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: + 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 + """JsonApiUserOutAttributes - 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,) + authentication_id (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: + 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-metadata-client/gooddata_metadata_client/model/json_api_user_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_document.py new file mode 100644 index 000000000..dc42d6a76 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_out import JsonApiUserOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiUserOut'] = JsonApiUserOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiUserOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiUserOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiUserOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiUserOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiUserOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiUserOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_list.py new file mode 100644 index 000000000..02cb424dc --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_out_with_links import JsonApiUserOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiUserOutWithLinks'] = JsonApiUserOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiUserOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiUserOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiUserOutList - a model defined in OpenAPI + + Args: + data ([JsonApiUserOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiUserOutList - a model defined in OpenAPI + + Args: + data ([JsonApiUserOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_relationships.py new file mode 100644 index 000000000..43e5f3c69 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_relationships.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_acl_out_relationships_objects import JsonApiACLOutRelationshipsObjects + globals()['JsonApiACLOutRelationshipsObjects'] = JsonApiACLOutRelationshipsObjects + + +class JsonApiUserOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'user_groups': (JsonApiACLOutRelationshipsObjects,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'user_groups': 'userGroups', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiUserOutRelationships - 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,) + user_groups (JsonApiACLOutRelationshipsObjects): [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: + 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 + """JsonApiUserOutRelationships - 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,) + user_groups (JsonApiACLOutRelationshipsObjects): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_user_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_with_links.py new file mode 100644 index 000000000..5ef61343b --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_out import JsonApiUserOut + from gooddata_metadata_client.model.json_api_user_out_attributes import JsonApiUserOutAttributes + from gooddata_metadata_client.model.json_api_user_out_relationships import JsonApiUserOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiUserOut'] = JsonApiUserOut + globals()['JsonApiUserOutAttributes'] = JsonApiUserOutAttributes + globals()['JsonApiUserOutRelationships'] = JsonApiUserOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiUserOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USER': "user", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiUserOutAttributes,), # noqa: E501 + 'relationships': (JsonApiUserOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiUserOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "user", must be one of ["user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiUserOutAttributes): [optional] # noqa: E501 + relationships (JsonApiUserOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "user") + _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: + 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 + """JsonApiUserOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "user", must be one of ["user", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiUserOutAttributes): [optional] # noqa: E501 + relationships (JsonApiUserOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "user") + _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: + 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 beause 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': [ + JsonApiUserOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_to_many_linkage.py new file mode 100644 index 000000000..c41258371 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_linkage import JsonApiUserLinkage + globals()['JsonApiUserLinkage'] = JsonApiUserLinkage + + +class JsonApiUserToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiUserLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiUserToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiUserLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiUserLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiUserToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiUserLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiUserLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_to_one_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_to_one_linkage.py new file mode 100644 index 000000000..e7c8cbfde --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_user_to_one_linkage.py @@ -0,0 +1,318 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_user_linkage import JsonApiUserLinkage + globals()['JsonApiUserLinkage'] = JsonApiUserLinkage + + +class JsonApiUserToOneLinkage(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USER': "user", + }, + } + + 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 = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiUserToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "user" # 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: + 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 + """JsonApiUserToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "user" # 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: + 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 beause 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': [ + JsonApiUserLinkage, + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_in.py new file mode 100644 index 000000000..51c4088da --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_in.py @@ -0,0 +1,287 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes + globals()['JsonApiAnalyticalDashboardOutAttributes'] = JsonApiAnalyticalDashboardOutAttributes + + +class JsonApiVisualizationObjectIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'VISUALIZATIONOBJECT': "visualizationObject", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAnalyticalDashboardOutAttributes,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "visualizationObject", must be one of ["visualizationObject", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "visualizationObject") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "visualizationObject", must be one of ["visualizationObject", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "visualizationObject") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_in_document.py new file mode 100644 index 000000000..53ac51446 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_visualization_object_in import JsonApiVisualizationObjectIn + globals()['JsonApiVisualizationObjectIn'] = JsonApiVisualizationObjectIn + + +class JsonApiVisualizationObjectInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiVisualizationObjectIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectInDocument - a model defined in OpenAPI + + Args: + data (JsonApiVisualizationObjectIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectInDocument - a model defined in OpenAPI + + Args: + data (JsonApiVisualizationObjectIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_linkage.py new file mode 100644 index 000000000..f8f78a2ac --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiVisualizationObjectLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'VISUALIZATIONOBJECT': "visualizationObject", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "visualizationObject", must be one of ["visualizationObject", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "visualizationObject") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "visualizationObject", must be one of ["visualizationObject", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "visualizationObject") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out.py new file mode 100644 index 000000000..6cee9b9db --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes + from gooddata_metadata_client.model.json_api_visualization_object_out_relationships import JsonApiVisualizationObjectOutRelationships + globals()['JsonApiAnalyticalDashboardOutAttributes'] = JsonApiAnalyticalDashboardOutAttributes + globals()['JsonApiVisualizationObjectOutRelationships'] = JsonApiVisualizationObjectOutRelationships + + +class JsonApiVisualizationObjectOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'VISUALIZATIONOBJECT': "visualizationObject", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAnalyticalDashboardOutAttributes,), # noqa: E501 + 'relationships': (JsonApiVisualizationObjectOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "visualizationObject", must be one of ["visualizationObject", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiVisualizationObjectOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "visualizationObject") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "visualizationObject", must be one of ["visualizationObject", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiVisualizationObjectOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "visualizationObject") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_document.py new file mode 100644 index 000000000..5dd71b171 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_visualization_object_out import JsonApiVisualizationObjectOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiVisualizationObjectOut'] = JsonApiVisualizationObjectOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiVisualizationObjectOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiVisualizationObjectOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiVisualizationObjectOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiVisualizationObjectOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_list.py new file mode 100644 index 000000000..da49b2c82 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_visualization_object_out_with_links import JsonApiVisualizationObjectOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiVisualizationObjectOutWithLinks'] = JsonApiVisualizationObjectOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiVisualizationObjectOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiVisualizationObjectOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectOutList - a model defined in OpenAPI + + Args: + data ([JsonApiVisualizationObjectOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectOutList - a model defined in OpenAPI + + Args: + data ([JsonApiVisualizationObjectOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_relationships.py new file mode 100644 index 000000000..316175419 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_relationships.py @@ -0,0 +1,285 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_metrics import JsonApiAnalyticalDashboardOutRelationshipsMetrics + from gooddata_metadata_client.model.json_api_dataset_out_relationships_attributes import JsonApiDatasetOutRelationshipsAttributes + from gooddata_metadata_client.model.json_api_dataset_out_relationships_facts import JsonApiDatasetOutRelationshipsFacts + globals()['JsonApiAnalyticalDashboardOutRelationshipsDatasets'] = JsonApiAnalyticalDashboardOutRelationshipsDatasets + globals()['JsonApiAnalyticalDashboardOutRelationshipsLabels'] = JsonApiAnalyticalDashboardOutRelationshipsLabels + globals()['JsonApiAnalyticalDashboardOutRelationshipsMetrics'] = JsonApiAnalyticalDashboardOutRelationshipsMetrics + globals()['JsonApiDatasetOutRelationshipsAttributes'] = JsonApiDatasetOutRelationshipsAttributes + globals()['JsonApiDatasetOutRelationshipsFacts'] = JsonApiDatasetOutRelationshipsFacts + + +class JsonApiVisualizationObjectOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'facts': (JsonApiDatasetOutRelationshipsFacts,), # noqa: E501 + 'attributes': (JsonApiDatasetOutRelationshipsAttributes,), # noqa: E501 + 'labels': (JsonApiAnalyticalDashboardOutRelationshipsLabels,), # noqa: E501 + 'metrics': (JsonApiAnalyticalDashboardOutRelationshipsMetrics,), # noqa: E501 + 'datasets': (JsonApiAnalyticalDashboardOutRelationshipsDatasets,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'facts': 'facts', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'labels': 'labels', # noqa: E501 + 'metrics': 'metrics', # noqa: E501 + 'datasets': 'datasets', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectOutRelationships - 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,) + facts (JsonApiDatasetOutRelationshipsFacts): [optional] # noqa: E501 + attributes (JsonApiDatasetOutRelationshipsAttributes): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [optional] # noqa: E501 + metrics (JsonApiAnalyticalDashboardOutRelationshipsMetrics): [optional] # noqa: E501 + datasets (JsonApiAnalyticalDashboardOutRelationshipsDatasets): [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: + 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 + """JsonApiVisualizationObjectOutRelationships - 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,) + facts (JsonApiDatasetOutRelationshipsFacts): [optional] # noqa: E501 + attributes (JsonApiDatasetOutRelationshipsAttributes): [optional] # noqa: E501 + labels (JsonApiAnalyticalDashboardOutRelationshipsLabels): [optional] # noqa: E501 + metrics (JsonApiAnalyticalDashboardOutRelationshipsMetrics): [optional] # noqa: E501 + datasets (JsonApiAnalyticalDashboardOutRelationshipsDatasets): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_with_links.py new file mode 100644 index 000000000..998605539 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes + from gooddata_metadata_client.model.json_api_visualization_object_out import JsonApiVisualizationObjectOut + from gooddata_metadata_client.model.json_api_visualization_object_out_relationships import JsonApiVisualizationObjectOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiAnalyticalDashboardOutAttributes'] = JsonApiAnalyticalDashboardOutAttributes + globals()['JsonApiVisualizationObjectOut'] = JsonApiVisualizationObjectOut + globals()['JsonApiVisualizationObjectOutRelationships'] = JsonApiVisualizationObjectOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiVisualizationObjectOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'VISUALIZATIONOBJECT': "visualizationObject", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiAnalyticalDashboardOutAttributes,), # noqa: E501 + 'relationships': (JsonApiVisualizationObjectOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiVisualizationObjectOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "visualizationObject", must be one of ["visualizationObject", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiVisualizationObjectOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "visualizationObject") + _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: + 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 + """JsonApiVisualizationObjectOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "visualizationObject", must be one of ["visualizationObject", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiAnalyticalDashboardOutAttributes): [optional] # noqa: E501 + relationships (JsonApiVisualizationObjectOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "visualizationObject") + _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: + 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 beause 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': [ + JsonApiVisualizationObjectOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_to_many_linkage.py new file mode 100644 index 000000000..f1bfb9795 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_visualization_object_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_visualization_object_linkage import JsonApiVisualizationObjectLinkage + globals()['JsonApiVisualizationObjectLinkage'] = JsonApiVisualizationObjectLinkage + + +class JsonApiVisualizationObjectToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiVisualizationObjectLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiVisualizationObjectToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiVisualizationObjectLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiVisualizationObjectLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiVisualizationObjectToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiVisualizationObjectLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiVisualizationObjectLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_in.py new file mode 100644 index 000000000..dec5280f0 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_in.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_out_attributes import JsonApiWorkspaceDataFilterOutAttributes + from gooddata_metadata_client.model.json_api_workspace_data_filter_out_relationships import JsonApiWorkspaceDataFilterOutRelationships + globals()['JsonApiWorkspaceDataFilterOutAttributes'] = JsonApiWorkspaceDataFilterOutAttributes + globals()['JsonApiWorkspaceDataFilterOutRelationships'] = JsonApiWorkspaceDataFilterOutRelationships + + +class JsonApiWorkspaceDataFilterIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACEDATAFILTER': "workspaceDataFilter", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiWorkspaceDataFilterOutAttributes,), # noqa: E501 + 'relationships': (JsonApiWorkspaceDataFilterOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspaceDataFilter", must be one of ["workspaceDataFilter", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilter") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspaceDataFilter", must be one of ["workspaceDataFilter", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilter") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_in_document.py new file mode 100644 index 000000000..f32d227b0 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_in import JsonApiWorkspaceDataFilterIn + globals()['JsonApiWorkspaceDataFilterIn'] = JsonApiWorkspaceDataFilterIn + + +class JsonApiWorkspaceDataFilterInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiWorkspaceDataFilterIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterInDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterInDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_linkage.py new file mode 100644 index 000000000..a9d9ae6fc --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiWorkspaceDataFilterLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACEDATAFILTER': "workspaceDataFilter", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "workspaceDataFilter", must be one of ["workspaceDataFilter", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "workspaceDataFilter") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "workspaceDataFilter", must be one of ["workspaceDataFilter", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "workspaceDataFilter") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out.py new file mode 100644 index 000000000..948a316bb --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_out_attributes import JsonApiWorkspaceDataFilterOutAttributes + from gooddata_metadata_client.model.json_api_workspace_data_filter_out_relationships import JsonApiWorkspaceDataFilterOutRelationships + globals()['JsonApiWorkspaceDataFilterOutAttributes'] = JsonApiWorkspaceDataFilterOutAttributes + globals()['JsonApiWorkspaceDataFilterOutRelationships'] = JsonApiWorkspaceDataFilterOutRelationships + + +class JsonApiWorkspaceDataFilterOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACEDATAFILTER': "workspaceDataFilter", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiWorkspaceDataFilterOutAttributes,), # noqa: E501 + 'relationships': (JsonApiWorkspaceDataFilterOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspaceDataFilter", must be one of ["workspaceDataFilter", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilter") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspaceDataFilter", must be one of ["workspaceDataFilter", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilter") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_attributes.py new file mode 100644 index 000000000..712b94037 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_attributes.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiWorkspaceDataFilterOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'column_name': (str,), # noqa: E501 + 'data_source_id': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'column_name': 'columnName', # noqa: E501 + 'data_source_id': 'dataSourceId', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + column_name (str): [optional] # noqa: E501 + data_source_id (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: + 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 + """JsonApiWorkspaceDataFilterOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + column_name (str): [optional] # noqa: E501 + data_source_id (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: + 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-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_document.py new file mode 100644 index 000000000..e648cf7f5 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_out import JsonApiWorkspaceDataFilterOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiWorkspaceDataFilterOut'] = JsonApiWorkspaceDataFilterOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiWorkspaceDataFilterOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiWorkspaceDataFilterOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_list.py new file mode 100644 index 000000000..3623aab82 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_out_with_links import JsonApiWorkspaceDataFilterOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiWorkspaceDataFilterOutWithLinks'] = JsonApiWorkspaceDataFilterOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiWorkspaceDataFilterOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiWorkspaceDataFilterOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOutList - a model defined in OpenAPI + + Args: + data ([JsonApiWorkspaceDataFilterOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOutList - a model defined in OpenAPI + + Args: + data ([JsonApiWorkspaceDataFilterOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships.py new file mode 100644 index 000000000..b1f890fdd --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_out_relationships_filter_settings import JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings + globals()['JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings'] = JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings + + +class JsonApiWorkspaceDataFilterOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'filter_settings': (JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'filter_settings': 'filterSettings', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOutRelationships - 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,) + filter_settings (JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings): [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: + 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 + """JsonApiWorkspaceDataFilterOutRelationships - 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,) + filter_settings (JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships_filter_settings.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships_filter_settings.py new file mode 100644 index 000000000..b583663e2 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_relationships_filter_settings.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_to_many_linkage import JsonApiWorkspaceDataFilterSettingToManyLinkage + globals()['JsonApiWorkspaceDataFilterSettingToManyLinkage'] = JsonApiWorkspaceDataFilterSettingToManyLinkage + + +class JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiWorkspaceDataFilterSettingToManyLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterSettingToManyLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterSettingToManyLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_with_links.py new file mode 100644 index 000000000..46df5608d --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_out import JsonApiWorkspaceDataFilterOut + from gooddata_metadata_client.model.json_api_workspace_data_filter_out_attributes import JsonApiWorkspaceDataFilterOutAttributes + from gooddata_metadata_client.model.json_api_workspace_data_filter_out_relationships import JsonApiWorkspaceDataFilterOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiWorkspaceDataFilterOut'] = JsonApiWorkspaceDataFilterOut + globals()['JsonApiWorkspaceDataFilterOutAttributes'] = JsonApiWorkspaceDataFilterOutAttributes + globals()['JsonApiWorkspaceDataFilterOutRelationships'] = JsonApiWorkspaceDataFilterOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiWorkspaceDataFilterOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACEDATAFILTER': "workspaceDataFilter", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiWorkspaceDataFilterOutAttributes,), # noqa: E501 + 'relationships': (JsonApiWorkspaceDataFilterOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "workspaceDataFilter", must be one of ["workspaceDataFilter", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilter") + _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: + 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 + """JsonApiWorkspaceDataFilterOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "workspaceDataFilter", must be one of ["workspaceDataFilter", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilter") + _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: + 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 beause 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': [ + JsonApiWorkspaceDataFilterOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_linkage.py new file mode 100644 index 000000000..cb2a17d16 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiWorkspaceDataFilterSettingLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACEDATAFILTERSETTING': "workspaceDataFilterSetting", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "workspaceDataFilterSetting", must be one of ["workspaceDataFilterSetting", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "workspaceDataFilterSetting") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "workspaceDataFilterSetting", must be one of ["workspaceDataFilterSetting", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "workspaceDataFilterSetting") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out.py new file mode 100644 index 000000000..1b745e2a5 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_attributes import JsonApiWorkspaceDataFilterSettingOutAttributes + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_relationships import JsonApiWorkspaceDataFilterSettingOutRelationships + globals()['JsonApiWorkspaceDataFilterSettingOutAttributes'] = JsonApiWorkspaceDataFilterSettingOutAttributes + globals()['JsonApiWorkspaceDataFilterSettingOutRelationships'] = JsonApiWorkspaceDataFilterSettingOutRelationships + + +class JsonApiWorkspaceDataFilterSettingOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACEDATAFILTERSETTING': "workspaceDataFilterSetting", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiWorkspaceDataFilterSettingOutAttributes,), # noqa: E501 + 'relationships': (JsonApiWorkspaceDataFilterSettingOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspaceDataFilterSetting", must be one of ["workspaceDataFilterSetting", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterSettingOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterSettingOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilterSetting") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspaceDataFilterSetting", must be one of ["workspaceDataFilterSetting", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterSettingOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterSettingOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilterSetting") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_attributes.py new file mode 100644 index 000000000..6e71e9e54 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_attributes.py @@ -0,0 +1,263 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiWorkspaceDataFilterSettingOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'title': (str,), # noqa: E501 + 'description': (str,), # noqa: E501 + 'filter_values': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'title': 'title', # noqa: E501 + 'description': 'description', # noqa: E501 + 'filter_values': 'filterValues', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + filter_values ([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: + 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 + """JsonApiWorkspaceDataFilterSettingOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + title (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + filter_values ([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: + 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-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_document.py new file mode 100644 index 000000000..197f8725b --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out import JsonApiWorkspaceDataFilterSettingOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiWorkspaceDataFilterSettingOut'] = JsonApiWorkspaceDataFilterSettingOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiWorkspaceDataFilterSettingOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiWorkspaceDataFilterSettingOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterSettingOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterSettingOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_list.py new file mode 100644 index 000000000..fb3055bde --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_with_links import JsonApiWorkspaceDataFilterSettingOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiWorkspaceDataFilterSettingOutWithLinks'] = JsonApiWorkspaceDataFilterSettingOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiWorkspaceDataFilterSettingOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiWorkspaceDataFilterSettingOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOutList - a model defined in OpenAPI + + Args: + data ([JsonApiWorkspaceDataFilterSettingOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOutList - a model defined in OpenAPI + + Args: + data ([JsonApiWorkspaceDataFilterSettingOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships.py new file mode 100644 index 000000000..dfa05da8d --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_relationships_workspace_data_filter import JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter + globals()['JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter'] = JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter + + +class JsonApiWorkspaceDataFilterSettingOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'workspace_data_filter': (JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'workspace_data_filter': 'workspaceDataFilter', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOutRelationships - 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,) + workspace_data_filter (JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter): [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: + 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 + """JsonApiWorkspaceDataFilterSettingOutRelationships - 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,) + workspace_data_filter (JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships_workspace_data_filter.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships_workspace_data_filter.py new file mode 100644 index 000000000..c2ba96536 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_relationships_workspace_data_filter.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_to_one_linkage import JsonApiWorkspaceDataFilterToOneLinkage + globals()['JsonApiWorkspaceDataFilterToOneLinkage'] = JsonApiWorkspaceDataFilterToOneLinkage + + +class JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiWorkspaceDataFilterToOneLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterToOneLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceDataFilterToOneLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_with_links.py new file mode 100644 index 000000000..517a1fd54 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_with_links.py @@ -0,0 +1,346 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out import JsonApiWorkspaceDataFilterSettingOut + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_attributes import JsonApiWorkspaceDataFilterSettingOutAttributes + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_relationships import JsonApiWorkspaceDataFilterSettingOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiWorkspaceDataFilterSettingOut'] = JsonApiWorkspaceDataFilterSettingOut + globals()['JsonApiWorkspaceDataFilterSettingOutAttributes'] = JsonApiWorkspaceDataFilterSettingOutAttributes + globals()['JsonApiWorkspaceDataFilterSettingOutRelationships'] = JsonApiWorkspaceDataFilterSettingOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiWorkspaceDataFilterSettingOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACEDATAFILTERSETTING': "workspaceDataFilterSetting", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^([.A-Za-z0-9_-]{1,255}:)?[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiWorkspaceDataFilterSettingOutAttributes,), # noqa: E501 + 'relationships': (JsonApiWorkspaceDataFilterSettingOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterSettingOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "workspaceDataFilterSetting", must be one of ["workspaceDataFilterSetting", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterSettingOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterSettingOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilterSetting") + _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: + 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 + """JsonApiWorkspaceDataFilterSettingOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "workspaceDataFilterSetting", must be one of ["workspaceDataFilterSetting", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceDataFilterSettingOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceDataFilterSettingOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspaceDataFilterSetting") + _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: + 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 beause 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': [ + JsonApiWorkspaceDataFilterSettingOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_to_many_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_to_many_linkage.py new file mode 100644 index 000000000..09a802521 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_to_many_linkage.py @@ -0,0 +1,290 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_linkage import JsonApiWorkspaceDataFilterSettingLinkage + globals()['JsonApiWorkspaceDataFilterSettingLinkage'] = JsonApiWorkspaceDataFilterSettingLinkage + + +class JsonApiWorkspaceDataFilterSettingToManyLinkage(ModelSimple): + """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. + 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 { + 'value': ([JsonApiWorkspaceDataFilterSettingLinkage],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + 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): + """JsonApiWorkspaceDataFilterSettingToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiWorkspaceDataFilterSettingLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiWorkspaceDataFilterSettingLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """JsonApiWorkspaceDataFilterSettingToManyLinkage - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([JsonApiWorkspaceDataFilterSettingLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + + Keyword Args: + value ([JsonApiWorkspaceDataFilterSettingLinkage]): References to other resource objects in a to-many (\\\"relationship\\\"). Relationships can be specified by including a member in a resource's links object.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_to_one_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_to_one_linkage.py new file mode 100644 index 000000000..12d100f09 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_to_one_linkage.py @@ -0,0 +1,318 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_data_filter_linkage import JsonApiWorkspaceDataFilterLinkage + globals()['JsonApiWorkspaceDataFilterLinkage'] = JsonApiWorkspaceDataFilterLinkage + + +class JsonApiWorkspaceDataFilterToOneLinkage(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACEDATAFILTER': "workspaceDataFilter", + }, + } + + 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 = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceDataFilterToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "workspaceDataFilter" # 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: + 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 + """JsonApiWorkspaceDataFilterToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "workspaceDataFilter" # 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: + 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 beause 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': [ + JsonApiWorkspaceDataFilterLinkage, + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_in.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_in.py new file mode 100644 index 000000000..2960add7c --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_in.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_out_attributes import JsonApiWorkspaceOutAttributes + from gooddata_metadata_client.model.json_api_workspace_out_relationships import JsonApiWorkspaceOutRelationships + globals()['JsonApiWorkspaceOutAttributes'] = JsonApiWorkspaceOutAttributes + globals()['JsonApiWorkspaceOutRelationships'] = JsonApiWorkspaceOutRelationships + + +class JsonApiWorkspaceIn(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACE': "workspace", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'attributes': (JsonApiWorkspaceOutAttributes,), # noqa: E501 + 'relationships': (JsonApiWorkspaceOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspace") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceIn - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + attributes (JsonApiWorkspaceOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspace") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_in_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_in_document.py new file mode 100644 index 000000000..76f2c7751 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_in_document.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_in import JsonApiWorkspaceIn + globals()['JsonApiWorkspaceIn'] = JsonApiWorkspaceIn + + +class JsonApiWorkspaceInDocument(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiWorkspaceIn,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceInDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceIn): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceInDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceIn): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_linkage.py new file mode 100644 index 000000000..5b167050a --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_linkage.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiWorkspaceLinkage(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACE': "workspace", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "workspace") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceLinkage - a model defined in OpenAPI + + Args: + id (str): + + Keyword Args: + type (str): defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "workspace") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out.py new file mode 100644 index 000000000..da5a907e4 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out.py @@ -0,0 +1,299 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_out_attributes import JsonApiWorkspaceOutAttributes + from gooddata_metadata_client.model.json_api_workspace_out_meta import JsonApiWorkspaceOutMeta + from gooddata_metadata_client.model.json_api_workspace_out_relationships import JsonApiWorkspaceOutRelationships + globals()['JsonApiWorkspaceOutAttributes'] = JsonApiWorkspaceOutAttributes + globals()['JsonApiWorkspaceOutMeta'] = JsonApiWorkspaceOutMeta + globals()['JsonApiWorkspaceOutRelationships'] = JsonApiWorkspaceOutRelationships + + +class JsonApiWorkspaceOut(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACE': "workspace", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'meta': (JsonApiWorkspaceOutMeta,), # noqa: E501 + 'attributes': (JsonApiWorkspaceOutAttributes,), # noqa: E501 + 'relationships': (JsonApiWorkspaceOutRelationships,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'meta': 'meta', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + meta (JsonApiWorkspaceOutMeta): [optional] # noqa: E501 + attributes (JsonApiWorkspaceOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspace") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOut - a model defined in OpenAPI + + Args: + id (str): API identifier of an object + + Keyword Args: + type (str): Object type. defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + meta (JsonApiWorkspaceOutMeta): [optional] # noqa: E501 + attributes (JsonApiWorkspaceOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceOutRelationships): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspace") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_attributes.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_attributes.py new file mode 100644 index 000000000..64bbc5adb --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_attributes.py @@ -0,0 +1,255 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiWorkspaceOutAttributes(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): [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: + 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 + """JsonApiWorkspaceOutAttributes - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_document.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_document.py new file mode 100644 index 000000000..625301c40 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_document.py @@ -0,0 +1,279 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_out import JsonApiWorkspaceOut + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['JsonApiWorkspaceOut'] = JsonApiWorkspaceOut + globals()['ObjectLinks'] = ObjectLinks + + +class JsonApiWorkspaceOutDocument(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 = { + ('included',): { + }, + } + + @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 { + 'data': (JsonApiWorkspaceOut,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutDocument - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceOut): + + 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,) + links (ObjectLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_list.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_list.py new file mode 100644 index 000000000..e93b5f244 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_list.py @@ -0,0 +1,281 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_out_with_links import JsonApiWorkspaceOutWithLinks + from gooddata_metadata_client.model.list_links import ListLinks + globals()['JsonApiWorkspaceOutWithLinks'] = JsonApiWorkspaceOutWithLinks + globals()['ListLinks'] = ListLinks + + +class JsonApiWorkspaceOutList(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 = { + ('data',): { + }, + ('included',): { + }, + } + + @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 { + 'data': ([JsonApiWorkspaceOutWithLinks],), # noqa: E501 + 'links': (ListLinks,), # noqa: E501 + 'included': ([dict],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + 'links': 'links', # noqa: E501 + 'included': 'included', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutList - a model defined in OpenAPI + + Args: + data ([JsonApiWorkspaceOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutList - a model defined in OpenAPI + + Args: + data ([JsonApiWorkspaceOutWithLinks]): + + 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,) + links (ListLinks): [optional] # noqa: E501 + included ([dict]): Included resources. [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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_meta.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_meta.py new file mode 100644 index 000000000..be6368c71 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_meta.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_out_meta_config import JsonApiWorkspaceOutMetaConfig + globals()['JsonApiWorkspaceOutMetaConfig'] = JsonApiWorkspaceOutMetaConfig + + +class JsonApiWorkspaceOutMeta(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'config': (JsonApiWorkspaceOutMetaConfig,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'config': 'config', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutMeta - 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,) + config (JsonApiWorkspaceOutMetaConfig): [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: + 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 + """JsonApiWorkspaceOutMeta - 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,) + config (JsonApiWorkspaceOutMetaConfig): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_meta_config.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_meta_config.py new file mode 100644 index 000000000..d61f79f24 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_meta_config.py @@ -0,0 +1,271 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class JsonApiWorkspaceOutMetaConfig(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 { + 'data_sampling_available': (bool,), # noqa: E501 + 'approximate_count_available': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data_sampling_available': 'dataSamplingAvailable', # noqa: E501 + 'approximate_count_available': 'approximateCountAvailable', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutMetaConfig - a model defined in OpenAPI + + Args: + + Keyword Args: + data_sampling_available (bool): is sampling enabled - based on type of data-source connected to this workspace. defaults to False # noqa: E501 + approximate_count_available (bool): is approximate count enabled - based on type of data-source connected to this workspace. defaults to False # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + data_sampling_available = kwargs.get('data_sampling_available', False) + approximate_count_available = kwargs.get('approximate_count_available', False) + _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: + 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.data_sampling_available = data_sampling_available + self.approximate_count_available = approximate_count_available + 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 + """JsonApiWorkspaceOutMetaConfig - a model defined in OpenAPI + + Args: + + Keyword Args: + data_sampling_available (bool): is sampling enabled - based on type of data-source connected to this workspace. defaults to False # noqa: E501 + approximate_count_available (bool): is approximate count enabled - based on type of data-source connected to this workspace. defaults to False # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + data_sampling_available = kwargs.get('data_sampling_available', False) + approximate_count_available = kwargs.get('approximate_count_available', False) + _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: + 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.data_sampling_available = data_sampling_available + self.approximate_count_available = approximate_count_available + 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-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships.py new file mode 100644 index 000000000..ef4b4bc27 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_out_relationships_parent import JsonApiWorkspaceOutRelationshipsParent + globals()['JsonApiWorkspaceOutRelationshipsParent'] = JsonApiWorkspaceOutRelationshipsParent + + +class JsonApiWorkspaceOutRelationships(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'parent': (JsonApiWorkspaceOutRelationshipsParent,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'parent': 'parent', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutRelationships - 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,) + parent (JsonApiWorkspaceOutRelationshipsParent): [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: + 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 + """JsonApiWorkspaceOutRelationships - 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,) + parent (JsonApiWorkspaceOutRelationshipsParent): [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: + 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-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships_parent.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships_parent.py new file mode 100644 index 000000000..d137a7bfa --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_relationships_parent.py @@ -0,0 +1,267 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_to_one_linkage import JsonApiWorkspaceToOneLinkage + globals()['JsonApiWorkspaceToOneLinkage'] = JsonApiWorkspaceToOneLinkage + + +class JsonApiWorkspaceOutRelationshipsParent(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'data': (JsonApiWorkspaceToOneLinkage,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'data': 'data', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutRelationshipsParent - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceToOneLinkage): + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, data, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutRelationshipsParent - a model defined in OpenAPI + + Args: + data (JsonApiWorkspaceToOneLinkage): + + 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: + 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.data = data + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_with_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_with_links.py new file mode 100644 index 000000000..e7487ca85 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_out_with_links.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_out import JsonApiWorkspaceOut + from gooddata_metadata_client.model.json_api_workspace_out_attributes import JsonApiWorkspaceOutAttributes + from gooddata_metadata_client.model.json_api_workspace_out_meta import JsonApiWorkspaceOutMeta + from gooddata_metadata_client.model.json_api_workspace_out_relationships import JsonApiWorkspaceOutRelationships + from gooddata_metadata_client.model.object_links import ObjectLinks + from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer + globals()['JsonApiWorkspaceOut'] = JsonApiWorkspaceOut + globals()['JsonApiWorkspaceOutAttributes'] = JsonApiWorkspaceOutAttributes + globals()['JsonApiWorkspaceOutMeta'] = JsonApiWorkspaceOutMeta + globals()['JsonApiWorkspaceOutRelationships'] = JsonApiWorkspaceOutRelationships + globals()['ObjectLinks'] = ObjectLinks + globals()['ObjectLinksContainer'] = ObjectLinksContainer + + +class JsonApiWorkspaceOutWithLinks(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACE': "workspace", + }, + } + + validations = { + ('id',): { + 'regex': { + 'pattern': r'^[.A-Za-z0-9_-]{1,255}$', # noqa: E501 + }, + }, + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'meta': (JsonApiWorkspaceOutMeta,), # noqa: E501 + 'attributes': (JsonApiWorkspaceOutAttributes,), # noqa: E501 + 'relationships': (JsonApiWorkspaceOutRelationships,), # noqa: E501 + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'meta': 'meta', # noqa: E501 + 'attributes': 'attributes', # noqa: E501 + 'relationships': 'relationships', # noqa: E501 + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + meta (JsonApiWorkspaceOutMeta): [optional] # noqa: E501 + attributes (JsonApiWorkspaceOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspace") + _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: + 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 + """JsonApiWorkspaceOutWithLinks - a model defined in OpenAPI + + Keyword Args: + id (str): API identifier of an object + type (str): Object type. defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + meta (JsonApiWorkspaceOutMeta): [optional] # noqa: E501 + attributes (JsonApiWorkspaceOutAttributes): [optional] # noqa: E501 + relationships (JsonApiWorkspaceOutRelationships): [optional] # noqa: E501 + links (ObjectLinks): [optional] # noqa: E501 + """ + + type = kwargs.get('type', "workspace") + _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: + 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 beause 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': [ + JsonApiWorkspaceOut, + ObjectLinksContainer, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_to_one_linkage.py b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_to_one_linkage.py new file mode 100644 index 000000000..6b217ab28 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_to_one_linkage.py @@ -0,0 +1,318 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.json_api_workspace_linkage import JsonApiWorkspaceLinkage + globals()['JsonApiWorkspaceLinkage'] = JsonApiWorkspaceLinkage + + +class JsonApiWorkspaceToOneLinkage(ModelComposed): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACE': "workspace", + }, + } + + 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 = True + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """JsonApiWorkspaceToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "workspace" # 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: + 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 + """JsonApiWorkspaceToOneLinkage - 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,) + id (str): [optional] # noqa: E501 + type (str): [optional] if omitted the server will use the default value of "workspace" # 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: + 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 beause 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': [ + JsonApiWorkspaceLinkage, + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/list_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/list_links.py new file mode 100644 index 000000000..551be7f38 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/list_links.py @@ -0,0 +1,318 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.list_links_all_of import ListLinksAllOf + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['ListLinksAllOf'] = ListLinksAllOf + globals()['ObjectLinks'] = ObjectLinks + + +class ListLinks(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 { + '_self': (str,), # noqa: E501 + 'next': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_self': 'self', # noqa: E501 + 'next': 'next', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ListLinks - a model defined in OpenAPI + + Keyword Args: + _self (str): A string containing the link's URL. + _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,) + next (str): A string containing the link's URL for the next page of data.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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 + """ListLinks - a model defined in OpenAPI + + Keyword Args: + _self (str): A string containing the link's URL. + _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,) + next (str): A string containing the link's URL for the next page of data.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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 beause 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': [ + ListLinksAllOf, + ObjectLinks, + ], + 'oneOf': [ + ], + } diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/list_links_all_of.py b/gooddata-metadata-client/gooddata_metadata_client/model/list_links_all_of.py new file mode 100644 index 000000000..743dc029b --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/list_links_all_of.py @@ -0,0 +1,255 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class ListLinksAllOf(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 { + 'next': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'next': 'next', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ListLinksAllOf - 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,) + next (str): A string containing the link's URL for the next page of data.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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 + """ListLinksAllOf - 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,) + next (str): A string containing the link's URL for the next page of data.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + 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-metadata-client/gooddata_metadata_client/model/object_links.py b/gooddata-metadata-client/gooddata_metadata_client/model/object_links.py new file mode 100644 index 000000000..45ef4c934 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/object_links.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class ObjectLinks(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 { + '_self': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + '_self': 'self', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, _self, *args, **kwargs): # noqa: E501 + """ObjectLinks - a model defined in OpenAPI + + Args: + _self (str): A string containing the link's URL. + + 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + 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._self = _self + 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, _self, *args, **kwargs): # noqa: E501 + """ObjectLinks - a model defined in OpenAPI + + Args: + _self (str): A string containing the link's URL. + + 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: + 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._self = _self + 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-metadata-client/gooddata_metadata_client/model/object_links_container.py b/gooddata-metadata-client/gooddata_metadata_client/model/object_links_container.py new file mode 100644 index 000000000..a6540b411 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/object_links_container.py @@ -0,0 +1,261 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + +def lazy_import(): + from gooddata_metadata_client.model.object_links import ObjectLinks + globals()['ObjectLinks'] = ObjectLinks + + +class ObjectLinksContainer(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'links': (ObjectLinks,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'links': 'links', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ObjectLinksContainer - 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,) + links (ObjectLinks): [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: + 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 + """ObjectLinksContainer - 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,) + links (ObjectLinks): [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: + 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-metadata-client/gooddata_metadata_client/model/reference_identifier.py b/gooddata-metadata-client/gooddata_metadata_client/model/reference_identifier.py new file mode 100644 index 000000000..7bc5ebfa2 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/reference_identifier.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class ReferenceIdentifier(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'DATASET': "dataset", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """ReferenceIdentifier - a model defined in OpenAPI + + Args: + id (str): Reference ID. + + Keyword Args: + type (str): A type of the reference.. defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataset") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """ReferenceIdentifier - a model defined in OpenAPI + + Args: + id (str): Reference ID. + + Keyword Args: + type (str): A type of the reference.. defaults to "dataset", must be one of ["dataset", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "dataset") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/user_group_identifier.py b/gooddata-metadata-client/gooddata_metadata_client/model/user_group_identifier.py new file mode 100644 index 000000000..7b28d20d9 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/user_group_identifier.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class UserGroupIdentifier(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'USERGROUP': "userGroup", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """UserGroupIdentifier - a model defined in OpenAPI + + Args: + id (str): Identifier of the user group. + + Keyword Args: + type (str): A type.. defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "userGroup") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """UserGroupIdentifier - a model defined in OpenAPI + + Args: + id (str): Identifier of the user group. + + Keyword Args: + type (str): A type.. defaults to "userGroup", must be one of ["userGroup", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "userGroup") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model/workspace_identifier.py b/gooddata-metadata-client/gooddata_metadata_client/model/workspace_identifier.py new file mode 100644 index 000000000..fd69f3dbb --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model/workspace_identifier.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 + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from gooddata_metadata_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, +) +from ..model_utils import OpenApiModel +from gooddata_metadata_client.exceptions import ApiAttributeError + + + +class WorkspaceIdentifier(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('type',): { + 'WORKSPACE': "workspace", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """WorkspaceIdentifier - a model defined in OpenAPI + + Args: + id (str): Identifier of the workspace. + + Keyword Args: + type (str): A type.. defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "workspace") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, *args, **kwargs): # noqa: E501 + """WorkspaceIdentifier - a model defined in OpenAPI + + Args: + id (str): Identifier of the workspace. + + Keyword Args: + type (str): A type.. defaults to "workspace", must be one of ["workspace", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + type = kwargs.get('type', "workspace") + _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: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.id = id + self.type = type + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/gooddata-metadata-client/gooddata_metadata_client/model_utils.py b/gooddata-metadata-client/gooddata_metadata_client/model_utils.py new file mode 100644 index 000000000..5629e1428 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/model_utils.py @@ -0,0 +1,1992 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +from datetime import date, datetime # noqa: F401 +import inspect +import io +import os +import pprint +import re +import tempfile + +from dateutil.parser import parse + +from gooddata_metadata_client.exceptions import ( + ApiKeyError, + ApiAttributeError, + ApiTypeError, + ApiValueError, +) + +none_type = type(None) +file_type = io.IOBase + + +def convert_js_args_to_python_args(fn): + from functools import wraps + @wraps(fn) + def wrapped_init(_self_loathing_, *args, **kwargs): + """ + An attribute named `self` received from the api will conflicts with the reserved `self` + parameter of a class method. During generation, `self` attributes are mapped + to `_self_loathing_` in models. Here, we name `_self_loathing_` instead of `self` to avoid conflicts. + """ + spec_property_naming = kwargs.get('_spec_property_naming', False) + if spec_property_naming: + kwargs = change_keys_js_to_python(kwargs, _self_loathing_ if isinstance(_self_loathing_, type) else _self_loathing_.__class__) + return fn(_self_loathing_, *args, **kwargs) + return wrapped_init + + +class cached_property(object): + # this caches the result of the function call for fn with no inputs + # use this as a decorator on function methods that you want converted + # into cached properties + result_key = '_results' + + def __init__(self, fn): + self._fn = fn + + def __get__(self, instance, cls=None): + if self.result_key in vars(self): + return vars(self)[self.result_key] + else: + result = self._fn() + setattr(self, self.result_key, result) + return result + + +PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) + +def allows_single_value_input(cls): + """ + This function returns True if the input composed schema model or any + descendant model allows a value only input + This is true for cases where oneOf contains items like: + oneOf: + - float + - NumberWithValidation + - StringEnum + - ArrayModel + - null + TODO: lru_cache this + """ + if ( + issubclass(cls, ModelSimple) or + cls in PRIMITIVE_TYPES + ): + return True + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return False + return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) + return False + +def composed_model_input_classes(cls): + """ + This function returns a list of the possible models that can be accepted as + inputs. + TODO: lru_cache this + """ + if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: + return [cls] + elif issubclass(cls, ModelNormal): + if cls.discriminator is None: + return [cls] + else: + return get_discriminated_classes(cls) + elif issubclass(cls, ModelComposed): + if not cls._composed_schemas['oneOf']: + return [] + if cls.discriminator is None: + input_classes = [] + for c in cls._composed_schemas['oneOf']: + input_classes.extend(composed_model_input_classes(c)) + return input_classes + else: + return get_discriminated_classes(cls) + return [] + + +class OpenApiModel(object): + """The base class for all OpenAPIModels""" + + def set_attribute(self, name, value): + # this is only used to set properties on self + + path_to_item = [] + if self._path_to_item: + path_to_item.extend(self._path_to_item) + path_to_item.append(name) + + if name in self.openapi_types: + required_types_mixed = self.openapi_types[name] + elif self.additional_properties_type is None: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + path_to_item + ) + elif self.additional_properties_type is not None: + required_types_mixed = self.additional_properties_type + + if get_simple_class(name) != str: + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) + + if self._check_type: + value = validate_and_convert_types( + value, required_types_mixed, path_to_item, self._spec_property_naming, + self._check_type, configuration=self._configuration) + if (name,) in self.allowed_values: + check_allowed_values( + self.allowed_values, + (name,), + value + ) + if (name,) in self.validations: + check_validations( + self.validations, + (name,), + value, + self._configuration + ) + self.__dict__['_data_store'][name] = value + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other + + def __setattr__(self, attr, value): + """set the value of an attribute using dot notation: `instance.attr = val`""" + self[attr] = value + + def __getattr__(self, attr): + """get the value of an attribute using dot notation: `instance.attr`""" + return self.__getitem__(attr) + + def __new__(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: 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 the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return super(OpenApiModel, cls).__new__(cls) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return super(OpenApiModel, cls).__new__(cls) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = super(OpenApiModel, cls).__new__(cls) + self_inst.__init__(*args, **kwargs) + + new_inst = new_cls.__new__(new_cls, *args, **kwargs) + new_inst.__init__(*args, **kwargs) + return new_inst + + + @classmethod + @convert_js_args_to_python_args + def _new_from_openapi_data(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: 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 the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return cls._from_openapi_data(*args, **kwargs) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return cls._from_openapi_data(*args, **kwargs) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = cls._from_openapi_data(*args, **kwargs) + + + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) + return new_inst + + +class ModelSimple(OpenApiModel): + """the parent class of models whose type != object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_str(self): + """Returns the string representation of the model""" + return str(self.value) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + this_val = self._data_store['value'] + that_val = other._data_store['value'] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + return vals_equal + + +class ModelNormal(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi""" + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + self.set_attribute(name, value) + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + return self.__dict__['_data_store'].get(name, default) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + if name in self: + return self.get(name) + + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + + def __contains__(self, name): + """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`""" + if name in self.required_properties: + return name in self.__dict__ + + return name in self.__dict__['_data_store'] + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +class ModelComposed(OpenApiModel): + """the parent class of models whose type == object in their + swagger/openapi and have oneOf/allOf/anyOf + + When one sets a property we use var_name_to_model_instances to store the value in + the correct class instances + run any type checking + validation code. + When one gets a property we use var_name_to_model_instances to get the value + from the correct class instances. + This allows multiple composed schemas to contain the same property with additive + constraints on the value. + + _composed_schemas (dict) stores the anyOf/allOf/oneOf classes + key (str): allOf/oneOf/anyOf + value (list): the classes in the XOf definition. + Note: none_type can be included when the openapi document version >= 3.1.0 + _composed_instances (list): stores a list of instances of the composed schemas + defined in _composed_schemas. When properties are accessed in the self instance, + they are returned from the self._data_store or the data stores in the instances + in self._composed_schemas + _var_name_to_model_instances (dict): maps between a variable name on self and + the composed instances (self included) which contain that data + key (str): property name + value (list): list of class instances, self or instances in _composed_instances + which contain the value that the key is referring to. + """ + + def __setitem__(self, name, value): + """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" + if name in self.required_properties: + self.__dict__[name] = value + return + + """ + Use cases: + 1. additional_properties_type is None (additionalProperties == False in spec) + Check for property presence in self.openapi_types + if not present then throw an error + if present set in self, set attribute + always set on composed schemas + 2. additional_properties_type exists + set attribute on self + always set on composed schemas + """ + if self.additional_properties_type is None: + """ + For an attribute to exist on a composed schema it must: + - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND + - fulfill schema_requirements in each oneOf/anyOf/allOf schemas + + schema_requirements: + For an attribute to exist on a schema it must: + - be present in properties at the schema OR + - have additionalProperties unset (defaults additionalProperties = any type) OR + - have additionalProperties set + """ + if name not in self.openapi_types: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + # attribute must be set on self and composed instances + self.set_attribute(name, value) + for model_instance in self._composed_instances: + setattr(model_instance, name, value) + if name not in self._var_name_to_model_instances: + # we assigned an additional property + self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] + return None + + __unset_attribute_value__ = object() + + def get(self, name, default=None): + """returns the value of an attribute or some default value if the attribute was not set""" + if name in self.required_properties: + return self.__dict__[name] + + # get the attribute from the correct instance + model_instances = self._var_name_to_model_instances.get(name) + values = [] + # A composed model stores self and child (oneof/anyOf/allOf) models under + # self._var_name_to_model_instances. + # Any property must exist in self and all model instances + # The value stored in all model instances must be the same + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + v = model_instance._data_store[name] + if v not in values: + values.append(v) + len_values = len(values) + if len_values == 0: + return default + elif len_values == 1: + return values[0] + elif len_values > 1: + raise ApiValueError( + "Values stored for property {0} in {1} differ when looking " + "at self and self's composed instances. All values must be " + "the same".format(name, type(self).__name__), + [e for e in [self._path_to_item, name] if e] + ) + + def __getitem__(self, name): + """get the value of an attribute using square-bracket notation: `instance[attr]`""" + value = self.get(name, self.__unset_attribute_value__) + if value is self.__unset_attribute_value__: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + return value + + def __contains__(self, name): + """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`""" + + if name in self.required_properties: + return name in self.__dict__ + + model_instances = self._var_name_to_model_instances.get( + name, self._additional_properties_model_instances) + + if model_instances: + for model_instance in model_instances: + if name in model_instance._data_store: + return True + + return False + + def to_dict(self): + """Returns the model properties as a dict""" + return model_to_dict(self, serialize=False) + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, self.__class__): + return False + + if not set(self._data_store.keys()) == set(other._data_store.keys()): + return False + for _var_name, this_val in self._data_store.items(): + that_val = other._data_store[_var_name] + types = set() + types.add(this_val.__class__) + types.add(that_val.__class__) + vals_equal = this_val == that_val + if not vals_equal: + return False + return True + + +COERCION_INDEX_BY_TYPE = { + ModelComposed: 0, + ModelNormal: 1, + ModelSimple: 2, + none_type: 3, # The type of 'None'. + list: 4, + dict: 5, + float: 6, + int: 7, + bool: 8, + datetime: 9, + date: 10, + str: 11, + file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. +} + +# these are used to limit what type conversions we try to do +# when we have a valid type already and we want to try converting +# to another type +UPCONVERSION_TYPE_PAIRS = ( + (str, datetime), + (str, date), + (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + (list, ModelComposed), + (dict, ModelComposed), + (str, ModelComposed), + (int, ModelComposed), + (float, ModelComposed), + (list, ModelComposed), + (list, ModelNormal), + (dict, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), +) + +COERCIBLE_TYPE_PAIRS = { + False: ( # client instantiation of a model with client data + # (dict, ModelComposed), + # (list, ModelComposed), + # (dict, ModelNormal), + # (list, ModelNormal), + # (str, ModelSimple), + # (int, ModelSimple), + # (float, ModelSimple), + # (list, ModelSimple), + # (str, int), + # (str, float), + # (str, datetime), + # (str, date), + # (int, str), + # (float, str), + ), + True: ( # server -> client data + (dict, ModelComposed), + (list, ModelComposed), + (dict, ModelNormal), + (list, ModelNormal), + (str, ModelSimple), + (int, ModelSimple), + (float, ModelSimple), + (list, ModelSimple), + # (str, int), + # (str, float), + (str, datetime), + (str, date), + # (int, str), + # (float, str), + (str, file_type) + ), +} + + +def get_simple_class(input_value): + """Returns an input_value's simple class that we will use for type checking + Python2: + float and int will return int, where int is the python3 int backport + str and unicode will return str, where str is the python3 str backport + Note: float and int ARE both instances of int backport + Note: str_py2 and unicode_py2 are NOT both instances of str backport + + Args: + input_value (class/class_instance): the item for which we will return + the simple class + """ + if isinstance(input_value, type): + # input_value is a class + return input_value + elif isinstance(input_value, tuple): + return tuple + elif isinstance(input_value, list): + return list + elif isinstance(input_value, dict): + return dict + elif isinstance(input_value, none_type): + return none_type + elif isinstance(input_value, file_type): + return file_type + elif isinstance(input_value, bool): + # this must be higher than the int check because + # isinstance(True, int) == True + return bool + elif isinstance(input_value, int): + return int + elif isinstance(input_value, datetime): + # this must be higher than the date check because + # isinstance(datetime_instance, date) == True + return datetime + elif isinstance(input_value, date): + return date + elif isinstance(input_value, str): + return str + return type(input_value) + + +def check_allowed_values(allowed_values, input_variable_path, input_values): + """Raises an exception if the input_values are not allowed + + Args: + allowed_values (dict): the allowed_values dict + input_variable_path (tuple): the path to the input variable + input_values (list/str/int/float/date/datetime): the values that we + are checking to see if they are in allowed_values + """ + these_allowed_values = list(allowed_values[input_variable_path].values()) + if (isinstance(input_values, list) + and not set(input_values).issubset( + set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values) - set(these_allowed_values))), + raise ApiValueError( + "Invalid values for `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (isinstance(input_values, dict) + and not set( + input_values.keys()).issubset(set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values.keys()) - set(these_allowed_values))) + raise ApiValueError( + "Invalid keys in `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) + ) + elif (not isinstance(input_values, (list, dict)) + and input_values not in these_allowed_values): + raise ApiValueError( + "Invalid value for `%s` (%s), must be one of %s" % + ( + input_variable_path[0], + input_values, + these_allowed_values + ) + ) + + +def is_json_validation_enabled(schema_keyword, configuration=None): + """Returns true if JSON schema validation is enabled for the specified + validation keyword. This can be used to skip JSON schema structural validation + as requested in the configuration. + + Args: + schema_keyword (string): the name of a JSON schema validation keyword. + configuration (Configuration): the configuration class. + """ + + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) + + +def check_validations( + validations, input_variable_path, input_values, + configuration=None): + """Raises an exception if the input_values are invalid + + Args: + validations (dict): the validation dictionary. + input_variable_path (tuple): the path to the input variable. + input_values (list/str/int/float/date/datetime): the values that we + are checking. + configuration (Configuration): the configuration class. + """ + + if input_values is None: + return + + current_validations = validations[input_variable_path] + if (is_json_validation_enabled('multipleOf', configuration) and + 'multiple_of' in current_validations and + isinstance(input_values, (int, float)) and + not (float(input_values) / current_validations['multiple_of']).is_integer()): + # Note 'multipleOf' will be as good as the floating point arithmetic. + raise ApiValueError( + "Invalid value for `%s`, value must be a multiple of " + "`%s`" % ( + input_variable_path[0], + current_validations['multiple_of'] + ) + ) + + if (is_json_validation_enabled('maxLength', configuration) and + 'max_length' in current_validations and + len(input_values) > current_validations['max_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['max_length'] + ) + ) + + if (is_json_validation_enabled('minLength', configuration) and + 'min_length' in current_validations and + len(input_values) < current_validations['min_length']): + raise ApiValueError( + "Invalid value for `%s`, length must be greater than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['min_length'] + ) + ) + + if (is_json_validation_enabled('maxItems', configuration) and + 'max_items' in current_validations and + len(input_values) > current_validations['max_items']): + raise ApiValueError( + "Invalid value for `%s`, number of items must be less than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['max_items'] + ) + ) + + if (is_json_validation_enabled('minItems', configuration) and + 'min_items' in current_validations and + len(input_values) < current_validations['min_items']): + raise ValueError( + "Invalid value for `%s`, number of items must be greater than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['min_items'] + ) + ) + + items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum') + if (any(item in current_validations for item in items)): + if isinstance(input_values, list): + max_val = max(input_values) + min_val = min(input_values) + elif isinstance(input_values, dict): + max_val = max(input_values.values()) + min_val = min(input_values.values()) + else: + max_val = input_values + min_val = input_values + + if (is_json_validation_enabled('exclusiveMaximum', configuration) and + 'exclusive_maximum' in current_validations and + max_val >= current_validations['exclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than `%s`" % ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('maximum', configuration) and + 'inclusive_maximum' in current_validations and + max_val > current_validations['inclusive_maximum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['inclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('exclusiveMinimum', configuration) and + 'exclusive_minimum' in current_validations and + min_val <= current_validations['exclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than `%s`" % + ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) + ) + + if (is_json_validation_enabled('minimum', configuration) and + 'inclusive_minimum' in current_validations and + min_val < current_validations['inclusive_minimum']): + raise ApiValueError( + "Invalid value for `%s`, must be a value greater than or equal " + "to `%s`" % ( + input_variable_path[0], + current_validations['inclusive_minimum'] + ) + ) + flags = current_validations.get('regex', {}).get('flags', 0) + if (is_json_validation_enabled('pattern', configuration) and + 'regex' in current_validations and + not re.search(current_validations['regex']['pattern'], + input_values, flags=flags)): + err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( + input_variable_path[0], + current_validations['regex']['pattern'] + ) + if flags != 0: + # Don't print the regex flags if the flags are not + # specified in the OAS document. + err_msg = r"%s with flags=`%s`" % (err_msg, flags) + raise ApiValueError(err_msg) + + +def order_response_types(required_types): + """Returns the required types sorted in coercion order + + Args: + required_types (list/tuple): collection of classes or instance of + list or dict with class information inside it. + + Returns: + (list): coercion order sorted collection of classes or instance + of list or dict with class information inside it. + """ + + def index_getter(class_or_instance): + if isinstance(class_or_instance, list): + return COERCION_INDEX_BY_TYPE[list] + elif isinstance(class_or_instance, dict): + return COERCION_INDEX_BY_TYPE[dict] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelComposed)): + return COERCION_INDEX_BY_TYPE[ModelComposed] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelNormal)): + return COERCION_INDEX_BY_TYPE[ModelNormal] + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelSimple)): + return COERCION_INDEX_BY_TYPE[ModelSimple] + elif class_or_instance in COERCION_INDEX_BY_TYPE: + return COERCION_INDEX_BY_TYPE[class_or_instance] + raise ApiValueError("Unsupported type: %s" % class_or_instance) + + sorted_types = sorted( + required_types, + key=lambda class_or_instance: index_getter(class_or_instance) + ) + return sorted_types + + +def remove_uncoercible(required_types_classes, current_item, spec_property_naming, + must_convert=True): + """Only keeps the type conversions that are possible + + Args: + required_types_classes (tuple): tuple of classes that are required + these should be ordered by COERCION_INDEX_BY_TYPE + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + current_item (any): the current item (input data) to be converted + + Keyword Args: + must_convert (bool): if True the item to convert is of the wrong + type and we want a big list of coercibles + if False, we want a limited list of coercibles + + Returns: + (list): the remaining coercible required types, classes only + """ + current_type_simple = get_simple_class(current_item) + + results_classes = [] + for required_type_class in required_types_classes: + # convert our models to OpenApiModel + required_type_class_simplified = required_type_class + if isinstance(required_type_class_simplified, type): + if issubclass(required_type_class_simplified, ModelComposed): + required_type_class_simplified = ModelComposed + elif issubclass(required_type_class_simplified, ModelNormal): + required_type_class_simplified = ModelNormal + elif issubclass(required_type_class_simplified, ModelSimple): + required_type_class_simplified = ModelSimple + + if required_type_class_simplified == current_type_simple: + # don't consider converting to one's own class + continue + + class_pair = (current_type_simple, required_type_class_simplified) + if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: + results_classes.append(required_type_class) + elif class_pair in UPCONVERSION_TYPE_PAIRS: + results_classes.append(required_type_class) + return results_classes + +def get_discriminated_classes(cls): + """ + Returns all the classes that a discriminator converts to + TODO: lru_cache this + """ + possible_classes = [] + key = list(cls.discriminator.keys())[0] + if is_type_nullable(cls): + possible_classes.append(cls) + for discr_cls in cls.discriminator[key].values(): + if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: + possible_classes.extend(get_discriminated_classes(discr_cls)) + else: + possible_classes.append(discr_cls) + return possible_classes + + +def get_possible_classes(cls, from_server_context): + # TODO: lru_cache this + possible_classes = [cls] + if from_server_context: + return possible_classes + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + possible_classes = [] + possible_classes.extend(get_discriminated_classes(cls)) + elif issubclass(cls, ModelComposed): + possible_classes.extend(composed_model_input_classes(cls)) + return possible_classes + + +def get_required_type_classes(required_types_mixed, spec_property_naming): + """Converts the tuple required_types into a tuple and a dict described + below + + Args: + required_types_mixed (tuple/list): will contain either classes or + instance of list or dict + spec_property_naming (bool): if True these values came from the + server, and we use the data types in our endpoints. + If False, we are client side and we need to include + oneOf and discriminator classes inside the data types in our endpoints + + Returns: + (valid_classes, dict_valid_class_to_child_types_mixed): + valid_classes (tuple): the valid classes that the current item + should be + dict_valid_class_to_child_types_mixed (dict): + valid_class (class): this is the key + child_types_mixed (list/dict/tuple): describes the valid child + types + """ + valid_classes = [] + child_req_types_by_current_type = {} + for required_type in required_types_mixed: + if isinstance(required_type, list): + valid_classes.append(list) + child_req_types_by_current_type[list] = required_type + elif isinstance(required_type, tuple): + valid_classes.append(tuple) + child_req_types_by_current_type[tuple] = required_type + elif isinstance(required_type, dict): + valid_classes.append(dict) + child_req_types_by_current_type[dict] = required_type[str] + else: + valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) + return tuple(valid_classes), child_req_types_by_current_type + + +def change_keys_js_to_python(input_dict, model_class): + """ + Converts from javascript_key keys in the input_dict to python_keys in + the output dict using the mapping in model_class. + If the input_dict contains a key which does not declared in the model_class, + the key is added to the output dict as is. The assumption is the model_class + may have undeclared properties (additionalProperties attribute in the OAS + document). + """ + + if getattr(model_class, 'attribute_map', None) is None: + return input_dict + output_dict = {} + reversed_attr_map = {value: key for key, value in + model_class.attribute_map.items()} + for javascript_key, value in input_dict.items(): + python_key = reversed_attr_map.get(javascript_key) + if python_key is None: + # if the key is unknown, it is in error or it is an + # additionalProperties variable + python_key = javascript_key + output_dict[python_key] = value + return output_dict + + +def get_type_error(var_value, path_to_item, valid_classes, key_type=False): + error_msg = type_error_message( + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type + ) + + +def deserialize_primitive(data, klass, path_to_item): + """Deserializes string to primitive type. + + :param data: str/int/float + :param klass: str/class the class to convert to + + :return: int, float, str, bool, date, datetime + """ + additional_message = "" + try: + if klass in {datetime, date}: + additional_message = ( + "If you need your parameter to have a fallback " + "string value, please set its type as `type: {}` in your " + "spec. That allows the value to be any type. " + ) + if klass == datetime: + if len(data) < 8: + raise ValueError("This is not a datetime") + # The string should be in iso8601 datetime format. + parsed_datetime = parse(data) + date_only = ( + parsed_datetime.hour == 0 and + parsed_datetime.minute == 0 and + parsed_datetime.second == 0 and + parsed_datetime.tzinfo is None and + 8 <= len(data) <= 10 + ) + if date_only: + raise ValueError("This is a date, not a datetime") + return parsed_datetime + elif klass == date: + if len(data) < 8: + raise ValueError("This is not a date") + return parse(data).date() + else: + converted_value = klass(data) + if isinstance(data, str) and klass == float: + if str(converted_value) != data: + # '7' -> 7.0 -> '7.0' != '7' + raise ValueError('This is not a float') + return converted_value + except (OverflowError, ValueError) as ex: + # parse can raise OverflowError + raise ApiValueError( + "{0}Failed to parse {1} as {2}".format( + additional_message, repr(data), klass.__name__ + ), + path_to_item=path_to_item + ) from ex + + +def get_discriminator_class(model_class, + discr_name, + discr_value, cls_visited): + """Returns the child class specified by the discriminator. + + Args: + model_class (OpenApiModel): the model class. + discr_name (string): the name of the discriminator property. + discr_value (any): the discriminator value. + cls_visited (list): list of model classes that have been visited. + Used to determine the discriminator class without + visiting circular references indefinitely. + + Returns: + used_model_class (class/None): the chosen child class that will be used + to deserialize the data, for example dog.Dog. + If a class is not found, None is returned. + """ + + if model_class in cls_visited: + # The class has already been visited and no suitable class was found. + return None + cls_visited.append(model_class) + used_model_class = None + if discr_name in model_class.discriminator: + class_name_to_discr_class = model_class.discriminator[discr_name] + used_model_class = class_name_to_discr_class.get(discr_value) + if used_model_class is None: + # We didn't find a discriminated class in class_name_to_discr_class. + # So look in the ancestor or descendant discriminators + # The discriminator mapping may exist in a descendant (anyOf, oneOf) + # or ancestor (allOf). + # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat + # hierarchy, the discriminator mappings may be defined at any level + # in the hierarchy. + # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig + # if we try to make BasquePig from mammal, we need to travel through + # the oneOf descendant discriminators to find BasquePig + descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ + model_class._composed_schemas.get('anyOf', ()) + ancestor_classes = model_class._composed_schemas.get('allOf', ()) + possible_classes = descendant_classes + ancestor_classes + for cls in possible_classes: + # Check if the schema has inherited discriminators. + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + used_model_class = get_discriminator_class( + cls, discr_name, discr_value, cls_visited) + if used_model_class is not None: + return used_model_class + return used_model_class + + +def deserialize_model(model_data, model_class, path_to_item, check_type, + configuration, spec_property_naming): + """Deserializes model_data to model instance. + + Args: + model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model + model_class (OpenApiModel): the model class + path_to_item (list): path to the model in the received data + check_type (bool): whether to check the data tupe for the values in + the model + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + + Returns: + model instance + + Raise: + ApiTypeError + ApiValueError + ApiKeyError + """ + + kw_args = dict(_check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _spec_property_naming=spec_property_naming) + + if issubclass(model_class, ModelSimple): + return model_class._new_from_openapi_data(model_data, **kw_args) + elif isinstance(model_data, list): + return model_class._new_from_openapi_data(*model_data, **kw_args) + if isinstance(model_data, dict): + kw_args.update(model_data) + return model_class._new_from_openapi_data(**kw_args) + elif isinstance(model_data, PRIMITIVE_TYPES): + return model_class._new_from_openapi_data(model_data, **kw_args) + + +def deserialize_file(response_data, configuration, content_disposition=None): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + Args: + param response_data (str): the file data to write + configuration (Configuration): the instance to use to convert files + + Keyword Args: + content_disposition (str): the value of the Content-Disposition + header + + Returns: + (file_type): the deserialized file which is open + The user is responsible for closing and reading the file + """ + fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + + f = open(path, "rb") + return f + + +def attempt_convert_item(input_value, valid_classes, path_to_item, + configuration, spec_property_naming, key_type=False, + must_convert=False, check_type=True): + """ + Args: + input_value (any): the data to convert + valid_classes (any): the classes that are valid + path_to_item (list): the path to the item to convert + configuration (Configuration): the instance to use to convert files + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + key_type (bool): if True we need to convert a key type (not supported) + must_convert (bool): if True we must convert + check_type (bool): if True we check the type or the returned data in + ModelComposed/ModelNormal/ModelSimple instances + + Returns: + instance (any) the fixed item + + Raises: + ApiTypeError + ApiValueError + ApiKeyError + """ + valid_classes_ordered = order_response_types(valid_classes) + valid_classes_coercible = remove_uncoercible( + valid_classes_ordered, input_value, spec_property_naming) + if not valid_classes_coercible or key_type: + # we do not handle keytype errors, json will take care + # of this for us + if configuration is None or not configuration.discard_unknown_keys: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=key_type) + for valid_class in valid_classes_coercible: + try: + if issubclass(valid_class, OpenApiModel): + return deserialize_model(input_value, valid_class, + path_to_item, check_type, + configuration, spec_property_naming) + elif valid_class == file_type: + return deserialize_file(input_value, configuration) + return deserialize_primitive(input_value, valid_class, + path_to_item) + except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: + if must_convert: + raise conversion_exc + # if we have conversion errors when must_convert == False + # we ignore the exception and move on to the next class + continue + # we were unable to convert, must_convert == False + return input_value + + +def is_type_nullable(input_type): + """ + Returns true if None is an allowed value for the specified input_type. + + A type is nullable if at least one of the following conditions is true: + 1. The OAS 'nullable' attribute has been specified, + 1. The type is the 'null' type, + 1. The type is a anyOf/oneOf composed schema, and a child schema is + the 'null' type. + Args: + input_type (type): the class of the input_value that we are + checking + Returns: + bool + """ + if input_type is none_type: + return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: + return True + if issubclass(input_type, ModelComposed): + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + for t in input_type._composed_schemas.get('oneOf', ()): + if is_type_nullable(t): return True + for t in input_type._composed_schemas.get('anyOf', ()): + if is_type_nullable(t): return True + return False + + +def is_valid_type(input_class_simple, valid_classes): + """ + Args: + input_class_simple (class): the class of the input_value that we are + checking + valid_classes (tuple): the valid classes that the current item + should be + Returns: + bool + """ + valid_type = input_class_simple in valid_classes + if not valid_type and ( + issubclass(input_class_simple, OpenApiModel) or + input_class_simple is none_type): + for valid_class in valid_classes: + if input_class_simple is none_type and is_type_nullable(valid_class): + # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. + return True + if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): + continue + discr_propertyname_py = list(valid_class.discriminator.keys())[0] + discriminator_classes = ( + valid_class.discriminator[discr_propertyname_py].values() + ) + valid_type = is_valid_type(input_class_simple, discriminator_classes) + if valid_type: + return True + return valid_type + + +def validate_and_convert_types(input_value, required_types_mixed, path_to_item, + spec_property_naming, _check_type, configuration=None): + """Raises a TypeError is there is a problem, otherwise returns value + + Args: + input_value (any): the data to validate/convert + required_types_mixed (list/dict/tuple): A list of + valid classes, or a list tuples of valid classes, or a dict where + the value is a tuple of value classes + path_to_item: (list) the path to the data being validated + this stores a list of keys or indices to get to the data being + validated + spec_property_naming (bool): True if the variable names in the input + data are serialized names as specified in the OpenAPI document. + False if the variables names in the input data are python + variable names in PEP-8 snake case. + _check_type: (boolean) if true, type will be checked and conversion + will be attempted. + configuration: (Configuration): the configuration class to use + when converting file_type items. + If passed, conversion will be attempted when possible + If not passed, no conversions will be attempted and + exceptions will be raised + + Returns: + the correctly typed value + + Raises: + ApiTypeError + """ + results = get_required_type_classes(required_types_mixed, spec_property_naming) + valid_classes, child_req_types_by_current_type = results + + input_class_simple = get_simple_class(input_value) + valid_type = is_valid_type(input_class_simple, valid_classes) + if not valid_type: + if configuration: + # if input_value is not valid_type try to convert it + converted_instance = attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=True, + check_type=_check_type + ) + return converted_instance + else: + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=False) + + # input_value's type is in valid_classes + if len(valid_classes) > 1 and configuration: + # there are valid classes which are not the current class + valid_classes_coercible = remove_uncoercible( + valid_classes, input_value, spec_property_naming, must_convert=False) + if valid_classes_coercible: + converted_instance = attempt_convert_item( + input_value, + valid_classes_coercible, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=False, + check_type=_check_type + ) + return converted_instance + + if child_req_types_by_current_type == {}: + # all types are of the required types and there are no more inner + # variables left to look at + return input_value + inner_required_types = child_req_types_by_current_type.get( + type(input_value) + ) + if inner_required_types is None: + # for this type, there are not more inner variables left to look at + return input_value + if isinstance(input_value, list): + if input_value == []: + # allow an empty list + return input_value + for index, inner_value in enumerate(input_value): + inner_path = list(path_to_item) + inner_path.append(index) + input_value[index] = validate_and_convert_types( + inner_value, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + elif isinstance(input_value, dict): + if input_value == {}: + # allow an empty dict + return input_value + for inner_key, inner_val in input_value.items(): + inner_path = list(path_to_item) + inner_path.append(inner_key) + if get_simple_class(inner_key) != str: + raise get_type_error(inner_key, inner_path, valid_classes, + key_type=True) + input_value[inner_key] = validate_and_convert_types( + inner_val, + inner_required_types, + inner_path, + spec_property_naming, + _check_type, + configuration=configuration + ) + return input_value + + +def model_to_dict(model_instance, serialize=True): + """Returns the model properties as a dict + + Args: + model_instance (one of your model instances): the model instance that + will be converted to a dict. + + Keyword Args: + serialize (bool): if True, the keys in the dict will be values from + attribute_map + """ + result = {} + + model_instances = [model_instance] + if model_instance._composed_schemas: + model_instances.extend(model_instance._composed_instances) + seen_json_attribute_names = set() + used_fallback_python_attribute_names = set() + py_to_json_map = {} + for model_instance in model_instances: + for attr, value in model_instance._data_store.items(): + if serialize: + # we use get here because additional property key names do not + # exist in attribute_map + try: + attr = model_instance.attribute_map[attr] + py_to_json_map.update(model_instance.attribute_map) + seen_json_attribute_names.add(attr) + except KeyError: + used_fallback_python_attribute_names.add(attr) + if isinstance(value, list): + if not value: + # empty list or None + result[attr] = value + else: + res = [] + for v in value: + if isinstance(v, PRIMITIVE_TYPES) or v is None: + res.append(v) + elif isinstance(v, ModelSimple): + res.append(v.value) + else: + res.append(model_to_dict(v, serialize=serialize)) + result[attr] = res + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], + model_to_dict(item[1], serialize=serialize)) + if hasattr(item[1], '_data_store') else item, + value.items() + )) + elif isinstance(value, ModelSimple): + result[attr] = value.value + elif hasattr(value, '_data_store'): + result[attr] = model_to_dict(value, serialize=serialize) + else: + result[attr] = value + if serialize: + for python_key in used_fallback_python_attribute_names: + json_key = py_to_json_map.get(python_key) + if json_key is None: + continue + if python_key == json_key: + continue + json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names + if json_key_assigned_no_need_for_python_key: + del result[python_key] + + return result + + +def type_error_message(var_value=None, var_name=None, valid_classes=None, + key_type=None): + """ + Keyword Args: + var_value (any): the variable which has the type_error + var_name (str): the name of the variable which has the typ error + valid_classes (tuple): the accepted classes for current_item's + value + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + """ + key_or_value = 'value' + if key_type: + key_or_value = 'key' + valid_classes_phrase = get_valid_classes_phrase(valid_classes) + msg = ( + "Invalid type for variable '{0}'. Required {1} type {2} and " + "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) + ) + return msg + + +def get_valid_classes_phrase(input_classes): + """Returns a string phrase describing what types are allowed + """ + all_classes = list(input_classes) + all_classes = sorted(all_classes, key=lambda cls: cls.__name__) + all_class_names = [cls.__name__ for cls in all_classes] + if len(all_class_names) == 1: + return 'is {0}'.format(all_class_names[0]) + return "is one of [{0}]".format(", ".join(all_class_names)) + + +def get_allof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + used to make instances + constant_args (dict): + metadata arguments: + _check_type + _path_to_item + _spec_property_naming + _configuration + _visited_composed_classes + + Returns + composed_instances (list) + """ + composed_instances = [] + for allof_class in self._composed_schemas['allOf']: + + try: + allof_instance = allof_class(**model_args, **constant_args) + composed_instances.append(allof_instance) + except Exception as ex: + raise ApiValueError( + "Invalid inputs given to generate an instance of '%s'. The " + "input data was invalid for the allOf schema '%s' in the composed " + "schema '%s'. Error=%s" % ( + allof_class.__name__, + allof_class.__name__, + self.__class__.__name__, + str(ex) + ) + ) from ex + return composed_instances + + +def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): + """ + Find the oneOf schema that matches the input data (e.g. payload). + If exactly one schema matches the input data, an instance of that schema + is returned. + If zero or more than one schema match the input data, an exception is raised. + In OAS 3.x, the payload MUST, by validation, match exactly one of the + schemas described by oneOf. + + Args: + cls: the class we are handling + model_kwargs (dict): var_name to var_value + The input data, e.g. the payload that must match a oneOf schema + in the OpenAPI document. + constant_kwargs (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Kwargs: + model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): + the value to assign to a primitive class or ModelSimple class + Notes: + - this is only passed in when oneOf includes types which are not object + - None is used to suppress handling of model_arg, nullable models are handled in __new__ + + Returns + oneof_instance (instance) + """ + if len(cls._composed_schemas['oneOf']) == 0: + return None + + oneof_instances = [] + # Iterate over each oneOf schema and determine if the input data + # matches the oneOf schemas. + for oneof_class in cls._composed_schemas['oneOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if oneof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + single_value_input = allows_single_value_input(oneof_class) + + try: + if not single_value_input: + oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) + else: + if issubclass(oneof_class, ModelSimple): + oneof_instance = oneof_class(model_arg, **constant_kwargs) + elif oneof_class in PRIMITIVE_TYPES: + oneof_instance = validate_and_convert_types( + model_arg, + (oneof_class,), + constant_kwargs['_path_to_item'], + constant_kwargs['_spec_property_naming'], + constant_kwargs['_check_type'], + configuration=constant_kwargs['_configuration'] + ) + oneof_instances.append(oneof_instance) + except Exception: + pass + if len(oneof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None " + "of the oneOf schemas matched the input data." % + cls.__name__ + ) + elif len(oneof_instances) > 1: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. Multiple " + "oneOf schemas matched the inputs, but a max of one is allowed." % + cls.__name__ + ) + return oneof_instances[0] + + +def get_anyof_instances(self, model_args, constant_args): + """ + Args: + self: the class we are handling + model_args (dict): var_name to var_value + The input data, e.g. the payload that must match at least one + anyOf child schema in the OpenAPI document. + constant_args (dict): var_name to var_value + args that every model requires, including configuration, server + and path to item. + + Returns + anyof_instances (list) + """ + anyof_instances = [] + if len(self._composed_schemas['anyOf']) == 0: + return anyof_instances + + for anyof_class in self._composed_schemas['anyOf']: + # The composed oneOf schema allows the 'null' type and the input data + # is the null value. This is a OAS >= 3.1 feature. + if anyof_class is none_type: + # skip none_types because we are deserializing dict data. + # none_type deserialization is handled in the __new__ method + continue + + try: + anyof_instance = anyof_class(**model_args, **constant_args) + anyof_instances.append(anyof_instance) + except Exception: + pass + if len(anyof_instances) == 0: + raise ApiValueError( + "Invalid inputs given to generate an instance of %s. None of the " + "anyOf schemas matched the inputs." % + self.__class__.__name__ + ) + return anyof_instances + + +def get_discarded_args(self, composed_instances, model_args): + """ + Gathers the args that were discarded by configuration.discard_unknown_keys + """ + model_arg_keys = model_args.keys() + discarded_args = set() + # arguments passed to self were already converted to python names + # before __init__ was called + for instance in composed_instances: + if instance.__class__ in self._composed_schemas['allOf']: + try: + keys = instance.to_dict().keys() + discarded_keys = model_args - keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + else: + try: + all_keys = set(model_to_dict(instance, serialize=False).keys()) + js_keys = model_to_dict(instance, serialize=True).keys() + all_keys.update(js_keys) + discarded_keys = model_arg_keys - all_keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + return discarded_args + + +def validate_get_composed_info(constant_args, model_args, self): + """ + For composed schemas, generate schema instances for + all schemas in the oneOf/anyOf/allOf definition. If additional + properties are allowed, also assign those properties on + all matched schemas that contain additionalProperties. + Openapi schemas are python classes. + + Exceptions are raised if: + - 0 or > 1 oneOf schema matches the model_args input data + - no anyOf schema matches the model_args input data + - any of the allOf schemas do not match the model_args input data + + Args: + constant_args (dict): these are the args that every model requires + model_args (dict): these are the required and optional spec args that + were passed in to make this model + self (class): the class that we are instantiating + This class contains self._composed_schemas + + Returns: + composed_info (list): length three + composed_instances (list): the composed instances which are not + self + var_name_to_model_instances (dict): a dict going from var_name + to the model_instance which holds that var_name + the model_instance may be self or an instance of one of the + classes in self.composed_instances() + additional_properties_model_instances (list): a list of the + model instances which have the property + additional_properties_type. This list can include self + """ + # create composed_instances + composed_instances = [] + allof_instances = get_allof_instances(self, model_args, constant_args) + composed_instances.extend(allof_instances) + oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) + if oneof_instance is not None: + composed_instances.append(oneof_instance) + anyof_instances = get_anyof_instances(self, model_args, constant_args) + composed_instances.extend(anyof_instances) + """ + set additional_properties_model_instances + additional properties must be evaluated at the schema level + so self's additional properties are most important + If self is a composed schema with: + - no properties defined in self + - additionalProperties: False + Then for object payloads every property is an additional property + and they are not allowed, so only empty dict is allowed + + Properties must be set on all matching schemas + so when a property is assigned toa composed instance, it must be set on all + composed instances regardless of additionalProperties presence + keeping it to prevent breaking changes in v5.0.1 + TODO remove cls._additional_properties_model_instances in 6.0.0 + """ + additional_properties_model_instances = [] + if self.additional_properties_type is not None: + additional_properties_model_instances = [self] + + """ + no need to set properties on self in here, they will be set in __init__ + By here all composed schema oneOf/anyOf/allOf instances have their properties set using + model_args + """ + discarded_args = get_discarded_args(self, composed_instances, model_args) + + # map variable names to composed_instances + var_name_to_model_instances = {} + for prop_name in model_args: + if prop_name not in discarded_args: + var_name_to_model_instances[prop_name] = [self] + composed_instances + + return [ + composed_instances, + var_name_to_model_instances, + additional_properties_model_instances, + discarded_args + ] diff --git a/gooddata-metadata-client/gooddata_metadata_client/models/__init__.py b/gooddata-metadata-client/gooddata_metadata_client/models/__init__.py new file mode 100644 index 000000000..b79be5df7 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/models/__init__.py @@ -0,0 +1,239 @@ +# flake8: noqa + +# import all models into this package +# if you have many models here with many references from one model to another this may +# raise a RecursionError +# to avoid this, import only the models that you directly need like: +# from from gooddata_metadata_client.model.pet import Pet +# or import this package, but before doing it, use: +# import sys +# sys.setrecursionlimit(n) + +from gooddata_metadata_client.model.data_source_table_identifier import DataSourceTableIdentifier +from gooddata_metadata_client.model.dataset_reference_identifier import DatasetReferenceIdentifier +from gooddata_metadata_client.model.declarative_analytical_dashboard import DeclarativeAnalyticalDashboard +from gooddata_metadata_client.model.declarative_analytics import DeclarativeAnalytics +from gooddata_metadata_client.model.declarative_analytics_layer import DeclarativeAnalyticsLayer +from gooddata_metadata_client.model.declarative_attribute import DeclarativeAttribute +from gooddata_metadata_client.model.declarative_column import DeclarativeColumn +from gooddata_metadata_client.model.declarative_data_source import DeclarativeDataSource +from gooddata_metadata_client.model.declarative_data_sources import DeclarativeDataSources +from gooddata_metadata_client.model.declarative_dataset import DeclarativeDataset +from gooddata_metadata_client.model.declarative_date_dataset import DeclarativeDateDataset +from gooddata_metadata_client.model.declarative_fact import DeclarativeFact +from gooddata_metadata_client.model.declarative_filter_context import DeclarativeFilterContext +from gooddata_metadata_client.model.declarative_label import DeclarativeLabel +from gooddata_metadata_client.model.declarative_ldm import DeclarativeLdm +from gooddata_metadata_client.model.declarative_metric import DeclarativeMetric +from gooddata_metadata_client.model.declarative_model import DeclarativeModel +from gooddata_metadata_client.model.declarative_organization import DeclarativeOrganization +from gooddata_metadata_client.model.declarative_organization_info import DeclarativeOrganizationInfo +from gooddata_metadata_client.model.declarative_pdm import DeclarativePdm +from gooddata_metadata_client.model.declarative_reference import DeclarativeReference +from gooddata_metadata_client.model.declarative_table import DeclarativeTable +from gooddata_metadata_client.model.declarative_tables import DeclarativeTables +from gooddata_metadata_client.model.declarative_user import DeclarativeUser +from gooddata_metadata_client.model.declarative_user_group import DeclarativeUserGroup +from gooddata_metadata_client.model.declarative_user_groups import DeclarativeUserGroups +from gooddata_metadata_client.model.declarative_users import DeclarativeUsers +from gooddata_metadata_client.model.declarative_visualization_object import DeclarativeVisualizationObject +from gooddata_metadata_client.model.declarative_workspace import DeclarativeWorkspace +from gooddata_metadata_client.model.declarative_workspace_data_filter import DeclarativeWorkspaceDataFilter +from gooddata_metadata_client.model.declarative_workspace_data_filter_setting import DeclarativeWorkspaceDataFilterSetting +from gooddata_metadata_client.model.declarative_workspace_data_filters import DeclarativeWorkspaceDataFilters +from gooddata_metadata_client.model.declarative_workspace_model import DeclarativeWorkspaceModel +from gooddata_metadata_client.model.declarative_workspaces import DeclarativeWorkspaces +from gooddata_metadata_client.model.generate_ldm_request import GenerateLdmRequest +from gooddata_metadata_client.model.grain_identifier import GrainIdentifier +from gooddata_metadata_client.model.granularities_formatting import GranularitiesFormatting +from gooddata_metadata_client.model.json_api_aclin import JsonApiACLIn +from gooddata_metadata_client.model.json_api_aclin_document import JsonApiACLInDocument +from gooddata_metadata_client.model.json_api_acl_out import JsonApiACLOut +from gooddata_metadata_client.model.json_api_acl_out_attributes import JsonApiACLOutAttributes +from gooddata_metadata_client.model.json_api_acl_out_document import JsonApiACLOutDocument +from gooddata_metadata_client.model.json_api_acl_out_list import JsonApiACLOutList +from gooddata_metadata_client.model.json_api_acl_out_relationships import JsonApiACLOutRelationships +from gooddata_metadata_client.model.json_api_acl_out_relationships_objects import JsonApiACLOutRelationshipsObjects +from gooddata_metadata_client.model.json_api_acl_out_relationships_subjects import JsonApiACLOutRelationshipsSubjects +from gooddata_metadata_client.model.json_api_acl_out_with_links import JsonApiACLOutWithLinks +from gooddata_metadata_client.model.json_api_analytical_dashboard_in import JsonApiAnalyticalDashboardIn +from gooddata_metadata_client.model.json_api_analytical_dashboard_in_document import JsonApiAnalyticalDashboardInDocument +from gooddata_metadata_client.model.json_api_analytical_dashboard_linkage import JsonApiAnalyticalDashboardLinkage +from gooddata_metadata_client.model.json_api_analytical_dashboard_out import JsonApiAnalyticalDashboardOut +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_attributes import JsonApiAnalyticalDashboardOutAttributes +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_document import JsonApiAnalyticalDashboardOutDocument +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_list import JsonApiAnalyticalDashboardOutList +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships import JsonApiAnalyticalDashboardOutRelationships +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_analytical_dashboards import JsonApiAnalyticalDashboardOutRelationshipsAnalyticalDashboards +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_datasets import JsonApiAnalyticalDashboardOutRelationshipsDatasets +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_filter_contexts import JsonApiAnalyticalDashboardOutRelationshipsFilterContexts +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_labels import JsonApiAnalyticalDashboardOutRelationshipsLabels +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_metrics import JsonApiAnalyticalDashboardOutRelationshipsMetrics +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_relationships_visualization_objects import JsonApiAnalyticalDashboardOutRelationshipsVisualizationObjects +from gooddata_metadata_client.model.json_api_analytical_dashboard_out_with_links import JsonApiAnalyticalDashboardOutWithLinks +from gooddata_metadata_client.model.json_api_analytical_dashboard_to_many_linkage import JsonApiAnalyticalDashboardToManyLinkage +from gooddata_metadata_client.model.json_api_api_token_in import JsonApiApiTokenIn +from gooddata_metadata_client.model.json_api_api_token_in_document import JsonApiApiTokenInDocument +from gooddata_metadata_client.model.json_api_api_token_out import JsonApiApiTokenOut +from gooddata_metadata_client.model.json_api_api_token_out_attributes import JsonApiApiTokenOutAttributes +from gooddata_metadata_client.model.json_api_api_token_out_document import JsonApiApiTokenOutDocument +from gooddata_metadata_client.model.json_api_api_token_out_list import JsonApiApiTokenOutList +from gooddata_metadata_client.model.json_api_api_token_out_with_links import JsonApiApiTokenOutWithLinks +from gooddata_metadata_client.model.json_api_attribute_linkage import JsonApiAttributeLinkage +from gooddata_metadata_client.model.json_api_attribute_out import JsonApiAttributeOut +from gooddata_metadata_client.model.json_api_attribute_out_attributes import JsonApiAttributeOutAttributes +from gooddata_metadata_client.model.json_api_attribute_out_document import JsonApiAttributeOutDocument +from gooddata_metadata_client.model.json_api_attribute_out_list import JsonApiAttributeOutList +from gooddata_metadata_client.model.json_api_attribute_out_relationships import JsonApiAttributeOutRelationships +from gooddata_metadata_client.model.json_api_attribute_out_relationships_dataset import JsonApiAttributeOutRelationshipsDataset +from gooddata_metadata_client.model.json_api_attribute_out_with_links import JsonApiAttributeOutWithLinks +from gooddata_metadata_client.model.json_api_attribute_to_many_linkage import JsonApiAttributeToManyLinkage +from gooddata_metadata_client.model.json_api_attribute_to_one_linkage import JsonApiAttributeToOneLinkage +from gooddata_metadata_client.model.json_api_cookie_security_configuration_in import JsonApiCookieSecurityConfigurationIn +from gooddata_metadata_client.model.json_api_cookie_security_configuration_in_document import JsonApiCookieSecurityConfigurationInDocument +from gooddata_metadata_client.model.json_api_cookie_security_configuration_out import JsonApiCookieSecurityConfigurationOut +from gooddata_metadata_client.model.json_api_cookie_security_configuration_out_attributes import JsonApiCookieSecurityConfigurationOutAttributes +from gooddata_metadata_client.model.json_api_cookie_security_configuration_out_document import JsonApiCookieSecurityConfigurationOutDocument +from gooddata_metadata_client.model.json_api_data_source_in import JsonApiDataSourceIn +from gooddata_metadata_client.model.json_api_data_source_in_attributes import JsonApiDataSourceInAttributes +from gooddata_metadata_client.model.json_api_data_source_in_document import JsonApiDataSourceInDocument +from gooddata_metadata_client.model.json_api_data_source_out import JsonApiDataSourceOut +from gooddata_metadata_client.model.json_api_data_source_out_attributes import JsonApiDataSourceOutAttributes +from gooddata_metadata_client.model.json_api_data_source_out_document import JsonApiDataSourceOutDocument +from gooddata_metadata_client.model.json_api_data_source_out_list import JsonApiDataSourceOutList +from gooddata_metadata_client.model.json_api_data_source_out_with_links import JsonApiDataSourceOutWithLinks +from gooddata_metadata_client.model.json_api_data_source_table_out import JsonApiDataSourceTableOut +from gooddata_metadata_client.model.json_api_data_source_table_out_attributes import JsonApiDataSourceTableOutAttributes +from gooddata_metadata_client.model.json_api_data_source_table_out_attributes_columns import JsonApiDataSourceTableOutAttributesColumns +from gooddata_metadata_client.model.json_api_data_source_table_out_document import JsonApiDataSourceTableOutDocument +from gooddata_metadata_client.model.json_api_data_source_table_out_list import JsonApiDataSourceTableOutList +from gooddata_metadata_client.model.json_api_data_source_table_out_with_links import JsonApiDataSourceTableOutWithLinks +from gooddata_metadata_client.model.json_api_dataset_linkage import JsonApiDatasetLinkage +from gooddata_metadata_client.model.json_api_dataset_out import JsonApiDatasetOut +from gooddata_metadata_client.model.json_api_dataset_out_attributes import JsonApiDatasetOutAttributes +from gooddata_metadata_client.model.json_api_dataset_out_attributes_grain import JsonApiDatasetOutAttributesGrain +from gooddata_metadata_client.model.json_api_dataset_out_attributes_reference_properties import JsonApiDatasetOutAttributesReferenceProperties +from gooddata_metadata_client.model.json_api_dataset_out_document import JsonApiDatasetOutDocument +from gooddata_metadata_client.model.json_api_dataset_out_list import JsonApiDatasetOutList +from gooddata_metadata_client.model.json_api_dataset_out_relationships import JsonApiDatasetOutRelationships +from gooddata_metadata_client.model.json_api_dataset_out_relationships_attributes import JsonApiDatasetOutRelationshipsAttributes +from gooddata_metadata_client.model.json_api_dataset_out_relationships_facts import JsonApiDatasetOutRelationshipsFacts +from gooddata_metadata_client.model.json_api_dataset_out_with_links import JsonApiDatasetOutWithLinks +from gooddata_metadata_client.model.json_api_dataset_to_many_linkage import JsonApiDatasetToManyLinkage +from gooddata_metadata_client.model.json_api_dataset_to_one_linkage import JsonApiDatasetToOneLinkage +from gooddata_metadata_client.model.json_api_fact_linkage import JsonApiFactLinkage +from gooddata_metadata_client.model.json_api_fact_out import JsonApiFactOut +from gooddata_metadata_client.model.json_api_fact_out_attributes import JsonApiFactOutAttributes +from gooddata_metadata_client.model.json_api_fact_out_document import JsonApiFactOutDocument +from gooddata_metadata_client.model.json_api_fact_out_list import JsonApiFactOutList +from gooddata_metadata_client.model.json_api_fact_out_relationships import JsonApiFactOutRelationships +from gooddata_metadata_client.model.json_api_fact_out_with_links import JsonApiFactOutWithLinks +from gooddata_metadata_client.model.json_api_fact_to_many_linkage import JsonApiFactToManyLinkage +from gooddata_metadata_client.model.json_api_filter_context_in import JsonApiFilterContextIn +from gooddata_metadata_client.model.json_api_filter_context_in_document import JsonApiFilterContextInDocument +from gooddata_metadata_client.model.json_api_filter_context_linkage import JsonApiFilterContextLinkage +from gooddata_metadata_client.model.json_api_filter_context_out import JsonApiFilterContextOut +from gooddata_metadata_client.model.json_api_filter_context_out_document import JsonApiFilterContextOutDocument +from gooddata_metadata_client.model.json_api_filter_context_out_list import JsonApiFilterContextOutList +from gooddata_metadata_client.model.json_api_filter_context_out_relationships import JsonApiFilterContextOutRelationships +from gooddata_metadata_client.model.json_api_filter_context_out_with_links import JsonApiFilterContextOutWithLinks +from gooddata_metadata_client.model.json_api_filter_context_to_many_linkage import JsonApiFilterContextToManyLinkage +from gooddata_metadata_client.model.json_api_label_linkage import JsonApiLabelLinkage +from gooddata_metadata_client.model.json_api_label_out import JsonApiLabelOut +from gooddata_metadata_client.model.json_api_label_out_attributes import JsonApiLabelOutAttributes +from gooddata_metadata_client.model.json_api_label_out_document import JsonApiLabelOutDocument +from gooddata_metadata_client.model.json_api_label_out_list import JsonApiLabelOutList +from gooddata_metadata_client.model.json_api_label_out_relationships import JsonApiLabelOutRelationships +from gooddata_metadata_client.model.json_api_label_out_relationships_attribute import JsonApiLabelOutRelationshipsAttribute +from gooddata_metadata_client.model.json_api_label_out_with_links import JsonApiLabelOutWithLinks +from gooddata_metadata_client.model.json_api_label_to_many_linkage import JsonApiLabelToManyLinkage +from gooddata_metadata_client.model.json_api_metric_in import JsonApiMetricIn +from gooddata_metadata_client.model.json_api_metric_in_document import JsonApiMetricInDocument +from gooddata_metadata_client.model.json_api_metric_linkage import JsonApiMetricLinkage +from gooddata_metadata_client.model.json_api_metric_out import JsonApiMetricOut +from gooddata_metadata_client.model.json_api_metric_out_attributes import JsonApiMetricOutAttributes +from gooddata_metadata_client.model.json_api_metric_out_attributes_content import JsonApiMetricOutAttributesContent +from gooddata_metadata_client.model.json_api_metric_out_document import JsonApiMetricOutDocument +from gooddata_metadata_client.model.json_api_metric_out_list import JsonApiMetricOutList +from gooddata_metadata_client.model.json_api_metric_out_relationships import JsonApiMetricOutRelationships +from gooddata_metadata_client.model.json_api_metric_out_with_links import JsonApiMetricOutWithLinks +from gooddata_metadata_client.model.json_api_metric_to_many_linkage import JsonApiMetricToManyLinkage +from gooddata_metadata_client.model.json_api_organization_in import JsonApiOrganizationIn +from gooddata_metadata_client.model.json_api_organization_in_attributes import JsonApiOrganizationInAttributes +from gooddata_metadata_client.model.json_api_organization_in_document import JsonApiOrganizationInDocument +from gooddata_metadata_client.model.json_api_organization_out import JsonApiOrganizationOut +from gooddata_metadata_client.model.json_api_organization_out_attributes import JsonApiOrganizationOutAttributes +from gooddata_metadata_client.model.json_api_organization_out_document import JsonApiOrganizationOutDocument +from gooddata_metadata_client.model.json_api_organization_out_relationships import JsonApiOrganizationOutRelationships +from gooddata_metadata_client.model.json_api_organization_out_relationships_bootstrap_user import JsonApiOrganizationOutRelationshipsBootstrapUser +from gooddata_metadata_client.model.json_api_organization_out_relationships_bootstrap_user_group import JsonApiOrganizationOutRelationshipsBootstrapUserGroup +from gooddata_metadata_client.model.json_api_user_group_in import JsonApiUserGroupIn +from gooddata_metadata_client.model.json_api_user_group_in_document import JsonApiUserGroupInDocument +from gooddata_metadata_client.model.json_api_user_group_linkage import JsonApiUserGroupLinkage +from gooddata_metadata_client.model.json_api_user_group_out import JsonApiUserGroupOut +from gooddata_metadata_client.model.json_api_user_group_out_document import JsonApiUserGroupOutDocument +from gooddata_metadata_client.model.json_api_user_group_out_list import JsonApiUserGroupOutList +from gooddata_metadata_client.model.json_api_user_group_out_relationships import JsonApiUserGroupOutRelationships +from gooddata_metadata_client.model.json_api_user_group_out_with_links import JsonApiUserGroupOutWithLinks +from gooddata_metadata_client.model.json_api_user_group_to_many_linkage import JsonApiUserGroupToManyLinkage +from gooddata_metadata_client.model.json_api_user_group_to_one_linkage import JsonApiUserGroupToOneLinkage +from gooddata_metadata_client.model.json_api_user_in import JsonApiUserIn +from gooddata_metadata_client.model.json_api_user_in_document import JsonApiUserInDocument +from gooddata_metadata_client.model.json_api_user_linkage import JsonApiUserLinkage +from gooddata_metadata_client.model.json_api_user_out import JsonApiUserOut +from gooddata_metadata_client.model.json_api_user_out_attributes import JsonApiUserOutAttributes +from gooddata_metadata_client.model.json_api_user_out_document import JsonApiUserOutDocument +from gooddata_metadata_client.model.json_api_user_out_list import JsonApiUserOutList +from gooddata_metadata_client.model.json_api_user_out_relationships import JsonApiUserOutRelationships +from gooddata_metadata_client.model.json_api_user_out_with_links import JsonApiUserOutWithLinks +from gooddata_metadata_client.model.json_api_user_to_many_linkage import JsonApiUserToManyLinkage +from gooddata_metadata_client.model.json_api_user_to_one_linkage import JsonApiUserToOneLinkage +from gooddata_metadata_client.model.json_api_visualization_object_in import JsonApiVisualizationObjectIn +from gooddata_metadata_client.model.json_api_visualization_object_in_document import JsonApiVisualizationObjectInDocument +from gooddata_metadata_client.model.json_api_visualization_object_linkage import JsonApiVisualizationObjectLinkage +from gooddata_metadata_client.model.json_api_visualization_object_out import JsonApiVisualizationObjectOut +from gooddata_metadata_client.model.json_api_visualization_object_out_document import JsonApiVisualizationObjectOutDocument +from gooddata_metadata_client.model.json_api_visualization_object_out_list import JsonApiVisualizationObjectOutList +from gooddata_metadata_client.model.json_api_visualization_object_out_relationships import JsonApiVisualizationObjectOutRelationships +from gooddata_metadata_client.model.json_api_visualization_object_out_with_links import JsonApiVisualizationObjectOutWithLinks +from gooddata_metadata_client.model.json_api_visualization_object_to_many_linkage import JsonApiVisualizationObjectToManyLinkage +from gooddata_metadata_client.model.json_api_workspace_data_filter_in import JsonApiWorkspaceDataFilterIn +from gooddata_metadata_client.model.json_api_workspace_data_filter_in_document import JsonApiWorkspaceDataFilterInDocument +from gooddata_metadata_client.model.json_api_workspace_data_filter_linkage import JsonApiWorkspaceDataFilterLinkage +from gooddata_metadata_client.model.json_api_workspace_data_filter_out import JsonApiWorkspaceDataFilterOut +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_attributes import JsonApiWorkspaceDataFilterOutAttributes +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_document import JsonApiWorkspaceDataFilterOutDocument +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_list import JsonApiWorkspaceDataFilterOutList +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_relationships import JsonApiWorkspaceDataFilterOutRelationships +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_relationships_filter_settings import JsonApiWorkspaceDataFilterOutRelationshipsFilterSettings +from gooddata_metadata_client.model.json_api_workspace_data_filter_out_with_links import JsonApiWorkspaceDataFilterOutWithLinks +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_linkage import JsonApiWorkspaceDataFilterSettingLinkage +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out import JsonApiWorkspaceDataFilterSettingOut +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_attributes import JsonApiWorkspaceDataFilterSettingOutAttributes +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_document import JsonApiWorkspaceDataFilterSettingOutDocument +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_list import JsonApiWorkspaceDataFilterSettingOutList +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_relationships import JsonApiWorkspaceDataFilterSettingOutRelationships +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_relationships_workspace_data_filter import JsonApiWorkspaceDataFilterSettingOutRelationshipsWorkspaceDataFilter +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_out_with_links import JsonApiWorkspaceDataFilterSettingOutWithLinks +from gooddata_metadata_client.model.json_api_workspace_data_filter_setting_to_many_linkage import JsonApiWorkspaceDataFilterSettingToManyLinkage +from gooddata_metadata_client.model.json_api_workspace_data_filter_to_one_linkage import JsonApiWorkspaceDataFilterToOneLinkage +from gooddata_metadata_client.model.json_api_workspace_in import JsonApiWorkspaceIn +from gooddata_metadata_client.model.json_api_workspace_in_document import JsonApiWorkspaceInDocument +from gooddata_metadata_client.model.json_api_workspace_linkage import JsonApiWorkspaceLinkage +from gooddata_metadata_client.model.json_api_workspace_out import JsonApiWorkspaceOut +from gooddata_metadata_client.model.json_api_workspace_out_attributes import JsonApiWorkspaceOutAttributes +from gooddata_metadata_client.model.json_api_workspace_out_document import JsonApiWorkspaceOutDocument +from gooddata_metadata_client.model.json_api_workspace_out_list import JsonApiWorkspaceOutList +from gooddata_metadata_client.model.json_api_workspace_out_meta import JsonApiWorkspaceOutMeta +from gooddata_metadata_client.model.json_api_workspace_out_meta_config import JsonApiWorkspaceOutMetaConfig +from gooddata_metadata_client.model.json_api_workspace_out_relationships import JsonApiWorkspaceOutRelationships +from gooddata_metadata_client.model.json_api_workspace_out_relationships_parent import JsonApiWorkspaceOutRelationshipsParent +from gooddata_metadata_client.model.json_api_workspace_out_with_links import JsonApiWorkspaceOutWithLinks +from gooddata_metadata_client.model.json_api_workspace_to_one_linkage import JsonApiWorkspaceToOneLinkage +from gooddata_metadata_client.model.list_links import ListLinks +from gooddata_metadata_client.model.list_links_all_of import ListLinksAllOf +from gooddata_metadata_client.model.object_links import ObjectLinks +from gooddata_metadata_client.model.object_links_container import ObjectLinksContainer +from gooddata_metadata_client.model.reference_identifier import ReferenceIdentifier +from gooddata_metadata_client.model.user_group_identifier import UserGroupIdentifier +from gooddata_metadata_client.model.workspace_identifier import WorkspaceIdentifier diff --git a/gooddata-metadata-client/gooddata_metadata_client/rest.py b/gooddata-metadata-client/gooddata_metadata_client/rest.py new file mode 100644 index 000000000..e3f3f7bf1 --- /dev/null +++ b/gooddata-metadata-client/gooddata_metadata_client/rest.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 + Generated by: https://openapi-generator.tech +""" + + +import io +import json +import logging +import re +import ssl +from urllib.parse import urlencode + +import urllib3 + +from gooddata_metadata_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests + if (method != 'DELETE') and ('Content-Type' not in headers): + headers['Content-Type'] = 'application/json' + if query_params: + url += '?' + urlencode(query_params) + if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + if r.status == 401: + raise UnauthorizedException(http_resp=r) + + if r.status == 403: + raise ForbiddenException(http_resp=r) + + if r.status == 404: + raise NotFoundException(http_resp=r) + + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) + + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/gooddata-metadata-client/requirements.txt b/gooddata-metadata-client/requirements.txt new file mode 100644 index 000000000..96947f604 --- /dev/null +++ b/gooddata-metadata-client/requirements.txt @@ -0,0 +1,3 @@ +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.25.3 diff --git a/gooddata-metadata-client/setup.cfg b/gooddata-metadata-client/setup.cfg new file mode 100644 index 000000000..11433ee87 --- /dev/null +++ b/gooddata-metadata-client/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/gooddata-metadata-client/setup.py b/gooddata-metadata-client/setup.py new file mode 100644 index 000000000..d09998787 --- /dev/null +++ b/gooddata-metadata-client/setup.py @@ -0,0 +1,42 @@ +""" + OpenAPI definition + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: v0 + Generated by: https://openapi-generator.tech +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "gooddata-metadata-client" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "urllib3 >= 1.25.3", + "python-dateutil", +] + +setup( + name=NAME, + version=VERSION, + description="OpenAPI definition", + author="OpenAPI Generator community", + author_email="team@openapitools.org", + url="", + keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI definition"], + python_requires=">=3.6", + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description="""\ + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + """ +) diff --git a/gooddata-metadata-client/test-requirements.txt b/gooddata-metadata-client/test-requirements.txt new file mode 100644 index 000000000..bb4f22bb7 --- /dev/null +++ b/gooddata-metadata-client/test-requirements.txt @@ -0,0 +1 @@ +pytest-cov>=2.8.1 diff --git a/gooddata-metadata-client/tox.ini b/gooddata-metadata-client/tox.ini new file mode 100644 index 000000000..7029b0a47 --- /dev/null +++ b/gooddata-metadata-client/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=gooddata_metadata_client From 8274a4f799913d921fe919e434929c9bb64dbb2f Mon Sep 17 00:00:00 2001 From: Lubo Slivka Date: Thu, 5 Aug 2021 13:15:25 +0200 Subject: [PATCH 2/4] Add initial version of SDK - Builds on top of generated clients --- gooddata-sdk/.gitignore | 66 +++ gooddata-sdk/gooddata_sdk/__init__.py | 36 ++ gooddata-sdk/gooddata_sdk/catalog.py | 478 ++++++++++++++++++++ gooddata-sdk/gooddata_sdk/client.py | 33 ++ gooddata-sdk/gooddata_sdk/compute.py | 187 ++++++++ gooddata-sdk/gooddata_sdk/exec_model.py | 559 ++++++++++++++++++++++++ gooddata-sdk/gooddata_sdk/insight.py | 423 ++++++++++++++++++ gooddata-sdk/gooddata_sdk/table.py | 226 ++++++++++ gooddata-sdk/gooddata_sdk/utils.py | 98 +++++ gooddata-sdk/requirements.txt | 2 + gooddata-sdk/setup.py | 16 + 11 files changed, 2124 insertions(+) create mode 100644 gooddata-sdk/.gitignore create mode 100644 gooddata-sdk/gooddata_sdk/__init__.py create mode 100644 gooddata-sdk/gooddata_sdk/catalog.py create mode 100644 gooddata-sdk/gooddata_sdk/client.py create mode 100644 gooddata-sdk/gooddata_sdk/compute.py create mode 100644 gooddata-sdk/gooddata_sdk/exec_model.py create mode 100644 gooddata-sdk/gooddata_sdk/insight.py create mode 100644 gooddata-sdk/gooddata_sdk/table.py create mode 100644 gooddata-sdk/gooddata_sdk/utils.py create mode 100644 gooddata-sdk/requirements.txt create mode 100644 gooddata-sdk/setup.py diff --git a/gooddata-sdk/.gitignore b/gooddata-sdk/.gitignore new file mode 100644 index 000000000..43995bd42 --- /dev/null +++ b/gooddata-sdk/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/gooddata-sdk/gooddata_sdk/__init__.py b/gooddata-sdk/gooddata_sdk/__init__.py new file mode 100644 index 000000000..07bce56c9 --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/__init__.py @@ -0,0 +1,36 @@ +# (C) 2021 GoodData Corporation +from gooddata_sdk.catalog import Catalog, CatalogService, CatalogDataset, CatalogLabel, CatalogMetric, CatalogAttribute, \ + CatalogFact +from gooddata_sdk.client import GoodDataApiClient +from gooddata_sdk.compute import ComputeService, ExecutionResponse, ExecutionResult, ExecutionDefinition +from gooddata_sdk.exec_model import Attribute, Filter, Measure, PositiveAttributeFilter, NegativeAttributeFilter, \ + AbsoluteDateFilter, RelativeDateFilter, MeasureValueFilter, RankingFilter, SimpleMeasure, PopDateMeasure, \ + PopDatesetMeasure, ArithmeticMeasure, PopDate, PopDateDataset, ObjId, ExecModelEntity +from gooddata_sdk.insight import Insight, InsightService, InsightMeasure, InsightAttribute, InsightBucket +from gooddata_sdk.table import TableService, ExecutionTable +from gooddata_sdk.utils import Sideloads + + +class GoodDataSdk: + def __init__(self, host, token, extra_user_agent=None): + self._client = GoodDataApiClient(host, token, extra_user_agent) + self._catalog = CatalogService(self._client) + self._compute = ComputeService(self._client) + self._insights = InsightService(self._client) + self._tables = TableService(self._client) + + @property + def catalog(self) -> CatalogService: + return self._catalog + + @property + def compute(self) -> ComputeService: + return self._compute + + @property + def insights(self) -> InsightService: + return self._insights + + @property + def tables(self) -> TableService: + return self._tables diff --git a/gooddata-sdk/gooddata_sdk/catalog.py b/gooddata-sdk/gooddata_sdk/catalog.py new file mode 100644 index 000000000..258a2430b --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/catalog.py @@ -0,0 +1,478 @@ +# (C) 2021 GoodData Corporation +from typing import Union +import functools +import gooddata_metadata_client.apis as metadata_apis +import gooddata_afm_client.apis as afm_apis +import gooddata_afm_client.models as afm_models +from gooddata_sdk.utils import Sideloads, id_obj_to_key, load_all_entities +from gooddata_sdk.client import GoodDataApiClient +from gooddata_sdk.compute import ExecutionDefinition +from gooddata_sdk.exec_model import Attribute, SimpleMeasure, ObjId, Measure, Filter, exec_model_to_api_model + +ValidObjects = dict[str, set] + + +class CatalogEntry: + @property + def id(self) -> str: + raise NotImplementedError() + + @property + def type(self) -> str: + raise NotImplementedError() + + @property + def obj_id(self) -> ObjId: + raise NotImplementedError() + + @property + def title(self) -> str: + raise NotImplementedError() + + @property + def description(self) -> str: + raise NotImplementedError() + + +class CatalogLabel(CatalogEntry): + def __init__(self, label): + super(CatalogLabel, self).__init__() + + self._l = label['attributes'] + self._label = label + self._obj_id = ObjId(self._label['id'], type=self._label['type']) + + @property + def id(self) -> str: + return self._label['id'] + + @property + def type(self) -> str: + return self._label['type'] + + @property + def title(self) -> str: + return self._label['type'] + + @property + def obj_id(self) -> ObjId: + return self._obj_id + + @property + def title(self) -> str: + return self._l['title'] + + @property + def description(self) -> str: + return self._l['description'] + + @property + def primary(self) -> bool: + return 'primary' in self._l and self._l['primary'] + + def as_computable(self) -> Attribute: + return Attribute(local_id=self.id, label=self.id) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"CatalogLabel(id={self.id}, title={self.title})" + + +class CatalogAttribute(CatalogEntry): + def __init__(self, attribute, labels: list[CatalogLabel]): + super(CatalogAttribute, self).__init__() + + self._a = attribute['attributes'] + self._attribute = attribute + self._labels = labels + self._labels_idx = dict([(str(label.obj_id), label) for label in labels]) + self._obj_id = ObjId(self._attribute['id'], self._attribute['type']) + + @property + def id(self) -> str: + return self._attribute['id'] + + @property + def type(self) -> str: + return self._attribute['type'] + + @property + def obj_id(self) -> ObjId: + return self._obj_id + + @property + def title(self) -> str: + return self._a['title'] + + @property + def description(self) -> str: + return self._a['description'] + + @property + def labels(self) -> list[CatalogLabel]: + return self._labels + + @property + def granularity(self) -> Union[str, None]: + return self._a['granularity'] if 'granularity' in self._a else None + + def primary_label(self) -> CatalogLabel: + return next(filter(lambda l: l.primary, self.labels), None) + + def find_label(self, id_obj) -> Union[CatalogLabel, None]: + obj_key = id_obj_to_key(id_obj) + + return self._labels_idx[obj_key] if obj_key in self._labels_idx else None + + def as_computable(self) -> Attribute: + primary_label = self.primary_label() + + if primary_label is not None: + return primary_label.as_computable() + + # cannot even write meaningful error here. cannot create attribute from attribute? :D + raise ValueError() + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"CatalogAttribute(id={self.id}, title={self.title}, labels={self.labels})" + + +class CatalogFact(CatalogEntry): + def __init__(self, fact): + super(CatalogFact, self).__init__() + + self._f = fact['attributes'] + self._fact = fact + self._obj_id = ObjId(self._fact['id'], self._fact['type']) + + @property + def id(self) -> str: + return self._fact['id'] + + @property + def type(self) -> str: + return self._fact['type'] + + @property + def obj_id(self) -> ObjId: + return self._obj_id + + @property + def title(self) -> str: + return self._f['title'] + + @property + def description(self) -> str: + return self._f['description'] + + def as_computable(self) -> Measure: + return SimpleMeasure(local_id=self.id, item=ObjId(self.id, 'fact')) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"CatalogFact(id={self.id}, title={self.title})" + + +class CatalogMetric(CatalogEntry): + def __init__(self, metric): + super(CatalogMetric, self).__init__() + + self._m = metric['attributes'] + self._metric = metric + self._obj_id = ObjId(self._metric['id'], self._metric['type']) + + @property + def id(self) -> str: + return self._metric['id'] + + @property + def type(self) -> str: + return self._metric['type'] + + @property + def obj_id(self) -> ObjId: + return self._obj_id + + @property + def title(self) -> str: + return self._m['title'] + + @property + def description(self) -> str: + return self._m['description'] + + def as_computable(self) -> Measure: + return SimpleMeasure(local_id=self.id, item=ObjId(self.id, 'metric')) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"CatalogMetric(id={self.id}, title={self.title})" + + +class CatalogDataset(CatalogEntry): + def __init__(self, dataset, attributes, facts): + super(CatalogDataset, self).__init__() + + self._d = dataset['attributes'] + self._dataset = dataset + self._attributes = attributes + self._facts = facts + self._obj_id = ObjId(self._dataset['id'], self._dataset['type']) + + @property + def id(self) -> str: + return self._dataset['id'] + + @property + def type(self) -> str: + return self._dataset['type'] + + @property + def obj_id(self) -> ObjId: + return self._obj_id + + @property + def title(self) -> str: + return self._d['title'] + + @property + def description(self) -> str: + return self._d['description'] + + @property + def attributes(self) -> list[CatalogAttribute]: + return self._attributes + + @property + def facts(self) -> list[CatalogFact]: + return self._facts + + def find_label_attribute(self, id_obj) -> Union[CatalogAttribute, None]: + for attr in self._attributes: + if attr.find_label(id_obj) is not None: + return attr + + return None + + def filter_dataset(self, valid_objects: ValidObjects): + """ + Filters dataset so that it contains only attributes and facts that are part of the provided valid objects + structure. + + :param valid_objects: mapping of object type to a set of valid object ids + :return: CatalogDataset containing only valid attributes and facts; None if all of the attributes and facts were filtered out + """ + new_attributes = [a for a in self.attributes if a.id in valid_objects[a.type]] + new_facts = [f for f in self.facts if f.id in valid_objects[f.type]] + + if not len(new_attributes) and not len(new_facts): + return None + + return CatalogDataset(self._dataset, new_attributes, new_facts) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"CatalogDataset(id={self.id}, title={self.title}, facts={self.facts}, attributes={self.attributes})" + + +ValidObjectTypes = Union[Attribute, Measure, Filter, CatalogLabel, CatalogFact, CatalogMetric] +ValidObjectsInputType = Union[ValidObjectTypes, list[ValidObjectTypes], ExecutionDefinition] + + +class Catalog: + def __init__(self, valid_obj_fun, datasets: list[CatalogDataset], + metrics: list[CatalogMetric]): + self._valid_obf_fun = valid_obj_fun + self._datasets = datasets + self._metrics = metrics + + @property + def datasets(self) -> list[CatalogDataset]: + return self._datasets + + @property + def metrics(self) -> list[CatalogMetric]: + return self._metrics + + def find_label_attribute(self, id_obj) -> Union[CatalogAttribute, None]: + for dataset in self._datasets: + res = dataset.find_label_attribute(id_obj) + + if res is not None: + return res + + return None + + def _valid_objects(self, ctx: ValidObjectsInputType) -> ValidObjects: + return self._valid_obf_fun(ctx) + + def catalog_with_valid_objects(self, ctx: ValidObjectsInputType): + """ + Returns a new instance of catalog which contains only those datasets (attributes and facts) that are valid in + the provided context. The context is composed of one more more entities of the semantic model and + the filtered catalog will contain only those entities that can be safely added on top of that existing context. + + :param ctx: existing context. you can specify context in one of the following ways: + - single item or list of items from the execution model + - single item or list of items from catalog model; catalog fact, label or metric may be added + - the entire execution definition that is used to compute analytics + :return: + """ + valid_objects = self._valid_objects(ctx) + + new_datasets = [non_empty for non_empty in [d.filter_dataset(valid_objects) for d in self.datasets] if + non_empty is not None] + new_metrics = [m for m in self.metrics if m.id in valid_objects[m.type]] + + return Catalog(self._valid_obf_fun, datasets=new_datasets, metrics=new_metrics) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"Catalog(datasets={self.datasets})" + + +def _create_catalog(valid_obj_fun, datasets, attributes, metrics) -> Catalog: + # prep: dataset query gets attributes and facts sideloaded, shove them into a map for easier access + dataset_sideloads = Sideloads(datasets.included) + attribute_sideloads = Sideloads(attributes.included) + + # metrics are not associated to any dataset, so can construct them right away + catalog_metrics = [CatalogMetric(metric) for metric in metrics.data] + + # now the rest requires some joins... + # first construct the dataset's leaves - facts + catalog_facts = dict([(fact['id'], CatalogFact(fact)) for fact in dataset_sideloads.all_for_type('fact')]) + + # then build all attributes & their labels, map them attr.id => attribute + catalog_attributes = dict() + for attr in attributes.data: + attr_id = attr['id'] + label_ids = attr['relationships']['labels']['data'] + catalog_attributes[attr_id] = CatalogAttribute(attr, + [CatalogLabel(attribute_sideloads.find(label_id)) for label_id in + label_ids]) + + # finally go through all datasets, find related attributes and facts + catalog_datasets = dict() + for dataset in datasets.data: + dataset_id = dataset['id'] + rels = dataset['relationships'] + attribute_ids = rels['attributes']['data'] if 'attributes' in rels else [] + fact_ids = rels['facts']['data'] if 'facts' in rels else [] + + catalog_datasets[dataset_id] = CatalogDataset(dataset, + [catalog_attributes[attr_id_obj['id']] for attr_id_obj in + attribute_ids], + [catalog_facts[fact_id_obj['id']] for fact_id_obj in fact_ids] + ) + + return Catalog(valid_obj_fun=valid_obj_fun, + datasets=list(catalog_datasets.values()), metrics=catalog_metrics) + + +def _prepare_afm_for_availability(items: list[ValidObjectTypes]): + attributes = [] + measures = [] + filters = [] + + for item in items: + if isinstance(item, Attribute): + attributes.append(item) + elif isinstance(item, Measure): + measures.append(item) + elif isinstance(item, Filter): + filters.append(item) + elif isinstance(item, CatalogLabel): + attributes.append(item.as_computable()) + elif isinstance(item, (CatalogFact, CatalogMetric)): + measures.append(item.as_computable()) + + return exec_model_to_api_model(attributes=attributes, measures=measures, filters=filters) + + +class CatalogService: + # Note on the disabled checking: + # generated client has issues parsing the vis objects; .. have to avoid return type checks + # + # note: the parsing is done lazily so it does not necessarily bomb on the next line but when trying to + # access returned object's properties + + def __init__(self, api_client: GoodDataApiClient): + self._client = api_client + self._api = metadata_apis.WorkspaceObjectControllerApi(api_client.metadata_client) + self._valid_objects = afm_apis.ValidObjectsControllerApi(api_client.afm_client) + + def get_full_catalog(self, workspace_id: str) -> Catalog: + """ + Retrieves catalog for a workspace. Catalog contains all data sets and metrics defined in that workspace. + + :param workspace_id: workspace identifier + :return: + """ + get_datasets = functools.partial(self._api.get_all_entities_datasets, workspace_id, + include=['attributes', 'facts'], _check_return_type=False) + + get_attributes = functools.partial(self._api.get_all_entities_attributes, workspace_id, include=['labels'], + _check_return_type=False) + + get_metrics = functools.partial(self._api.get_all_entities_metrics, workspace_id, _check_return_type=False) + + attributes = load_all_entities(get_attributes) + datasets = load_all_entities(get_datasets) + metrics = load_all_entities(get_metrics) + + valid_obj_fun = functools.partial(self.compute_valid_objects, workspace_id) + + return _create_catalog(valid_obj_fun, datasets, attributes, metrics) + + def compute_valid_objects(self, workspace_id: str, ctx: ValidObjectsInputType) -> ValidObjects: + """ + Returns attributes, facts, and measures which are valid to add to a context that already + contains some entities from the semantic model. The entities are typically used to compute analytics and + come from the execution definition. You may, however, specify the entities through different layers of + convenience. + + :param workspace_id: workspace identifier + :param ctx: items already in context. you can specify context in one of the following ways: + - single item or list of items from the execution model + - single item or list of items from catalog model; catalog fact, label or metric may be added + - the entire execution definition that is used to compute analytics + :return: a dict of sets; type of available object is used as key in the dict, the value is a set containing + id's of available items + """ + if isinstance(ctx, ExecutionDefinition): + afm = exec_model_to_api_model(attributes=ctx.attributes, measures=ctx.measures, filters=ctx.filters) + else: + _ctx = ctx if isinstance(ctx, list) else [ctx] + afm = _prepare_afm_for_availability(_ctx) + + query = afm_models.AfmValidObjectsQuery(afm=afm, types=["facts", "attributes", "measures"]) + response = self._valid_objects.compute_valid_objects(workspace_id=workspace_id, afm_valid_objects_query=query) + + by_type: dict[str, set] = dict() + + for available in response.items: + _type = available['type'] + + if _type not in by_type: + items_of_type = set() + by_type[_type] = items_of_type + else: + items_of_type = by_type[_type] + + items_of_type.add(available['id']) + + return by_type diff --git a/gooddata-sdk/gooddata_sdk/client.py b/gooddata-sdk/gooddata_sdk/client.py new file mode 100644 index 000000000..985de2aba --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/client.py @@ -0,0 +1,33 @@ +# (C) 2021 GoodData Corporation +import gooddata_metadata_client as metadata_client +import gooddata_afm_client as afm_client + +USER_AGENT = "gooddata-python-sdk/0.1" + + +class GoodDataApiClient: + def __init__(self, host, token, extra_user_agent=None): + self._hostname = host + self._token = token + + user_agent = f"{USER_AGENT} {extra_user_agent}" if extra_user_agent is not None else USER_AGENT + + self._metadata_config = metadata_client.Configuration(host=host) + self._metadata_client = metadata_client.ApiClient(configuration=self._metadata_config, + header_name='Authorization', header_value=f'Bearer {token}') + self._metadata_client.default_headers['X-Requested-With'] = 'XMLHttpRequest' + self._metadata_client.user_agent = user_agent + + self._afm_config = afm_client.Configuration(host=host) + self._afm_client = afm_client.ApiClient(configuration=self._afm_config, header_name='Authorization', + header_value=f'Bearer {token}') + self._afm_client.default_headers['X-Requested-With'] = 'XMLHttpRequest' + self._afm_client.user_agent = user_agent + + @property + def afm_client(self): + return self._afm_client + + @property + def metadata_client(self): + return self._metadata_client diff --git a/gooddata-sdk/gooddata_sdk/compute.py b/gooddata-sdk/gooddata_sdk/compute.py new file mode 100644 index 000000000..b259819b5 --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/compute.py @@ -0,0 +1,187 @@ +# (C) 2021 GoodData Corporation +from typing import Union + +import gooddata_afm_client.apis as apis +import gooddata_afm_client.models as models +from gooddata_sdk.client import GoodDataApiClient +from gooddata_sdk.exec_model import Attribute, Measure, Filter, exec_model_to_api_model + + +class ExecutionDefinition: + def __init__(self, attributes: list[Attribute], measures: list[Measure], filters: list[Filter], dimensions): + self._attributes = attributes or [] + self._measures = measures or [] + self._filters = filters or [] + self._dimensions = [dim for dim in dimensions if dim is not None] + + @property + def attributes(self): + return self._attributes + + def has_attributes(self): + return self.attributes is not None and len(self.attributes) > 0 + + @property + def measures(self): + return self._measures + + def has_measures(self): + return self.measures is not None and len(self.measures) > 0 + + @property + def filters(self): + return self._filters + + def has_filters(self): + return self.filters is not None and len(self.filters) > 0 + + @property + def dimensions(self): + return self._dimensions + + def is_one_dim(self): + return len(self.dimensions) == 1 + + def is_two_dim(self): + return len(self.dimensions) == 2 + + def as_api_model(self): + dimensions = [] + + for idx, dim in enumerate(self._dimensions): + dimensions.append(models.Dimension(local_identifier=f"dim_{idx}", item_identifiers=dim)) + + execution = exec_model_to_api_model(attributes=self.attributes, + measures=self.measures, + filters=self.filters) + + result_spec = models.ResultSpec(dimensions=dimensions) + + return models.AfmExecution(execution=execution, result_spec=result_spec) + + +class ExecutionResult: + def __init__(self, result): + self._data = result['data'] + self._headers = result['dimension_headers'] + self._grand_totals = result['grand_totals'] + self._paging = result['paging'] + + @property + def data(self): + return self._data + + @property + def headers(self): + return self._headers + + @property + def grand_totals(self): + return self._grand_totals + + @property + def paging(self): + return self._paging + + @property + def paging_total(self): + return self._paging['total'] + + @property + def paging_count(self): + return self._paging['count'] + + @property + def paging_offset(self): + return self._paging['offset'] + + def is_complete(self, dim=0): + return self.paging_offset[dim] + self.paging_count[dim] >= self.paging_total[dim] + + def next_page_start(self, dim=0): + return self.paging_offset[dim] + self.paging_count[dim] + + def get_all_header_values(self, dim, header_idx): + return [header['attributeHeader']['labelValue'] for header in + self.headers[dim]['headerGroups'][header_idx]['headers']] + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"ExecutionResult(paging={self.paging})" + + +class ExecutionResponse: + def __init__(self, result_api: apis.ResultControllerApi, workspace_id: str, exec_def: ExecutionDefinition, + response): + self._result_api = result_api + self._workspace_id = workspace_id + self._exec_def = exec_def + + self._r = response['execution_response'] + self._response = response + + @property + def workspace_id(self): + return self._workspace_id + + @property + def exec_def(self): + return self._exec_def + + @property + def result_id(self) -> str: + return self._r['links']['executionResult'] + + def read_result(self, limit: Union[int, list[int]], offset: Union[int, list[int]] = None): + """ + Reads from the execution result. + :param offset: + :param limit: + :return: + """ + + _offset = offset if isinstance(offset, list) else [offset] if offset is not None else None + _limit = limit if isinstance(limit, list) else [limit] + + # if limit is specified but offset is not, server will ignore paging completely (bug) + # this makes sure that offset gets defaulted to start of result + _offset = [0 for _ in _limit] if _limit is not None and _offset is None else _offset + + return ExecutionResult( + self._result_api.retrieve_result(workspace_id=self._workspace_id, result_id=self.result_id, + offset=_offset, limit=_limit, _check_return_type=False)) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"ExecutionResponse(workspace_id={self.workspace_id}, result_id={self.result_id})" + + +class ComputeService: + """ + Compute service drives computation of analytics for a GoodData.CN workspaces. The prescription of what to compute + is encapsulated by the ExecutionDefinition which consists of attributes, measures, filters and definition of + dimensions that influence how to organize the data in the result. + """ + + def __init__(self, api_client: GoodDataApiClient): + self._exec_api = apis.AfmControllerApi(api_client.afm_client) + self._result_api = apis.ResultControllerApi(api_client.afm_client) + + def for_exec_def(self, workspace_id, exec_def: ExecutionDefinition) -> ExecutionResponse: + """ + Starts computation in GoodData.CN workspace, using the provided execution definition. + + :param workspace_id: workspace identifier + :param exec_def: execution definition - this prescribes what to calculate, how to place labels and measure values into dimensions + :return: + """ + response = self._exec_api.compute_report(workspace_id, exec_def.as_api_model(), _check_return_type=False) + + return ExecutionResponse(result_api=self._result_api, + workspace_id=workspace_id, + exec_def=exec_def, + response=response) diff --git a/gooddata-sdk/gooddata_sdk/exec_model.py b/gooddata-sdk/gooddata_sdk/exec_model.py new file mode 100644 index 000000000..570696126 --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/exec_model.py @@ -0,0 +1,559 @@ +# (C) 2021 GoodData Corporation +from typing import Union +import gooddata_afm_client.models as afm_models + + +class ObjId: + def __init__(self, id, type): + self._id: str = id + self._type: str = type + + @property + def id(self) -> str: + return self._id + + @property + def type(self) -> str: + return self._type + + def as_afm_id(self): + return afm_models.AfmObjectIdentifier( + identifier=afm_models.ObjectIdentifier(id=self._id, type=self._type)) + + def as_identifier(self): + return afm_models.Identifier(identifier=afm_models.ObjectIdentifier(id=self._id, type=self._type)) + + def __eq__(self, other): + return isinstance(other, ObjId) and self.id == other.id and self.type == other.type + + def __str__(self): + """ + String representation is used to transform ObjId to string key. + + :return: string in format / + :rtype: str + """ + return f"{self.type}/{self.id}" + + def __repr__(self): + return f"{self.type}/{self.id}" + + +def _to_identifier(val: Union[ObjId, str]): + if isinstance(val, str): + return afm_models.Identifier(local_identifier=val) + + return val.as_identifier() + + +def _extract_id_or_local_id(val) -> Union[ObjId, str]: + if isinstance(val, (str, ObjId)): + return val + else: + # if things bomb here it means bad input to model class + return val.local_id + + +def _extract_local_id(val) -> str: + if isinstance(val, str): + return val + else: + # if things bomb here it means bad input to model class + return val.local_id + + +class ExecModelEntity: + def __init__(self): + pass + + def as_api_model(self): + raise NotImplementedError() + + +class Attribute(ExecModelEntity): + def __init__(self, local_id: str, label: Union[ObjId, str]): + """ + Creates new attribute that can be used to slice or dice measure values during computation. + + :param local_id: identifier of the attribute within the execution + :param label: identifier of the label to use for slicing or dicing; specified either as ObjId or str containing the label id + """ + super(Attribute, self).__init__() + + self._local_id = local_id + self._label = ObjId(label, 'label') if isinstance(label, str) else label + + @property + def local_id(self): + return self._local_id + + @property + def label(self): + return self._label + + def has_same_label(self, other): + return isinstance(other, Attribute) and other.label == self.label + + def as_api_model(self) -> afm_models.AttributeItem: + return afm_models.AttributeItem(local_identifier=self.local_id, + label=self.label.as_afm_id()) + + +class Filter(ExecModelEntity): + def __init__(self): + super(Filter, self).__init__() + + self._apply_on_result = None + + @property + def apply_on_result(self) -> Union[bool, None]: + return self._apply_on_result + + def is_noop(self): + raise NotImplementedError() + + def as_api_model(self): + raise NotImplementedError() + + +class Measure(ExecModelEntity): + def __init__(self, local_id: str): + super(Measure, self).__init__() + self._local_id = local_id + + @property + def local_id(self) -> str: + return self._local_id + + def as_api_model(self) -> afm_models.MeasureItem: + definition = self._body_as_api_model() + + return afm_models.MeasureItem(local_identifier=self._local_id, definition=definition) + + def _body_as_api_model(self): + raise NotImplementedError() + + +SIMPLE_MEASURE_AGGREGATION = {"SUM", "AVG", "COUNT", "APPROXIMATE_COUNT", "MAX", "MEDIAN", "MIN", "RUNSUM"} + + +class SimpleMeasure(Measure): + def __init__(self, local_id: str, item: ObjId, aggregation=None, compute_ratio=False, filters: list[Filter] = None): + super(SimpleMeasure, self).__init__(local_id) + + _agg = aggregation.upper() if aggregation is not None else None + if _agg is not None and _agg not in SIMPLE_MEASURE_AGGREGATION: + raise ValueError(f"Invalid arithmetic measure operator '{_agg}'. " + f"Valid operators: {ARITHMETIC_MEASURE_OPERATORS}") + + self._item = item + + if item.type == 'metric': + self._aggregation = None + elif _agg is None: + self._aggregation = "SUM" + else: + self._aggregation = _agg + + self._compute_ratio = compute_ratio + + if filters is None: + self._filters = [] + else: + self._filters = filters + + @property + def item(self) -> ObjId: + return self._item + + @property + def aggregation(self) -> str: + return self._aggregation + + @property + def compute_ratio(self) -> bool: + return self._compute_ratio + + @property + def filters(self) -> list[Filter]: + return self._filters + + def _body_as_api_model(self): + # aggregation is optional yet the model bombs if None is sent :( + if self.aggregation is not None: + return afm_models.SimpleMeasureDefinition( + afm_models.SimpleMeasureDefinitionMeasure(item=self.item.as_afm_id(), aggregation=self.aggregation, + compute_ratio=self.compute_ratio, filters=self.filters) + ) + else: + return afm_models.SimpleMeasureDefinition( + afm_models.SimpleMeasureDefinitionMeasure(item=self.item.as_afm_id(), compute_ratio=self.compute_ratio, + filters=self.filters)) + + +class PopDate: + def __init__(self, attribute: ObjId, periods_ago: int): + self._attribute = attribute + self._periods_ago = periods_ago + + @property + def attribute(self) -> ObjId: + return self._attribute + + @property + def periods_ago(self) -> int: + return self._periods_ago + + def as_api_model(self): + return afm_models.PopDate(attribute=self.attribute.as_afm_id(), periods_ago=self.periods_ago) + + +class PopDateMeasure(Measure): + def __init__(self, local_id: str, measure: Union[str, Measure], date_attributes: list[PopDate]): + super(PopDateMeasure, self).__init__(local_id) + + self._measure = _extract_local_id(measure) + self._date_attributes = date_attributes + + @property + def measure_local_id(self) -> str: + return self._measure + + @property + def date_attributes(self) -> list[PopDate]: + return self._date_attributes + + def _body_as_api_model(self): + measure_identifier = afm_models.LocalIdentifier(local_identifier=self.measure_local_id) + date_attributes = list([a.as_api_model() for a in self.date_attributes]) + + return afm_models.PopDateMeasureDefinition( + afm_models.PopDateMeasureDefinitionOverPeriodMeasure(measure_identifier=measure_identifier, + date_attributes=date_attributes)) + + +class PopDateDataset: + def __init__(self, dataset: Union[ObjId, str], periods_ago: int): + self._dataset = ObjId(dataset, "dataset") if isinstance(dataset, str) else dataset + self._periods_ago = periods_ago + + @property + def dataset(self) -> ObjId: + return self._dataset + + @property + def periods_ago(self) -> int: + return self._periods_ago + + def as_api_model(self): + return afm_models.PopDataset(dataset=self.dataset.as_afm_id(), periods_ago=self.periods_ago) + + +class PopDatesetMeasure(Measure): + def __init__(self, local_id: str, measure: Union[str, Measure], date_datasets: list[PopDateDataset]): + super(PopDatesetMeasure, self).__init__(local_id) + + self._measure = _extract_local_id(measure) + self._date_datasets = date_datasets + + @property + def measure_local_id(self) -> str: + return self._measure + + @property + def date_datasets(self) -> list[PopDateDataset]: + return self._date_datasets + + def _body_as_api_model(self): + measure_identifier = afm_models.LocalIdentifier(local_identifier=self.measure_local_id) + date_datasets = list([d.as_api_model() for d in self.date_datasets]) + + return afm_models.PopDatasetMeasureDefinition( + afm_models.PopDatasetMeasureDefinitionPreviousPeriodMeasure(measure_identifier=measure_identifier, + date_datasets=date_datasets)) + + +ARITHMETIC_MEASURE_OPERATORS = {"SUM", "DIFFERENCE", "MULTIPLICATION", "RATIO", "CHANGE"} + + +class ArithmeticMeasure(Measure): + def __init__(self, local_id: str, operator: str, operands: list[Union[str, Measure]]): + super(ArithmeticMeasure, self).__init__(local_id) + + if operator not in ARITHMETIC_MEASURE_OPERATORS: + raise ValueError(f"Invalid arithmetic measure operator '{operator}'. " + f"Valid operators: {ARITHMETIC_MEASURE_OPERATORS}") + + self._operator = operator + self._operands = list([_extract_local_id(o) for o in operands]) + + @property + def operator(self) -> str: + return self._operator + + @property + def operand_local_ids(self) -> list[str]: + return self._operands + + def _body_as_api_model(self): + measure_identifiers = [afm_models.LocalIdentifier(local_identifier=local_d) for local_d in self._operands] + + return afm_models.ArithmeticMeasureDefinition( + afm_models.ArithmeticMeasureDefinitionArithmeticMeasure(operator=self.operator, + measure_identifiers=measure_identifiers)) + + +class PositiveAttributeFilter(Filter): + def __init__(self, label: Union[ObjId, str, Attribute], in_values: list[str]): + super(PositiveAttributeFilter, self).__init__() + + self._label = _extract_id_or_local_id(label) + self._in_values = in_values + + @property + def label(self) -> Union[ObjId, str]: + return self._label + + @property + def in_values(self) -> list[str]: + return self._in_values + + def is_noop(self): + return False + + def as_api_model(self): + label_id = _to_identifier(self._label) + body = afm_models.PositiveAttributeFilterBody(label=label_id, _in=self.in_values, + _check_type=False) + return afm_models.PositiveAttributeFilter(body) + + +class NegativeAttributeFilter(Filter): + def __init__(self, label: Union[ObjId, str, Attribute], not_in_values: list[str]): + super(NegativeAttributeFilter, self).__init__() + + self._label = _extract_id_or_local_id(label) + self._not_in_values = not_in_values + + @property + def label(self) -> Union[ObjId, str]: + return self._label + + @property + def not_in_values(self) -> list[str]: + return self._not_in_values + + def is_noop(self): + return len(self.not_in_values) == 0 + + def as_api_model(self): + label_id = _to_identifier(self._label) + body = afm_models.NegativeAttributeFilterBody(label=label_id, not_in=self.not_in_values, + _check_type=False) + return afm_models.NegativeAttributeFilter(body) + + +class RelativeDateFilter(Filter): + def __init__(self, dataset: ObjId, granularity: str, from_shift: int, to_shift: int): + super(RelativeDateFilter, self).__init__() + + self._dataset = dataset + self._granularity = granularity + self._from_shift = from_shift + self._to_shift = to_shift + + @property + def dataset(self) -> ObjId: + return self._dataset + + @property + def granularity(self) -> str: + return self._granularity + + @property + def from_shift(self) -> int: + return self._from_shift + + @property + def to_shift(self) -> int: + return self._to_shift + + def is_noop(self): + return False + + def as_api_model(self): + body = afm_models.RelativeDateFilterBody(dataset=self.dataset.as_afm_id(), + granularity=self.granularity, + _from=self.from_shift, to=self.to_shift, _check_type=False) + return afm_models.RelativeDateFilter(body) + + +class AbsoluteDateFilter(Filter): + def __init__(self, dataset: ObjId, from_date: int, to_date: int): + super(AbsoluteDateFilter, self).__init__() + + self._dataset = dataset + self._from_date = from_date + self._to_date = to_date + + @property + def dataset(self) -> ObjId: + return self._dataset + + @property + def from_date(self) -> int: + return self._from_date + + @property + def to_date(self) -> int: + return self._to_date + + def is_noop(self): + return False + + def as_api_model(self): + body = afm_models.AbsoluteDateFilterBody(dataset=self.dataset.as_afm_id(), + _from=self._from_date, to=self._to_date, + _check_type=False) + return afm_models.AbsoluteDateFilter(body) + + +_MEASURE_VALUE_OPERATORS = { + "EQUAL_TO": 'comparison', + "GREATER_THAN": 'comparison', + "GREATER_THAN_OR_EQUAL_TO": 'comparison', + "LESS_THAN": 'comparison', + "LESS_THAN_OR_EQUAL_TO": 'comparison', + "NOT_EQUAL_TO": 'comparison', + "BETWEEN": 'range', + "NOT_BETWEEN": 'range' +} + + +class MeasureValueFilter(Filter): + def __init__(self, measure: Union[ObjId, str, Measure], operator: str, + values: Union[float, int, tuple[float, float]], + treat_nulls_as: Union[bool, None] = None): + super(MeasureValueFilter, self).__init__() + + if operator not in _MEASURE_VALUE_OPERATORS: + raise ValueError(f"Invalid measure value filter operator type '{operator}'." + f"It is expected to be one of: {_MEASURE_VALUE_OPERATORS.keys()}") + + if _MEASURE_VALUE_OPERATORS[operator] == 'range': + if len(values) != 2: + raise ValueError(f"Invalid number of values for {operator}. Expected two values: (from, to).") + + self._values = values + else: + if len(values) != 1 and not isinstance(values, (int, float)): + raise ValueError(f"Invalid number of values for {operator}. " + f"Expected single int, float or one-sized list or tuple.") + + self._values = (values,) if isinstance(values, (int, float)) else values + + self._measure = _extract_id_or_local_id(measure) + self._operator = operator + self._treat_nulls_as = treat_nulls_as + + @property + def measure(self) -> Union[ObjId, str]: + return self._measure + + @property + def operator(self) -> str: + return self._operator + + @property + def values(self) -> tuple[float]: + return self._values + + @property + def treat_nulls_as(self) -> Union[float, None]: + return self._treat_nulls_as + + def is_noop(self): + return False + + def as_api_model(self): + measure = _to_identifier(self._measure) + + if _MEASURE_VALUE_OPERATORS[self.operator] == 'comparison': + body = afm_models.ComparisonMeasureValueFilterBody(measure=measure, operator=self.operator, + value=self.values[0], + treat_null_values_as=self.treat_nulls_as, + _check_type=False) + + return afm_models.ComparisonMeasureValueFilter(body) + else: + _from = min(self.values) + to = max(self.values) + + body = afm_models.RangeMeasureValueFilterBody(measure=measure, operator=self.operator, + _from=_from, to=to, + treat_null_values_as=self.treat_nulls_as, + _check_type=False) + + return afm_models.RangeMeasureValueFilter(body) + + +_RANKING_OPERATORS = {"TOP", "BOTTOM"} + + +class RankingFilter(Filter): + def __init__(self, measures: list[Union[ObjId, Measure]], operator: str, value: int, + dimensionality: list[Union[ObjId, Attribute]]): + super(RankingFilter, self).__init__() + + if operator not in _RANKING_OPERATORS: + raise ValueError(f"Invalid ranking filter operator type '{operator}'." + f"It is expected to be one of: {_RANKING_OPERATORS}") + + self._measures = [_extract_id_or_local_id(m) for m in measures] + self._dimensionality = [_extract_id_or_local_id(d) for d in dimensionality] + self._operator = operator + self._value = value + + @property + def measures(self) -> list[Union[ObjId, str]]: + return self._measures + + @property + def operator(self) -> str: + return self._operator + + @property + def value(self) -> int: + return self._value + + @property + def dimensionality(self) -> list[Union[ObjId, str]]: + return self._dimensionality + + def is_noop(self): + return False + + def as_api_model(self): + measures = [_to_identifier(m) for m in self.measures] + dimensionality = [_to_identifier(d) for d in self.dimensionality] + + body = afm_models.RankingFilterBody(measures=measures, dimensionality=dimensionality, + operator=self.operator, value=self.value, + _check_type=False) + return afm_models.RankingFilter(body) + + +def exec_model_to_api_model(attributes: list[Attribute] = None, measures: list[Measure] = None, + filters: list[Filter] = None) -> afm_models.AFM: + """ + Transforms categorized execution model entities (attributes, measures, facts) into an API model + that can be used for computations of data results or computations of object availability. + + :param attributes: optionally specify list of attributes + :param measures: optionally specify list of measures + :param filters: optionally specify list of filters + :return: + """ + return afm_models.AFM(attributes=[a.as_api_model() for a in attributes] if attributes is not None else [], + measures=[m.as_api_model() for m in measures] if measures is not None else [], + filters=[f.as_api_model() for f in filters] if filters is not None else []) diff --git a/gooddata-sdk/gooddata_sdk/insight.py b/gooddata-sdk/gooddata_sdk/insight.py new file mode 100644 index 000000000..1e3d93186 --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/insight.py @@ -0,0 +1,423 @@ +# (C) 2021 GoodData Corporation +import functools + +import gooddata_metadata_client.apis as metadata_apis +from gooddata_sdk.client import GoodDataApiClient +from gooddata_sdk.exec_model import ObjId, SimpleMeasure, PopDateMeasure, PopDatesetMeasure, ArithmeticMeasure, \ + PositiveAttributeFilter, NegativeAttributeFilter, MeasureValueFilter, RankingFilter, AbsoluteDateFilter, \ + RelativeDateFilter, Attribute, PopDate, PopDateDataset +from gooddata_sdk.utils import Sideloads, load_all_entities + +# +# Conversion from types stored in insight into the goodata_afm_client models. Insight is created by GD.UI SDK +# and is persisted in the freeform 'vis object' in the metadata. The types from SDK model are stored there. +# + +_GRANULARITY_CONVERSION = { + 'GDC.time.year': "YEAR", + 'GDC.time.quarter': "QUARTER", + 'GDC.time.month': "MONTH", + 'GDC.time.week_us': "WEEK", + 'GDC.time.week': "WEEK", + 'GDC.time.date': "DAY", + 'GDC.time.hour': "HOUR", + 'GDC.time.minute': "MINUTE", + + 'GDC.time.quarter_in_year': 'QUARTER_OF_YEAR', + 'GDC.time.month_in_year': 'MONTH_OF_YEAR', + 'GDC.time.week_in_year': 'WEEK_OF_YEAR', + 'GDC.time.day_in_year': 'DAY_OF_YEAR', + 'GDC.time.day_in_month': 'DAY_OF_MONTH', + 'GDC.time.day_in_week': 'DAY_OF_WEEK', + 'GDC.time.hour_in_day': 'HOUR_OF_DAY', + 'GDC.time.minute_in_hour': 'MINUTE_OF_HOUR', +} + +_AGGREGATION_CONVERSION = { + 'sum': 'SUM', + 'avg': 'AVG', + 'count': 'COUNT', + 'approximate_count': 'APPROXIMATE_COUNT', + 'max': 'MAX', + 'median': 'MEDIAN', + 'min': 'MIN', + 'runsum': 'RUNSUM' +} + +_ARITHMETIC_CONVERSION = { + 'sum': 'SUM', + 'difference': 'DIFFERENCE', + 'multiplication': 'MULTIPLICATION', + 'ratio': 'RATIO', + 'change': 'CHANGE' +} + + +# +# +# + +def _ref_extract(ref): + if 'identifier' in ref: + return ObjId(id=ref['identifier']['id'], type=ref['identifier']['type']) + elif 'localIdentifier' in ref: + return ref['localIdentifier'] + + raise ValueError("invalid ref. must be identifier or localIdentifier") + + +def _convert_filter_to_computable(filter_obj): + if 'positiveAttributeFilter' in filter_obj: + f = filter_obj['positiveAttributeFilter'] + # fallback to use URIs; SDK may be able to create filter with attr elements as uris... + in_values = f['in']['values'] if 'values' in f['in'] else f['in']['uris'] + + return PositiveAttributeFilter(label=_ref_extract(f['displayForm']), + in_values=in_values) + + elif 'negativeAttributeFilter' in filter_obj: + f = filter_obj['negativeAttributeFilter'] + # fallback to use URIs; SDK may be able to create filter with attr elements as uris... + not_in_values = f['notIn']['values'] if 'values' in f['notIn'] else f['in']['uris'] + + return NegativeAttributeFilter(label=_ref_extract(f['displayForm']), not_in_values=not_in_values) + elif 'relativeDateFilter' in filter_obj: + f = filter_obj['relativeDateFilter'] + + return RelativeDateFilter(dataset=_ref_extract(f['dataSet']), + granularity=_GRANULARITY_CONVERSION[f['granularity']], + from_shift=f['from'], to_shift=f['to']) + + elif 'absoluteDateFilter' in filter_obj: + f = filter_obj['absoluteDateFilter'] + + return AbsoluteDateFilter(dataset=_ref_extract(f['dataSet']), from_date=f['from'], to_date=f['to']) + elif 'measureValueFilter' in filter_obj: + f = filter_obj['measureValueFilter'] + condition = f['condition'] + + if 'comparison' in condition: + c = condition['comparison'] + treat_values_as_null = c['treatNullValuesAs'] if 'treatNullValuesAs' in c else None + + return MeasureValueFilter(measure=_ref_extract(f['measure']), + operator=c['operator'], values=c['value'], + treat_nulls_as=treat_values_as_null) + elif 'range' in condition: + c = condition['range'] + treat_values_as_null = c['treatNullValuesAs'] if 'treatNullValuesAs' in c else None + return MeasureValueFilter(measure=_ref_extract(f['measure']), + operator=c['operator'], values=(c['from'], c['to']), + treat_nulls_as=treat_values_as_null) + elif 'rankingFilter' in filter_obj: + f = filter_obj['rankingFilter'] + dimensionality = [_ref_extract(a) for a in f['attributes']] if 'attributes' in f else None + + return RankingFilter(measures=[_ref_extract(f['measure'])], dimensionality=dimensionality, + operator=f['operator'], value=f['value']) + + raise ValueError(f'Unable to convert filter {filter_obj}') + + +def _convert_measure_to_computable(measure): + m = measure['measure'] + local_id = m['localIdentifier'] + measure_def = m['definition'] + + if 'measureDefinition' in measure_def: + d = measure_def['measureDefinition'] + aggregation = _AGGREGATION_CONVERSION[d['aggregation']] if 'aggregation' in d else None + compute_ratio = d['computeRatio'] if 'computeRatio' in d else False + filters = [_convert_filter_to_computable(f) for f in d['filters']] if 'filters' in d else None + + return SimpleMeasure(local_id=local_id, item=_ref_extract(d['item']), + aggregation=aggregation, compute_ratio=compute_ratio, filters=filters) + + elif 'popMeasureDefinition' in measure_def: + d = measure_def['popMeasureDefinition'] + date_attributes = [PopDate(attribute=_ref_extract(d['popAttribute']), periods_ago=1)] + + return PopDateMeasure(local_id=local_id, measure=d['measureIdentifier'], date_attributes=date_attributes) + + elif 'previousPeriodMeasure' in measure_def: + d = measure_def['previousPeriodMeasure'] + + date_datasets = [PopDateDataset(_ref_extract(d['dataSet']), dd['periodsAgo']) for dd in d['dateDataSets']] + + return PopDatesetMeasure(local_id=local_id, measure=d['measureIdentifier'], date_datasets=date_datasets) + + elif 'arithmeticMeasure' in measure_def: + d = measure_def['arithmeticMeasure'] + + return ArithmeticMeasure(local_id=local_id, operator=_ARITHMETIC_CONVERSION[d['operator']], + operands=d['measureIdentifiers']) + + raise ValueError(f'Unable to convert measure {measure_def}') + + +# +# +# + +class InsightMeasure: + """ + Represents measure placed on an insight. + + Note: this has different shape than object passed to execution. + """ + + def __init__(self, measure=None): + self._measure = measure + self._m = measure['measure'] + self._d = self._m['definition'] + + @property + def local_id(self): + return self._m['localIdentifier'] + + @property + def alias(self): + return self._m['alias'] if 'alias' in self._m else None + + @property + def title(self): + return self._m['title'] if 'title' in self._m else None + + @property + def item(self): + if 'measureDefinition' in self._d: + return self._d['measureDefinition']['item'] + + return None + + @property + def item_id(self): + item = self.item + + return item['identifier']['id'] if item is not None else None + + @property + def is_time_comparison(self): + return 'popMeasureDefinition' in self._d or 'previousPeriodMeasure' in self._d + + @property + def time_comparison_master(self): + """ + If this is a time comparison measure, return local_id of the master measure from which it is + derived. + :return: local_id of master measure, None if not a time comparison measure + """ + if 'popMeasureDefinition' in self._d: + return self._d['popMeasureDefinition']['measureIdentifier'] + elif 'previousPeriodMeasure' in self._d: + return self._d['previousPeriodMeasure']['measureIdentifier'] + + return None + + def as_computable(self): + return _convert_measure_to_computable(self._measure) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"measure(local_id={self.local_id})" + + +class InsightAttribute: + def __init__(self, attribute): + self._attribute = attribute + self._a = attribute['attribute'] + + @property + def local_id(self): + return self._a['localIdentifier'] + + @property + def label_id(self): + return self._a['displayForm']['identifier']['id'] + + @property + def alias(self): + return self._a['alias'] if 'alias' in self._a else None + + @property + def label(self): + return self._a['displayForm'] + + def as_computable(self): + return Attribute(local_id=self.local_id, label=_ref_extract(self.label)) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"attribute(local_id={self.local_id})" + + +class InsightFilter: + def __init__(self, f=None): + self._filter = f + + def as_computable(self): + return _convert_filter_to_computable(self._filter) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return self._filter + + +class InsightBucket: + def __init__(self, bucket=None): + self._b = bucket + self._measures = None + self._attributes = None + + @property + def local_id(self): + return self._b['localIdentifier'] + + @property + def items(self): + return self._b['items'] + + @property + def measures(self) -> list[InsightMeasure]: + if self._measures is None: + self._measures = [InsightMeasure(item) for item in self.items if 'measure' in item] + + return self._measures + + @property + def attributes(self) -> list[InsightAttribute]: + if self._attributes is None: + self._attributes = [InsightAttribute(item) for item in self.items if 'attribute' in item] + + return self._attributes + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"bucket(local_id={self.local_id}, items_count={len(self.items)})" + + +class Insight: + def __init__(self, from_vis_obj=None, sideloads=None): + if sideloads is None: + sideloads: Sideloads = Sideloads([]) + + self._vo = from_vis_obj + self._sideloads = sideloads + + @property + def id(self): + return self._vo['id'] + + @property + def title(self): + return self._vo['attributes']['title'] + + @property + def description(self): + return self._vo['attributes']['description'] + + @property + def buckets(self): + return [InsightBucket(b) for b in self._vo['attributes']['content']['buckets']] + + @property + def filters(self): + return [InsightFilter(f) for f in self._vo['attributes']['content']['filters']] + + @property + def sorts(self): + return self._vo['attributes']['content']['sorts'] + + @property + def properties(self): + return self._vo['attributes']['content']['properties'] + + @property + def vis_url(self): + return self._vo['attributes']['content']['visualizationUrl'] + + @property + def measures(self): + return [m for b in self.buckets for m in b.measures] + + @property + def attributes(self): + return [a for b in self.buckets for a in b.attributes] + + @property + def sideloads(self): + return self._sideloads + + def get_metadata(self, id_obj): + if not self._sideloads: + return None + + # otherwise try to use the id object as is + return self._sideloads.find(id_obj) + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"insight(title='{self.title}', id='{self.id}, buckets='{str(self.buckets)}')'" + + +class InsightService: + """ + Insight Service allows retrieval of insights from a GD.CN workspace. The insights are returned as instances of Insight + which allows convenient introspection and necessary functions to convert the insight into a form where it can + be sent for computation. + + Note: the insights are created using GD.CN Analytical Designer or using GoodData.UI SDK. They are stored as + visualization objects with a free-form body. This body is specific for AD & SDK. + The Insight wrapper exists to take care of these discrepancies. + """ + + # Note on the disabled checking: + # generated client has issues parsing the vis objects; .. have to avoid return type checks + # + # note: the parsing is done lazily so it does not necessarily bomb on the next line but when trying to + # access returned object's properties + + def __init__(self, api_client: GoodDataApiClient): + self._api = metadata_apis.WorkspaceObjectControllerApi(api_client.metadata_client) + + def get_insights(self, workspace_id): + """ + Gets all insights for a workspace. The insights will contain sideloaded metadata for all execution entities + that they reference. + + :param workspace_id: identifier of workspace to load insights from + :return: all available insights, each insight will contain sideloaded metadata about the entities it references + :rtype: list[Insight] + """ + get_func = functools.partial(self._api.get_all_entities_visualization_objects, workspace_id, + include=["ALL"], _check_return_type=False) + + vis_objects = load_all_entities(get_func) + sideloads = Sideloads(vis_objects.included) + + return [Insight(vis_obj, sideloads) for vis_obj in vis_objects.data] + + def get_insight(self, workspace_id, insight_id): + """ + Gets a single insight from a workspace. + + :param workspace_id: identifier of workspace to load insight from + :param insight_id: identifier of the insight + :return: single insight; the insight will contain sideloaded metadata about the entities it references + :rtype: Insight + """ + vis_obj = self._api.get_entity_visualization_objects(workspace_id, object_id=insight_id, include=["ALL"], + _check_return_type=False) + sideloads = Sideloads(vis_obj.included) + + return Insight(vis_obj.data, sideloads) diff --git a/gooddata-sdk/gooddata_sdk/table.py b/gooddata-sdk/gooddata_sdk/table.py new file mode 100644 index 000000000..0d4d1d77c --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/table.py @@ -0,0 +1,226 @@ +# (C) 2021 GoodData Corporation +from typing import Union + +from gooddata_sdk.client import GoodDataApiClient +from gooddata_sdk.compute import ExecutionResponse, ExecutionResult, ExecutionDefinition, ComputeService +from gooddata_sdk.exec_model import Attribute, Measure, Filter +from gooddata_sdk.insight import Insight + +_TABLE_ROW_BATCH_SIZE = 512 +""" +Number of rows that the code reads from backed at once. +""" + +_MAX_MEASURES = 256 +""" +Maximum number of measures that this code is prepared to handle. This is to simplify the paging business - so that +code only pages 'down' across one (row) dimension. +""" + + +class ExecutionTable: + """ + Represents execution result as a table. This is a convenience wrapper for executions constructed using + the following convention: + + - all attributes are in the first dimension + - all measures are in the second dimension + - if the execution is attribute- or measure-less, then there is always single dimension + + The mapping to rows is then as follows: + + - both attributes + measures are on the execution = iteration over first dimension; as many rows as total records + in the first dimension (paging.total[0]) + - just attributes = iteration over just headers in first dimension; as many rows as total records in the + first dimension (paging.total[0]) + - just measures = single row, all measure values returned in one row + + """ + + def __init__(self, response: ExecutionResponse, first_page: ExecutionResult): + self._exec_def = response.exec_def + self._response = response + self._first_page = first_page + self._pages = [first_page] + + @property + def attributes(self): + return self._exec_def.attributes + + @property + def measures(self): + return self._exec_def.measures + + @property + def column_ids(self) -> list[str]: + """ + Returns column identifiers. Each row will be a mapping of column identifier to column data. + + :return: + """ + return [a.local_id for a in self.attributes] + [m.local_id for m in self.measures] + + @property + def column_metadata(self): + """ + Returns mapping of column identifier to definition of either attribute whose elements will be in that column + or measure whose value will be calculated in that column. + :return: + """ + return dict(zip(self.column_ids, self.attributes + self.measures)) + + def _read_next_page(self) -> bool: + if not self._exec_def.has_attributes(): + # result without attributes has just one row with all the measures, there is no next page to load + return False + + last_loaded = self._pages[-1] + offset = last_loaded.paging_offset + count = last_loaded.paging_count + total = last_loaded.paging_total + + # no more data on the backend, bail out + if offset[0] + count[0] >= total[0]: + return False + + next_offset = [offset[0] + count[0]] + offset[1:] + # backend is smart enough to cap if the limit is greater than number of remaining rows + next_limit = [_TABLE_ROW_BATCH_SIZE] + count[1:] + + next_page = self._response.read_result(offset=next_offset, limit=next_limit) + + self._pages.append(next_page) + + return True + + def _read_all_measures_in_one_row(self): + data = self._first_page.data + cols = self.column_ids + + yield dict(zip(cols, data)) + + def _read_all_paged(self): + page_idx = 0 + cols = self.column_ids + + while page_idx < len(self._pages): + page = self._pages[page_idx] + attribute_headers = page.headers[0] + data = page.data + paging = page.paging + page_row_idx = 0 + + # yield all data from current page + while page_row_idx < paging['count'][0]: + headers = [header['headers'][page_row_idx]['attributeHeader']['labelValue'] for header in + attribute_headers['headerGroups']] + measure_data = data[page_row_idx] if self._exec_def.has_measures() else [] + + yield dict(zip(cols, headers + measure_data)) + page_row_idx += 1 + + # try to read next page of data. False means the end was reached so just bail out + if not self._read_next_page(): + break + + # otherwise the self._pages was updated so go on with next page + page_idx += 1 + + def read_all(self): + """ + Returns a generator that will be yielding execution result as rows. Each row is a dict() mapping column identifier + to value of that column. + + :return: generator yielding dict() representing rows of the table + """ + if not self._exec_def.has_attributes(): + return self._read_all_measures_in_one_row() + + return self._read_all_paged() + + def __len__(self): + if self._exec_def.has_attributes(): + # if there are attributes in the result, then the sheet will be sliced with one row per + # attribute => whatever the paging says is total for the first dimension is the number of rows + return self._first_page.paging_total[0] + else: + # if there are no attributes in the result, then the sheet contains at most one row with all + # measure values in it; now due such result being single dim, code looks at number of computed measure + # values in that single dim. if there are any, then there will be one row + return 1 if self._first_page.paging_total[0] > 0 else 0 + + def __str__(self): + return self.__repr__() + + def __repr__(self): + return f"ExecutionTable(response={self._response}, columns={self.column_ids}, rows={len(self)})" + + +def _prepare_tabular_definition(attributes: list[Attribute], filters: list[Filter], measures: list[Measure]): + dims = [ + [a.local_id for a in attributes] if len(attributes) else None, + ['measureGroup'] if len(measures) else None + ] + + return ExecutionDefinition(attributes=attributes, measures=measures, filters=filters, dimensions=dims) + + +def _as_table(response: ExecutionResponse) -> ExecutionTable: + first_page_offset = [0, 0] + first_page_limit = [_TABLE_ROW_BATCH_SIZE, _MAX_MEASURES] + + if not response.exec_def.has_attributes(): + # there are no attributes, there shall be at most one row with the measures, so get that as first page + first_page_limit = [first_page_limit[1]] + first_page_offset = [0] + elif not response.exec_def.has_measures(): + # there are no measures; there may be many attribute headers + first_page_limit = [first_page_limit[0]] + first_page_offset = [0] + + first_page = response.read_result(offset=first_page_offset, limit=first_page_limit) + + return ExecutionTable(response=response, first_page=first_page) + + +class TableService: + """ + The TableService provides a convenient way to drive computations and access the results in a tabular fashion. + + Compared to the ComputeService, with this one here you do not have to worry about the layout of the result and + do not have to have to work with execution response, access the data using paging. + + The ExecutionTable returned by the TableService allows you to iterate over the rows of the calculated data. + """ + def __init__(self, api_client: GoodDataApiClient): + self._compute = ComputeService(api_client) + + def for_insight(self, workspace_id, insight: Insight) -> ExecutionTable: + exec_def = _prepare_tabular_definition( + attributes=[a.as_computable() for a in insight.attributes], + measures=[m.as_computable() for m in insight.measures], + filters=[f for f in [f.as_computable for f in insight.filters] if not f.is_noop()]) + + response = self._compute.for_exec_def(workspace_id=workspace_id, exec_def=exec_def) + + return _as_table(response) + + def for_items(self, workspace_id, items: list[Union[Attribute, Measure]], filters=None) -> ExecutionTable: + if filters is None: + filters = [] + + attributes: list[Attribute] = [] + measures: list[Measure] = [] + + for item in items: + if isinstance(item, Attribute): + attributes.append(item) + elif isinstance(item, Measure): + measures.append(item) + else: + raise ValueError(f"Invalid input item: {item}. Expecting instance of Attribute or Measure") + + exec_def = _prepare_tabular_definition(attributes=attributes, measures=measures, filters=filters) + response = self._compute.for_exec_def(workspace_id=workspace_id, exec_def=exec_def) + + return _as_table(response) diff --git a/gooddata-sdk/gooddata_sdk/utils.py b/gooddata-sdk/gooddata_sdk/utils.py new file mode 100644 index 000000000..46da36bca --- /dev/null +++ b/gooddata-sdk/gooddata_sdk/utils.py @@ -0,0 +1,98 @@ +# (C) 2021 GoodData Corporation +from collections import namedtuple + +from gooddata_metadata_client import ApiAttributeError +from gooddata_sdk.exec_model import ObjId + + +def id_obj_to_key(id_obj): + """ + Given an object containing an id+type pair, this function will return a string key. + + For convenience, this also recognizes the `ref` format used by GoodData.UI SDK. In that format, the id+type + are wrapped in 'identifier'. + + :param id_obj: id object + :return: string that can be used as key + """ + unwrapped = id_obj + if isinstance(id_obj, str): + return id_obj + elif isinstance(id_obj, ObjId): + return str(id_obj) + elif 'identifier' in id_obj: + # items in insight have id object in format {identifier: { id, type }}; unwrap them for convenience + unwrapped = id_obj['identifier'] + + if 'id' not in unwrapped or 'type' not in unwrapped: + raise KeyError( + f"Invalid id object used to find sideloaded entity: {str(id_obj)}. Need dict with 'id' and 'type' keys") + + return f"{unwrapped['type']}/{unwrapped['id']}" + + +AllPagedEntities = namedtuple('PagedResult', ['data', 'included']) + + +def load_all_entities(get_page_func, page_size=500): + """ + Loads all entities from a paged resource. The primary input to this function is a partial function that is setup with + all the fixed parameters. Given this the function will get entities page-by-page and merge them into a single + 'pseudo-response' containing data and included attributes. + + An example usage: + + >>> import functools + >>> import gooddata_metadata_client.apis as metadata_apis + >>> get_func = functools.partial(metadata_apis.get_all_entities_visualization_objects, 'some-workspace-id', + >>> include=["ALL"], _check_return_type=False) + >>> vis_objects = load_all_entities(get_func) + + :param get_page_func: an API controller from the metadata client + :param page_size: optionally specify page length, default is 500 + :return: + """ + all_paged_entities = AllPagedEntities(data=[], included=[]) + current_page = 0 + + while True: + result = get_page_func(page=current_page, size=page_size) + + all_paged_entities.data.extend(result.data) + + try: + all_paged_entities.included.extend(result.included) + except ApiAttributeError: + pass + + if len(result.data) < page_size: + break + + current_page += 1 + + return all_paged_entities + + +class Sideloads: + def __init__(self, objs): + self._objects = dict([(f"{o['type']}/{o['id']}", o) for o in objs]) + + def find(self, id_obj): + id_obj_key = id_obj_to_key(id_obj) + + if id_obj_key not in self._objects: + return None + + return self._objects[id_obj_key] + + def all_for_type(self, obj_type): + return [o for o in self._objects.values() if o['type'] == obj_type] + + def __str__(self): + return str(self._objects) + + def __repr__(self): + return f"Sideloads({','.join(self._objects.keys())})" + + def __len__(self): + return len(self._objects) diff --git a/gooddata-sdk/requirements.txt b/gooddata-sdk/requirements.txt new file mode 100644 index 000000000..8149f2cd0 --- /dev/null +++ b/gooddata-sdk/requirements.txt @@ -0,0 +1,2 @@ +gooddata-afm-client >= 1.0.0 +gooddata-metadata-client >= 1.0.0 \ No newline at end of file diff --git a/gooddata-sdk/setup.py b/gooddata-sdk/setup.py new file mode 100644 index 000000000..98ffd2545 --- /dev/null +++ b/gooddata-sdk/setup.py @@ -0,0 +1,16 @@ +import subprocess +from setuptools import setup, find_packages, Extension + +REQUIRES = [ + "gooddata-afm-client >= 1.0", + "gooddata-metadata-client >= 1.0" +] + +setup( + name='gooddata-sdk', + version='0.1', + author='Lubomir Slivka', + license='MIT', + install_requires=REQUIRES, + packages=['gooddata_sdk'] +) From c684e252e02dbdbfb5f6e6b4da1f7e1595804752 Mon Sep 17 00:00:00 2001 From: Lubo Slivka Date: Thu, 5 Aug 2021 13:15:56 +0200 Subject: [PATCH 3/4] Add initial version of gooddata-fdw - Builds on top of SDK --- .dockerignore | 1 + .gitignore | 3 + Dockerfile | 38 +++ gooddata-fdw/.gitignore | 66 ++++ gooddata-fdw/README.md | 140 ++++++++ gooddata-fdw/gooddata_fdw/__init__.py | 458 ++++++++++++++++++++++++++ gooddata-fdw/requirements.txt | 1 + gooddata-fdw/setup.py | 15 + start_gooddata_fdw.sh | 10 + 9 files changed, 732 insertions(+) create mode 100644 .dockerignore create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 gooddata-fdw/.gitignore create mode 100644 gooddata-fdw/README.md create mode 100644 gooddata-fdw/gooddata_fdw/__init__.py create mode 100644 gooddata-fdw/requirements.txt create mode 100644 gooddata-fdw/setup.py create mode 100755 start_gooddata_fdw.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..485dee64b --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.idea diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..01fd6fa57 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +.env +test_clients.py \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..83f35741e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,38 @@ +FROM postgres:12-alpine + +# +# Docker image that adds multicorn & gooddata-fdw on top of official PostgreSQL image. +# +# Note: multicorn has some issues building against PostgreSQL 13 so going with v12 for now +# + +# +# There is also some funny stuff in the multicorn make file. Documented here: +# +# see: https://github.com/Segfault-Inc/Multicorn/issues/183 +# see: https://gist.github.com/felixge/49c37dffb49efc8bc0911b1113231de0#file-dockerfile +# +# The preflight-check is removed because of this. +# + +RUN apk add --no-cache --update wget make musl-dev llvm11 gcc clang python3 python3-dev py3-setuptools py3-pip \ + && pip3 --no-color --no-cache-dir -qq install pgxnclient \ + \ + && pgxnclient install foreign_table_exposer \ + \ + && wget http://api.pgxn.org/dist/multicorn/1.4.0/multicorn-1.4.0.zip && unzip multicorn-1.4.0 && cd multicorn-1.4.0 \ + && echo "" > preflight-check.sh && PYTHON_OVERRIDE=python3 make && PYTHON_OVERRIDE=python3 make install + +# +# Add all required gooddata-python packages into the image +# +ADD gooddata-afm-client /gd/gooddata-afm-client +ADD gooddata-metadata-client /gd/gooddata-metadata-client +ADD gooddata-sdk /gd/gooddata-sdk +ADD gooddata-fdw /gd/gooddata-fdw + +RUN cd /gd/gooddata-afm-client && python3 setup.py install \ + && cd /gd/gooddata-metadata-client && python3 setup.py install \ + && cd /gd/gooddata-sdk && python3 setup.py install \ + && cd /gd/gooddata-fdw && python3 setup.py install \ + && echo "CREATE EXTENSION multicorn; CREATE EXTENSION foreign_table_exposer; " > /docker-entrypoint-initdb.d/create_extensions.sql diff --git a/gooddata-fdw/.gitignore b/gooddata-fdw/.gitignore new file mode 100644 index 000000000..43995bd42 --- /dev/null +++ b/gooddata-fdw/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/gooddata-fdw/README.md b/gooddata-fdw/README.md new file mode 100644 index 000000000..5d79d29ee --- /dev/null +++ b/gooddata-fdw/README.md @@ -0,0 +1,140 @@ +# GoodData.CN Foreign Data Wrapper + +## Getting Started + +For convenience a Dockerfile is in place which when started will run PostgreSQL 12 with multicorn and gooddata-fdw +installed. There is a [script in place](../start_gooddata_fdw.sh) to automate build and startup steps: + + POSTGRES_PASSWORD=... ./start_gooddata_fdw + +You need to provide your own password via the `POSTGRES_PASSWORD` environmental variable. The command will build an +image containing official PostgreSQL v12 and install all the requirements and GoodData FDW into it. It will create +a new `gooddata` DB and `gooddata` user who will have access to this DB. The password for this user is what you have +entered in the `POSTGRES_PASSWORD` variable. + +After the container starts, you can connect to the running PostgreSQL: + +- From console using `psql --host localhost --port 2543 --user gooddata gooddata` + + You will be asked to enter the password that you have specified when starting the script. + +- From any other client using JDBC string: `jdbc:postgresql://localhost:2543/gooddata` + + You will be asked to enter username (gooddata) and password. + +Once connected you will be able to work with the GD.CN Foreign Data Wrapper. At first, you need to define your GD.CN +server in PostgreSQL: + +```postgresql +CREATE SERVER multicorn_gooddata FOREIGN DATA WRAPPER multicorn +OPTIONS ( + wrapper 'gooddata_fdw.GoodDataForeignDataWrapper', + host 'https://gdcn_host', + token 'auth_token' +); +``` + +Typically you have to do this once per GD.CN installation. You can add as many servers as you want/need. + +**IMPORTANT**: do not forget to specify host including the schema (http or https). + +## Import insights from your workspace + +You can import insights created in GoodData.CN Analytical Designer as PostgreSQL foreign tables. You can import insights +from as many workspaces as you want. We recommend you to create schema per workspace otherwise you run risk of table +name clashes. + +```postgresql +-- +-- Schema to map insights into. This can be anything you want. +-- +CREATE SCHEMA gooddata_workspace; + +-- +-- This maps all insights stored in GD.CN workspace into a schema of your choice. +-- +-- Note: it is essential that you import from 'gooddata_insights'. That is the schema that the FDW uses to +-- identify that you actually want to map the workspace's insights +-- +IMPORT FOREIGN SCHEMA gooddata_insights FROM SERVER multicorn_gooddata INTO gooddata_workspace OPTIONS ( + workspace 'workspace_id' +); +``` + +You will get couple of 'NOTICE' messages as the import progresses. You can then check the imported tables for instance +by executing: + +```postgresql +SELECT * FROM information_schema.foreign_tables WHERE foreign_table_schema = 'gooddata_workspace'; +``` + +## Free-form computations on top of Semantic Model + +You can import your entire semantic model including MAQL metrics into a special `compute` **pseudo-table**. Doing SELECTs +from this table will trigger computation of analytics on your GoodData.CN server based on the columns that you have +specified on the SELECT. + +Note that the `compute` is called pseudo-table for a reason. It does not adhere to the relational model. The columns +that you SELECT map to facts, metrics and labels in your semantic model. Computing results for the select will automatically +aggregate results on the columns that are mapped to labels in your semantic model. In other words cardinality of +the `compute` table changes based on the columns that you SELECT. + +This is how you can import the semantic model: + +```postgresql +-- +-- Schema where the compute pseudo-table should be created. This can be any schema, even schema where you map the +-- insights. +-- +CREATE SCHEMA gooddata_workspace; + +-- +-- This imports the semantic model into the 'compute' pseudo-table. +-- +-- Note: it is essential that you import from 'gooddata_compute'. That is the schema that the FDW uses to +-- identify that you actually want to import the semantic layer. +-- +IMPORT FOREIGN SCHEMA gooddata_compute FROM SERVER multicorn_gooddata INTO gooddata_workspace OPTIONS ( + workspace 'workspace_id' +); +``` + +**IMPORTANT**: Your semantic model may consist of multiple isolated segments that have no relationship between them. Attempting +to compute results from multiple isolated segments will result in errors. + +## Custom reports as foreign tables + +You can manually create your own foreign tables and map their columns to GoodData.CN semantic model. This is similar +to creating normal tables except you have to provide table and column OPTIONS to establish the correct mapping. For instance: + +```postgresql +CREATE FOREIGN TABLE custom_report ( + some_label VARCHAR OPTIONS (id 'label/some_label'), + some_fact_sum NUMERIC(15,5) OPTIONS (id 'fact/some_fact', agg 'sum'), + some_fact_avg NUMERIC(15,5) OPTIONS (id 'fact/some_fact', agg 'avg'), + some_metric NUMERIC(15,5) OPTIONS (id 'metric/some_metric') +) +SERVER multicorn_gooddata +OPTIONS ( workspace 'workspace_id'); +``` + +To explain: + +- OPTIONS on foreign table must contain identifier of workspace to map to +- OPTIONS on each column must contain identifier of semantic model entity. The id is string but consisting + of two parts `/`. Where `entity_type` is either label, fact or metric. + +For columns that map to facts in your semantic model, you can also specify what aggregation function should be used when +aggregating the fact values for the labels in your custom report table. You can use the following aggregation functions: + +- `sum` +- `avg`, +- `min`, +- `max`, +- `median` + +The `agg` key is optional. If you do not specify it, then default 'sum' aggregation will be used. The value of `agg` is +case insensitive. + +Note: If you do not specify the required options, the CREATE command will fail. If you specify wrong entity IDs, +the failures will happen at SELECT time. diff --git a/gooddata-fdw/gooddata_fdw/__init__.py b/gooddata-fdw/gooddata_fdw/__init__.py new file mode 100644 index 000000000..5f0b4658e --- /dev/null +++ b/gooddata-fdw/gooddata_fdw/__init__.py @@ -0,0 +1,458 @@ +# (C) 2021 GoodData Corporation +from logging import ERROR, INFO, DEBUG, WARNING, CRITICAL +from operator import itemgetter + +from multicorn import ForeignDataWrapper, TableDefinition, ColumnDefinition +from multicorn.utils import log_to_postgres + +import gooddata_sdk as sdk + +_IN_POSTGRES = True +_USER_AGENT = "gooddata-fdw/0.1" + + +def log_to_console(): + global _IN_POSTGRES + _IN_POSTGRES = False + + +def _log_debug(msg): + if not _IN_POSTGRES: + print(f"DEBUG: gooddata_fdw: {msg}") + else: + log_to_postgres(f"gooddata_fdw: {msg}", level=DEBUG) + + +def _log_info(msg): + if not _IN_POSTGRES: + print(f"INFO: gooddata_fdw: {msg}") + else: + log_to_postgres(f"gooddata_fdw: {msg}", level=INFO) + + +def _log_warn(msg): + if not _IN_POSTGRES: + print(f"WARNING: gooddata_fdw: {msg}") + else: + log_to_postgres(f"gooddata_fdw: {msg}", level=WARNING) + + +def _log_error(msg): + if not _IN_POSTGRES: + print(f"ERROR: gooddata_fdw: {msg}") + else: + log_to_postgres(f"gooddata_fdw: {msg}", level=ERROR) + + +def _log_critical(msg): + if not _IN_POSTGRES: + print(f"CRITICAL: gooddata_fdw: {msg}") + else: + log_to_postgres(f"gooddata_fdw: {msg}", level=CRITICAL) + + +def _sanitize_str_for_postgres(string, used_names=None): + # replace non-alpha-num stuff with underscores + with_underscores = ''.join(char if char.isalnum() else '_' for char in string.lower()) + + # then get rid of sequences of underscores + candidate = '_'.join([s for s in with_underscores.split('_') if s != '']) + + if used_names is None: + return candidate + + return _ensure_unique(candidate, used_names) + + +def _ensure_unique(candidate, used_names): + # ensure column name uniqueness - in a dumb way by appending some number + if candidate in used_names: + i = 1 + new_candidate = f'{candidate}_{i}' + + while new_candidate in used_names: + i += 1 + new_candidate = f'{candidate}_{i}' + + return new_candidate + + return candidate + + +# +# Column naming during IMPORT SCHEMA is delegated to strategies. The idea is that we may want to support +# different strategies and let user select the desired one through OPTIONS during import. +# + +class InsightTableNamingStrategy: + def table_name_for_insight(self, insight: sdk.Insight) -> str: + raise NotImplementedError() + + +class DefaultInsightTableNaming(InsightTableNamingStrategy): + def __init__(self): + self._uniques = dict() + + def table_name_for_insight(self, insight: sdk.Insight) -> str: + new_name = _sanitize_str_for_postgres(insight.title, self._uniques) + self._uniques[new_name] = True + + return new_name + + +class InsightColumnNamingStrategy: + def col_name_for_attribute(self, attr: sdk.InsightAttribute) -> str: + raise NotImplementedError() + + def col_name_for_measure(self, attr: sdk.InsightAttribute) -> str: + raise NotImplementedError() + + +class DefaultInsightColumnNaming(InsightColumnNamingStrategy): + def __init__(self): + self._uniques = dict() + + def col_name_for_attribute(self, attr: sdk.InsightAttribute) -> str: + new_name = _sanitize_str_for_postgres(attr.label_id, self._uniques) + self._uniques[new_name] = True + + return new_name + + def col_name_for_measure(self, measure: sdk.InsightMeasure) -> str: + # if simple measure, use the item identifier (nice, readable) + # otherwise try alias + # otherwise try title + # otherwise use local_id (arbitrary, AD created local_ids are messy) + # TODO: improve this heuristic to get better names for derived measures + id_to_use = measure.item_id or measure.alias or measure.title or measure.local_id + new_name = _sanitize_str_for_postgres(id_to_use, self._uniques) + self._uniques[new_name] = True + + return new_name + + +class CatalogNamingStrategy: + def col_name_for_label(self, attr: sdk.CatalogLabel) -> str: + raise NotImplementedError() + + def col_name_for_fact(self, attr: sdk.CatalogFact) -> str: + raise NotImplementedError() + + def col_name_for_metric(self, attr: sdk.CatalogMetric) -> str: + raise NotImplementedError() + + +class DefaultCatalogNamingStrategy: + def __init__(self): + self._uniques = dict() + + def col_name_for_label(self, label: sdk.CatalogLabel, dataset: sdk.CatalogDataset) -> str: + ds_prefix = f"{dataset.id}." + # some of our tests project have convention where fact/label is as: dataset.dataset_something + # that looks awkward in a table.. thus this funny stuff + use_id = label.id if not label.id.startswith(f"{ds_prefix}{dataset.id}") else label.id[len(ds_prefix):] + new_name = _sanitize_str_for_postgres(use_id, self._uniques) + self._uniques[new_name] = True + + return new_name + + def col_name_for_fact(self, fact: sdk.CatalogFact, dataset: sdk.CatalogDataset) -> str: + ds_prefix = f"{dataset.id}." + # some of our tests project have convention where fact/label is as: dataset.dataset_something + # that looks awkward in a table.. thus this funny stuff + use_id = fact.id if not fact.id.startswith(f"{ds_prefix}{dataset.id}") else fact.id[len(ds_prefix):] + new_name = _sanitize_str_for_postgres(use_id, self._uniques) + self._uniques[new_name] = True + + return new_name + + def col_name_for_metric(self, metric: sdk.CatalogMetric) -> str: + new_name = _sanitize_str_for_postgres(metric.id, self._uniques) + self._uniques[new_name] = True + + return new_name + + +# +# +# + +def _col_as_computable(col: ColumnDefinition): + item_type, item_id = col.options['id'].split('/') + + # since all cols are from the compute table, the uniqueness of local_id is ensured... + if item_type == 'label': + return sdk.Attribute(local_id=col.column_name, label=item_id) + else: + aggregation = col.options['agg'] if 'agg' in col.options else None + + return sdk.SimpleMeasure(local_id=col.column_name, item=sdk.ObjId(item_id, item_type), aggregation=aggregation) + + +# +# +# + +class GoodDataForeignDataWrapper(ForeignDataWrapper): + def __init__(self, options, columns): + super(GoodDataForeignDataWrapper, self).__init__(options, columns) + + if 'host' not in options or 'token' not in options: + raise ValueError("server OPTIONS must contain 'host' and 'token' keys.") + + if 'workspace' not in options: + raise ValueError( + "attempting to work with an incorrectly defined foreign table." + "Table must contain both 'workspace'.") + + _log_debug(f'initializing (options={options}, columns={columns})') + + self._host, self._token, self._workspace = itemgetter('host', 'token', 'workspace')( + options) + self._options = options + self._columns = columns + self._insight = options['insight'] if 'insight' in options else None + self._compute = options['compute'] if 'compute' in options else None + self._sdk = sdk.GoodDataSdk(host=self._host, token=self._token, extra_user_agent=_USER_AGENT) + + self._validate() + + def _validate(self): + """ + Validates column definitions, making sure that the options contain all the essential mapping metadata. + + For table mapped to an insight, each column's OPTIONS must contain localId. + For all other tables (including the 'compute' pseudo-table), each column's OPTIONS must contain 'id' + :return: + """ + if self._insight is not None: + for c in self._columns.values(): + if 'local_id' not in c.options: + raise ValueError(f"Foreign table column '{c.column_name}' is not defined correctly. " + f"For tables that map GoodData.CN insight, the column OPTIONS must specify " + f"'localId' which is localIdentifier of the Insight's bucket item. If you created " + f"this table manually, please rather use the IMPORT FOREIGN SCHEMA and import " + f"from the 'gooddata_insights' schema. The import will set everything correctly.") + + return + + for c in self._columns.values(): + if 'id' not in c.options: + raise ValueError(f"Foreign table column '{c.column_name}' is not defined correctly. " + f"For tables mapping to GoodData.CN semantic layer, the column OPTIONS must specify " + f"'id' which in format: 'fact/your.fact.id', 'label/your.label.id', " + f"'metric/your.metric.id'.") + else: + split = c.options['id'].split('/') + + if len(split) > 2 or split[0] not in ('fact', 'label', 'metric'): + raise ValueError(f"Foreign table column '{c.column_name}' is not defined correctly. " + f"For tables mapping to GoodData.CN semantic layer, the column OPTIONS must " + f"specify 'id' which in format: 'fact/your.fact.id', 'label/your.label.id', " + f"'metric/your.metric.id'. Instead got: {c.options['id']}") + + def _execute_insight(self, quals, columns, sortKeys=None): + """ + Computes data for table mapped to an insight. Note that this execution maintains insight's filters - the + table is implicitly filtered. + """ + # TODO add validation that the table columns are consistent with insight bucket items + + col_to_local_id = dict([(c.column_name, c.options['local_id']) for c in self._columns.values()]) + insight = self._sdk.insights.get_insight(self._workspace, self._insight) + table = self._sdk.tables.for_insight(self._workspace, insight) + + for result_row in table.read_all(): + row = dict() + + # TODO: it is likely that conversion to DATE/TIMESTAMP will have to happen here if the column is of + # the respective type + for column_name in columns: + row[column_name] = result_row[col_to_local_id[column_name]] + + yield row + + def get_computable_for_col_name(self, column_name): + return _col_as_computable(self._columns[column_name]) + + def _execute_compute(self, quals, columns, sortKeys=None): + """ + Computes data for the 'compute' pseudo-table. The 'compute' table is special. It does not behave as other + relational tables: the input columns determine what data will be calculated and the cardinality of the result + fully depends on the input columns. + """ + # TODO: pushdown some of the filters that are included in quals + items = [self.get_computable_for_col_name(col_name) for col_name in columns] + table = self._sdk.tables.for_items(self._workspace, items) + + # TODO: it is likely that this has to change to support DATE and TIMESTAMP. have mapping that need to be + # timestamp/date, instead of returning generator, iterate rows, convert to dates and yield the converted row + return table.read_all() + + def _execute_custom_report(self, quals, columns, sortKeys=None): + """ + Computes data for manually created table that maps to particular workspace and its columns map to label, fact or + metric in that workspace. The mapping conventions are same as for the 'compute' pseudo-table. Compared to the + pseudo-table though, the custom report execution always computes data for all columns - thus appears like + any other relational table. + """ + # TODO: pushdown some of the filters that are included in quals + items = [_col_as_computable(col) for col in self._columns.values()] + table = self._sdk.tables.for_items(self._workspace, items) + + # TODO: it is likely that this has to change to support DATE and TIMESTAMP. have mapping that need to be + # timestamp/date, instead of returning generator, iterate rows, convert to dates and yield the converted row + # note: no need to filter result rows to only those that are SELECTed.. multicorn/postgres takes care of + # that + return table.read_all() + + def execute(self, quals, columns, sortkeys=None): + _log_debug(f'query in fdw with options {self._options}; columns {type(columns)}') + + if self._insight: + return self._execute_insight(quals, columns, sortkeys) + if self._compute: + return self._execute_compute(quals, columns, sortkeys) + + return self._execute_custom_report(quals, columns, sortkeys) + + @classmethod + def import_schema(cls, schema, srv_options, options, restriction_type, restricts): + _log_info( + f"import fdw schema {schema} (srv_options={srv_options}, " + f"options={options}, restriction_type={restriction_type}, restricts={restricts})" + ) + + if 'host' not in srv_options or 'token' not in srv_options: + raise ValueError("server OPTIONS must contain 'host' and 'token' keys.") + + if 'workspace' not in options: + raise ValueError( + "gooddata_fdw: IMPORT SCHEMA OPTIONS must contain 'workspace' key " + "to indicate workspace from which to import.") + + host = srv_options['host'] + + if not host.startswith('https://') and not host.startswith('http://'): + raise ValueError('gooddata_fdw: your server is not defined correctly. ' + 'The host must start with https:// or http://') + + if schema == 'gooddata_insights': + return cls.import_insights_from_workspace(schema, srv_options, options, restriction_type, restricts) + elif schema == 'gooddata_compute': + return cls.import_semantic_layer_from_workspace(schema, srv_options, options, restriction_type, restricts) + + raise NotImplementedError( + f"This FDW does not support IMPORT FOREIGN SCHEMA for {schema}") + + @classmethod + def import_insights_from_workspace(cls, schema, srv_options, options, restriction_type, restricts): + workspace = options['workspace'] + table_naming = DefaultInsightTableNaming() + + _log_info( + f"importing insights as tables from {srv_options['host']} workspace {options['workspace']}") + + _sdk = sdk.GoodDataSdk(host=srv_options['host'], token=srv_options['token'], + extra_user_agent=_USER_AGENT) + + # TODO catalog will be needed to correctly identify cols that contain date/timestamp; skipping for now + # _log_debug(f"loading full catalog") + # catalog_service = sdk.CatalogService(client) + # catalog = catalog_service.get_full_catalog(workspace) + + _log_debug(f"loading all insights") + insights = _sdk.insights.get_insights(workspace) + + tables = [] + + for insight in insights: + table_name = table_naming.table_name_for_insight(insight) + _log_info(f"creating table def {table_name} for insight {insight.title}") + + column_naming = DefaultInsightColumnNaming() + columns = [] + + for attr in insight.attributes: + column_name = column_naming.col_name_for_attribute(attr) + _log_debug(f"creating col def {column_name} for attribute {attr}") + + col = ColumnDefinition(column_name=column_name, type_name='VARCHAR(256)', + options=dict(local_id=attr.local_id)) + columns.append(col) + + for measure in insight.measures: + column_name = column_naming.col_name_for_measure(measure) + _log_debug(f"creating col def {column_name} for measure {measure}") + + col = ColumnDefinition(column_name=column_name, type_name='DECIMAL(15,5)', + options=dict(local_id=measure.local_id)) + columns.append(col) + + table = TableDefinition(table_name=table_name, columns=columns, + options=dict(workspace=workspace, insight=insight.id)) + tables.append(table) + + return tables + + @classmethod + def import_semantic_layer_from_workspace(cls, schema, srv_options, options, restriction_type, restricts): + workspace = options['workspace'] + + _log_info( + f"importing semantic layer as tables from {srv_options['host']} workspace {options['workspace']}") + + _sdk = sdk.GoodDataSdk(host=srv_options['host'], token=srv_options['token'], + extra_user_agent=_USER_AGENT) + + catalog = _sdk.catalog.get_full_catalog(workspace) + columns = [] + naming = DefaultCatalogNamingStrategy() + + for metric in catalog.metrics: + column_name = naming.col_name_for_metric(metric) + + _log_info(f"metric {metric.id} mapped to column {column_name}") + + columns.append(ColumnDefinition(column_name=column_name, + type_name='DECIMAL(15,5)', + options=dict(id=f'metric/{metric.id}'))) + + for dataset in catalog.datasets: + for fact in dataset.facts: + column_name = naming.col_name_for_fact(fact, dataset) + + _log_info(f"fact {fact.id} mapped to column {column_name}") + + columns.append(ColumnDefinition(column_name=column_name, + type_name='DECIMAL(15,5)', + options=dict(id=f'fact/{fact.id}'))) + + for attribute in dataset.attributes: + # TODO: correctly identify cols that should be DATE or TIMESTAMP. skipping for now because + # can't be bothered doing the date conversions + for label in attribute.labels: + column_name = naming.col_name_for_label(label, dataset) + + _log_info(f"label {label.id} mapped to column {column_name}") + + columns.append(ColumnDefinition(column_name=column_name, + type_name='VARCHAR(256)', + options=dict(id=f'label/{label.id}'))) + + return [TableDefinition(table_name="compute", + columns=columns, + options=dict(workspace=workspace, compute="pseudo-table"))] + + @property + def rowid_column(self): + return super().rowid_column + + def insert(self, values): + return super().insert(values) + + def update(self, oldvalues, newvalues): + return super().update(oldvalues, newvalues) + + def delete(self, oldvalues): + return super().delete(oldvalues) diff --git a/gooddata-fdw/requirements.txt b/gooddata-fdw/requirements.txt new file mode 100644 index 000000000..f48a1d4ed --- /dev/null +++ b/gooddata-fdw/requirements.txt @@ -0,0 +1 @@ +gooddata-sdk >= 0.1 \ No newline at end of file diff --git a/gooddata-fdw/setup.py b/gooddata-fdw/setup.py new file mode 100644 index 000000000..6649c125c --- /dev/null +++ b/gooddata-fdw/setup.py @@ -0,0 +1,15 @@ +import subprocess +from setuptools import setup, find_packages, Extension + +REQUIRES = [ + "gooddata-sdk >= 0.1" +] + +setup( + name='gooddata-fdw', + version='0.1', + author='Lubomir Slivka', + license='MIT', + install_requires=REQUIRES, + packages=['gooddata_fdw'] +) diff --git a/start_gooddata_fdw.sh b/start_gooddata_fdw.sh new file mode 100755 index 000000000..3ee1f9682 --- /dev/null +++ b/start_gooddata_fdw.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eu + +docker build -t postgresql-gd . +docker run --rm -p 2543:5432 \ + -e POSTGRES_DB=gooddata \ + -e POSTGRES_USER=gooddata \ + -e POSTGRES_PASSWORD="${POSTGRES_PASSWORD}" \ + postgresql-gd postgres -c shared_preload_libraries='foreign_table_exposer' From 67cf6d0492ccefa9051e04d828150c3412deaad3 Mon Sep 17 00:00:00 2001 From: Lubo Slivka Date: Thu, 5 Aug 2021 13:17:29 +0200 Subject: [PATCH 4/4] Add initial version of pandas integration - Builds on top of SDK --- gooddata-pandas/.gitignore | 66 +++++++ gooddata-pandas/README.md | 78 +++++++++ gooddata-pandas/gooddata_pandas/__init__.py | 41 +++++ .../gooddata_pandas/data_access.py | 162 +++++++++++++++++ gooddata-pandas/gooddata_pandas/dataframe.py | 165 ++++++++++++++++++ gooddata-pandas/gooddata_pandas/series.py | 80 +++++++++ gooddata-pandas/gooddata_pandas/utils.py | 103 +++++++++++ gooddata-pandas/requirements.txt | 2 + gooddata-pandas/setup.py | 16 ++ 9 files changed, 713 insertions(+) create mode 100644 gooddata-pandas/.gitignore create mode 100644 gooddata-pandas/README.md create mode 100644 gooddata-pandas/gooddata_pandas/__init__.py create mode 100644 gooddata-pandas/gooddata_pandas/data_access.py create mode 100644 gooddata-pandas/gooddata_pandas/dataframe.py create mode 100644 gooddata-pandas/gooddata_pandas/series.py create mode 100644 gooddata-pandas/gooddata_pandas/utils.py create mode 100644 gooddata-pandas/requirements.txt create mode 100644 gooddata-pandas/setup.py diff --git a/gooddata-pandas/.gitignore b/gooddata-pandas/.gitignore new file mode 100644 index 000000000..43995bd42 --- /dev/null +++ b/gooddata-pandas/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/gooddata-pandas/README.md b/gooddata-pandas/README.md new file mode 100644 index 000000000..a442c55f8 --- /dev/null +++ b/gooddata-pandas/README.md @@ -0,0 +1,78 @@ +# GoodData to pandas adapters + +This package contains a thin layer that utilizes gooddata-sdk and allows you to conveniently create pandas series and +data frames from the computations done against semantic model in your GoodData.CN workspace. + +## Examples + +Here are a couple of introductory examples how to create indexed and not-indexed series and data frames. + +The examples show the simplest possible way to specify labels, facts or metrics to use in your series or data frames. +The factory functions allow for greater flexibility on the inputs - you can also use the objects that are normally +input to the compute model - Attribute, different types of Measures and also specify filters to apply during the +computation on the server. + +### Series + +```python +from gooddata_pandas import GoodPandas + +# initialize the adapter to work on top of GD.CN host and use the provided authentication token +gp = GoodPandas(host=HOST, token=TOKEN) + +series = gp.series(workspace_id) + +# create indexed series +indexed_series = series.indexed(index_by="label_id", data_by="measure_id") + +# create non-indexed series containing just the values of measure sliced by elements of the label +non_indexed = series.not_indexed(data_by="measure_id, granularity="label_id") +``` + +### Data Frames + +```python +from gooddata_pandas import GoodPandas + +# initialize the adapter to work on top of GD.CN host and use the provided authentication token +gp = GoodPandas(host=HOST, token=TOKEN) + +frames = gp.data_frames(workspace_id) + +# create indexed data frame +indexed_df = frames.indexed(index_by="label/label_id", columns=dict( + first_label='label/first_label_id', + second_label='label/second_label_id', + first_metric='metric/first_metric_id', + second_metric='fact/fact_id' +)) + +# create data frame with hierarchical index +indexed_df = frames.indexed(index_by=dict(first_label='label/first_label_id', + second_label='label/second_label_id'), + columns=dict(first_metric='metric/first_metric_id', + second_metric='fact/fact_id') +) + +# create non-indexed data frame +indexed_df = frames.not_indexed(columns=dict( + first_label='label/first_label_id', + second_label='label/second_label_id', + first_metric='metric/first_metric_id', + second_metric='fact/fact_id' +)) + +# creates data frame based on the contents of the insight. if the insight contains labels and measures, the data +# frame will contain index or hierarchical index. +insight_df = frames.insight('insight_id') + +# creates data frame based on the content of the items dict. if the dict contains both labels and measures, the +# frame will contain index or hierarchical index. +df = frames.for_items(items=dict( + first_label='label/first_label_id', + second_label='label/second_label_id', + first_metric='metric/first_metric_id', + second_metric='fact/fact_id' +)) + +``` diff --git a/gooddata-pandas/gooddata_pandas/__init__.py b/gooddata-pandas/gooddata_pandas/__init__.py new file mode 100644 index 000000000..e0d986919 --- /dev/null +++ b/gooddata-pandas/gooddata_pandas/__init__.py @@ -0,0 +1,41 @@ +# (C) 2021 GoodData Corporation + +from gooddata_pandas.series import GoodDataSeriesFactory +from gooddata_pandas.dataframe import DataFrameFactory +from gooddata_sdk import GoodDataSdk + + +class GoodPandas: + """ + Facade to access factories that create pandas Series and DataFrames using analytics computed by GoodData.CN. + """ + def __init__(self, host, token): + self._sdk = GoodDataSdk(host=host, token=token, extra_user_agent="gooddata-pandas/0.1") + self._series_per_ws = dict() + self._frames_per_ws = dict() + + def series(self, workspace_id): + """ + Creates factory to use for construction of pandas.Series. + + :param workspace_id: workspace to which the factory will be bound + :return: always one same instance for given workspace + :rtype: GoodDataSeriesFactory + """ + if workspace_id not in self._series_per_ws: + self._series_per_ws[workspace_id] = GoodDataSeriesFactory(sdk=self._sdk, workspace_id=workspace_id) + + return self._series_per_ws[workspace_id] + + def data_frames(self, workspace_id): + """ + Creates factory to use for construction of pandas.DataFrame. + + :param workspace_id: workspace to which the factory will be bound + :return: always one same instance for given workspace + :rtype: DataFrameFactory + """ + if workspace_id not in self._frames_per_ws: + self._frames_per_ws[workspace_id] = DataFrameFactory(sdk=self._sdk, workspace_id=workspace_id) + + return self._frames_per_ws[workspace_id] diff --git a/gooddata-pandas/gooddata_pandas/data_access.py b/gooddata-pandas/gooddata_pandas/data_access.py new file mode 100644 index 000000000..c8a3f9851 --- /dev/null +++ b/gooddata-pandas/gooddata_pandas/data_access.py @@ -0,0 +1,162 @@ +# (C) 2021 GoodData Corporation +from gooddata_sdk import ExecutionDefinition, ExecutionResponse, Attribute, Measure, Filter, GoodDataSdk +from gooddata_pandas.utils import ColumnsDef, IndexDef, _to_item, _to_attribute, _to_filters + + +def _compute(sdk: GoodDataSdk, workspace_id: str, + columns: ColumnsDef, + index_by: IndexDef = None, + filter_by: list[Filter] = None) -> tuple[ExecutionResponse, dict, dict, dict]: + """ + Creates execution-by-convention to retrieve data for frame with the provided columns that is optionally + indexed by index_by label and optionally also filtered. + + The convention is as follows: + + - If the columns contain labels and facts/metric, then two dimensional result will be created. first dim + will contain measureGroup, second dimension will be all the attributes + + - If indexing is desired, then the index label will be placed in the attribute dimension and will be the + first in that dimension + + - Otherwise the execution will be single-dim and will contain either measureGroup or all attributes + + The compute will return execution response and two mappings: + - pandas name to index where headers appear in the attribute dimension + - pandas col name to index where headers appear in measure dimension + - pandas index name to index where headers appear in the attribute dimension + """ + _index_by = dict() + + if isinstance(index_by, dict): + _index_by = index_by + elif isinstance(index_by, str): + _index_by = {0: index_by} + + attributes = [] + measures = [] + col_to_attr_idx = dict() + index_to_attr_idx = dict() + col_to_measure_idx = dict() + + for index_name, index_col in (_index_by or dict()).items(): + item = _to_attribute(index_col) + index_to_attr_idx[index_name] = len(attributes) + attributes.append(item) + + for col_name, col in columns.items(): + item = _to_item(col) + + if isinstance(item, Attribute): + # prevent double-add for attributes that are using same labels. this has no real effect on the result + # apart from extra load/size of the result that would contain the duplicates. + # + # this may typically happen when same labels are used for indexing & data + existing_attr_idx = next((idx for idx, attr in enumerate(attributes) if item.has_same_label(attr)), None) + + if existing_attr_idx is not None: + col_to_attr_idx[col_name] = existing_attr_idx + else: + col_to_attr_idx[col_name] = len(attributes) + attributes.append(item) + elif isinstance(item, Measure): + col_to_measure_idx[col_name] = len(measures) + measures.append(item) + + dimensions = [ + ['measureGroup'] if len(measures) else None, + [a.local_id for a in attributes] if len(attributes) else None + ] + + exec_def = ExecutionDefinition(attributes=attributes, + measures=measures, + filters=_to_filters(filter_by), + dimensions=dimensions) + + return sdk.compute.for_exec_def(workspace_id, exec_def), col_to_attr_idx, col_to_measure_idx, index_to_attr_idx + + +_RESULT_PAGE_LEN = 1000 + + +# +# Note: both of the extract functions assume the number of measures requested for the data frame is less than +# page limit enforced by the server. The function for getting data frame for measures only does not paging at all +# and the one that gets data from possibly two-dimensional result always pages only through the dimension that +# contains attributes. +# + +def _extract_for_measures_only(response: ExecutionResponse, cols: list, col_to_metric_idx: dict) -> dict: + exec_def = response.exec_def + result = response.read_result(len(exec_def.measures)) + data = dict() + + for col in cols: + data[col] = [result.data[col_to_metric_idx[col]]] + + return data + + +def _extract_from_attributes_and_maybe_measures(response: ExecutionResponse, cols: list, col_to_attr_idx: dict, + col_to_metric_idx: dict, + index_to_attr_idx: dict = None) -> tuple[dict, dict]: + exec_def = response.exec_def + offset = [0 for _ in exec_def.dimensions] + limit = [len(exec_def.measures), _RESULT_PAGE_LEN] if exec_def.has_measures() else [_RESULT_PAGE_LEN] + attribute_dim = 1 if exec_def.has_measures() else 0 + result = response.read_result(limit=limit, offset=offset) + + index = dict([(idx_name, []) for idx_name in index_to_attr_idx]) if index_to_attr_idx is not None else dict() + data = dict([(col, []) for col in cols]) + + while True: + for idx_name in index: + index[idx_name] += result.get_all_header_values(attribute_dim, index_to_attr_idx[idx_name]) + + for col in cols: + if col in col_to_attr_idx: + data[col] += result.get_all_header_values(attribute_dim, col_to_attr_idx[col]) + else: + data[col] += result.data[col_to_metric_idx[col]] + + if result.is_complete(attribute_dim): + break + + offset[attribute_dim] = result.next_page_start(attribute_dim) + result = response.read_result(limit=limit, offset=offset) + + return data, index + + +def compute_and_extract(sdk: GoodDataSdk, workspace_id: str, + columns: ColumnsDef, + index_by: IndexDef = None, + filter_by: list[Filter] = None) -> tuple[dict, dict]: + """ + Convenience function to drive computation & data extraction on behalf of the series and data frame factories. + + Given data columns and index columns, this function will create AFM execution and then read the results and + populate data and index dicts. + + For each column in `columns`, the returned data will contain key under which there is array of data for that column + For each index in index_by, the returned data will contain key under which there is array with data to construct the + index. When there are multiple indexes, feed the indexes to MultiIndex.from_arrays(). + + Note that as convenience it is possible to pass just single index. in that case the index dict will contain exactly + one key of '0' (just get first value from dict when consuming the result). + """ + result = _compute(sdk=sdk, workspace_id=workspace_id, + index_by=index_by, + columns=columns, + filter_by=filter_by) + + response, col_to_attr_idx, col_to_metric_idx, index_to_attr_idx = result + + exec_def = response.exec_def + cols = list(columns.keys()) + + if not exec_def.has_attributes(): + return _extract_for_measures_only(response, cols, col_to_metric_idx), dict() + else: + return _extract_from_attributes_and_maybe_measures(response, cols, col_to_attr_idx, col_to_metric_idx, + index_to_attr_idx) diff --git a/gooddata-pandas/gooddata_pandas/dataframe.py b/gooddata-pandas/gooddata_pandas/dataframe.py new file mode 100644 index 000000000..8ba5468c0 --- /dev/null +++ b/gooddata-pandas/gooddata_pandas/dataframe.py @@ -0,0 +1,165 @@ +# (C) 2021 GoodData Corporation +import pandas + +from gooddata_pandas.data_access import compute_and_extract +from gooddata_pandas.utils import DefaultInsightColumnNaming, IndexDef, ColumnsDef, _to_item +from gooddata_sdk import GoodDataSdk, Filter, Attribute, Measure + + +class DataFrameFactory: + """ + Factory to create pandas.DataFrame instances. + + There are several methods in place that should provide for convenient construction of data frames: + + - indexed() - calculate measure values sliced by one or more labels, indexed by those labels + - not_indexed() - calculate measure values sliced by one or more labels, but not indexed by those labels, + label values will be part of the DataFrame and will be in the same row as the measure values calculated + for them + - for_items() - calculate measure values for a one or more items which may be labels or measures. Depending + what items you specify, this method will create DataFrame with or without index + - for_insight() - calculate DataFrame for insight created by GoodData.CN Analytical Designer. Depending + on what items are in the insight, this method will create DataFrame with or without index. + + Note that all of these methods have additional levels of convenience and flexibility so their purpose is not + limited to just what is listed above. + """ + def __init__(self, sdk: GoodDataSdk, workspace_id: str): + self._sdk = sdk + self._workspace_id = workspace_id + + def indexed(self, index_by: IndexDef, columns: ColumnsDef, filter_by: list[Filter] = None) -> pandas.DataFrame: + """ + Creates a data frame indexed by values of the label. The data frame columns will be created from either + metrics or other label values. + + The computation to obtain data from GoodData.CN workspace will use all labels that you specify for both + indexing and in columns to aggregate values of metric columns. + + Note that depending on composition of the labels, the DataFrame's index may or may not be unique. + + :param index_by: one or more labels to index by; specify either: + - string with id: 'some_label_id', + - object identifier: ObjId(id='some_label_id', type='label'), + - string representation of object identifier: 'label/some_label_id' + - or an Attribute object used in the compute model: Attribute(local_id=..., label='some_label_id'), + - dict containing mapping of index name to label to use for indexing - specified in one of the ways list above + :param columns: dict mapping column name to its definition; column may be specified as: + - object identifier: ObjId(id='some_id', type='') - where type is either 'label', 'fact' or 'metric' + - string representation of object identifier: '/some_id' - where type is either 'label', 'fact' or 'metric' + - Attribute object used in the compute model: Attribute(local_id=..., label='some_label_id') + - subclass of Measure object used in the compute model: SimpleMeasure, PopDateMeasure, PopDatasetMeasure, ArithmeticMeasure + :param filter_by: filters to apply during computation on the server + :return: + """ + data, index = compute_and_extract(self._sdk, self._workspace_id, columns=columns, index_by=index_by, + filter_by=filter_by) + _idx = None + if len(index) == 1: + _idx = pandas.Index(list(index.values())[0]) + elif len(index) > 1: + _idx = pandas.MultiIndex.from_arrays(list(index.values()), names=list(index.keys())) + + return pandas.DataFrame(data=data, index=_idx) + + def not_indexed(self, columns: ColumnsDef, + filter_by: list[Filter] = None) -> pandas.DataFrame: + """ + Creates a data frame with columns created from metrics and or labels. + + The computation to obtain data from GoodData.CN workspace will use all labels that you specify for both columns + to aggregate values of metric columns. + + :param columns: dict mapping column name to its definition; column may be specified as: + - object identifier: ObjId(id='some_id', type='') - where type is either 'label', 'fact' or 'metric' + - string representation of object identifier: '/some_id' - where type is either 'label', 'fact' or 'metric' + - Attribute object used in the compute model: Attribute(local_id=..., label='some_label_id') + - subclass of Measure object used in the compute model: SimpleMeasure, PopDateMeasure, PopDatasetMeasure, ArithmeticMeasure + :param filter_by: optionally specify filters to apply during computation on the server + :return: + """ + + data, _ = compute_and_extract(self._sdk, self._workspace_id, columns=columns, filter_by=filter_by) + + return pandas.DataFrame(data=data) + + def for_items(self, items: ColumnsDef, filter_by: list[Filter] = None, auto_index=True): + """ + Creates a data frame for a named items. This is a convenience method that will create DataFrame with or + without index based on the context of the items that you pass. + + - If items contain labels and measures, then DataFrame with index will be created. If there is more than + one label among the items, then hierarchical index will be created. + + You can turn this behavior using 'auto_index' parameter. + + - Otherwise DataFrame without index will be created and will contain column per item. + + You may also optionally specify filters to apply during the computation on the server. + + :param items: dict mapping item name to its definition; item may be specified as: + - object identifier: ObjId(id='some_id', type='') - where type is either 'label', 'fact' or 'metric' + - string representation of object identifier: '/some_id' - where type is either 'label', 'fact' or 'metric' + - Attribute object used in the compute model: Attribute(local_id=..., label='some_label_id') + - subclass of Measure object used in the compute model: SimpleMeasure, PopDateMeasure, PopDatasetMeasure, ArithmeticMeasure + :param filter_by: optionally specify filters to apply during computation on the server + :param auto_index: optionally force creation of DataFrame without index even if the contents of items make it + eligible for indexing + :return: + """ + resolved_attr_cols = dict() + resolved_measure_cols = dict() + has_attributes = False + has_measures = False + + for col_name, col_def in items.items(): + item = _to_item(col_def) + + if isinstance(item, Attribute): + has_attributes = True + resolved_attr_cols[col_name] = item + else: + has_measures = True + resolved_measure_cols[col_name] = item + + if not auto_index or not has_measures or not has_attributes: + columns = {**resolved_attr_cols, **resolved_measure_cols} + + return self.not_indexed(columns=columns, filter_by=filter_by) + + return self.indexed(index_by=resolved_attr_cols, columns=resolved_measure_cols, filter_by=filter_by) + + def for_insight(self, insight_id: str, auto_index=True) -> pandas.DataFrame: + """ + Creates a data frame with columns based on the content of the insight with the provided identifier. The + filters that are set on the insight will be applied and used for the server-side computation of the data + for the data frame. + + This method will create DataFrame with or without index - depending on the contents of the insight. The + rules are as follows: + + - if the insight contains both attributes and measures, it will be mapped to a DataFrame with index + - if there are multiple attributes, hieararchical index (pandas.MultiIndex) will be used + - otherwise a normal index will be used (pandas.Index) + - you can use the option 'auto_index' argument to disable this logic and force no indexing + + - if the insight contains either only attributes or only measures, then DataFrame will not be indexed + and all attribute or measures values will be used as data. + + Note that if the insight consists of single measure only, the resulting data frame is guaranteed to have + single 'row' of data with one column per measure. + + :param insight_id: insight identifier + :param auto_index: optionally force creation of DataFrame without index even if the data in the insight is + eligible for indexing + :return: + """ + naming = DefaultInsightColumnNaming() + insight = self._sdk.insights.get_insight(workspace_id=self._workspace_id, insight_id=insight_id) + filter_by = [f.as_computable() for f in insight.filters] + columns = dict( + [(naming.col_name_for_attribute(a), a.as_computable()) for a in insight.attributes] + + [(naming.col_name_for_measure(m), m.as_computable()) for m in insight.measures] + ) + + return self.for_items(columns, filter_by=filter_by, auto_index=auto_index) diff --git a/gooddata-pandas/gooddata_pandas/series.py b/gooddata-pandas/gooddata_pandas/series.py new file mode 100644 index 000000000..d2a82680c --- /dev/null +++ b/gooddata-pandas/gooddata_pandas/series.py @@ -0,0 +1,80 @@ +# (C) 2021 GoodData Corporation +from typing import Union + +import pandas +from gooddata_pandas.data_access import compute_and_extract +from gooddata_pandas.utils import IndexDef, LabelItemDef +from gooddata_sdk import GoodDataSdk, Attribute, SimpleMeasure, Filter, ObjId + + +class GoodDataSeriesFactory: + def __init__(self, sdk: GoodDataSdk, workspace_id: str): + self._sdk = sdk + self._workspace_id = workspace_id + + def indexed(self, index_by: IndexDef, data_by: Union[SimpleMeasure, str, ObjId, Attribute], + filter_by: Union[Filter, list[Filter]] = None) -> pandas.Series: + """ + Creates pandas Series from data points calculated from a single `data_by` that will be computed on granularity + of the index labels. The elements of the index labels will be used to construct simple or hierarchical index. + + :param index_by: label to index by; specify either: + - string with id: 'some_label_id', + - object identifier: ObjId(id='some_label_id', type='label'), + - string representation of object identifier: 'label/some_label_id' + - or an Attribute object used in the compute model: Attribute(local_id=..., label='some_label_id') + - dict containing mapping of index name to label to use for indexing - specified in one of the ways list above + :param data_by: label, fact or metric to that will provide data (measure values or label elements); specify either: + - object identifier: ObjId(id='some_id', type='') - where type is either 'label', 'fact' or 'metric' + - string representation of object identifier: '/some_id' - where type is either 'label', 'fact' or 'metric' + - Attribute object used in the compute model: Attribute(local_id=..., label='some_label_id') + - SimpleMeasure object used in the compute model: SimpleMeasure(local_id=..., item=..., aggregation=...) + :param filter_by: optionally specify filter to apply during computation on the server + :return: + """ + data, index = compute_and_extract(self._sdk, self._workspace_id, index_by=index_by, + columns={'_series': data_by}, filter_by=filter_by) + + _idx = None + if len(index) == 1: + _idx = pandas.Index(list(index.values())[0]) + elif len(index) > 1: + _idx = pandas.MultiIndex.from_arrays(list(index.values()), names=list(index.keys())) + + return pandas.Series(data=data['_series'], index=_idx) + + def not_indexed(self, data_by: Union[SimpleMeasure, str, ObjId, Attribute], + granularity: Union[list[LabelItemDef], IndexDef] = None, + filter_by: Union[Filter, list[Filter]] = None) -> pandas.Series: + """ + Creates pandas Series from data points calculated from a single `data_by` that will be computed on granularity + of the specified labels. No index will be constructed. + + Note that data_by may also be a label in which case the Series will contain label elements. + + :param data_by: label, fact or metric to get data from; specify either: + - object identifier: ObjId(id='some_id', type='') - where type is either 'label', 'fact' or 'metric' + - string representation of object identifier: '/some_id' - where type is either 'label', 'fact' or 'metric' + - Attribute object used in the compute model: Attribute(local_id=..., label='some_label_id') + - SimpleMeasure object used in the compute model: SimpleMeasure(local_id=..., item=..., aggregation=...) + :param granularity: optionally specify label to slice the metric by; specify either: + - string with id: 'some_label_id', + - object identifier: ObjId(id='some_label_id', type='label'), + - string representation of object identifier: 'label/some_label_id' + - or an Attribute object used in the compute model: Attribute(local_id=..., label='some_label_id') + - list containing multiple labels to slice the metric by - specified in one of the ways list above + - dict containing mapping of index name to label to use for indexing - specified in one of the ways list above; + this option is available so that you can easily switch from indexed factory method to this one if needed + :param filter_by: optionally specify filter to apply during computation on the server + :return: + """ + + if isinstance(granularity, list): + _index = dict([(idx, label) for idx, label in enumerate(granularity)]) + else: + _index = granularity + + data, _ = compute_and_extract(self._sdk, self._workspace_id, index_by=granularity, + columns={'_series': data_by}, filter_by=filter_by) + + return pandas.Series(data=data['_series']) diff --git a/gooddata-pandas/gooddata_pandas/utils.py b/gooddata-pandas/gooddata_pandas/utils.py new file mode 100644 index 000000000..c3ebd93c8 --- /dev/null +++ b/gooddata-pandas/gooddata_pandas/utils.py @@ -0,0 +1,103 @@ +# (C) 2021 GoodData Corporation +import uuid +from typing import Union + +from gooddata_sdk import Attribute, SimpleMeasure, Measure, Filter, ObjId, InsightAttribute, InsightMeasure + +LabelItemDef = Union[Attribute, ObjId, str] +DataItemDef = Union[Attribute, Measure, ObjId, str] +IndexDef = Union[LabelItemDef, dict[str, LabelItemDef]] +ColumnsDef = dict[str, DataItemDef] + + +def _unique_local_id(): + return uuid.uuid4().hex.replace('-', '') + + +def _try_obj_id(val): + if isinstance(val, str): + split = val.split('/') + _type = split[0] + + if _type in ['label', 'metric', 'fact']: + return ObjId(id='/'.join(split[1:]), type=_type) + + return val + + +def _to_attribute(val: LabelItemDef) -> Attribute: + _val = _try_obj_id(val) + + if isinstance(_val, Attribute): + return _val + elif isinstance(_val, ObjId): + return Attribute(local_id=_unique_local_id(), label=_val) + elif isinstance(_val, str): + return Attribute(local_id=_unique_local_id(), label=val) + + raise ValueError(f"Invalid attribute input: {val}") + + +def _to_simple_metric(val: Union[SimpleMeasure, str, ObjId]) -> SimpleMeasure: + _val = _try_obj_id(val) + + if isinstance(_val, SimpleMeasure): + return _val + elif isinstance(_val, ObjId): + return SimpleMeasure(local_id=_unique_local_id(), item=_val) + elif isinstance(_val, str): + return SimpleMeasure(local_id=_unique_local_id(), item=ObjId(_val, "metric")) + + raise ValueError(f"Invalid metric input: {val}") + + +def _to_filters(val: Union[Filter, list[Filter]]) -> list[Filter]: + if isinstance(val, Filter): + return [val] + + return val + + +def _to_item(val: DataItemDef) -> Union[Attribute, Measure]: + _val = _try_obj_id(val) + + if isinstance(_val, (Attribute, Measure)): + return val + elif isinstance(_val, ObjId): + if _val.type in ['fact', 'metric']: + return SimpleMeasure(local_id=_unique_local_id(), item=_val) + else: + return Attribute(local_id=_unique_local_id(), label=_val) + + raise ValueError(f"Invalid column_by item {val}") + + +class DefaultInsightColumnNaming: + def __init__(self): + self._uniques = dict() + + def _ensure_unique(self, candidate): + # ensure column name uniqueness - in a dumb way by appending some number + if candidate in self._uniques: + i = 1 + new_candidate = f'{candidate}_{i}' + + while new_candidate in self._uniques: + i += 1 + new_candidate = f'{candidate}_{i}' + + return new_candidate + + return candidate + + def col_name_for_attribute(self, attr: InsightAttribute) -> str: + return self._ensure_unique(attr.label_id) + + def col_name_for_measure(self, measure: InsightMeasure) -> str: + # if simple measure, use the item identifier (nice, readable) + # otherwise try alias + # otherwise try title + # otherwise use local_id (arbitrary, AD created local_ids are messy) + id_to_use = measure.item_id or measure.alias or measure.title or measure.local_id + + return self._ensure_unique(id_to_use) diff --git a/gooddata-pandas/requirements.txt b/gooddata-pandas/requirements.txt new file mode 100644 index 000000000..9d01aaefc --- /dev/null +++ b/gooddata-pandas/requirements.txt @@ -0,0 +1,2 @@ +gooddata-sdk >= 0.1 +pandas diff --git a/gooddata-pandas/setup.py b/gooddata-pandas/setup.py new file mode 100644 index 000000000..e8f8e6c27 --- /dev/null +++ b/gooddata-pandas/setup.py @@ -0,0 +1,16 @@ +import subprocess +from setuptools import setup, find_packages, Extension + +REQUIRES = [ + "gooddata-sdk >= 0.1", + "pandas" +] + +setup( + name='gooddata-pandas', + version='0.1', + author='Lubomir Slivka', + license='MIT', + install_requires=REQUIRES, + packages=['gooddata_pandas'] +)