From 6b6a10e6e4778d9663361019bee8e25d22620949 Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Wed, 16 Aug 2023 22:51:00 +0100 Subject: [PATCH 01/12] Mark search results as Iterable Signed-off-by: Christopher Grote --- pyatlan/client/atlan.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyatlan/client/atlan.py b/pyatlan/client/atlan.py index 1368cd90a..e45842c40 100644 --- a/pyatlan/client/atlan.py +++ b/pyatlan/client/atlan.py @@ -12,7 +12,7 @@ import time import uuid from abc import ABC -from typing import ClassVar, Generator, Optional, Type, TypeVar, Union +from typing import ClassVar, Generator, Iterable, Optional, Type, TypeVar, Union import requests from pydantic import ( @@ -250,7 +250,7 @@ class AtlanClient(BaseSettings): class Config: env_prefix = "atlan_" - class SearchResults(ABC): + class SearchResults(ABC, Iterable): """ Abstract class that encapsulates results returned by various searches. """ @@ -335,7 +335,7 @@ def __iter__(self) -> Generator[Asset, None, None]: if not self.next_page(): break - class IndexSearchResults(SearchResults): + class IndexSearchResults(SearchResults, Iterable): """ Captures the response from a search against Atlan. Also provides the ability to iteratively page through results, without needing to track or re-run the original @@ -375,7 +375,7 @@ def _get_next_page(self): def count(self) -> int: return self._count - class LineageListResults(SearchResults): + class LineageListResults(SearchResults, Iterable): """ Captures the response from a lineage retrieval against Atlan. Also provides the ability to iteratively page through results, without needing to track or re-run the original query. From 53bab5d92001632851194d0747cc989c88dabcdb Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Mon, 21 Aug 2023 16:04:17 +0100 Subject: [PATCH 02/12] Search simplification (in progress) Signed-off-by: Christopher Grote --- pyatlan/cache/custom_metadata_cache.py | 48 +++ pyatlan/model/fields/atlan_fields.py | 404 +++++++++++++++++++++++++ pyatlan/model/fields/referenceable.py | 49 +++ pyatlan/model/fluent_search.py | 394 ++++++++++++++++++++++++ 4 files changed, 895 insertions(+) create mode 100644 pyatlan/model/fields/atlan_fields.py create mode 100644 pyatlan/model/fields/referenceable.py create mode 100644 pyatlan/model/fluent_search.py diff --git a/pyatlan/cache/custom_metadata_cache.py b/pyatlan/cache/custom_metadata_cache.py index 4112c3308..dffa67d5b 100644 --- a/pyatlan/cache/custom_metadata_cache.py +++ b/pyatlan/cache/custom_metadata_cache.py @@ -14,6 +14,7 @@ class CustomMetadataCache: """ cache_by_id: dict[str, CustomMetadataDef] = dict() + attr_cache_by_id: dict[str, AttributeDef] = dict() map_id_to_name: dict[str, str] = dict() map_name_to_id: dict[str, str] = dict() map_attr_id_to_name: dict[str, dict[str, str]] = dict() @@ -40,6 +41,7 @@ def refresh_cache(cls) -> None: cls.map_attr_name_to_id = {} cls.archived_attr_ids = {} cls.cache_by_id = {} + cls.attr_cache_by_id = {} for cm in response.custom_metadata_defs: type_id = cm.name type_name = cm.display_name @@ -53,6 +55,7 @@ def refresh_cache(cls) -> None: attr_id = str(attr.name) attr_name = str(attr.display_name) cls.map_attr_id_to_name[type_id][attr_id] = attr_name + cls.attr_cache_by_id[attr_id] = attr if attr.options and attr.options.is_archived: cls.archived_attr_ids[attr_id] = attr_name elif attr_name in cls.map_attr_name_to_id[type_id]: @@ -213,6 +216,14 @@ def _get_attributes_for_search_results(cls, set_id: str) -> Optional[list[str]]: return [f"{set_id}.{idstr}" for idstr in attr_ids] return None + @classmethod + def _get_attribute_for_search_results( + cls, set_id: str, attr_name: str + ) -> Optional[str]: + if sub_map := cls.map_attr_name_to_id.get(set_id): + return sub_map.get(attr_name, None) + return None + @classmethod def get_attributes_for_search_results(cls, set_name: str) -> Optional[list[str]]: """ @@ -228,6 +239,25 @@ def get_attributes_for_search_results(cls, set_name: str) -> Optional[list[str]] return cls._get_attributes_for_search_results(set_id) return None + @classmethod + def get_attribute_for_search_results( + cls, set_name: str, attr_name: str + ) -> Optional[str]: + """ + Retrieve a single custom attribute name to include on search results. + + :param set_name: human-readable name of the custom metadata set for which to retrieve the custom metadata + attribute name + :param attr_name: human-readable name of the attribute + :returns: the attribute name, strictly useful for inclusion in search results + """ + if set_id := cls.get_id_for_name(set_name): + if attr_id := cls._get_attribute_for_search_results(set_id, attr_name): + return attr_id + cls.refresh_cache() + return cls._get_attribute_for_search_results(set_id, attr_name) + return None + @classmethod def get_custom_metadata_def(cls, name: str) -> CustomMetadataDef: """ @@ -243,3 +273,21 @@ def get_custom_metadata_def(cls, name: str) -> CustomMetadataDef: return typedef else: raise ValueError(f"No custom metadata with the name: {name} found") + + @classmethod + def get_attribute_def(cls, attr_id: str) -> AttributeDef: + """ + Retrieve a specific custom metadata attribute definition by its unique Atlan-internal ID string. + + :param attr_id: Atlan-internal ID string for the custom metadata attribute + :returns: attribute definition for the custom metadata attribute + """ + if not attr_id: + raise ValueError( + "No custom metadata attribute ID was provided, cannot lookup attribute definition." + ) + if cls.attr_cache_by_id is None: + cls.refresh_cache() + if attr_def := cls.attr_cache_by_id.get(attr_id): + return attr_def + raise ValueError(f"No custom metadata attribute with the id: {attr_id} found") diff --git a/pyatlan/model/fields/atlan_fields.py b/pyatlan/model/fields/atlan_fields.py new file mode 100644 index 000000000..32aef1d9c --- /dev/null +++ b/pyatlan/model/fields/atlan_fields.py @@ -0,0 +1,404 @@ +from abc import ABC +from typing import Union + +from pydantic import StrictStr + +from pyatlan.model.enums import SortOrder +from pyatlan.model.search import ( + Exists, + Match, + Prefix, + Query, + Range, + SortItem, + Term, + Terms, +) +from pyatlan.model.typedef import AttributeDef + + +class AtlanField(ABC): + """ + Base enumeration of all attributes that exist in Atlan, so you do not have to remember their + exact spelling or capitalization. + """ + + atlan_field_name: StrictStr + + +class RelationField(AtlanField): + """ + Represents any field used to capture a relationship in Atlan, which is not inherently + searchable. + """ + + def __init__(self, atlan: StrictStr): + """ + Default constructor. + + :param atlan: name of the attribute in the metastore + """ + self.atlan_field_name = atlan + + +class SearchableField(AtlanField): + """ + Base class for any field in Atlan that can be searched. + """ + + elastic_field_name: StrictStr + + def __init__(self, atlan: StrictStr, elastic: StrictStr): + """ + Default constructor. + + :param atlan: name of the attribute in the metastore + :param elastic: name of the field in the search index + """ + self.atlan_field_name = atlan + self.elastic_field_name = elastic + + def exists(self) -> Query: + """ + Returns a query that will only match assets that have some non-null, non-empty value + (no matter what actual value) for the field. + + :returns: a query that will only match assets that have some non-null, non-empty value for the field + """ + return Exists(field=self.elastic_field_name) + + def order(self, order: SortOrder = SortOrder.ASCENDING) -> SortItem: + """ + Returns a condition to sort results by the field, in the specified order. + + :param order: in which to sort the results + :returns: sort condition for the field, in the specified order + """ + return SortItem(field=self.elastic_field_name, order=order) + + +class BooleanField(SearchableField): + """ + Represents any field in Atlan that can be searched only by truthiness. + """ + + def __init__(self, atlan: StrictStr, boolean: StrictStr): + """ + Default constructor. + + :param atlan: name of the attribute in the metastore + :param boolean: name of the bool field in the search index + """ + super().__init__(atlan, boolean) + + @property + def boolean_field_name(self) -> str: + """ + Returns the name of the boolean field index for this attribute in Elastic. + + :returns: the field name for the boolean index on this attribute + """ + return self.elastic_field_name + + def eq(self, value: bool) -> Query: + """ + Returns a query that will match all assets whose field has a value that exactly equals + the provided boolean value. + + :param value: the value (bool) to check the field's value is exactly equal to + :returns: a query that will only match assets whose value for the field is exactly equal to the boolean value + provided + """ + return Term(field=self.boolean_field_name, value=value) + + +class KeywordField(SearchableField): + """ + Represents any field in Atlan that can be searched only by keyword (no text-analyzed fuzziness). + """ + + def __init__(self, atlan: str, keyword: str): + """ + Default constructor. + + :param atlan: name of the attribute in the metastore + :param keyword: name of the keyword field in the search index + """ + super().__init__(atlan, keyword) + + @property + def keyword_field_name(self) -> str: + """ + Returns the name of the keyword field index for this attribute in Elastic. + + :returns: the field name for the keyword index on this attribute + """ + return self.elastic_field_name + + def startswith(self, value: str, case_insensitive: bool = False) -> Query: + """ + Returns a query that will match all assets whose field has a value that starts with + the provided value. Note that this can als obe a case-insensitive match. + + :param value: the value (prefix) to check the field's value starts with + :param case_insensitive: if True, will match the value irrespective of case, otherwise will be a case-sensitive + match + :returns: a query that will only match assets whose value for the field starts with the value provided + """ + return Prefix( + field=self.keyword_field_name, + value=value, + case_insensitive=case_insensitive, + ) + + def eq(self, value: str, case_insensitive: bool = False) -> Query: + """ + Returns a query that will match all assets whose field has a value that exactly matches + the provided string value. + + :param value: the value (string) to check the field's value is exactly equal to + :param case_insensitive: if True, will match the value irrespective of case, otherwise will be a case-sensitive + match + :returns: a query that will only match assets whose value for the field is exactly equal to the value provided + """ + return Term( + field=self.keyword_field_name, + value=value, + case_insensitive=case_insensitive, + ) + + def within(self, values: list[str]) -> Query: + """ + Returns a query that will match all assets whose field has a value that exactly matches + at least one of the provided string values. + + :param values: the values (strings) to check the field's value is exactly equal to + :returns: a query that will only match assets whose value for the field is exactly equal to at least one of + the values provided + """ + return Terms(field=self.keyword_field_name, values=values) + + +class TextField(SearchableField): + """ + Represents any field in Atlan that can only be searched using text-related search operations. + """ + + def __init__(self, atlan: str, text: str): + """ + Default constructor. + + :param atlan: name of the attribute in the metastore + :param text: name of the text field in the search index + """ + super().__init__(atlan, text) + + @property + def text_field_name(self) -> str: + """ + Returns the name of the text field index for this attribute in Elastic. + + :returns: the field name for the text index on this attribute + """ + return self.elastic_field_name + + def match(self, value: str) -> Query: + """ + Returns a query that will textually match the provided value against the field. This + analyzes the provided value according to the same analysis carried out on the field + (for example, tokenization, stemming, and so on). + + :param value: the string value to match against + :returns: a query that will only match assets whose analyzed value for the field matches the value provided + (which will also be analyzed) + """ + return Match( + field=self.text_field_name, + query=value, + ) + + +class NumericField(SearchableField): + """ + Represents any field in Atlan that can be searched using only numeric search operations. + """ + + def __init__(self, atlan: str, numeric: str): + """ + Default constructor. + + :param atlan: name of the attribute in the metastore + :param numeric: name of the numeric field in the search index + """ + super().__init__(atlan, numeric) + + @property + def numeric_field_name(self) -> str: + """ + Returns the name of the numeric field index for this attribute in Elastic. + + :returns: the field name for the numeric index on this attribute + """ + return self.elastic_field_name + + def eq(self, value: Union[int, float]) -> Query: + """ + Returns a query that will match all assets whose field has a value that exactly + matches the provided numeric value. + + :param: value the numeric value to exactly match + :returns: a query that will only match assets whose value for the field is exactly the numeric value provided + """ + return Term(field=self.numeric_field_name, value=value) + + def gt(self, value: Union[int, float]) -> Query: + """ + Returns a query that will match all assets whose field has a value that is strictly + greater than the provided numeric value. + + :param value: the numeric value to compare against + :returns: a query that will only match assets whose value for the field is strictly greater than the numeric + value provided + """ + return Range(field=self.numeric_field_name, gt=value) + + def gte(self, value: Union[int, float]) -> Query: + """ + Returns a query that will match all assets whose field has a value that is greater + than or equal to the provided numeric value. + + :param value: the numeric value to compare against + :returns: a query that will only match assets whose value for the field is greater than or equal to the numeric + value provided + """ + return Range(field=self.numeric_field_name, gte=value) + + def lt(self, value: Union[int, float]) -> Query: + """ + Returns a query that will match all assets whose field has a value that is strictly + less than the provided numeric value. + + :param value: the numeric value to compare against + :returns: a value that will only match assets whose value for the field is strictly less than the numeric + value provided + """ + return Range(field=self.numeric_field_name, lt=value) + + def lte(self, value: Union[int, float]) -> Query: + """ + Returns a query that will match all assets whose field has a value that is less + than or equal to the provided numeric value. + + :param value: the numeric value to compare against + :returns: a query that will only match assets whose value for the field is less than or equal to the numeric + value provided + """ + return Range(field=self.numeric_field_name, lte=value) + + def between(self, minimum: Union[int, float], maximum: Union[int, float]) -> Query: + """ + Returns a query that will match all assets whose field has a value between the minimum and + maximum specified values, inclusive. + """ + return Range(field=self.numeric_field_name, gte=minimum, lte=maximum) + + +class NumericRankField(NumericField): + """ + Represents any field in Atlan that can be searched using only numeric search operations, + but also has a rank-orderable index. + """ + + rank_field_name: str + + def __init__(self, atlan: str, numeric: str, rank: str): + """ + Default constructor. + + :param atlan: name of the attribute in the metastore + :param numeric: name of the numeric field in the search index + :param rank: name of the rank orderable field in the search index + """ + super().__init__(atlan, numeric) + self.rank_field_name = rank + + +class KeywordTextField(KeywordField, TextField): + """ + Represents any field in Atlan that can be searched by keyword or text-based search operations. + """ + + _text_field_name: str + + def __init__(self, atlan: str, keyword: str, text: str): + """ + Default constructor. + + :param atlan: name of the attribute in the metastore + :param keyword: name of the keyword field in the search index + :param text: name of the text field in the search index + """ + super(KeywordField, self).__init__(atlan, keyword) + self._text_field_name = text + + @property + def text_field_name(self) -> str: + return self._text_field_name + + +class KeywordTextStemmedField(KeywordTextField): + """ + Represents any field in Atlan that can be searched by keyword or text-based search operations, + including a stemmed variation of the text analyzers. + """ + + stemmed_field_name: str + + def __init__(self, atlan: str, keyword: str, text: str, stemmed: str): + """ + Default constructor. + + :param atlan: name of the attribute in the metastore + :param keyword: name of the keyword field in the search index + :param text: name of the text field in the search index + :param stemmed: name of the stemmed text field in the search index + """ + super().__init__(atlan, keyword, text) + self.stemmed_field_name = stemmed + + def match_stemmed(self, value: StrictStr) -> Query: + """ + Returns a query that will textually match the provided value against the field. This + analyzes the provided value according to the same analysis carried out on the field + (for example, tokenization and stemming). + + :param value: the string value to match against + :returns: a query that will only match assets whose analyzed value for the field matches the value provided + (which will also be analyzed) + """ + return Match(field=self.stemmed_field_name, query=value) + + +class CustomMetadataField(SearchableField): + """ + Utility class to simplify searching for values on custom metadata attributes. + """ + + set_name: str + attribute_name: str + attribute_def: AttributeDef + + def __init__(self, set_name: str, attribute_name: str): + from pyatlan.cache.custom_metadata_cache import CustomMetadataCache + + super().__init__( + CustomMetadataCache.get_attribute_for_search_results( + set_name, attribute_name + ), + CustomMetadataCache.get_attr_id_for_name(set_name, attribute_name), + ) + self.set_name = set_name + self.attribute_name = attribute_name + self.attribute_def = CustomMetadataCache.get_attribute_def( + self.elastic_field_name + ) diff --git a/pyatlan/model/fields/referenceable.py b/pyatlan/model/fields/referenceable.py new file mode 100644 index 000000000..7cc958942 --- /dev/null +++ b/pyatlan/model/fields/referenceable.py @@ -0,0 +1,49 @@ +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, +) + + +class ReferenceableFields: + + TYPE_NAME = KeywordTextField("typeName", "__typeName.keyword", "__typeName") + """Type of the asset. For example Table, Column, and so on.""" + + GUID = KeywordField("guid", "__guid") + """Globally unique identifier (GUID) of any object in Atlan.""" + + CREATED_BY = KeywordField("createdBy", "__createdBy") + """Atlan user who created this asset.""" + + UPDATED_BY = KeywordField("updatedBy", "__modifiedBy") + """Atlan user who last updated the asset.""" + + STATUS = KeywordField("status", "__state") + """Asset status in Atlan (active vs deleted).""" + + ATLAN_TAGS = KeywordTextField( + "classificationNames", "__traitNames", "__classificationsText" + ) + """ + All directly-assigned Atlan tags that exist on an asset, searchable by internal hashed-string ID of the Atlan tag. + """ + + PROPAGATED_ATLAN_TAGS = KeywordTextField( + "classificationNames", "__propagatedTraitNames", "__classificationsText" + ) + """All propagated Atlan tags that exist on an asset, searchable by internal hashed-string ID of the Atlan tag.""" + + ASSIGNED_TERMS = KeywordTextField("meanings", "__meanings", "__meaningsText") + """All terms attached to an asset, searchable by the term's qualifiedName.""" + + SUPER_TYPE_NAMES = KeywordTextField( + "typeName", "__superTypeNames.keyword", "__superTypeNames" + ) + """All super types of an asset.""" + + CREATE_TIME = NumericField("createTime", "__timestamp") + """Time (in milliseconds) when the asset was created.""" + + UPDATE_TIME = NumericField("updateTime", "__modificationTimestamp") + """Time (in milliseconds) when the asset was last updated.""" diff --git a/pyatlan/model/fluent_search.py b/pyatlan/model/fluent_search.py new file mode 100644 index 000000000..21b2f0efb --- /dev/null +++ b/pyatlan/model/fluent_search.py @@ -0,0 +1,394 @@ +from __future__ import annotations + +import dataclasses +from typing import Optional, Union, cast + +from pyatlan.model.enums import EntityStatus +from pyatlan.model.fields.atlan_fields import AtlanField +from pyatlan.model.fields.referenceable import ReferenceableFields +from pyatlan.model.search import DSL, Bool, IndexSearchRequest, Query, SortItem + + +@dataclasses.dataclass +class CompoundQuery: + """ + Class to compose compound queries combining various conditions. + """ + + wheres: Optional[list[Query]] = None + where_nots: Optional[list[Query]] = None + where_somes: Optional[list[Query]] = None + _min_somes: int = 1 + + @staticmethod + def active_assets() -> Query: + """ + Returns a query that will only match assets that are active in Atlan. + + :returns: a query that will only match assets that are active in Atlan + """ + return ReferenceableFields.STATUS.eq(EntityStatus.ACTIVE.value) + + @staticmethod + def archived_assets() -> Query: + """ + Returns a query that will only match assets that are archived (soft-deleted) in Atlan. + + :returns: a query that will only match assets that are archived (soft-deleted) in Atlan + """ + return ReferenceableFields.STATUS.eq(EntityStatus.DELETED.value) + + @staticmethod + def asset_type(of: type) -> Query: + """ + Returns a query that will only match assets of the type provided. + + :param of: type for assets to match + :returns: a query that will only match assets of the type provided + """ + return ReferenceableFields.TYPE_NAME.eq(of.__name__) + + @staticmethod + def asset_types(one_of: list[type]) -> Query: + """ + Returns a query that will only match assets that are one of the types provided. + + :param one_of: types for assets to match + :returns: a query that iwll only match assets of one of the types provided + """ + return ReferenceableFields.TYPE_NAME.within( + list(map(lambda x: x.__name__, one_of)) + ) + + @staticmethod + def super_types(one_of: Union[type, list[type]]) -> Query: + """ + Returns a query that will match all assets that are a subtype of at least one of + the types provided. + + :param one_of: type name(s) of the supertypes for assets to match + :returns: a query that will only match assets of a subtype of the types provided + """ + if isinstance(one_of, list): + return ReferenceableFields.SUPER_TYPE_NAMES.within( + list(map(lambda x: x.__name__, one_of)) + ) + return ReferenceableFields.SUPER_TYPE_NAMES.eq(one_of.__name__) + + @staticmethod + def tagged( + with_one_of: Optional[list[str]] = None, directly: bool = False + ) -> Query: + """ + Returns a query that will only match assets that have at least one of the Atlan tags + provided. This will match irrespective of the Atlan tag being directly applied to the + asset, or if it was propagated to the asset. + + :param with_one_of: human-readable names of the Atlan tags + :param directly: when True, the asset must have at least one Atlan tag directly assigned, otherwise + even propagated tags will suffice + :returns: a query that will only match assets that have at least one of the Atlan tags provided + """ + from pyatlan.cache.atlan_tag_cache import AtlanTagCache + + values: list[str] = [] + if with_one_of: + for name in with_one_of: + values.append(AtlanTagCache.get_id_for_name(name)) + if directly: + if values: + return FluentSearch( + wheres=[ReferenceableFields.ATLAN_TAGS.within(values)] + ).to_query() + return FluentSearch( + wheres=[ReferenceableFields.ATLAN_TAGS.exists()] + ).to_query() + if values: + return FluentSearch( + where_somes=[ + ReferenceableFields.ATLAN_TAGS.within(values), + ReferenceableFields.PROPAGATED_ATLAN_TAGS.within(values), + ], + _min_somes=1, + ).to_query() + return FluentSearch( + where_somes=[ + ReferenceableFields.ATLAN_TAGS.exists(), + ReferenceableFields.PROPAGATED_ATLAN_TAGS.exists(), + ], + _min_somes=1, + ).to_query() + + @staticmethod + def assigned_term(qualified_names: Optional[list[str]] = None) -> Query: + """ + Returns a query that will only match assets that have at least one term assigned. + (If a list of qualified_names is specified, the assets that match must have at least + one term assigned from within the list of qualified_names.) + + :param qualified_names: the qualified_names of the terms + :returns: a query that will only match assets that have at least one term assigned + """ + if qualified_names: + return ReferenceableFields.ASSIGNED_TERMS.within(qualified_names) + return ReferenceableFields.ASSIGNED_TERMS.exists() + + def __init__( + self, + wheres: Optional[list[Query]] = None, + where_nots: Optional[list[Query]] = None, + where_somes: Optional[list[Query]] = None, + _min_somes: int = 1, + ): + self.wheres = wheres + self.where_nots = where_nots + self.where_somes = where_somes + self._min_somes = _min_somes + + def _clone(self) -> "CompoundQuery": + """ + Returns a copy of the current CompoundQuery that's ready for further operations. + + :returns: copy of the current CompoundQuery + """ + return self.__class__( + wheres=self.wheres, + where_nots=self.where_nots, + where_somes=self.where_somes, + _min_somes=self._min_somes, + ) + + def where(self, query: Query) -> "CompoundQuery": + """ + Add a single criterion that must be present on every search result. + (Note: these are translated to filters.) + + :param query: the query to set as a criterion that must be present on every search result + :returns: the compound query with this additional criterion added + """ + clone = self._clone() + if clone.wheres is None: + clone.wheres = [] + clone.wheres.append(query) + return clone + + def where_not(self, query: Query) -> "CompoundQuery": + """ + Add a single criterion that must not be present on any search result. + + :param query: the query to set as a criterion that must not be present on any search result + :returns: the compound query with this additional criterion added + """ + clone = self._clone() + if clone.where_nots is None: + clone.where_nots = [] + clone.where_nots.append(query) + return clone + + def where_some(self, query: Query) -> "CompoundQuery": + """ + Add a single criterion at least some of which should be present on each search result. + You can control "how many" of the criteria added this way are a minimum for each search + result to match through the 'minimum' property. + + :param query: the query to set as a criterion some number of which should be present on a search result + :returns: the compound query with this additional criterion added + """ + clone = self._clone() + if clone.where_somes is None: + clone.where_somes = [] + clone.where_somes.append(query) + return clone + + def min_somes(self, minimum: int) -> "CompoundQuery": + """ + Sets the minimum number of 'where_somes' that must match for a result to be included. + + :param minimum: minimum number of 'where_somes' that must match + :returns: the compound query with this additional criterion applied + """ + clone = self._clone() + clone._min_somes = minimum + return clone + + def to_query(self) -> Query: + """ + Translate the Atlan compound query into an Elastic Query object. + + :returns: an Elastic Query object that represents the compound query + """ + q = Bool() + q.filter = self.wheres or [] + q.must_not = self.where_nots or [] + if self.where_somes: + q.should = self.where_somes + q.minimum_should_match = self._min_somes + return q + + +@dataclasses.dataclass +class FluentSearch(CompoundQuery): + """ + Class to compose compound queries combining various conditions. + """ + + sorts: Optional[list[SortItem]] = None + # TODO aggregations: Optional[dict[str, Aggregation]] = None + _page_size: Optional[int] = None + _includes_on_results: Optional[list[str]] = None + _includes_on_relations: Optional[list[str]] = None + + def __init__( + self, + wheres: Optional[list[Query]] = None, + where_nots: Optional[list[Query]] = None, + where_somes: Optional[list[Query]] = None, + _min_somes: int = 1, + sorts: Optional[list[SortItem]] = None, + _page_size: Optional[int] = None, + _includes_on_results: Optional[list[str]] = None, + _includes_on_relations: Optional[list[str]] = None, + ): + super().__init__(wheres, where_nots, where_somes, _min_somes) + self.sorts = sorts + self._page_size = _page_size + self._includes_on_results = _includes_on_results + self._includes_on_relations = _includes_on_relations + + def _clone(self) -> "FluentSearch": + """ + Returns a copy of the current FluentSearch that's ready for further operations. + + :returns: copy of the current FluentSearch + """ + clone: FluentSearch = cast(FluentSearch, super()._clone()) + clone.sorts = self.sorts + # TODO clone.aggregations = self.aggregations + clone._page_size = self._page_size + clone._includes_on_results = self._includes_on_results + clone._includes_on_relations = self._includes_on_relations + return clone + + def sort(self, by: SortItem) -> "FluentSearch": + """ + Add a criterion by which to sort the results. + + :param by: criterion by which to sort the results + :returns: the fluent search with this sorting criterion added + """ + clone = self._clone() + if clone.sorts is None: + clone.sorts = [] + clone.sorts.append(by) + return clone + + # def aggregate(self, key: str, aggregation: Aggregation) -> "FluentSearch": + # """ + # Add an aggregation to run against the results of the search. + # You provide any key you want (you'll use it to look at the results of a specific aggregation). + + # :param key: you want to use to look at the results of the aggregation + # :param aggregation: you want to calculate + # :returns: the fluent search with this aggregation added + # """ + # clone = self._clone() + # if clone.aggregations is None: + # clone.aggregations = {} + # clone.aggregations[key] = aggregation + # return clone + + def page_size(self, size: int) -> "FluentSearch": + """ + Set the number of results to retrieve per underlying API request. + + :param size: number of results to retrieve per underlying API request + :returns: the fluent search with this parameter configured + """ + clone = self._clone() + clone._page_size = size + return clone + + def include_on_results(self, field: Union[str, AtlanField]) -> "FluentSearch": + """ + Add an attribute to retrieve for each asset in the results. + + :param field: attribute to retrieve for each result + :returns: the fluent search with this parameter added + """ + clone = self._clone() + if clone._includes_on_results is None: + clone._includes_on_results = [] + if isinstance(field, AtlanField): + clone._includes_on_results.append(field.atlan_field_name) + else: + clone._includes_on_results.append(field) + return clone + + def include_on_relations(self, field: Union[str, AtlanField]) -> "FluentSearch": + """ + Add an attribute to retrieve for each asset related to the assets in the results. + + :param field: attribute to retrieve for each related asset of each result + :returns: the fluent search with this parameter added + """ + clone = self._clone() + if clone._includes_on_relations is None: + clone._includes_on_relations = [] + if isinstance(field, AtlanField): + clone._includes_on_relations.append(field.atlan_field_name) + else: + clone._includes_on_relations.append(field) + return clone + + def _dsl(self) -> DSL: + """ + Translate the Atlan fluent search into an Atlan search DSL. + + :returns: an Atlan search DSL that encapsulates the fluent search + """ + return DSL(query=self.to_query()) + + def to_request(self) -> IndexSearchRequest: + """ + Translate the Atlan fluent search into an Atlan search request. + + :returns: an Atlan search request that encapsulates the fluent search + """ + dsl = self._dsl() + if self._page_size: + dsl.size = self._page_size + if self.sorts: + dsl.sort = self.sorts + # if self.aggregations: + # dsl.aggregations.extend(self.aggregations) + request = IndexSearchRequest(dsl=dsl) + if self._includes_on_results: + request.attributes = self._includes_on_results + if self._includes_on_relations: + request.relation_attributes = self._includes_on_relations + return request + + def count(self, client: AtlanClient) -> int: + """ + Return the total number of assets that will match the supplied criteria, + using the most minimal query possible (retrieves minimal data). + + :param client: client through which to count the assets + :returns: the count of assets that will match the supplied criteria + """ + dsl = self._dsl() + dsl.size = 1 + request = IndexSearchRequest(dsl=dsl) + return client.search(request).count + + def execute(self, client: AtlanClient) -> AtlanClient.IndexSearchResults: + """ + Run the fluent search to retrieve assets that match the supplied criteria. + + :param client: client through which to retrieve the assets + :returns: an iterable list of assets that match the supplied criteria, lazily-fetched + """ + return client.search(self.to_request()) + + +from pyatlan.client.atlan import AtlanClient # noqa: E402 From a31095ee21a55a883b62fb07363e07da574ebd7b Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Mon, 21 Aug 2023 16:05:28 +0100 Subject: [PATCH 03/12] Combines bool criteria using filter for efficiency, and adds default sort by GUID for stable results across pages Signed-off-by: Christopher Grote --- pyatlan/model/search.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pyatlan/model/search.py b/pyatlan/model/search.py index ff543e0fe..acfce2773 100644 --- a/pyatlan/model/search.py +++ b/pyatlan/model/search.py @@ -97,14 +97,14 @@ def __add__(self, other): # preference if hasattr(other, "__radd__"): return other.__radd__(self) - return Bool(must=[self, other]) + return Bool(filter=[self, other]) def __and__(self, other): # make sure we give queries that know how to combine themselves # preference if hasattr(other, "__rand__"): return other.__rand__(self) - return Bool(must=[self, other]) + return Bool(filter=[self, other]) def __or__(self, other): # make sure we give queries that know how to combine themselves @@ -1777,14 +1777,18 @@ class DSL(AtlanObject): track_total_hits: bool = Field(True, alias="track_total_hits") post_filter: Optional[Query] = Field(alias="post_filter") query: Optional[Query] - sort: Optional[list[SortItem]] = Field(alias="sort") + sort: list[SortItem] = Field( + alias="sort", default=[SortItem(TermAttributes.GUID.value)] + ) class Config: json_encoders = {Query: lambda v: v.to_dict(), SortItem: lambda v: v.to_dict()} def __init__(__pydantic_self__, **data: Any) -> None: super().__init__(**data) - __pydantic_self__.__fields_set__.update(["from_", "size", "track_total_hits"]) + __pydantic_self__.__fields_set__.update( + ["from_", "size", "track_total_hits", "sort"] + ) @validator("query", always=True) def validate_query(cls, v, values): From b6fbc4bc39b70b73b57f8d55f5d3038545af0f04 Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Mon, 21 Aug 2023 16:13:04 +0100 Subject: [PATCH 04/12] Search simplification (in progress) Signed-off-by: Christopher Grote --- pyatlan/model/fields/__init__.py | 0 pyatlan/model/fields/asset.py | 13 +++ pyatlan/model/fields/atlan_fields.py | 56 +++++----- pyatlan/model/fields/atlas_glossary_term.py | 11 ++ pyatlan/model/fluent_search.py | 3 +- tests/integration/glossary_test.py | 109 ++++++++++++++++++++ 6 files changed, 168 insertions(+), 24 deletions(-) create mode 100644 pyatlan/model/fields/__init__.py create mode 100644 pyatlan/model/fields/asset.py create mode 100644 pyatlan/model/fields/atlas_glossary_term.py diff --git a/pyatlan/model/fields/__init__.py b/pyatlan/model/fields/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/pyatlan/model/fields/asset.py b/pyatlan/model/fields/asset.py new file mode 100644 index 000000000..ba15b9137 --- /dev/null +++ b/pyatlan/model/fields/asset.py @@ -0,0 +1,13 @@ +from pyatlan.model.fields.atlan_fields import KeywordTextField, KeywordTextStemmedField +from pyatlan.model.fields.referenceable import ReferenceableFields + + +class AssetFields(ReferenceableFields): + + NAME = KeywordTextStemmedField("name", "name.keyword", "name", "name.stemmed") + """Human-readable name of the asset.""" + + QUALIFIED_NAME = KeywordTextField( + "qualifiedName", "qualifiedName", "qualifiedName.text" + ) + """Unique fully-qualified name of the asset in Atlan.""" diff --git a/pyatlan/model/fields/atlan_fields.py b/pyatlan/model/fields/atlan_fields.py index 32aef1d9c..2dcdb1257 100644 --- a/pyatlan/model/fields/atlan_fields.py +++ b/pyatlan/model/fields/atlan_fields.py @@ -1,7 +1,7 @@ from abc import ABC from typing import Union -from pydantic import StrictStr +from pydantic import StrictBool, StrictFloat, StrictInt, StrictStr from pyatlan.model.enums import SortOrder from pyatlan.model.search import ( @@ -100,7 +100,7 @@ def boolean_field_name(self) -> str: """ return self.elastic_field_name - def eq(self, value: bool) -> Query: + def eq(self, value: StrictBool) -> Query: """ Returns a query that will match all assets whose field has a value that exactly equals the provided boolean value. @@ -117,7 +117,7 @@ class KeywordField(SearchableField): Represents any field in Atlan that can be searched only by keyword (no text-analyzed fuzziness). """ - def __init__(self, atlan: str, keyword: str): + def __init__(self, atlan: StrictStr, keyword: StrictStr): """ Default constructor. @@ -135,7 +135,7 @@ def keyword_field_name(self) -> str: """ return self.elastic_field_name - def startswith(self, value: str, case_insensitive: bool = False) -> Query: + def startswith(self, value: StrictStr, case_insensitive: bool = False) -> Query: """ Returns a query that will match all assets whose field has a value that starts with the provided value. Note that this can als obe a case-insensitive match. @@ -151,7 +151,7 @@ def startswith(self, value: str, case_insensitive: bool = False) -> Query: case_insensitive=case_insensitive, ) - def eq(self, value: str, case_insensitive: bool = False) -> Query: + def eq(self, value: StrictStr, case_insensitive: bool = False) -> Query: """ Returns a query that will match all assets whose field has a value that exactly matches the provided string value. @@ -184,7 +184,7 @@ class TextField(SearchableField): Represents any field in Atlan that can only be searched using text-related search operations. """ - def __init__(self, atlan: str, text: str): + def __init__(self, atlan: StrictStr, text: StrictStr): """ Default constructor. @@ -202,7 +202,7 @@ def text_field_name(self) -> str: """ return self.elastic_field_name - def match(self, value: str) -> Query: + def match(self, value: StrictStr) -> Query: """ Returns a query that will textually match the provided value against the field. This analyzes the provided value according to the same analysis carried out on the field @@ -223,7 +223,7 @@ class NumericField(SearchableField): Represents any field in Atlan that can be searched using only numeric search operations. """ - def __init__(self, atlan: str, numeric: str): + def __init__(self, atlan: StrictStr, numeric: StrictStr): """ Default constructor. @@ -241,7 +241,7 @@ def numeric_field_name(self) -> str: """ return self.elastic_field_name - def eq(self, value: Union[int, float]) -> Query: + def eq(self, value: Union[StrictInt, StrictFloat]) -> Query: """ Returns a query that will match all assets whose field has a value that exactly matches the provided numeric value. @@ -251,7 +251,7 @@ def eq(self, value: Union[int, float]) -> Query: """ return Term(field=self.numeric_field_name, value=value) - def gt(self, value: Union[int, float]) -> Query: + def gt(self, value: Union[StrictInt, StrictFloat]) -> Query: """ Returns a query that will match all assets whose field has a value that is strictly greater than the provided numeric value. @@ -262,7 +262,7 @@ def gt(self, value: Union[int, float]) -> Query: """ return Range(field=self.numeric_field_name, gt=value) - def gte(self, value: Union[int, float]) -> Query: + def gte(self, value: Union[StrictInt, StrictFloat]) -> Query: """ Returns a query that will match all assets whose field has a value that is greater than or equal to the provided numeric value. @@ -273,7 +273,7 @@ def gte(self, value: Union[int, float]) -> Query: """ return Range(field=self.numeric_field_name, gte=value) - def lt(self, value: Union[int, float]) -> Query: + def lt(self, value: Union[StrictInt, StrictFloat]) -> Query: """ Returns a query that will match all assets whose field has a value that is strictly less than the provided numeric value. @@ -284,7 +284,7 @@ def lt(self, value: Union[int, float]) -> Query: """ return Range(field=self.numeric_field_name, lt=value) - def lte(self, value: Union[int, float]) -> Query: + def lte(self, value: Union[StrictInt, StrictFloat]) -> Query: """ Returns a query that will match all assets whose field has a value that is less than or equal to the provided numeric value. @@ -295,7 +295,11 @@ def lte(self, value: Union[int, float]) -> Query: """ return Range(field=self.numeric_field_name, lte=value) - def between(self, minimum: Union[int, float], maximum: Union[int, float]) -> Query: + def between( + self, + minimum: Union[StrictInt, StrictFloat], + maximum: Union[StrictInt, StrictFloat], + ) -> Query: """ Returns a query that will match all assets whose field has a value between the minimum and maximum specified values, inclusive. @@ -309,9 +313,9 @@ class NumericRankField(NumericField): but also has a rank-orderable index. """ - rank_field_name: str + rank_field_name: StrictStr - def __init__(self, atlan: str, numeric: str, rank: str): + def __init__(self, atlan: StrictStr, numeric: StrictStr, rank: StrictStr): """ Default constructor. @@ -328,9 +332,9 @@ class KeywordTextField(KeywordField, TextField): Represents any field in Atlan that can be searched by keyword or text-based search operations. """ - _text_field_name: str + _text_field_name: StrictStr - def __init__(self, atlan: str, keyword: str, text: str): + def __init__(self, atlan: StrictStr, keyword: StrictStr, text: StrictStr): """ Default constructor. @@ -352,9 +356,11 @@ class KeywordTextStemmedField(KeywordTextField): including a stemmed variation of the text analyzers. """ - stemmed_field_name: str + stemmed_field_name: StrictStr - def __init__(self, atlan: str, keyword: str, text: str, stemmed: str): + def __init__( + self, atlan: StrictStr, keyword: StrictStr, text: StrictStr, stemmed: StrictStr + ): """ Default constructor. @@ -392,10 +398,14 @@ def __init__(self, set_name: str, attribute_name: str): from pyatlan.cache.custom_metadata_cache import CustomMetadataCache super().__init__( - CustomMetadataCache.get_attribute_for_search_results( - set_name, attribute_name + StrictStr( + CustomMetadataCache.get_attribute_for_search_results( + set_name, attribute_name + ) + ), + StrictStr( + CustomMetadataCache.get_attr_id_for_name(set_name, attribute_name) ), - CustomMetadataCache.get_attr_id_for_name(set_name, attribute_name), ) self.set_name = set_name self.attribute_name = attribute_name diff --git a/pyatlan/model/fields/atlas_glossary_term.py b/pyatlan/model/fields/atlas_glossary_term.py new file mode 100644 index 000000000..d96b1d0be --- /dev/null +++ b/pyatlan/model/fields/atlas_glossary_term.py @@ -0,0 +1,11 @@ +from pyatlan.model.fields.asset import AssetFields +from pyatlan.model.fields.atlan_fields import KeywordField + + +class AtlasGlossaryTermFields(AssetFields): + + ANCHOR = KeywordField("anchor", "__glossary") + """Glossary in which the term is contained, searchable by the qualifiedName of the glossary.""" + + CATEGORIES = KeywordField("categories", "__categories") + """Categories in which the term is organized, searchable by the qualifiedName of the category.""" diff --git a/pyatlan/model/fluent_search.py b/pyatlan/model/fluent_search.py index 21b2f0efb..ab5796db9 100644 --- a/pyatlan/model/fluent_search.py +++ b/pyatlan/model/fluent_search.py @@ -94,7 +94,8 @@ def tagged( values: list[str] = [] if with_one_of: for name in with_one_of: - values.append(AtlanTagCache.get_id_for_name(name)) + if tag_id := AtlanTagCache.get_id_for_name(name): + values.append(tag_id) if directly: if values: return FluentSearch( diff --git a/tests/integration/glossary_test.py b/tests/integration/glossary_test.py index 86c6bc47f..9bdd9454e 100644 --- a/tests/integration/glossary_test.py +++ b/tests/integration/glossary_test.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright 2022 Atlan Pte. Ltd. +import itertools import logging from typing import Generator @@ -10,6 +11,10 @@ from pyatlan.client.atlan import AtlanClient from pyatlan.error import NotFoundError from pyatlan.model.assets import AtlasGlossary, AtlasGlossaryCategory, AtlasGlossaryTerm +from pyatlan.model.fields.asset import AssetFields +from pyatlan.model.fields.atlas_glossary_term import AtlasGlossaryTermFields +from pyatlan.model.fluent_search import CompoundQuery, FluentSearch +from pyatlan.model.search import DSL, IndexSearchRequest from tests.integration.client import TestId, delete_asset LOGGER = logging.getLogger(__name__) @@ -165,6 +170,110 @@ def test_read_glossary( assert len(terms) == 2 +def test_compound_queries( + client: AtlanClient, + glossary: AtlasGlossary, + term1: AtlasGlossaryTerm, + term2: AtlasGlossaryTerm, +): + cq = ( + CompoundQuery() + .where(CompoundQuery.active_assets()) + .where(CompoundQuery.asset_type(AtlasGlossaryTerm)) + .where(AssetFields.NAME.startswith(MODULE_NAME)) + .where(AtlasGlossaryTermFields.ANCHOR.eq(glossary.qualified_name)) + ).to_query() + request = IndexSearchRequest(dsl=DSL(query=cq)) + response = client.search(request) + assert response + assert response.count == 2 + + cq = ( + CompoundQuery() + .where(CompoundQuery.active_assets()) + .where(CompoundQuery.asset_type(AtlasGlossaryTerm)) + .where(AssetFields.NAME.startswith(MODULE_NAME)) + .where(AtlasGlossaryTermFields.ANCHOR.eq(glossary.qualified_name)) + .where_not(AssetFields.NAME.eq(term2.name)) + ).to_query() + request = IndexSearchRequest(dsl=DSL(query=cq)) + response = client.search(request) + assert response + assert response.count == 1 + + +def test_fluent_search( + client: AtlanClient, + glossary: AtlasGlossary, + term1: AtlasGlossaryTerm, + term2: AtlasGlossaryTerm, +): + terms = ( + FluentSearch() + .page_size(1) + .where(CompoundQuery.active_assets()) + .where(CompoundQuery.asset_type(AtlasGlossaryTerm)) + .where(AssetFields.NAME.startswith(MODULE_NAME)) + .where(AtlasGlossaryTermFields.ANCHOR.eq(glossary.qualified_name)) + .include_on_results(AtlasGlossaryTermFields.ANCHOR) + .include_on_relations(AssetFields.NAME) + ) + + assert terms.count(client) == 2 + + guids_chained = [] + g_sorted = [] + for asset in filter( + lambda x: isinstance(x, AtlasGlossaryTerm), + itertools.islice(terms.execute(client), 2), + ): + guids_chained.append(asset.guid) + g_sorted.append(asset.guid) + g_sorted.sort() + assert guids_chained == g_sorted + + terms = FluentSearch( + _page_size=5, + wheres=[ + CompoundQuery.active_assets(), + CompoundQuery.asset_type(AtlasGlossaryTerm), + AssetFields.NAME.startswith(MODULE_NAME), + AtlasGlossaryTermFields.ANCHOR.startswith(glossary.qualified_name), + ], + _includes_on_results=[AtlasGlossaryTermFields.ANCHOR.atlan_field_name], + _includes_on_relations=[AssetFields.NAME.atlan_field_name], + ).execute(client) + + guids_alt = [] + g_sorted = [] + for asset in terms: + guids_alt.append(asset.guid) + g_sorted.append(asset.guid) + g_sorted.sort() + assert g_sorted == guids_alt + + terms = FluentSearch( + _page_size=5, + wheres=[ + CompoundQuery.active_assets(), + CompoundQuery.asset_type(AtlasGlossaryTerm), + AssetFields.NAME.startswith(MODULE_NAME), + AtlasGlossaryTermFields.ANCHOR.startswith(glossary.qualified_name), + ], + _includes_on_results=["anchor"], + _includes_on_relations=["name"], + sorts=[AssetFields.NAME.order()], + ).execute(client) + + names = [] + names_sorted = [] + for asset in terms: + names.append(asset.name) + names_sorted.append(asset.name) + names_sorted.sort() + assert names_sorted == names + + @pytest.mark.order(after="test_read_glossary") def test_trim_to_required_glossary( client: AtlanClient, From b639372f7dfaaede8d431d5c508dbb286ea6db66 Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Tue, 22 Aug 2023 15:35:54 +0100 Subject: [PATCH 05/12] Search simplification Signed-off-by: Christopher Grote --- pyatlan/generator/class_generator.py | 134 +- pyatlan/generator/templates/imports.jinja2 | 10 + pyatlan/generator/templates/macros.jinja2 | 23 +- .../asset/atlas_glossary_category.jinja2 | 6 + .../methods/asset/atlas_glossary_term.jinja2 | 6 + pyatlan/generator/templates/module.jinja2 | 2 + pyatlan/generator/templates/properties.jinja2 | 7 +- .../templates/referenceable_attributes.jinja2 | 46 + pyatlan/model/assets/__init__.py | 132 +- pyatlan/model/assets/asset00.py | 3483 ++++++++++++++++- pyatlan/model/assets/asset01.py | 4 +- pyatlan/model/assets/asset02.py | 126 +- pyatlan/model/assets/asset03.py | 125 - pyatlan/model/assets/asset04.py | 463 +-- pyatlan/model/assets/asset05.py | 555 ++- pyatlan/model/assets/asset06.py | 101 +- pyatlan/model/assets/asset07.py | 132 +- pyatlan/model/assets/asset08.py | 14 +- pyatlan/model/assets/asset09.py | 55 +- pyatlan/model/assets/asset10.py | 394 +- pyatlan/model/assets/asset11.py | 677 +++- pyatlan/model/assets/asset12.py | 243 +- pyatlan/model/assets/asset13.py | 232 +- pyatlan/model/assets/asset14.py | 78 + .../model/assets/{asset15.py => asset16.py} | 4 +- pyatlan/model/assets/asset18.py | 14 +- .../model/assets/{asset17.py => asset19.py} | 14 +- .../model/assets/{asset20.py => asset21.py} | 4 +- pyatlan/model/assets/asset23.py | 107 +- pyatlan/model/assets/asset24.py | 165 + pyatlan/model/assets/asset26.py | 158 - pyatlan/model/assets/asset27.py | 198 +- pyatlan/model/assets/asset28.py | 178 +- pyatlan/model/assets/asset29.py | 475 +-- pyatlan/model/assets/asset30.py | 580 ++- pyatlan/model/assets/asset31.py | 242 +- pyatlan/model/assets/asset32.py | 295 +- pyatlan/model/assets/asset33.py | 420 ++ pyatlan/model/assets/asset35.py | 114 - pyatlan/model/assets/asset36.py | 193 +- pyatlan/model/assets/asset37.py | 231 +- pyatlan/model/assets/asset38.py | 176 +- pyatlan/model/assets/asset39.py | 16 +- pyatlan/model/assets/asset40.py | 41 +- pyatlan/model/assets/asset41.py | 216 +- pyatlan/model/assets/asset42.py | 281 +- pyatlan/model/assets/asset43.py | 95 +- pyatlan/model/assets/asset44.py | 91 +- pyatlan/model/assets/asset45.py | 105 +- pyatlan/model/assets/asset46.py | 251 +- pyatlan/model/assets/asset47.py | 311 +- pyatlan/model/assets/asset48.py | 179 +- pyatlan/model/assets/asset49.py | 73 +- pyatlan/model/assets/asset50.py | 63 +- pyatlan/model/assets/asset51.py | 350 +- pyatlan/model/assets/asset52.py | 572 ++- pyatlan/model/assets/asset53.py | 448 ++- pyatlan/model/assets/asset54.py | 489 +-- pyatlan/model/assets/asset55.py | 928 ++--- pyatlan/model/assets/asset56.py | 1003 +++-- pyatlan/model/assets/asset57.py | 774 ++-- pyatlan/model/assets/asset58.py | 831 ++-- pyatlan/model/assets/asset59.py | 572 ++- pyatlan/model/assets/asset60.py | 354 +- pyatlan/model/assets/asset61.py | 1747 ++------- pyatlan/model/assets/asset62.py | 2099 +++++++++- pyatlan/model/assets/asset63.py | 1443 +------ pyatlan/model/assets/asset64.py | 1868 ++++++++- pyatlan/model/assets/asset65.py | 249 +- pyatlan/model/assets/asset66.py | 422 +- pyatlan/model/assets/asset67.py | 809 ++-- pyatlan/model/assets/asset68.py | 899 ++++- pyatlan/model/assets/asset69.py | 163 +- pyatlan/model/assets/asset70.py | 1313 +------ pyatlan/model/assets/asset71.py | 1814 +++++---- pyatlan/model/assets/asset72.py | 1502 +++++-- pyatlan/model/assets/asset73.py | 857 ++-- pyatlan/model/assets/asset74.py | 937 ++++- pyatlan/model/assets/asset75.py | 421 +- pyatlan/model/assets/asset76.py | 16 +- .../model/assets/{asset22.py => asset77.py} | 16 +- pyatlan/model/fields/asset.py | 13 - pyatlan/model/fields/atlas_glossary_term.py | 11 - pyatlan/model/fields/referenceable.py | 49 - pyatlan/model/fluent_search.py | 34 +- pyatlan/model/search.py | 2 +- pyatlan/model/structs.py | 78 +- pyatlan/model/typedef.py | 7 + tests/integration/glossary_test.py | 34 +- tests/unit/test_client.py | 18 +- tests/unit/test_search_model.py | 46 +- 91 files changed, 22054 insertions(+), 13472 deletions(-) delete mode 100644 pyatlan/model/assets/asset03.py create mode 100644 pyatlan/model/assets/asset14.py rename pyatlan/model/assets/{asset15.py => asset16.py} (85%) rename pyatlan/model/assets/{asset17.py => asset19.py} (61%) rename pyatlan/model/assets/{asset20.py => asset21.py} (86%) create mode 100644 pyatlan/model/assets/asset24.py delete mode 100644 pyatlan/model/assets/asset26.py create mode 100644 pyatlan/model/assets/asset33.py delete mode 100644 pyatlan/model/assets/asset35.py rename pyatlan/model/assets/{asset22.py => asset77.py} (53%) delete mode 100644 pyatlan/model/fields/asset.py delete mode 100644 pyatlan/model/fields/atlas_glossary_term.py delete mode 100644 pyatlan/model/fields/referenceable.py diff --git a/pyatlan/generator/class_generator.py b/pyatlan/generator/class_generator.py index 21f889818..9e62978ed 100644 --- a/pyatlan/generator/class_generator.py +++ b/pyatlan/generator/class_generator.py @@ -6,12 +6,13 @@ an Atlan instance. The script create_typedefs_file.py can be used to produce this file. """ import datetime +import enum import json import os import re from enum import Enum from pathlib import Path -from typing import NamedTuple, Optional +from typing import Any, NamedTuple, Optional import networkx as nx from jinja2 import Environment, PackageLoader @@ -344,6 +345,135 @@ def create_modules(cls): asset_info.module_info.add_asset_info(asset_info=asset_info) +def get_class_var_for_attr(attr_name: str) -> str: + replace1 = re.sub(r"([A-Z]+)([A-Z][a-z])", r"\1_\2", attr_name.replace("_", "")) + replace2 = re.sub(r"([a-z])([A-Z])", r"\1_\2", replace1) + return replace2.upper() + + +class IndexType(Enum): + KEYWORD = enum.auto() + TEXT = enum.auto() + RANK_FEATURE = enum.auto() + BOOLEAN = enum.auto() + NUMERIC = enum.auto() + STEMMED = enum.auto() + RELATION = enum.auto() + + +class SearchType: + name: str + args: Optional[str] + + def __init__(self, name: str, args: Optional[str] = None): + self.name = name + self.args = args + + +def get_search_type(attr_def: dict[str, Any]) -> SearchType: + def get_default_index_for_type(base_type: str) -> IndexType: + if base_type in {"date", "float", "double", "int", "long"}: + to_use = IndexType.NUMERIC + elif base_type == "boolean": + to_use = IndexType.BOOLEAN + else: + to_use = IndexType.KEYWORD + return to_use + + def get_embedded_type(attr_type: str) -> str: + return attr_type[attr_type.index("<") + 1 : attr_type.index(">")] # noqa: E203 + + def get_base_type() -> str: + type_name = str(attr_def.get("typeName")) + base_type = type_name + if "<" in type_name: + if type_name.startswith("array<"): + if type_name.startswith("array dict[IndexType, str]: + searchable: dict[IndexType, str] = {} + config = attr_def.get("indexTypeESConfig") + attr_name = str(attr_def.get("name")) + if "relationshipTypeName" in attr_def: + searchable[IndexType.RELATION] = attr_name + else: + base_type = get_base_type() + # Default index + if config: + if analyzer := config.get("analyzer"): + if analyzer == "atlan_text_analyzer": + if attr_name.endswith(".stemmed"): + searchable[IndexType.STEMMED] = attr_name + else: + searchable[IndexType.TEXT] = attr_name + else: + def_index = get_default_index_for_type(base_type) + searchable[def_index] = attr_name + # Additional indexes + if fields := attr_def.get("indexTypeESFields"): + for field_suffix in fields: + field_name = f"{attr_name}.{field_suffix}" + if index_type := fields.get(field_suffix).get("type"): + if index_type == "keyword": + searchable[IndexType.KEYWORD] = field_name + elif index_type == "text": + if field_name.endswith(".stemmed"): + searchable[IndexType.STEMMED] = field_name + else: + searchable[IndexType.TEXT] = field_name + elif index_type == "rank_feature": + searchable[IndexType.RANK_FEATURE] = field_name + else: + def_index = get_default_index_for_type(base_type) + searchable[def_index] = field_name + return searchable + + search_map = get_indexes_for_attribute() + indices = search_map.keys() + if indices == {IndexType.KEYWORD}: + return SearchType( + name="KeywordField", args=f'"{search_map.get(IndexType.KEYWORD)}"' + ) + elif indices == {IndexType.TEXT}: + return SearchType(name="TextField", args=f'"{search_map.get(IndexType.TEXT)}"') + elif indices == {IndexType.NUMERIC}: + return SearchType( + name="NumericField", args=f'"{search_map.get(IndexType.NUMERIC)}"' + ) + elif indices == {IndexType.BOOLEAN}: + return SearchType( + name="BooleanField", args=f'"{search_map.get(IndexType.BOOLEAN)}"' + ) + elif indices == {IndexType.NUMERIC, IndexType.RANK_FEATURE}: + return SearchType( + name="NumericRankField", + args=f'"{search_map.get(IndexType.NUMERIC)}", ' + f'"{search_map.get(IndexType.RANK_FEATURE)}"', + ) + elif indices == {IndexType.KEYWORD, IndexType.TEXT}: + return SearchType( + name="KeywordTextField", + args=f'"{search_map.get(IndexType.KEYWORD)}", ' + f'"{search_map.get(IndexType.TEXT)}"', + ) + elif indices == {IndexType.KEYWORD, IndexType.TEXT, IndexType.STEMMED}: + return SearchType( + name="KeywordTextStemmedField", + args=f'"{search_map.get(IndexType.KEYWORD)}", ' + f'"{search_map.get(IndexType.TEXT)}", ' + f'"{search_map.get(IndexType.STEMMED)}"', + ) + return SearchType(name="RelationField") + + class Generator: def __init__(self) -> None: self.environment = Environment( @@ -351,6 +481,8 @@ def __init__(self) -> None: ) self.environment.filters["to_snake_case"] = to_snake_case self.environment.filters["get_type"] = get_type + self.environment.filters["get_search_type"] = get_search_type + self.environment.filters["get_class_var_for_attr"] = get_class_var_for_attr def merge_attributes(self, entity_def): def merge_them(s, a): diff --git a/pyatlan/generator/templates/imports.jinja2 b/pyatlan/generator/templates/imports.jinja2 index ee1bc6967..2ebfb03ba 100644 --- a/pyatlan/generator/templates/imports.jinja2 +++ b/pyatlan/generator/templates/imports.jinja2 @@ -50,6 +50,16 @@ from pyatlan.model.enums import ( SchemaRegistrySchemaType, SourceCostUnitType, ) +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + KeywordTextStemmedField, + NumericField, + NumericRankField, + RelationField, + TextField, +) from pyatlan.model.internal import AtlasServer, Internal from pyatlan.model.structs import ( AuthPolicyCondition, diff --git a/pyatlan/generator/templates/macros.jinja2 b/pyatlan/generator/templates/macros.jinja2 index 0edc09130..d22043a77 100644 --- a/pyatlan/generator/templates/macros.jinja2 +++ b/pyatlan/generator/templates/macros.jinja2 @@ -1,5 +1,5 @@ {%- macro gen_properties(attribute_defs) %} - _convience_properties: ClassVar[list[str]] = [ + _convenience_properties: ClassVar[list[str]] = [ {%- for attribute_def in attribute_defs %} "{{ 'assigned_terms' if attribute_def.name == 'meanings' else attribute_def.name | to_snake_case }}", {%- endfor %}] @@ -21,3 +21,24 @@ {%- endfor %} {% endmacro %} + +{%- macro gen_property_class_vars(type_name, attribute_defs) %} + {%- for attribute_def in attribute_defs %}{% if attribute_def.name != "inputs" and attribute_def.name != "outputs" %} + {%- set search_type = attribute_def | get_search_type %} + {{ attribute_def.name | get_class_var_for_attr }}: ClassVar[{{ search_type.name }}] = {{ search_type.name }}("{{ attribute_def.name }}"{% if search_type.args %}, {{ search_type.args }}{% endif %}) + """ + {{ attribute_def.description | default("TBC") }} + """ + + {%- endif %}{%- endfor %} +{% endmacro %} + +{%- macro gen_property_relationship_class_vars(type_name, relationship_attribute_defs) %} + {%- for attribute_def in relationship_attribute_defs %}{% if (type_name != "AtlasGlossaryTerm" or attribute_def.name != "categories") and (type_name != "AtlasGlossaryCategory" or attribute_def.name != "parentCategory") and ((type_name != "AtlasGlossaryTerm" or type_name != "AtlasGlossaryCategory") and attribute_def.name != "anchor") and (type_name != "Asset" or attribute_def.name != "meanings") %} + {{ attribute_def.name | get_class_var_for_attr }}: ClassVar[RelationField] = RelationField("{{ attribute_def.name }}") + """ + {{ attribute_def.description | default("TBC") }} + """ + + {%- endif %}{%- endfor %} +{% endmacro %} diff --git a/pyatlan/generator/templates/methods/asset/atlas_glossary_category.jinja2 b/pyatlan/generator/templates/methods/asset/atlas_glossary_category.jinja2 index 50140a702..0bdc6585b 100644 --- a/pyatlan/generator/templates/methods/asset/atlas_glossary_category.jinja2 +++ b/pyatlan/generator/templates/methods/asset/atlas_glossary_category.jinja2 @@ -48,3 +48,9 @@ qualified_name=qualified_name, name=name, anchor=glossary ) ) + + ANCHOR: ClassVar[KeywordField] = KeywordField("anchor", "__glossary") + """Glossary in which the category is contained, searchable by the qualifiedName of the glossary.""" + + PARENT_CATEGORY: ClassVar[KeywordField] = KeywordField("categories", "__parentCategory") + """Parent category in which a subcategory is contained, searchable by the qualifiedName of the category.""" diff --git a/pyatlan/generator/templates/methods/asset/atlas_glossary_term.jinja2 b/pyatlan/generator/templates/methods/asset/atlas_glossary_term.jinja2 index c1f0b9fe6..f2934c178 100644 --- a/pyatlan/generator/templates/methods/asset/atlas_glossary_term.jinja2 +++ b/pyatlan/generator/templates/methods/asset/atlas_glossary_term.jinja2 @@ -49,3 +49,9 @@ qualified_name=qualified_name, name=name, anchor=glossary ) ) + + ANCHOR: ClassVar[KeywordField] = KeywordField("anchor", "__glossary") + """Glossary in which the term is contained, searchable by the qualifiedName of the glossary.""" + + CATEGORIES: ClassVar[KeywordField] = KeywordField("categories", "__categories") + """Categories in which the term is organized, searchable by the qualifiedName of the category.""" diff --git a/pyatlan/generator/templates/module.jinja2 b/pyatlan/generator/templates/module.jinja2 index 7b1427dba..143421105 100644 --- a/pyatlan/generator/templates/module.jinja2 +++ b/pyatlan/generator/templates/module.jinja2 @@ -1,6 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright 2022 Atlan Pte. Ltd. {% from 'macros.jinja2' import gen_properties %} +{% from 'macros.jinja2' import gen_property_class_vars %} +{% from 'macros.jinja2' import gen_property_relationship_class_vars %} {% include 'imports.jinja2' %} {% for import in module.imports%} diff --git a/pyatlan/generator/templates/properties.jinja2 b/pyatlan/generator/templates/properties.jinja2 index 7ec5cc0f5..1791b39b0 100644 --- a/pyatlan/generator/templates/properties.jinja2 +++ b/pyatlan/generator/templates/properties.jinja2 @@ -1,7 +1,12 @@ def __setattr__(self, name, value): - if name in {{ entity_def.name }}._convience_properties: + if name in {{ entity_def.name }}._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__( name, value) + {%- if entity_def.name != "Referenceable" %} + {{ gen_property_class_vars(entity_def.name, entity_def.attribute_defs) }} + {{ gen_property_relationship_class_vars(entity_def.name, entity_def.relationship_attribute_defs) }} + {%- endif %} + {{ gen_properties(entity_def.attribute_defs + entity_def.relationship_attribute_defs) }} diff --git a/pyatlan/generator/templates/referenceable_attributes.jinja2 b/pyatlan/generator/templates/referenceable_attributes.jinja2 index 5cbb7d5d2..23555671a 100644 --- a/pyatlan/generator/templates/referenceable_attributes.jinja2 +++ b/pyatlan/generator/templates/referenceable_attributes.jinja2 @@ -13,6 +13,52 @@ def validate_required(self): pass + TYPE_NAME: ClassVar[KeywordTextField] = KeywordTextField("typeName", "__typeName.keyword", "__typeName") + """Type of the asset. For example Table, Column, and so on.""" + + GUID: ClassVar[KeywordField] = KeywordField("guid", "__guid") + """Globally unique identifier (GUID) of any object in Atlan.""" + + CREATED_BY: ClassVar[KeywordField] = KeywordField("createdBy", "__createdBy") + """Atlan user who created this asset.""" + + UPDATED_BY: ClassVar[KeywordField] = KeywordField("updatedBy", "__modifiedBy") + """Atlan user who last updated the asset.""" + + STATUS: ClassVar[KeywordField] = KeywordField("status", "__state") + """Asset status in Atlan (active vs deleted).""" + + ATLAN_TAGS: ClassVar[KeywordTextField] = KeywordTextField( + "classificationNames", "__traitNames", "__classificationsText" + ) + """ + All directly-assigned Atlan tags that exist on an asset, searchable by internal hashed-string ID of the Atlan tag. + """ + + PROPAGATED_ATLAN_TAGS: ClassVar[KeywordTextField] = KeywordTextField( + "classificationNames", "__propagatedTraitNames", "__classificationsText" + ) + """All propagated Atlan tags that exist on an asset, searchable by internal hashed-string ID of the Atlan tag.""" + + ASSIGNED_TERMS: ClassVar[KeywordTextField] = KeywordTextField("meanings", "__meanings", "__meaningsText") + """All terms attached to an asset, searchable by the term's qualifiedName.""" + + SUPER_TYPE_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "typeName", "__superTypeNames.keyword", "__superTypeNames" + ) + """All super types of an asset.""" + + CREATE_TIME: ClassVar[NumericField] = NumericField("createTime", "__timestamp") + """Time (in milliseconds) when the asset was created.""" + + UPDATE_TIME: ClassVar[NumericField] = NumericField("updateTime", "__modificationTimestamp") + """Time (in milliseconds) when the asset was last updated.""" + + QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "qualifiedName", "qualifiedName", "qualifiedName.text" + ) + """Unique fully-qualified name of the asset in Atlan.""" + _metadata_proxy: CustomMetadataProxy = PrivateAttr() attributes: '{{entity_def.name}}.Attributes' = Field( default_factory = lambda : {{entity_def.name}}.Attributes(), diff --git a/pyatlan/model/assets/__init__.py b/pyatlan/model/assets/__init__.py index 16457d985..ad86c2f91 100644 --- a/pyatlan/model/assets/__init__.py +++ b/pyatlan/model/assets/__init__.py @@ -51,57 +51,57 @@ ) from .asset01 import DataSet from .asset02 import Connection -from .asset03 import Badge -from .asset04 import AccessControl, AuthPolicy -from .asset05 import ProcessExecution -from .asset06 import AuthService -from .asset07 import Cloud -from .asset08 import Infrastructure -from .asset09 import BIProcess -from .asset10 import DbtProcess -from .asset11 import Persona -from .asset12 import Purpose -from .asset13 import Collection -from .asset15 import ObjectStore -from .asset17 import BI -from .asset18 import SaaS -from .asset20 import EventStore -from .asset22 import Insight -from .asset23 import API -from .asset26 import Google -from .asset27 import Azure -from .asset28 import AWS -from .asset29 import DbtColumnProcess -from .asset30 import S3 -from .asset31 import ADLS -from .asset32 import GCS -from .asset35 import Preset -from .asset36 import Mode -from .asset37 import Sigma -from .asset38 import Tableau -from .asset39 import Looker -from .asset40 import Redash -from .asset41 import DataStudio -from .asset42 import Metabase -from .asset43 import QuickSight -from .asset44 import Thoughtspot -from .asset45 import PowerBI -from .asset46 import MicroStrategy -from .asset47 import Qlik -from .asset48 import Salesforce -from .asset49 import ReadmeTemplate -from .asset50 import Kafka -from .asset51 import DbtTag -from .asset52 import APIPath, APISpec -from .asset53 import DataStudioAsset -from .asset54 import S3Bucket, S3Object -from .asset55 import ADLSAccount, ADLSContainer, ADLSObject -from .asset56 import GCSBucket, GCSObject -from .asset57 import PresetChart, PresetDashboard, PresetDataset, PresetWorkspace -from .asset58 import ModeChart, ModeCollection, ModeQuery, ModeReport, ModeWorkspace -from .asset59 import SigmaDataset, SigmaDatasetColumn -from .asset60 import SigmaDataElement, SigmaDataElementField, SigmaPage, SigmaWorkbook -from .asset61 import ( +from .asset04 import Badge +from .asset05 import AccessControl, AuthPolicy +from .asset06 import ProcessExecution +from .asset07 import AuthService +from .asset08 import Cloud +from .asset09 import Infrastructure +from .asset10 import BIProcess +from .asset11 import DbtProcess +from .asset12 import Persona +from .asset13 import Purpose +from .asset14 import Collection +from .asset16 import ObjectStore +from .asset18 import BI +from .asset19 import SaaS +from .asset21 import EventStore +from .asset23 import Insight +from .asset24 import API +from .asset27 import Google +from .asset28 import Azure +from .asset29 import AWS +from .asset30 import DbtColumnProcess +from .asset31 import S3 +from .asset32 import ADLS +from .asset33 import GCS +from .asset36 import Preset +from .asset37 import Mode +from .asset38 import Sigma +from .asset39 import Tableau +from .asset40 import Looker +from .asset41 import Redash +from .asset42 import DataStudio +from .asset43 import Metabase +from .asset44 import QuickSight +from .asset45 import Thoughtspot +from .asset46 import PowerBI +from .asset47 import MicroStrategy +from .asset48 import Qlik +from .asset49 import Salesforce +from .asset50 import ReadmeTemplate +from .asset51 import Kafka +from .asset52 import DbtTag +from .asset53 import APIPath, APISpec +from .asset54 import DataStudioAsset +from .asset55 import S3Bucket, S3Object +from .asset56 import ADLSAccount, ADLSContainer, ADLSObject +from .asset57 import GCSBucket, GCSObject +from .asset58 import PresetChart, PresetDashboard, PresetDataset, PresetWorkspace +from .asset59 import ModeChart, ModeCollection, ModeQuery, ModeReport, ModeWorkspace +from .asset60 import SigmaDataset, SigmaDatasetColumn +from .asset61 import SigmaDataElement, SigmaDataElementField, SigmaPage, SigmaWorkbook +from .asset62 import ( TableauCalculatedField, TableauDashboard, TableauDatasource, @@ -112,8 +112,8 @@ TableauWorkbook, TableauWorksheet, ) -from .asset62 import TableauMetric -from .asset63 import ( +from .asset63 import TableauMetric +from .asset64 import ( LookerDashboard, LookerExplore, LookerField, @@ -125,10 +125,10 @@ LookerTile, LookerView, ) -from .asset64 import RedashDashboard -from .asset65 import RedashQuery, RedashVisualization -from .asset66 import MetabaseCollection, MetabaseDashboard, MetabaseQuestion -from .asset67 import ( +from .asset65 import RedashDashboard +from .asset66 import RedashQuery, RedashVisualization +from .asset67 import MetabaseCollection, MetabaseDashboard, MetabaseQuestion +from .asset68 import ( QuickSightAnalysis, QuickSightAnalysisVisual, QuickSightDashboard, @@ -137,9 +137,9 @@ QuickSightDatasetField, QuickSightFolder, ) -from .asset68 import ThoughtspotDashlet, ThoughtspotLiveboard -from .asset69 import ThoughtspotAnswer -from .asset70 import ( +from .asset69 import ThoughtspotDashlet, ThoughtspotLiveboard +from .asset70 import ThoughtspotAnswer +from .asset71 import ( PowerBIColumn, PowerBIDashboard, PowerBIDataflow, @@ -152,7 +152,7 @@ PowerBITile, PowerBIWorkspace, ) -from .asset71 import ( +from .asset72 import ( MicroStrategyAttribute, MicroStrategyCube, MicroStrategyDocument, @@ -163,14 +163,14 @@ MicroStrategyReport, MicroStrategyVisualization, ) -from .asset72 import QlikApp, QlikChart, QlikDataset, QlikSheet, QlikSpace -from .asset73 import ( +from .asset73 import QlikApp, QlikChart, QlikDataset, QlikSheet, QlikSpace +from .asset74 import ( SalesforceDashboard, SalesforceField, SalesforceObject, SalesforceOrganization, SalesforceReport, ) -from .asset74 import KafkaConsumerGroup, KafkaTopic -from .asset75 import QlikStream -from .asset76 import AzureEventHub +from .asset75 import KafkaConsumerGroup, KafkaTopic +from .asset76 import QlikStream +from .asset77 import AzureEventHub diff --git a/pyatlan/model/assets/asset00.py b/pyatlan/model/assets/asset00.py index 73ed430f3..85b68b99c 100644 --- a/pyatlan/model/assets/asset00.py +++ b/pyatlan/model/assets/asset00.py @@ -27,6 +27,16 @@ SchemaRegistrySchemaType, SourceCostUnitType, ) +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + KeywordTextStemmedField, + NumericField, + NumericRankField, + RelationField, + TextField, +) from pyatlan.model.structs import ( ColumnValueFrequencyMap, DbtMetricFilter, @@ -84,11 +94,11 @@ def flush_custom_metadata(self): self.business_attributes = self._metadata_proxy.business_attributes def __setattr__(self, name, value): - if name in Referenceable._convience_properties: + if name in Referenceable._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + _convenience_properties: ClassVar[list[str]] = [ "qualified_name", "assigned_terms", ] @@ -122,6 +132,58 @@ class Attributes(AtlanObject): def validate_required(self): pass + TYPE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "typeName", "__typeName.keyword", "__typeName" + ) + """Type of the asset. For example Table, Column, and so on.""" + + GUID: ClassVar[KeywordField] = KeywordField("guid", "__guid") + """Globally unique identifier (GUID) of any object in Atlan.""" + + CREATED_BY: ClassVar[KeywordField] = KeywordField("createdBy", "__createdBy") + """Atlan user who created this asset.""" + + UPDATED_BY: ClassVar[KeywordField] = KeywordField("updatedBy", "__modifiedBy") + """Atlan user who last updated the asset.""" + + STATUS: ClassVar[KeywordField] = KeywordField("status", "__state") + """Asset status in Atlan (active vs deleted).""" + + ATLAN_TAGS: ClassVar[KeywordTextField] = KeywordTextField( + "classificationNames", "__traitNames", "__classificationsText" + ) + """ + All directly-assigned Atlan tags that exist on an asset, searchable by internal hashed-string ID of the Atlan tag. + """ + + PROPAGATED_ATLAN_TAGS: ClassVar[KeywordTextField] = KeywordTextField( + "classificationNames", "__propagatedTraitNames", "__classificationsText" + ) + """All propagated Atlan tags that exist on an asset, searchable by internal hashed-string ID of the Atlan tag.""" + + ASSIGNED_TERMS: ClassVar[KeywordTextField] = KeywordTextField( + "meanings", "__meanings", "__meaningsText" + ) + """All terms attached to an asset, searchable by the term's qualifiedName.""" + + SUPER_TYPE_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "typeName", "__superTypeNames.keyword", "__superTypeNames" + ) + """All super types of an asset.""" + + CREATE_TIME: ClassVar[NumericField] = NumericField("createTime", "__timestamp") + """Time (in milliseconds) when the asset was created.""" + + UPDATE_TIME: ClassVar[NumericField] = NumericField( + "updateTime", "__modificationTimestamp" + ) + """Time (in milliseconds) when the asset was last updated.""" + + QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "qualifiedName", "qualifiedName", "qualifiedName.text" + ) + """Unique fully-qualified name of the asset in Atlan.""" + _metadata_proxy: CustomMetadataProxy = PrivateAttr() attributes: "Referenceable.Attributes" = Field( default_factory=lambda: Referenceable.Attributes(), @@ -340,11 +402,764 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Asset._convience_properties: + if name in Asset._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + NAME: ClassVar[KeywordTextStemmedField] = KeywordTextStemmedField( + "name", "name.keyword", "name", "name.stemmed" + ) + """ + TBC + """ + DISPLAY_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "displayName", "displayName.keyword", "displayName" + ) + """ + TBC + """ + DESCRIPTION: ClassVar[KeywordTextField] = KeywordTextField( + "description", "description.keyword", "description" + ) + """ + TBC + """ + USER_DESCRIPTION: ClassVar[KeywordTextField] = KeywordTextField( + "userDescription", "userDescription.keyword", "userDescription" + ) + """ + TBC + """ + TENANT_ID: ClassVar[KeywordField] = KeywordField("tenantId", "tenantId") + """ + TBC + """ + CERTIFICATE_STATUS: ClassVar[TextField] = TextField( + "certificateStatus", "certificateStatus.text" + ) + """ + TBC + """ + CERTIFICATE_STATUS_MESSAGE: ClassVar[KeywordField] = KeywordField( + "certificateStatusMessage", "certificateStatusMessage" + ) + """ + TBC + """ + CERTIFICATE_UPDATED_BY: ClassVar[KeywordField] = KeywordField( + "certificateUpdatedBy", "certificateUpdatedBy" + ) + """ + TBC + """ + CERTIFICATE_UPDATED_AT: ClassVar[NumericField] = NumericField( + "certificateUpdatedAt", "certificateUpdatedAt" + ) + """ + TBC + """ + ANNOUNCEMENT_TITLE: ClassVar[KeywordField] = KeywordField( + "announcementTitle", "announcementTitle" + ) + """ + TBC + """ + ANNOUNCEMENT_MESSAGE: ClassVar[KeywordField] = KeywordField( + "announcementMessage", "announcementMessage" + ) + """ + TBC + """ + ANNOUNCEMENT_TYPE: ClassVar[KeywordField] = KeywordField( + "announcementType", "announcementType" + ) + """ + TBC + """ + ANNOUNCEMENT_UPDATED_AT: ClassVar[NumericField] = NumericField( + "announcementUpdatedAt", "announcementUpdatedAt" + ) + """ + TBC + """ + ANNOUNCEMENT_UPDATED_BY: ClassVar[KeywordField] = KeywordField( + "announcementUpdatedBy", "announcementUpdatedBy" + ) + """ + TBC + """ + OWNER_USERS: ClassVar[KeywordField] = KeywordField("ownerUsers", "ownerUsers") + """ + TBC + """ + OWNER_GROUPS: ClassVar[KeywordField] = KeywordField("ownerGroups", "ownerGroups") + """ + TBC + """ + ADMIN_USERS: ClassVar[KeywordField] = KeywordField("adminUsers", "adminUsers") + """ + TBC + """ + ADMIN_GROUPS: ClassVar[KeywordField] = KeywordField("adminGroups", "adminGroups") + """ + TBC + """ + VIEWER_USERS: ClassVar[KeywordField] = KeywordField("viewerUsers", "viewerUsers") + """ + TBC + """ + VIEWER_GROUPS: ClassVar[KeywordField] = KeywordField("viewerGroups", "viewerGroups") + """ + TBC + """ + CONNECTOR_NAME: ClassVar[KeywordField] = KeywordField( + "connectorName", "connectorName" + ) + """ + TBC + """ + CONNECTION_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "connectionName", "connectionName", "connectionName.text" + ) + """ + TBC + """ + CONNECTION_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "connectionQualifiedName", + "connectionQualifiedName", + "connectionQualifiedName.text", + ) + """ + TBC + """ + HAS_LINEAGE: ClassVar[BooleanField] = BooleanField("__hasLineage", "__hasLineage") + """ + TBC + """ + IS_DISCOVERABLE: ClassVar[BooleanField] = BooleanField( + "isDiscoverable", "isDiscoverable" + ) + """ + TBC + """ + IS_EDITABLE: ClassVar[BooleanField] = BooleanField("isEditable", "isEditable") + """ + TBC + """ + SUB_TYPE: ClassVar[KeywordField] = KeywordField("subType", "subType") + """ + TBC + """ + VIEW_SCORE: ClassVar[NumericRankField] = NumericRankField( + "viewScore", "viewScore", "viewScore.rank_feature" + ) + """ + TBC + """ + POPULARITY_SCORE: ClassVar[NumericRankField] = NumericRankField( + "popularityScore", "popularityScore", "popularityScore.rank_feature" + ) + """ + TBC + """ + SOURCE_OWNERS: ClassVar[KeywordField] = KeywordField("sourceOwners", "sourceOwners") + """ + TBC + """ + SOURCE_CREATED_BY: ClassVar[KeywordField] = KeywordField( + "sourceCreatedBy", "sourceCreatedBy" + ) + """ + TBC + """ + SOURCE_CREATED_AT: ClassVar[NumericField] = NumericField( + "sourceCreatedAt", "sourceCreatedAt" + ) + """ + TBC + """ + SOURCE_UPDATED_AT: ClassVar[NumericField] = NumericField( + "sourceUpdatedAt", "sourceUpdatedAt" + ) + """ + TBC + """ + SOURCE_UPDATED_BY: ClassVar[KeywordField] = KeywordField( + "sourceUpdatedBy", "sourceUpdatedBy" + ) + """ + TBC + """ + SOURCE_URL: ClassVar[KeywordField] = KeywordField("sourceURL", "sourceURL") + """ + TBC + """ + SOURCE_EMBED_URL: ClassVar[KeywordField] = KeywordField( + "sourceEmbedURL", "sourceEmbedURL" + ) + """ + TBC + """ + LAST_SYNC_WORKFLOW_NAME: ClassVar[KeywordField] = KeywordField( + "lastSyncWorkflowName", "lastSyncWorkflowName" + ) + """ + TBC + """ + LAST_SYNC_RUN_AT: ClassVar[NumericField] = NumericField( + "lastSyncRunAt", "lastSyncRunAt" + ) + """ + TBC + """ + LAST_SYNC_RUN: ClassVar[KeywordField] = KeywordField("lastSyncRun", "lastSyncRun") + """ + TBC + """ + ADMIN_ROLES: ClassVar[KeywordField] = KeywordField("adminRoles", "adminRoles") + """ + TBC + """ + SOURCE_READ_COUNT: ClassVar[NumericField] = NumericField( + "sourceReadCount", "sourceReadCount" + ) + """ + Total count of all read operations at source + """ + SOURCE_READ_USER_COUNT: ClassVar[NumericField] = NumericField( + "sourceReadUserCount", "sourceReadUserCount" + ) + """ + Total number of unique users that read data from asset + """ + SOURCE_LAST_READ_AT: ClassVar[NumericField] = NumericField( + "sourceLastReadAt", "sourceLastReadAt" + ) + """ + Timestamp of most recent read operation + """ + LAST_ROW_CHANGED_AT: ClassVar[NumericField] = NumericField( + "lastRowChangedAt", "lastRowChangedAt" + ) + """ + Timestamp of last operation that inserted/updated/deleted rows. Google Sheets, Mysql table etc + """ + SOURCE_TOTAL_COST: ClassVar[NumericField] = NumericField( + "sourceTotalCost", "sourceTotalCost" + ) + """ + Total cost of all operations at source + """ + SOURCE_COST_UNIT: ClassVar[KeywordField] = KeywordField( + "sourceCostUnit", "sourceCostUnit" + ) + """ + The unit of measure for sourceTotalCost + """ + SOURCE_READ_QUERY_COST: ClassVar[NumericField] = NumericField( + "sourceReadQueryCost", "sourceReadQueryCost" + ) + """ + Total cost of read queries at source + """ + SOURCE_READ_RECENT_USER_LIST: ClassVar[KeywordField] = KeywordField( + "sourceReadRecentUserList", "sourceReadRecentUserList" + ) + """ + List of usernames of the most recent users who read the asset + """ + SOURCE_READ_RECENT_USER_RECORD_LIST: ClassVar[KeywordField] = KeywordField( + "sourceReadRecentUserRecordList", "sourceReadRecentUserRecordList" + ) + """ + List of usernames with extra insights for the most recent users who read the asset + """ + SOURCE_READ_TOP_USER_LIST: ClassVar[KeywordField] = KeywordField( + "sourceReadTopUserList", "sourceReadTopUserList" + ) + """ + List of usernames of the top users who read the asset the most + """ + SOURCE_READ_TOP_USER_RECORD_LIST: ClassVar[KeywordField] = KeywordField( + "sourceReadTopUserRecordList", "sourceReadTopUserRecordList" + ) + """ + List of usernames with extra insights for the top users who read the asset the most + """ + SOURCE_READ_POPULAR_QUERY_RECORD_LIST: ClassVar[KeywordField] = KeywordField( + "sourceReadPopularQueryRecordList", "sourceReadPopularQueryRecordList" + ) + """ + List of the most popular queries that accessed this asset + """ + SOURCE_READ_EXPENSIVE_QUERY_RECORD_LIST: ClassVar[KeywordField] = KeywordField( + "sourceReadExpensiveQueryRecordList", "sourceReadExpensiveQueryRecordList" + ) + """ + List of the most expensive queries that accessed this asset + """ + SOURCE_READ_SLOW_QUERY_RECORD_LIST: ClassVar[KeywordField] = KeywordField( + "sourceReadSlowQueryRecordList", "sourceReadSlowQueryRecordList" + ) + """ + List of the slowest queries that accessed this asset + """ + SOURCE_QUERY_COMPUTE_COST_LIST: ClassVar[KeywordField] = KeywordField( + "sourceQueryComputeCostList", "sourceQueryComputeCostList" + ) + """ + List of most expensive warehouse names + """ + SOURCE_QUERY_COMPUTE_COST_RECORD_LIST: ClassVar[KeywordField] = KeywordField( + "sourceQueryComputeCostRecordList", "sourceQueryComputeCostRecordList" + ) + """ + List of most expensive warehouses with extra insights + """ + DBT_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtQualifiedName", "dbtQualifiedName", "dbtQualifiedName.text" + ) + """ + TBC + """ + ASSET_DBT_ALIAS: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtAlias", "assetDbtAlias.keyword", "assetDbtAlias" + ) + """ + TBC + """ + ASSET_DBT_META: ClassVar[KeywordField] = KeywordField( + "assetDbtMeta", "assetDbtMeta" + ) + """ + TBC + """ + ASSET_DBT_UNIQUE_ID: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtUniqueId", "assetDbtUniqueId.keyword", "assetDbtUniqueId" + ) + """ + TBC + """ + ASSET_DBT_ACCOUNT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtAccountName", "assetDbtAccountName.keyword", "assetDbtAccountName" + ) + """ + TBC + """ + ASSET_DBT_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtProjectName", "assetDbtProjectName.keyword", "assetDbtProjectName" + ) + """ + TBC + """ + ASSET_DBT_PACKAGE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtPackageName", "assetDbtPackageName.keyword", "assetDbtPackageName" + ) + """ + TBC + """ + ASSET_DBT_JOB_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtJobName", "assetDbtJobName.keyword", "assetDbtJobName" + ) + """ + TBC + """ + ASSET_DBT_JOB_SCHEDULE: ClassVar[KeywordField] = KeywordField( + "assetDbtJobSchedule", "assetDbtJobSchedule" + ) + """ + TBC + """ + ASSET_DBT_JOB_STATUS: ClassVar[KeywordField] = KeywordField( + "assetDbtJobStatus", "assetDbtJobStatus" + ) + """ + TBC + """ + ASSET_DBT_TEST_STATUS: ClassVar[KeywordField] = KeywordField( + "assetDbtTestStatus", "assetDbtTestStatus" + ) + """ + All associated dbt test statuses + """ + ASSET_DBT_JOB_SCHEDULE_CRON_HUMANIZED: ClassVar[TextField] = TextField( + "assetDbtJobScheduleCronHumanized", "assetDbtJobScheduleCronHumanized" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN: ClassVar[NumericField] = NumericField( + "assetDbtJobLastRun", "assetDbtJobLastRun" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_URL: ClassVar[KeywordField] = KeywordField( + "assetDbtJobLastRunUrl", "assetDbtJobLastRunUrl" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_CREATED_AT: ClassVar[NumericField] = NumericField( + "assetDbtJobLastRunCreatedAt", "assetDbtJobLastRunCreatedAt" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_UPDATED_AT: ClassVar[NumericField] = NumericField( + "assetDbtJobLastRunUpdatedAt", "assetDbtJobLastRunUpdatedAt" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_DEQUED_AT: ClassVar[NumericField] = NumericField( + "assetDbtJobLastRunDequedAt", "assetDbtJobLastRunDequedAt" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_STARTED_AT: ClassVar[NumericField] = NumericField( + "assetDbtJobLastRunStartedAt", "assetDbtJobLastRunStartedAt" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_TOTAL_DURATION: ClassVar[KeywordField] = KeywordField( + "assetDbtJobLastRunTotalDuration", "assetDbtJobLastRunTotalDuration" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_TOTAL_DURATION_HUMANIZED: ClassVar[ + KeywordField + ] = KeywordField( + "assetDbtJobLastRunTotalDurationHumanized", + "assetDbtJobLastRunTotalDurationHumanized", + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_QUEUED_DURATION: ClassVar[KeywordField] = KeywordField( + "assetDbtJobLastRunQueuedDuration", "assetDbtJobLastRunQueuedDuration" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_QUEUED_DURATION_HUMANIZED: ClassVar[ + KeywordField + ] = KeywordField( + "assetDbtJobLastRunQueuedDurationHumanized", + "assetDbtJobLastRunQueuedDurationHumanized", + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_RUN_DURATION: ClassVar[KeywordField] = KeywordField( + "assetDbtJobLastRunRunDuration", "assetDbtJobLastRunRunDuration" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_RUN_DURATION_HUMANIZED: ClassVar[ + KeywordField + ] = KeywordField( + "assetDbtJobLastRunRunDurationHumanized", + "assetDbtJobLastRunRunDurationHumanized", + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_GIT_BRANCH: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtJobLastRunGitBranch", + "assetDbtJobLastRunGitBranch", + "assetDbtJobLastRunGitBranch.text", + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_GIT_SHA: ClassVar[KeywordField] = KeywordField( + "assetDbtJobLastRunGitSha", "assetDbtJobLastRunGitSha" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_STATUS_MESSAGE: ClassVar[ + KeywordTextField + ] = KeywordTextField( + "assetDbtJobLastRunStatusMessage", + "assetDbtJobLastRunStatusMessage.keyword", + "assetDbtJobLastRunStatusMessage", + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_OWNER_THREAD_ID: ClassVar[KeywordField] = KeywordField( + "assetDbtJobLastRunOwnerThreadId", "assetDbtJobLastRunOwnerThreadId" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_EXECUTED_BY_THREAD_ID: ClassVar[KeywordField] = KeywordField( + "assetDbtJobLastRunExecutedByThreadId", "assetDbtJobLastRunExecutedByThreadId" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_ARTIFACTS_SAVED: ClassVar[BooleanField] = BooleanField( + "assetDbtJobLastRunArtifactsSaved", "assetDbtJobLastRunArtifactsSaved" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_ARTIFACT_S3PATH: ClassVar[KeywordField] = KeywordField( + "assetDbtJobLastRunArtifactS3Path", "assetDbtJobLastRunArtifactS3Path" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_HAS_DOCS_GENERATED: ClassVar[BooleanField] = BooleanField( + "assetDbtJobLastRunHasDocsGenerated", "assetDbtJobLastRunHasDocsGenerated" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_HAS_SOURCES_GENERATED: ClassVar[BooleanField] = BooleanField( + "assetDbtJobLastRunHasSourcesGenerated", "assetDbtJobLastRunHasSourcesGenerated" + ) + """ + TBC + """ + ASSET_DBT_JOB_LAST_RUN_NOTIFICATIONS_SENT: ClassVar[BooleanField] = BooleanField( + "assetDbtJobLastRunNotificationsSent", "assetDbtJobLastRunNotificationsSent" + ) + """ + TBC + """ + ASSET_DBT_JOB_NEXT_RUN: ClassVar[NumericField] = NumericField( + "assetDbtJobNextRun", "assetDbtJobNextRun" + ) + """ + TBC + """ + ASSET_DBT_JOB_NEXT_RUN_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtJobNextRunHumanized", + "assetDbtJobNextRunHumanized.keyword", + "assetDbtJobNextRunHumanized", + ) + """ + TBC + """ + ASSET_DBT_ENVIRONMENT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtEnvironmentName", + "assetDbtEnvironmentName.keyword", + "assetDbtEnvironmentName", + ) + """ + TBC + """ + ASSET_DBT_ENVIRONMENT_DBT_VERSION: ClassVar[KeywordField] = KeywordField( + "assetDbtEnvironmentDbtVersion", "assetDbtEnvironmentDbtVersion" + ) + """ + TBC + """ + ASSET_DBT_TAGS: ClassVar[KeywordTextField] = KeywordTextField( + "assetDbtTags", "assetDbtTags", "assetDbtTags.text" + ) + """ + TBC + """ + ASSET_DBT_SEMANTIC_LAYER_PROXY_URL: ClassVar[KeywordField] = KeywordField( + "assetDbtSemanticLayerProxyUrl", "assetDbtSemanticLayerProxyUrl" + ) + """ + TBC + """ + ASSET_DBT_SOURCE_FRESHNESS_CRITERIA: ClassVar[KeywordField] = KeywordField( + "assetDbtSourceFreshnessCriteria", "assetDbtSourceFreshnessCriteria" + ) + """ + TBC + """ + SAMPLE_DATA_URL: ClassVar[KeywordTextField] = KeywordTextField( + "sampleDataUrl", "sampleDataUrl", "sampleDataUrl.text" + ) + """ + TBC + """ + ASSET_TAGS: ClassVar[KeywordTextField] = KeywordTextField( + "assetTags", "assetTags", "assetTags.text" + ) + """ + TBC + """ + ASSET_MC_INCIDENT_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "assetMcIncidentNames", "assetMcIncidentNames.keyword", "assetMcIncidentNames" + ) + """ + TBC + """ + ASSET_MC_INCIDENT_QUALIFIED_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "assetMcIncidentQualifiedNames", + "assetMcIncidentQualifiedNames", + "assetMcIncidentQualifiedNames.text", + ) + """ + TBC + """ + ASSET_MC_MONITOR_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "assetMcMonitorNames", "assetMcMonitorNames.keyword", "assetMcMonitorNames" + ) + """ + TBC + """ + ASSET_MC_MONITOR_QUALIFIED_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "assetMcMonitorQualifiedNames", + "assetMcMonitorQualifiedNames", + "assetMcMonitorQualifiedNames.text", + ) + """ + TBC + """ + ASSET_MC_MONITOR_STATUSES: ClassVar[KeywordField] = KeywordField( + "assetMcMonitorStatuses", "assetMcMonitorStatuses" + ) + """ + All associated monitors statuses + """ + ASSET_MC_MONITOR_TYPES: ClassVar[KeywordField] = KeywordField( + "assetMcMonitorTypes", "assetMcMonitorTypes" + ) + """ + All associated monitor types + """ + ASSET_MC_MONITOR_SCHEDULE_TYPES: ClassVar[KeywordField] = KeywordField( + "assetMcMonitorScheduleTypes", "assetMcMonitorScheduleTypes" + ) + """ + MonteCarlo Monitor schedule type + """ + ASSET_MC_INCIDENT_TYPES: ClassVar[KeywordField] = KeywordField( + "assetMcIncidentTypes", "assetMcIncidentTypes" + ) + """ + TBC + """ + ASSET_MC_INCIDENT_SUB_TYPES: ClassVar[KeywordField] = KeywordField( + "assetMcIncidentSubTypes", "assetMcIncidentSubTypes" + ) + """ + TBC + """ + ASSET_MC_INCIDENT_SEVERITIES: ClassVar[KeywordField] = KeywordField( + "assetMcIncidentSeverities", "assetMcIncidentSeverities" + ) + """ + TBC + """ + ASSET_MC_INCIDENT_STATES: ClassVar[KeywordField] = KeywordField( + "assetMcIncidentStates", "assetMcIncidentStates" + ) + """ + TBC + """ + ASSET_MC_LAST_SYNC_RUN_AT: ClassVar[NumericField] = NumericField( + "assetMcLastSyncRunAt", "assetMcLastSyncRunAt" + ) + """ + TBC + """ + STARRED_BY: ClassVar[KeywordField] = KeywordField("starredBy", "starredBy") + """ + TBC + """ + STARRED_DETAILS_LIST: ClassVar[KeywordField] = KeywordField( + "starredDetailsList", "starredDetailsList" + ) + """ + List of usernames with extra information of the users who have starred an asset + """ + STARRED_COUNT: ClassVar[NumericField] = NumericField("starredCount", "starredCount") + """ + TBC + """ + ASSET_SODA_DQ_STATUS: ClassVar[KeywordField] = KeywordField( + "assetSodaDQStatus", "assetSodaDQStatus" + ) + """ + Soda DQ Status + """ + ASSET_SODA_CHECK_COUNT: ClassVar[NumericField] = NumericField( + "assetSodaCheckCount", "assetSodaCheckCount" + ) + """ + Soda check count + """ + ASSET_SODA_LAST_SYNC_RUN_AT: ClassVar[NumericField] = NumericField( + "assetSodaLastSyncRunAt", "assetSodaLastSyncRunAt" + ) + """ + TBC + """ + ASSET_SODA_LAST_SCAN_AT: ClassVar[NumericField] = NumericField( + "assetSodaLastScanAt", "assetSodaLastScanAt" + ) + """ + TBC + """ + ASSET_SODA_CHECK_STATUSES: ClassVar[KeywordField] = KeywordField( + "assetSodaCheckStatuses", "assetSodaCheckStatuses" + ) + """ + All associated soda check statuses + """ + ASSET_SODA_SOURCE_URL: ClassVar[KeywordField] = KeywordField( + "assetSodaSourceURL", "assetSodaSourceURL" + ) + """ + TBC + """ + ASSET_ICON: ClassVar[KeywordField] = KeywordField("assetIcon", "assetIcon") + """ + TBC + """ + + SCHEMA_REGISTRY_SUBJECTS: ClassVar[RelationField] = RelationField( + "schemaRegistrySubjects" + ) + """ + TBC + """ + MC_MONITORS: ClassVar[RelationField] = RelationField("mcMonitors") + """ + TBC + """ + FILES: ClassVar[RelationField] = RelationField("files") + """ + TBC + """ + MC_INCIDENTS: ClassVar[RelationField] = RelationField("mcIncidents") + """ + TBC + """ + LINKS: ClassVar[RelationField] = RelationField("links") + """ + TBC + """ + METRICS: ClassVar[RelationField] = RelationField("metrics") + """ + TBC + """ + README: ClassVar[RelationField] = RelationField("readme") + """ + TBC + """ + SODA_CHECKS: ClassVar[RelationField] = RelationField("sodaChecks") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "name", "display_name", "description", @@ -2617,6 +3432,14 @@ def create_for_modification( ) ) + ANCHOR: ClassVar[KeywordField] = KeywordField("anchor", "__glossary") + """Glossary in which the category is contained, searchable by the qualifiedName of the glossary.""" + + PARENT_CATEGORY: ClassVar[KeywordField] = KeywordField( + "categories", "__parentCategory" + ) + """Parent category in which a subcategory is contained, searchable by the qualifiedName of the category.""" + type_name: str = Field("AtlasGlossaryCategory", allow_mutation=False) @validator("type_name") @@ -2626,11 +3449,39 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in AtlasGlossaryCategory._convience_properties: + if name in AtlasGlossaryCategory._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SHORT_DESCRIPTION: ClassVar[KeywordField] = KeywordField( + "shortDescription", "shortDescription" + ) + """ + TBC + """ + LONG_DESCRIPTION: ClassVar[KeywordField] = KeywordField( + "longDescription", "longDescription" + ) + """ + TBC + """ + ADDITIONAL_ATTRIBUTES: ClassVar[KeywordField] = KeywordField( + "additionalAttributes", "additionalAttributes" + ) + """ + TBC + """ + + TERMS: ClassVar[RelationField] = RelationField("terms") + """ + TBC + """ + CHILDREN_CATEGORIES: ClassVar[RelationField] = RelationField("childrenCategories") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "short_description", "long_description", "additional_attributes", @@ -2789,11 +3640,47 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in AtlasGlossary._convience_properties: + if name in AtlasGlossary._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SHORT_DESCRIPTION: ClassVar[KeywordField] = KeywordField( + "shortDescription", "shortDescription" + ) + """ + TBC + """ + LONG_DESCRIPTION: ClassVar[KeywordField] = KeywordField( + "longDescription", "longDescription" + ) + """ + TBC + """ + LANGUAGE: ClassVar[KeywordField] = KeywordField("language", "language") + """ + TBC + """ + USAGE: ClassVar[KeywordField] = KeywordField("usage", "usage") + """ + TBC + """ + ADDITIONAL_ATTRIBUTES: ClassVar[KeywordField] = KeywordField( + "additionalAttributes", "additionalAttributes" + ) + """ + TBC + """ + + TERMS: ClassVar[RelationField] = RelationField("terms") + """ + TBC + """ + CATEGORIES: ClassVar[RelationField] = RelationField("categories") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "short_description", "long_description", "language", @@ -2970,6 +3857,12 @@ def create_for_modification( ) ) + ANCHOR: ClassVar[KeywordField] = KeywordField("anchor", "__glossary") + """Glossary in which the term is contained, searchable by the qualifiedName of the glossary.""" + + CATEGORIES: ClassVar[KeywordField] = KeywordField("categories", "__categories") + """Categories in which the term is organized, searchable by the qualifiedName of the category.""" + type_name: str = Field("AtlasGlossaryTerm", allow_mutation=False) @validator("type_name") @@ -2979,11 +3872,99 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in AtlasGlossaryTerm._convience_properties: + if name in AtlasGlossaryTerm._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SHORT_DESCRIPTION: ClassVar[KeywordField] = KeywordField( + "shortDescription", "shortDescription" + ) + """ + TBC + """ + LONG_DESCRIPTION: ClassVar[KeywordField] = KeywordField( + "longDescription", "longDescription" + ) + """ + TBC + """ + EXAMPLES: ClassVar[KeywordField] = KeywordField("examples", "examples") + """ + TBC + """ + ABBREVIATION: ClassVar[KeywordField] = KeywordField("abbreviation", "abbreviation") + """ + TBC + """ + USAGE: ClassVar[KeywordField] = KeywordField("usage", "usage") + """ + TBC + """ + ADDITIONAL_ATTRIBUTES: ClassVar[KeywordField] = KeywordField( + "additionalAttributes", "additionalAttributes" + ) + """ + TBC + """ + + VALID_VALUES_FOR: ClassVar[RelationField] = RelationField("validValuesFor") + """ + TBC + """ + VALID_VALUES: ClassVar[RelationField] = RelationField("validValues") + """ + TBC + """ + SEE_ALSO: ClassVar[RelationField] = RelationField("seeAlso") + """ + TBC + """ + IS_A: ClassVar[RelationField] = RelationField("isA") + """ + TBC + """ + ANTONYMS: ClassVar[RelationField] = RelationField("antonyms") + """ + TBC + """ + ASSIGNED_ENTITIES: ClassVar[RelationField] = RelationField("assignedEntities") + """ + TBC + """ + CLASSIFIES: ClassVar[RelationField] = RelationField("classifies") + """ + TBC + """ + PREFERRED_TO_TERMS: ClassVar[RelationField] = RelationField("preferredToTerms") + """ + TBC + """ + PREFERRED_TERMS: ClassVar[RelationField] = RelationField("preferredTerms") + """ + TBC + """ + TRANSLATION_TERMS: ClassVar[RelationField] = RelationField("translationTerms") + """ + TBC + """ + SYNONYMS: ClassVar[RelationField] = RelationField("synonyms") + """ + TBC + """ + REPLACED_BY: ClassVar[RelationField] = RelationField("replacedBy") + """ + TBC + """ + REPLACEMENT_TERMS: ClassVar[RelationField] = RelationField("replacementTerms") + """ + TBC + """ + TRANSLATED_TERMS: ClassVar[RelationField] = RelationField("translatedTerms") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "short_description", "long_description", "examples", @@ -3361,11 +4342,33 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Process._convience_properties: + if name in Process._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + CODE: ClassVar[KeywordField] = KeywordField("code", "code") + """ + TBC + """ + SQL: ClassVar[KeywordField] = KeywordField("sql", "sql") + """ + TBC + """ + AST: ClassVar[KeywordField] = KeywordField("ast", "ast") + """ + TBC + """ + + AIRFLOW_TASKS: ClassVar[RelationField] = RelationField("airflowTasks") + """ + TBC + """ + COLUMN_PROCESSES: ClassVar[RelationField] = RelationField("columnProcesses") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "inputs", "outputs", "code", @@ -3541,11 +4544,20 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Namespace._convience_properties: + if name in Namespace._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + CHILDREN_QUERIES: ClassVar[RelationField] = RelationField("childrenQueries") + """ + TBC + """ + CHILDREN_FOLDERS: ClassVar[RelationField] = RelationField("childrenFolders") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "children_queries", "children_folders", ] @@ -3597,11 +4609,31 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Folder._convience_properties: + if name in Folder._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + PARENT_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "parentQualifiedName", "parentQualifiedName", "parentQualifiedName.text" + ) + """ + TBC + """ + COLLECTION_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "collectionQualifiedName", + "collectionQualifiedName", + "collectionQualifiedName.text", + ) + """ + TBC + """ + + PARENT: ClassVar[RelationField] = RelationField("parent") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "parent_qualified_name", "collection_qualified_name", "parent", @@ -3671,11 +4703,34 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Catalog._convience_properties: + if name in Catalog._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + INPUT_TO_PROCESSES: ClassVar[RelationField] = RelationField("inputToProcesses") + """ + TBC + """ + OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( + "outputFromAirflowTasks" + ) + """ + TBC + """ + INPUT_TO_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( + "inputToAirflowTasks" + ) + """ + TBC + """ + OUTPUT_FROM_PROCESSES: ClassVar[RelationField] = RelationField( + "outputFromProcesses" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "input_to_processes", "output_from_airflow_tasks", "input_to_airflow_tasks", @@ -3767,11 +4822,34 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Tag._convience_properties: + if name in Tag._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + TAG_ID: ClassVar[KeywordField] = KeywordField("tagId", "tagId") + """ + Unique source tag identifier + """ + TAG_ATTRIBUTES: ClassVar[KeywordField] = KeywordField( + "tagAttributes", "tagAttributes" + ) + """ + Source tag attributes + """ + TAG_ALLOWED_VALUES: ClassVar[KeywordTextField] = KeywordTextField( + "tagAllowedValues", "tagAllowedValues", "tagAllowedValues.text" + ) + """ + Allowed values for the tag at source. De-normalised from sourceTagAttributed for ease of querying + """ + MAPPED_CLASSIFICATION_NAME: ClassVar[KeywordField] = KeywordField( + "mappedClassificationName", "mappedClassificationName" + ) + """ + Mapped atlan classification name + """ + + _convenience_properties: ClassVar[list[str]] = [ "tag_id", "tag_attributes", "tag_allowed_values", @@ -3851,11 +4929,24 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in ColumnProcess._convience_properties: + if name in ColumnProcess._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + OUTPUTS: ClassVar[RelationField] = RelationField("outputs") + """ + TBC + """ + PROCESS: ClassVar[RelationField] = RelationField("process") + """ + TBC + """ + INPUTS: ClassVar[RelationField] = RelationField("inputs") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "outputs", "process", "inputs", @@ -3921,11 +5012,58 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Airflow._convience_properties: + if name in Airflow._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + AIRFLOW_TAGS: ClassVar[KeywordField] = KeywordField("airflowTags", "airflowTags") + """ + TBC + """ + AIRFLOW_RUN_VERSION: ClassVar[KeywordField] = KeywordField( + "airflowRunVersion", "airflowRunVersion" + ) + """ + Airflow Version of the run + """ + AIRFLOW_RUN_OPEN_LINEAGE_VERSION: ClassVar[KeywordField] = KeywordField( + "airflowRunOpenLineageVersion", "airflowRunOpenLineageVersion" + ) + """ + OpenLineage Version of the run + """ + AIRFLOW_RUN_NAME: ClassVar[KeywordField] = KeywordField( + "airflowRunName", "airflowRunName" + ) + """ + Name of the run + """ + AIRFLOW_RUN_TYPE: ClassVar[KeywordField] = KeywordField( + "airflowRunType", "airflowRunType" + ) + """ + Type of the run + """ + AIRFLOW_RUN_START_TIME: ClassVar[NumericField] = NumericField( + "airflowRunStartTime", "airflowRunStartTime" + ) + """ + Start time of the run + """ + AIRFLOW_RUN_END_TIME: ClassVar[NumericField] = NumericField( + "airflowRunEndTime", "airflowRunEndTime" + ) + """ + End time of the run + """ + AIRFLOW_RUN_OPEN_LINEAGE_STATE: ClassVar[KeywordField] = KeywordField( + "airflowRunOpenLineageState", "airflowRunOpenLineageState" + ) + """ + OpenLineage state of the run + """ + + _convenience_properties: ClassVar[list[str]] = [ "airflow_tags", "airflow_run_version", "airflow_run_open_lineage_version", @@ -4077,11 +5215,29 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in AirflowDag._convience_properties: + if name in AirflowDag._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + AIRFLOW_DAG_SCHEDULE: ClassVar[KeywordField] = KeywordField( + "airflowDagSchedule", "airflowDagSchedule" + ) + """ + TBC + """ + AIRFLOW_DAG_SCHEDULE_DELTA: ClassVar[NumericField] = NumericField( + "airflowDagScheduleDelta", "airflowDagScheduleDelta" + ) + """ + Duration between scheduled runs in seconds + """ + + AIRFLOW_TASKS: ClassVar[RelationField] = RelationField("airflowTasks") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "airflow_dag_schedule", "airflow_dag_schedule_delta", "airflow_tasks", @@ -4151,11 +5307,99 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in AirflowTask._convience_properties: + if name in AirflowTask._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + AIRFLOW_TASK_OPERATOR_CLASS: ClassVar[KeywordTextField] = KeywordTextField( + "airflowTaskOperatorClass", + "airflowTaskOperatorClass.keyword", + "airflowTaskOperatorClass", + ) + """ + TBC + """ + AIRFLOW_DAG_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "airflowDagName", "airflowDagName.keyword", "airflowDagName" + ) + """ + TBC + """ + AIRFLOW_DAG_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "airflowDagQualifiedName", "airflowDagQualifiedName" + ) + """ + TBC + """ + AIRFLOW_TASK_CONNECTION_ID: ClassVar[KeywordTextField] = KeywordTextField( + "airflowTaskConnectionId", + "airflowTaskConnectionId.keyword", + "airflowTaskConnectionId", + ) + """ + TBC + """ + AIRFLOW_TASK_SQL: ClassVar[KeywordField] = KeywordField( + "airflowTaskSql", "airflowTaskSql" + ) + """ + TBC + """ + AIRFLOW_TASK_RETRY_NUMBER: ClassVar[NumericField] = NumericField( + "airflowTaskRetryNumber", "airflowTaskRetryNumber" + ) + """ + Retry required for the run + """ + AIRFLOW_TASK_POOL: ClassVar[KeywordField] = KeywordField( + "airflowTaskPool", "airflowTaskPool" + ) + """ + Pool on which this run happened + """ + AIRFLOW_TASK_POOL_SLOTS: ClassVar[NumericField] = NumericField( + "airflowTaskPoolSlots", "airflowTaskPoolSlots" + ) + """ + Pool slots used for the run + """ + AIRFLOW_TASK_QUEUE: ClassVar[KeywordField] = KeywordField( + "airflowTaskQueue", "airflowTaskQueue" + ) + """ + Queue on which this run happened + """ + AIRFLOW_TASK_PRIORITY_WEIGHT: ClassVar[NumericField] = NumericField( + "airflowTaskPriorityWeight", "airflowTaskPriorityWeight" + ) + """ + Priority weight of the run + """ + AIRFLOW_TASK_TRIGGER_RULE: ClassVar[KeywordField] = KeywordField( + "airflowTaskTriggerRule", "airflowTaskTriggerRule" + ) + """ + Trigger rule of the run + """ + + OUTPUTS: ClassVar[RelationField] = RelationField("outputs") + """ + TBC + """ + PROCESS: ClassVar[RelationField] = RelationField("process") + """ + TBC + """ + INPUTS: ClassVar[RelationField] = RelationField("inputs") + """ + TBC + """ + AIRFLOW_DAG: ClassVar[RelationField] = RelationField("airflowDag") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "airflow_task_operator_class", "airflow_dag_name", "airflow_dag_qualified_name", @@ -4170,7 +5414,6 @@ def __setattr__(self, name, value): "outputs", "process", "inputs", - "tables", "airflow_dag", ] @@ -4340,16 +5583,6 @@ def inputs(self, inputs: Optional[list[Catalog]]): self.attributes = self.Attributes() self.attributes.inputs = inputs - @property - def tables(self) -> Optional[list[Table]]: - return None if self.attributes is None else self.attributes.tables - - @tables.setter - def tables(self, tables: Optional[list[Table]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tables = tables - @property def airflow_dag(self) -> Optional[AirflowDag]: return None if self.attributes is None else self.attributes.airflow_dag @@ -4403,9 +5636,6 @@ class Attributes(Airflow.Attributes): inputs: Optional[list[Catalog]] = Field( None, description="", alias="inputs" ) # relationship - tables: Optional[list[Table]] = Field( - None, description="", alias="tables" - ) # relationship airflow_dag: Optional[AirflowDag] = Field( None, description="", alias="airflowDag" ) # relationship @@ -4429,11 +5659,11 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in DataQuality._convience_properties: + if name in DataQuality._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] class Metric(DataQuality): @@ -4448,11 +5678,47 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Metric._convience_properties: + if name in Metric._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + METRIC_TYPE: ClassVar[KeywordField] = KeywordField("metricType", "metricType") + """ + TBC + """ + METRIC_SQL: ClassVar[KeywordField] = KeywordField("metricSQL", "metricSQL") + """ + TBC + """ + METRIC_FILTERS: ClassVar[TextField] = TextField("metricFilters", "metricFilters") + """ + TBC + """ + METRIC_TIME_GRAINS: ClassVar[TextField] = TextField( + "metricTimeGrains", "metricTimeGrains" + ) + """ + TBC + """ + + METRIC_TIMESTAMP_COLUMN: ClassVar[RelationField] = RelationField( + "metricTimestampColumn" + ) + """ + TBC + """ + ASSETS: ClassVar[RelationField] = RelationField("assets") + """ + TBC + """ + METRIC_DIMENSION_COLUMNS: ClassVar[RelationField] = RelationField( + "metricDimensionColumns" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "metric_type", "metric_s_q_l", "metric_filters", @@ -4578,11 +5844,30 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Resource._convience_properties: + if name in Resource._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + LINK: ClassVar[KeywordField] = KeywordField("link", "link") + """ + TBC + """ + IS_GLOBAL: ClassVar[BooleanField] = BooleanField("isGlobal", "isGlobal") + """ + TBC + """ + REFERENCE: ClassVar[KeywordField] = KeywordField("reference", "reference") + """ + TBC + """ + RESOURCE_METADATA: ClassVar[KeywordField] = KeywordField( + "resourceMetadata", "resourceMetadata" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "link", "is_global", "reference", @@ -4680,11 +5965,20 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Readme._convience_properties: + if name in Readme._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SEE_ALSO: ClassVar[RelationField] = RelationField("seeAlso") + """ + TBC + """ + ASSET: ClassVar[RelationField] = RelationField("asset") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "see_also", "asset", ] @@ -4773,11 +6067,25 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in File._convience_properties: + if name in File._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + FILE_TYPE: ClassVar[KeywordField] = KeywordField("fileType", "fileType") + """ + TBC + """ + FILE_PATH: ClassVar[KeywordField] = KeywordField("filePath", "filePath") + """ + TBC + """ + + FILE_ASSETS: ClassVar[RelationField] = RelationField("fileAssets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "file_type", "file_path", "file_assets", @@ -4855,11 +6163,25 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Link._convience_properties: + if name in Link._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + ICON: ClassVar[KeywordField] = KeywordField("icon", "icon") + """ + TBC + """ + ICON_TYPE: ClassVar[KeywordField] = KeywordField("iconType", "iconType") + """ + TBC + """ + + ASSET: ClassVar[RelationField] = RelationField("asset") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "icon", "icon_type", "asset", @@ -4921,11 +6243,113 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in SQL._convience_properties: + if name in SQL._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + QUERY_COUNT: ClassVar[NumericField] = NumericField("queryCount", "queryCount") + """ + TBC + """ + QUERY_USER_COUNT: ClassVar[NumericField] = NumericField( + "queryUserCount", "queryUserCount" + ) + """ + TBC + """ + QUERY_USER_MAP: ClassVar[KeywordField] = KeywordField( + "queryUserMap", "queryUserMap" + ) + """ + TBC + """ + QUERY_COUNT_UPDATED_AT: ClassVar[NumericField] = NumericField( + "queryCountUpdatedAt", "queryCountUpdatedAt" + ) + """ + TBC + """ + DATABASE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "databaseName", "databaseName.keyword", "databaseName" + ) + """ + TBC + """ + DATABASE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "databaseQualifiedName", "databaseQualifiedName" + ) + """ + TBC + """ + SCHEMA_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "schemaName", "schemaName.keyword", "schemaName" + ) + """ + TBC + """ + SCHEMA_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "schemaQualifiedName", "schemaQualifiedName" + ) + """ + TBC + """ + TABLE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "tableName", "tableName.keyword", "tableName" + ) + """ + TBC + """ + TABLE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "tableQualifiedName", "tableQualifiedName" + ) + """ + TBC + """ + VIEW_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "viewName", "viewName.keyword", "viewName" + ) + """ + TBC + """ + VIEW_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "viewQualifiedName", "viewQualifiedName" + ) + """ + TBC + """ + IS_PROFILED: ClassVar[BooleanField] = BooleanField("isProfiled", "isProfiled") + """ + TBC + """ + LAST_PROFILED_AT: ClassVar[NumericField] = NumericField( + "lastProfiledAt", "lastProfiledAt" + ) + """ + TBC + """ + + DBT_SOURCES: ClassVar[RelationField] = RelationField("dbtSources") + """ + TBC + """ + SQL_DBT_MODELS: ClassVar[RelationField] = RelationField("sqlDbtModels") + """ + TBC + """ + SQL_DBT_SOURCES: ClassVar[RelationField] = RelationField("sqlDBTSources") + """ + TBC + """ + DBT_MODELS: ClassVar[RelationField] = RelationField("dbtModels") + """ + TBC + """ + DBT_TESTS: ClassVar[RelationField] = RelationField("dbtTests") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "query_count", "query_user_count", "query_user_map", @@ -5220,11 +6644,111 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Table._convience_properties: + if name in Table._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + COLUMN_COUNT: ClassVar[NumericField] = NumericField("columnCount", "columnCount") + """ + TBC + """ + ROW_COUNT: ClassVar[NumericField] = NumericField("rowCount", "rowCount") + """ + TBC + """ + SIZE_BYTES: ClassVar[NumericField] = NumericField("sizeBytes", "sizeBytes") + """ + TBC + """ + ALIAS: ClassVar[KeywordField] = KeywordField("alias", "alias") + """ + TBC + """ + IS_TEMPORARY: ClassVar[BooleanField] = BooleanField("isTemporary", "isTemporary") + """ + TBC + """ + IS_QUERY_PREVIEW: ClassVar[BooleanField] = BooleanField( + "isQueryPreview", "isQueryPreview" + ) + """ + TBC + """ + QUERY_PREVIEW_CONFIG: ClassVar[KeywordField] = KeywordField( + "queryPreviewConfig", "queryPreviewConfig" + ) + """ + TBC + """ + EXTERNAL_LOCATION: ClassVar[KeywordField] = KeywordField( + "externalLocation", "externalLocation" + ) + """ + TBC + """ + EXTERNAL_LOCATION_REGION: ClassVar[KeywordField] = KeywordField( + "externalLocationRegion", "externalLocationRegion" + ) + """ + TBC + """ + EXTERNAL_LOCATION_FORMAT: ClassVar[KeywordField] = KeywordField( + "externalLocationFormat", "externalLocationFormat" + ) + """ + TBC + """ + IS_PARTITIONED: ClassVar[BooleanField] = BooleanField( + "isPartitioned", "isPartitioned" + ) + """ + TBC + """ + PARTITION_STRATEGY: ClassVar[KeywordField] = KeywordField( + "partitionStrategy", "partitionStrategy" + ) + """ + TBC + """ + PARTITION_COUNT: ClassVar[NumericField] = NumericField( + "partitionCount", "partitionCount" + ) + """ + TBC + """ + PARTITION_LIST: ClassVar[KeywordField] = KeywordField( + "partitionList", "partitionList" + ) + """ + TBC + """ + + PARTITIONS: ClassVar[RelationField] = RelationField("partitions") + """ + TBC + """ + COLUMNS: ClassVar[RelationField] = RelationField("columns") + """ + TBC + """ + QUERIES: ClassVar[RelationField] = RelationField("queries") + """ + TBC + """ + FACTS: ClassVar[RelationField] = RelationField("facts") + """ + TBC + """ + ATLAN_SCHEMA: ClassVar[RelationField] = RelationField("atlanSchema") + """ + TBC + """ + DIMENSIONS: ClassVar[RelationField] = RelationField("dimensions") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "column_count", "row_count", "size_bytes", @@ -5239,12 +6763,11 @@ def __setattr__(self, name, value): "partition_strategy", "partition_count", "partition_list", + "partitions", "columns", + "queries", "facts", "atlan_schema", - "partitions", - "airflow_task", - "queries", "dimensions", ] @@ -5396,6 +6919,16 @@ def partition_list(self, partition_list: Optional[str]): self.attributes = self.Attributes() self.attributes.partition_list = partition_list + @property + def partitions(self) -> Optional[list[TablePartition]]: + return None if self.attributes is None else self.attributes.partitions + + @partitions.setter + def partitions(self, partitions: Optional[list[TablePartition]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.partitions = partitions + @property def columns(self) -> Optional[list[Column]]: return None if self.attributes is None else self.attributes.columns @@ -5406,6 +6939,16 @@ def columns(self, columns: Optional[list[Column]]): self.attributes = self.Attributes() self.attributes.columns = columns + @property + def queries(self) -> Optional[list[Query]]: + return None if self.attributes is None else self.attributes.queries + + @queries.setter + def queries(self, queries: Optional[list[Query]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.queries = queries + @property def facts(self) -> Optional[list[Table]]: return None if self.attributes is None else self.attributes.facts @@ -5426,36 +6969,6 @@ def atlan_schema(self, atlan_schema: Optional[Schema]): self.attributes = self.Attributes() self.attributes.atlan_schema = atlan_schema - @property - def partitions(self) -> Optional[list[TablePartition]]: - return None if self.attributes is None else self.attributes.partitions - - @partitions.setter - def partitions(self, partitions: Optional[list[TablePartition]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.partitions = partitions - - @property - def airflow_task(self) -> Optional[AirflowTask]: - return None if self.attributes is None else self.attributes.airflow_task - - @airflow_task.setter - def airflow_task(self, airflow_task: Optional[AirflowTask]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.airflow_task = airflow_task - - @property - def queries(self) -> Optional[list[Query]]: - return None if self.attributes is None else self.attributes.queries - - @queries.setter - def queries(self, queries: Optional[list[Query]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.queries = queries - @property def dimensions(self) -> Optional[list[Table]]: return None if self.attributes is None else self.attributes.dimensions @@ -5499,24 +7012,21 @@ class Attributes(SQL.Attributes): partition_list: Optional[str] = Field( None, description="", alias="partitionList" ) + partitions: Optional[list[TablePartition]] = Field( + None, description="", alias="partitions" + ) # relationship columns: Optional[list[Column]] = Field( None, description="", alias="columns" ) # relationship + queries: Optional[list[Query]] = Field( + None, description="", alias="queries" + ) # relationship facts: Optional[list[Table]] = Field( None, description="", alias="facts" ) # relationship atlan_schema: Optional[Schema] = Field( None, description="", alias="atlanSchema" ) # relationship - partitions: Optional[list[TablePartition]] = Field( - None, description="", alias="partitions" - ) # relationship - airflow_task: Optional[AirflowTask] = Field( - None, description="", alias="airflowTask" - ) # relationship - queries: Optional[list[Query]] = Field( - None, description="", alias="queries" - ) # relationship dimensions: Optional[list[Table]] = Field( None, description="", alias="dimensions" ) # relationship @@ -5565,11 +7075,91 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Query._convience_properties: + if name in Query._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + RAW_QUERY: ClassVar[KeywordField] = KeywordField("rawQuery", "rawQuery") + """ + TBC + """ + DEFAULT_SCHEMA_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "defaultSchemaQualifiedName", + "defaultSchemaQualifiedName", + "defaultSchemaQualifiedName.text", + ) + """ + TBC + """ + DEFAULT_DATABASE_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "defaultDatabaseQualifiedName", + "defaultDatabaseQualifiedName", + "defaultDatabaseQualifiedName.text", + ) + """ + TBC + """ + VARIABLES_SCHEMA_BASE64: ClassVar[KeywordField] = KeywordField( + "variablesSchemaBase64", "variablesSchemaBase64" + ) + """ + TBC + """ + IS_PRIVATE: ClassVar[BooleanField] = BooleanField("isPrivate", "isPrivate") + """ + TBC + """ + IS_SQL_SNIPPET: ClassVar[BooleanField] = BooleanField( + "isSqlSnippet", "isSqlSnippet" + ) + """ + TBC + """ + PARENT_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "parentQualifiedName", "parentQualifiedName", "parentQualifiedName.text" + ) + """ + TBC + """ + COLLECTION_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "collectionQualifiedName", + "collectionQualifiedName", + "collectionQualifiedName.text", + ) + """ + TBC + """ + IS_VISUAL_QUERY: ClassVar[BooleanField] = BooleanField( + "isVisualQuery", "isVisualQuery" + ) + """ + TBC + """ + VISUAL_BUILDER_SCHEMA_BASE64: ClassVar[KeywordField] = KeywordField( + "visualBuilderSchemaBase64", "visualBuilderSchemaBase64" + ) + """ + TBC + """ + + PARENT: ClassVar[RelationField] = RelationField("parent") + """ + TBC + """ + COLUMNS: ClassVar[RelationField] = RelationField("columns") + """ + TBC + """ + TABLES: ClassVar[RelationField] = RelationField("tables") + """ + TBC + """ + VIEWS: ClassVar[RelationField] = RelationField("views") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "raw_query", "default_schema_qualified_name", "default_database_qualified_name", @@ -5820,11 +7410,57 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Schema._convience_properties: + if name in Schema._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + TABLE_COUNT: ClassVar[NumericField] = NumericField("tableCount", "tableCount") + """ + TBC + """ + VIEWS_COUNT: ClassVar[NumericField] = NumericField("viewsCount", "viewsCount") + """ + TBC + """ + + SNOWFLAKE_TAGS: ClassVar[RelationField] = RelationField("snowflakeTags") + """ + TBC + """ + FUNCTIONS: ClassVar[RelationField] = RelationField("functions") + """ + TBC + """ + TABLES: ClassVar[RelationField] = RelationField("tables") + """ + TBC + """ + DATABASE: ClassVar[RelationField] = RelationField("database") + """ + TBC + """ + PROCEDURES: ClassVar[RelationField] = RelationField("procedures") + """ + TBC + """ + VIEWS: ClassVar[RelationField] = RelationField("views") + """ + TBC + """ + MATERIALISED_VIEWS: ClassVar[RelationField] = RelationField("materialisedViews") + """ + TBC + """ + SNOWFLAKE_PIPES: ClassVar[RelationField] = RelationField("snowflakePipes") + """ + TBC + """ + SNOWFLAKE_STREAMS: ClassVar[RelationField] = RelationField("snowflakeStreams") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "table_count", "views_count", "snowflake_tags", @@ -6025,11 +7661,37 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in SnowflakePipe._convience_properties: + if name in SnowflakePipe._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + DEFINITION: ClassVar[KeywordField] = KeywordField("definition", "definition") + """ + TBC + """ + SNOWFLAKE_PIPE_IS_AUTO_INGEST_ENABLED: ClassVar[BooleanField] = BooleanField( + "snowflakePipeIsAutoIngestEnabled", "snowflakePipeIsAutoIngestEnabled" + ) + """ + TBC + """ + SNOWFLAKE_PIPE_NOTIFICATION_CHANNEL_NAME: ClassVar[ + KeywordTextField + ] = KeywordTextField( + "snowflakePipeNotificationChannelName", + "snowflakePipeNotificationChannelName", + "snowflakePipeNotificationChannelName.text", + ) + """ + TBC + """ + + ATLAN_SCHEMA: ClassVar[RelationField] = RelationField("atlanSchema") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "definition", "snowflake_pipe_is_auto_ingest_enabled", "snowflake_pipe_notification_channel_name", @@ -6134,11 +7796,61 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in View._convience_properties: + if name in View._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + COLUMN_COUNT: ClassVar[NumericField] = NumericField("columnCount", "columnCount") + """ + TBC + """ + ROW_COUNT: ClassVar[NumericField] = NumericField("rowCount", "rowCount") + """ + TBC + """ + SIZE_BYTES: ClassVar[NumericField] = NumericField("sizeBytes", "sizeBytes") + """ + TBC + """ + IS_QUERY_PREVIEW: ClassVar[BooleanField] = BooleanField( + "isQueryPreview", "isQueryPreview" + ) + """ + TBC + """ + QUERY_PREVIEW_CONFIG: ClassVar[KeywordField] = KeywordField( + "queryPreviewConfig", "queryPreviewConfig" + ) + """ + TBC + """ + ALIAS: ClassVar[KeywordField] = KeywordField("alias", "alias") + """ + TBC + """ + IS_TEMPORARY: ClassVar[BooleanField] = BooleanField("isTemporary", "isTemporary") + """ + TBC + """ + DEFINITION: ClassVar[KeywordField] = KeywordField("definition", "definition") + """ + TBC + """ + + COLUMNS: ClassVar[RelationField] = RelationField("columns") + """ + TBC + """ + QUERIES: ClassVar[RelationField] = RelationField("queries") + """ + TBC + """ + ATLAN_SCHEMA: ClassVar[RelationField] = RelationField("atlanSchema") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "column_count", "row_count", "size_bytes", @@ -6340,11 +8052,77 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in MaterialisedView._convience_properties: + if name in MaterialisedView._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + REFRESH_MODE: ClassVar[KeywordField] = KeywordField("refreshMode", "refreshMode") + """ + TBC + """ + REFRESH_METHOD: ClassVar[KeywordField] = KeywordField( + "refreshMethod", "refreshMethod" + ) + """ + TBC + """ + STALENESS: ClassVar[KeywordField] = KeywordField("staleness", "staleness") + """ + TBC + """ + STALE_SINCE_DATE: ClassVar[NumericField] = NumericField( + "staleSinceDate", "staleSinceDate" + ) + """ + TBC + """ + COLUMN_COUNT: ClassVar[NumericField] = NumericField("columnCount", "columnCount") + """ + TBC + """ + ROW_COUNT: ClassVar[NumericField] = NumericField("rowCount", "rowCount") + """ + TBC + """ + SIZE_BYTES: ClassVar[NumericField] = NumericField("sizeBytes", "sizeBytes") + """ + TBC + """ + IS_QUERY_PREVIEW: ClassVar[BooleanField] = BooleanField( + "isQueryPreview", "isQueryPreview" + ) + """ + TBC + """ + QUERY_PREVIEW_CONFIG: ClassVar[KeywordField] = KeywordField( + "queryPreviewConfig", "queryPreviewConfig" + ) + """ + TBC + """ + ALIAS: ClassVar[KeywordField] = KeywordField("alias", "alias") + """ + TBC + """ + IS_TEMPORARY: ClassVar[BooleanField] = BooleanField("isTemporary", "isTemporary") + """ + TBC + """ + DEFINITION: ClassVar[KeywordField] = KeywordField("definition", "definition") + """ + TBC + """ + + COLUMNS: ClassVar[RelationField] = RelationField("columns") + """ + TBC + """ + ATLAN_SCHEMA: ClassVar[RelationField] = RelationField("atlanSchema") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "refresh_mode", "refresh_method", "staleness", @@ -6575,11 +8353,63 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Function._convience_properties: + if name in Function._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + FUNCTION_DEFINITION: ClassVar[KeywordField] = KeywordField( + "functionDefinition", "functionDefinition" + ) + """ + Code or set of statements that determine the output of the function. + """ + FUNCTION_RETURN_TYPE: ClassVar[KeywordField] = KeywordField( + "functionReturnType", "functionReturnType" + ) + """ + Data type of the value returned by the function. + """ + FUNCTION_ARGUMENTS: ClassVar[KeywordField] = KeywordField( + "functionArguments", "functionArguments" + ) + """ + Arguments that are passed in to the function. + """ + FUNCTION_LANGUAGE: ClassVar[KeywordField] = KeywordField( + "functionLanguage", "functionLanguage" + ) + """ + The programming language in which the function is written. + """ + FUNCTION_TYPE: ClassVar[KeywordField] = KeywordField("functionType", "functionType") + """ + The type of function. + """ + FUNCTION_IS_EXTERNAL: ClassVar[BooleanField] = BooleanField( + "functionIsExternal", "functionIsExternal" + ) + """ + Determines whether the functions is stored or executed externally. + """ + FUNCTION_IS_SECURE: ClassVar[BooleanField] = BooleanField( + "functionIsSecure", "functionIsSecure" + ) + """ + Determines whether sensitive information of the function is omitted for unauthorized users. + """ + FUNCTION_IS_MEMOIZABLE: ClassVar[BooleanField] = BooleanField( + "functionIsMemoizable", "functionIsMemoizable" + ) + """ + Determines whether the function must re-compute or not if there are no underlying changes in the values. + """ + + FUNCTION_SCHEMA: ClassVar[RelationField] = RelationField("functionSchema") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "function_definition", "function_return_type", "function_arguments", @@ -6729,11 +8559,111 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in TablePartition._convience_properties: + if name in TablePartition._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + CONSTRAINT: ClassVar[KeywordField] = KeywordField("constraint", "constraint") + """ + TBC + """ + COLUMN_COUNT: ClassVar[NumericField] = NumericField("columnCount", "columnCount") + """ + TBC + """ + ROW_COUNT: ClassVar[NumericField] = NumericField("rowCount", "rowCount") + """ + TBC + """ + SIZE_BYTES: ClassVar[NumericField] = NumericField("sizeBytes", "sizeBytes") + """ + TBC + """ + ALIAS: ClassVar[KeywordField] = KeywordField("alias", "alias") + """ + TBC + """ + IS_TEMPORARY: ClassVar[BooleanField] = BooleanField("isTemporary", "isTemporary") + """ + TBC + """ + IS_QUERY_PREVIEW: ClassVar[BooleanField] = BooleanField( + "isQueryPreview", "isQueryPreview" + ) + """ + TBC + """ + QUERY_PREVIEW_CONFIG: ClassVar[KeywordField] = KeywordField( + "queryPreviewConfig", "queryPreviewConfig" + ) + """ + TBC + """ + EXTERNAL_LOCATION: ClassVar[KeywordField] = KeywordField( + "externalLocation", "externalLocation" + ) + """ + TBC + """ + EXTERNAL_LOCATION_REGION: ClassVar[KeywordField] = KeywordField( + "externalLocationRegion", "externalLocationRegion" + ) + """ + TBC + """ + EXTERNAL_LOCATION_FORMAT: ClassVar[KeywordField] = KeywordField( + "externalLocationFormat", "externalLocationFormat" + ) + """ + TBC + """ + IS_PARTITIONED: ClassVar[BooleanField] = BooleanField( + "isPartitioned", "isPartitioned" + ) + """ + TBC + """ + PARTITION_STRATEGY: ClassVar[KeywordField] = KeywordField( + "partitionStrategy", "partitionStrategy" + ) + """ + TBC + """ + PARTITION_COUNT: ClassVar[NumericField] = NumericField( + "partitionCount", "partitionCount" + ) + """ + TBC + """ + PARTITION_LIST: ClassVar[KeywordField] = KeywordField( + "partitionList", "partitionList" + ) + """ + TBC + """ + + CHILD_TABLE_PARTITIONS: ClassVar[RelationField] = RelationField( + "childTablePartitions" + ) + """ + TBC + """ + COLUMNS: ClassVar[RelationField] = RelationField("columns") + """ + TBC + """ + PARENT_TABLE_PARTITION: ClassVar[RelationField] = RelationField( + "parentTablePartition" + ) + """ + TBC + """ + PARENT_TABLE: ClassVar[RelationField] = RelationField("parentTable") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "constraint", "column_count", "row_count", @@ -7039,11 +8969,323 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Column._convience_properties: + if name in Column._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + DATA_TYPE: ClassVar[TextField] = TextField("dataType", "dataType.text") + """ + TBC + """ + SUB_DATA_TYPE: ClassVar[KeywordField] = KeywordField("subDataType", "subDataType") + """ + TBC + """ + RAW_DATA_TYPE_DEFINITION: ClassVar[KeywordField] = KeywordField( + "rawDataTypeDefinition", "rawDataTypeDefinition" + ) + """ + TBC + """ + ORDER: ClassVar[NumericField] = NumericField("order", "order") + """ + TBC + """ + NESTED_COLUMN_COUNT: ClassVar[NumericField] = NumericField( + "nestedColumnCount", "nestedColumnCount" + ) + """ + TBC + """ + IS_PARTITION: ClassVar[BooleanField] = BooleanField("isPartition", "isPartition") + """ + TBC + """ + PARTITION_ORDER: ClassVar[NumericField] = NumericField( + "partitionOrder", "partitionOrder" + ) + """ + TBC + """ + IS_CLUSTERED: ClassVar[BooleanField] = BooleanField("isClustered", "isClustered") + """ + TBC + """ + IS_PRIMARY: ClassVar[BooleanField] = BooleanField("isPrimary", "isPrimary") + """ + TBC + """ + IS_FOREIGN: ClassVar[BooleanField] = BooleanField("isForeign", "isForeign") + """ + TBC + """ + IS_INDEXED: ClassVar[BooleanField] = BooleanField("isIndexed", "isIndexed") + """ + TBC + """ + IS_SORT: ClassVar[BooleanField] = BooleanField("isSort", "isSort") + """ + TBC + """ + IS_DIST: ClassVar[BooleanField] = BooleanField("isDist", "isDist") + """ + TBC + """ + IS_PINNED: ClassVar[BooleanField] = BooleanField("isPinned", "isPinned") + """ + TBC + """ + PINNED_BY: ClassVar[KeywordField] = KeywordField("pinnedBy", "pinnedBy") + """ + TBC + """ + PINNED_AT: ClassVar[NumericField] = NumericField("pinnedAt", "pinnedAt") + """ + TBC + """ + PRECISION: ClassVar[NumericField] = NumericField("precision", "precision") + """ + Total number of digits allowed + """ + DEFAULT_VALUE: ClassVar[KeywordField] = KeywordField("defaultValue", "defaultValue") + """ + TBC + """ + IS_NULLABLE: ClassVar[BooleanField] = BooleanField("isNullable", "isNullable") + """ + TBC + """ + NUMERIC_SCALE: ClassVar[NumericField] = NumericField("numericScale", "numericScale") + """ + TBC + """ + MAX_LENGTH: ClassVar[NumericField] = NumericField("maxLength", "maxLength") + """ + TBC + """ + VALIDATIONS: ClassVar[KeywordField] = KeywordField("validations", "validations") + """ + TBC + """ + PARENT_COLUMN_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "parentColumnQualifiedName", + "parentColumnQualifiedName", + "parentColumnQualifiedName.text", + ) + """ + TBC + """ + PARENT_COLUMN_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "parentColumnName", "parentColumnName.keyword", "parentColumnName" + ) + """ + TBC + """ + COLUMN_DISTINCT_VALUES_COUNT: ClassVar[NumericField] = NumericField( + "columnDistinctValuesCount", "columnDistinctValuesCount" + ) + """ + TBC + """ + COLUMN_DISTINCT_VALUES_COUNT_LONG: ClassVar[NumericField] = NumericField( + "columnDistinctValuesCountLong", "columnDistinctValuesCountLong" + ) + """ + TBC + """ + COLUMN_HISTOGRAM: ClassVar[KeywordField] = KeywordField( + "columnHistogram", "columnHistogram" + ) + """ + TBC + """ + COLUMN_MAX: ClassVar[NumericField] = NumericField("columnMax", "columnMax") + """ + TBC + """ + COLUMN_MIN: ClassVar[NumericField] = NumericField("columnMin", "columnMin") + """ + TBC + """ + COLUMN_MEAN: ClassVar[NumericField] = NumericField("columnMean", "columnMean") + """ + TBC + """ + COLUMN_SUM: ClassVar[NumericField] = NumericField("columnSum", "columnSum") + """ + TBC + """ + COLUMN_MEDIAN: ClassVar[NumericField] = NumericField("columnMedian", "columnMedian") + """ + TBC + """ + COLUMN_STANDARD_DEVIATION: ClassVar[NumericField] = NumericField( + "columnStandardDeviation", "columnStandardDeviation" + ) + """ + TBC + """ + COLUMN_UNIQUE_VALUES_COUNT: ClassVar[NumericField] = NumericField( + "columnUniqueValuesCount", "columnUniqueValuesCount" + ) + """ + TBC + """ + COLUMN_UNIQUE_VALUES_COUNT_LONG: ClassVar[NumericField] = NumericField( + "columnUniqueValuesCountLong", "columnUniqueValuesCountLong" + ) + """ + TBC + """ + COLUMN_AVERAGE: ClassVar[NumericField] = NumericField( + "columnAverage", "columnAverage" + ) + """ + TBC + """ + COLUMN_AVERAGE_LENGTH: ClassVar[NumericField] = NumericField( + "columnAverageLength", "columnAverageLength" + ) + """ + TBC + """ + COLUMN_DUPLICATE_VALUES_COUNT: ClassVar[NumericField] = NumericField( + "columnDuplicateValuesCount", "columnDuplicateValuesCount" + ) + """ + TBC + """ + COLUMN_DUPLICATE_VALUES_COUNT_LONG: ClassVar[NumericField] = NumericField( + "columnDuplicateValuesCountLong", "columnDuplicateValuesCountLong" + ) + """ + TBC + """ + COLUMN_MAXIMUM_STRING_LENGTH: ClassVar[NumericField] = NumericField( + "columnMaximumStringLength", "columnMaximumStringLength" + ) + """ + TBC + """ + COLUMN_MAXS: ClassVar[KeywordField] = KeywordField("columnMaxs", "columnMaxs") + """ + TBC + """ + COLUMN_MINIMUM_STRING_LENGTH: ClassVar[NumericField] = NumericField( + "columnMinimumStringLength", "columnMinimumStringLength" + ) + """ + TBC + """ + COLUMN_MINS: ClassVar[KeywordField] = KeywordField("columnMins", "columnMins") + """ + TBC + """ + COLUMN_MISSING_VALUES_COUNT: ClassVar[NumericField] = NumericField( + "columnMissingValuesCount", "columnMissingValuesCount" + ) + """ + TBC + """ + COLUMN_MISSING_VALUES_COUNT_LONG: ClassVar[NumericField] = NumericField( + "columnMissingValuesCountLong", "columnMissingValuesCountLong" + ) + """ + TBC + """ + COLUMN_MISSING_VALUES_PERCENTAGE: ClassVar[NumericField] = NumericField( + "columnMissingValuesPercentage", "columnMissingValuesPercentage" + ) + """ + TBC + """ + COLUMN_UNIQUENESS_PERCENTAGE: ClassVar[NumericField] = NumericField( + "columnUniquenessPercentage", "columnUniquenessPercentage" + ) + """ + TBC + """ + COLUMN_VARIANCE: ClassVar[NumericField] = NumericField( + "columnVariance", "columnVariance" + ) + """ + TBC + """ + COLUMN_TOP_VALUES: ClassVar[KeywordField] = KeywordField( + "columnTopValues", "columnTopValues" + ) + """ + TBC + """ + COLUMN_DEPTH_LEVEL: ClassVar[NumericField] = NumericField( + "columnDepthLevel", "columnDepthLevel" + ) + """ + Level of nesting, used for STRUCT/NESTED columns + """ + + VIEW: ClassVar[RelationField] = RelationField("view") + """ + TBC + """ + NESTED_COLUMNS: ClassVar[RelationField] = RelationField("nestedColumns") + """ + TBC + """ + DATA_QUALITY_METRIC_DIMENSIONS: ClassVar[RelationField] = RelationField( + "dataQualityMetricDimensions" + ) + """ + TBC + """ + DBT_MODEL_COLUMNS: ClassVar[RelationField] = RelationField("dbtModelColumns") + """ + TBC + """ + TABLE: ClassVar[RelationField] = RelationField("table") + """ + TBC + """ + COLUMN_DBT_MODEL_COLUMNS: ClassVar[RelationField] = RelationField( + "columnDbtModelColumns" + ) + """ + TBC + """ + MATERIALISED_VIEW: ClassVar[RelationField] = RelationField("materialisedView") + """ + TBC + """ + PARENT_COLUMN: ClassVar[RelationField] = RelationField("parentColumn") + """ + TBC + """ + QUERIES: ClassVar[RelationField] = RelationField("queries") + """ + TBC + """ + METRIC_TIMESTAMPS: ClassVar[RelationField] = RelationField("metricTimestamps") + """ + TBC + """ + FOREIGN_KEY_TO: ClassVar[RelationField] = RelationField("foreignKeyTo") + """ + TBC + """ + FOREIGN_KEY_FROM: ClassVar[RelationField] = RelationField("foreignKeyFrom") + """ + TBC + """ + DBT_METRICS: ClassVar[RelationField] = RelationField("dbtMetrics") + """ + TBC + """ + TABLE_PARTITION: ClassVar[RelationField] = RelationField("tablePartition") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "data_type", "sub_data_type", "raw_data_type_definition", @@ -8068,11 +10310,47 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in SnowflakeStream._convience_properties: + if name in SnowflakeStream._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SNOWFLAKE_STREAM_TYPE: ClassVar[KeywordField] = KeywordField( + "snowflakeStreamType", "snowflakeStreamType" + ) + """ + TBC + """ + SNOWFLAKE_STREAM_SOURCE_TYPE: ClassVar[KeywordField] = KeywordField( + "snowflakeStreamSourceType", "snowflakeStreamSourceType" + ) + """ + TBC + """ + SNOWFLAKE_STREAM_MODE: ClassVar[KeywordField] = KeywordField( + "snowflakeStreamMode", "snowflakeStreamMode" + ) + """ + TBC + """ + SNOWFLAKE_STREAM_IS_STALE: ClassVar[BooleanField] = BooleanField( + "snowflakeStreamIsStale", "snowflakeStreamIsStale" + ) + """ + TBC + """ + SNOWFLAKE_STREAM_STALE_AFTER: ClassVar[NumericField] = NumericField( + "snowflakeStreamStaleAfter", "snowflakeStreamStaleAfter" + ) + """ + TBC + """ + + ATLAN_SCHEMA: ClassVar[RelationField] = RelationField("atlanSchema") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "snowflake_stream_type", "snowflake_stream_source_type", "snowflake_stream_mode", @@ -8219,11 +10497,21 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Database._convience_properties: + if name in Database._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SCHEMA_COUNT: ClassVar[NumericField] = NumericField("schemaCount", "schemaCount") + """ + TBC + """ + + SCHEMAS: ClassVar[RelationField] = RelationField("schemas") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "schema_count", "schemas", ] @@ -8295,11 +10583,21 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Procedure._convience_properties: + if name in Procedure._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + DEFINITION: ClassVar[KeywordField] = KeywordField("definition", "definition") + """ + TBC + """ + + ATLAN_SCHEMA: ClassVar[RelationField] = RelationField("atlanSchema") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "definition", "atlan_schema", ] @@ -8349,11 +10647,139 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in SnowflakeTag._convience_properties: + if name in SnowflakeTag._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + TAG_ID: ClassVar[KeywordField] = KeywordField("tagId", "tagId") + """ + Unique source tag identifier + """ + TAG_ATTRIBUTES: ClassVar[KeywordField] = KeywordField( + "tagAttributes", "tagAttributes" + ) + """ + Source tag attributes + """ + TAG_ALLOWED_VALUES: ClassVar[KeywordTextField] = KeywordTextField( + "tagAllowedValues", "tagAllowedValues", "tagAllowedValues.text" + ) + """ + Allowed values for the tag at source. De-normalised from sourceTagAttributed for ease of querying + """ + MAPPED_CLASSIFICATION_NAME: ClassVar[KeywordField] = KeywordField( + "mappedClassificationName", "mappedClassificationName" + ) + """ + Mapped atlan classification name + """ + QUERY_COUNT: ClassVar[NumericField] = NumericField("queryCount", "queryCount") + """ + TBC + """ + QUERY_USER_COUNT: ClassVar[NumericField] = NumericField( + "queryUserCount", "queryUserCount" + ) + """ + TBC + """ + QUERY_USER_MAP: ClassVar[KeywordField] = KeywordField( + "queryUserMap", "queryUserMap" + ) + """ + TBC + """ + QUERY_COUNT_UPDATED_AT: ClassVar[NumericField] = NumericField( + "queryCountUpdatedAt", "queryCountUpdatedAt" + ) + """ + TBC + """ + DATABASE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "databaseName", "databaseName.keyword", "databaseName" + ) + """ + TBC + """ + DATABASE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "databaseQualifiedName", "databaseQualifiedName" + ) + """ + TBC + """ + SCHEMA_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "schemaName", "schemaName.keyword", "schemaName" + ) + """ + TBC + """ + SCHEMA_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "schemaQualifiedName", "schemaQualifiedName" + ) + """ + TBC + """ + TABLE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "tableName", "tableName.keyword", "tableName" + ) + """ + TBC + """ + TABLE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "tableQualifiedName", "tableQualifiedName" + ) + """ + TBC + """ + VIEW_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "viewName", "viewName.keyword", "viewName" + ) + """ + TBC + """ + VIEW_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "viewQualifiedName", "viewQualifiedName" + ) + """ + TBC + """ + IS_PROFILED: ClassVar[BooleanField] = BooleanField("isProfiled", "isProfiled") + """ + TBC + """ + LAST_PROFILED_AT: ClassVar[NumericField] = NumericField( + "lastProfiledAt", "lastProfiledAt" + ) + """ + TBC + """ + + DBT_SOURCES: ClassVar[RelationField] = RelationField("dbtSources") + """ + TBC + """ + SQL_DBT_MODELS: ClassVar[RelationField] = RelationField("sqlDbtModels") + """ + TBC + """ + SQL_DBT_SOURCES: ClassVar[RelationField] = RelationField("sqlDBTSources") + """ + TBC + """ + DBT_MODELS: ClassVar[RelationField] = RelationField("dbtModels") + """ + TBC + """ + DBT_TESTS: ClassVar[RelationField] = RelationField("dbtTests") + """ + TBC + """ + ATLAN_SCHEMA: ClassVar[RelationField] = RelationField("atlanSchema") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "tag_id", "tag_attributes", "tag_allowed_values", @@ -8707,11 +11133,122 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Dbt._convience_properties: + if name in Dbt._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + DBT_ALIAS: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAlias", "dbtAlias.keyword", "dbtAlias" + ) + """ + TBC + """ + DBT_META: ClassVar[KeywordField] = KeywordField("dbtMeta", "dbtMeta") + """ + TBC + """ + DBT_UNIQUE_ID: ClassVar[KeywordTextField] = KeywordTextField( + "dbtUniqueId", "dbtUniqueId.keyword", "dbtUniqueId" + ) + """ + TBC + """ + DBT_ACCOUNT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAccountName", "dbtAccountName.keyword", "dbtAccountName" + ) + """ + TBC + """ + DBT_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtProjectName", "dbtProjectName.keyword", "dbtProjectName" + ) + """ + TBC + """ + DBT_PACKAGE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtPackageName", "dbtPackageName.keyword", "dbtPackageName" + ) + """ + TBC + """ + DBT_JOB_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobName", "dbtJobName.keyword", "dbtJobName" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE: ClassVar[KeywordField] = KeywordField( + "dbtJobSchedule", "dbtJobSchedule" + ) + """ + TBC + """ + DBT_JOB_STATUS: ClassVar[KeywordField] = KeywordField( + "dbtJobStatus", "dbtJobStatus" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE_CRON_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobScheduleCronHumanized", + "dbtJobScheduleCronHumanized.keyword", + "dbtJobScheduleCronHumanized", + ) + """ + TBC + """ + DBT_JOB_LAST_RUN: ClassVar[NumericField] = NumericField( + "dbtJobLastRun", "dbtJobLastRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN: ClassVar[NumericField] = NumericField( + "dbtJobNextRun", "dbtJobNextRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobNextRunHumanized", + "dbtJobNextRunHumanized.keyword", + "dbtJobNextRunHumanized", + ) + """ + TBC + """ + DBT_ENVIRONMENT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentName", "dbtEnvironmentName.keyword", "dbtEnvironmentName" + ) + """ + TBC + """ + DBT_ENVIRONMENT_DBT_VERSION: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentDbtVersion", + "dbtEnvironmentDbtVersion.keyword", + "dbtEnvironmentDbtVersion", + ) + """ + TBC + """ + DBT_TAGS: ClassVar[KeywordField] = KeywordField("dbtTags", "dbtTags") + """ + TBC + """ + DBT_CONNECTION_CONTEXT: ClassVar[KeywordField] = KeywordField( + "dbtConnectionContext", "dbtConnectionContext" + ) + """ + TBC + """ + DBT_SEMANTIC_LAYER_PROXY_URL: ClassVar[KeywordField] = KeywordField( + "dbtSemanticLayerProxyUrl", "dbtSemanticLayerProxyUrl" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "dbt_alias", "dbt_meta", "dbt_unique_id", @@ -8999,11 +11536,49 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in DbtModelColumn._convience_properties: + if name in DbtModelColumn._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + DBT_MODEL_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtModelQualifiedName", "dbtModelQualifiedName", "dbtModelQualifiedName.text" + ) + """ + TBC + """ + DBT_MODEL_COLUMN_DATA_TYPE: ClassVar[KeywordField] = KeywordField( + "dbtModelColumnDataType", "dbtModelColumnDataType" + ) + """ + TBC + """ + DBT_MODEL_COLUMN_ORDER: ClassVar[NumericField] = NumericField( + "dbtModelColumnOrder", "dbtModelColumnOrder" + ) + """ + TBC + """ + + SQL_COLUMN: ClassVar[RelationField] = RelationField("sqlColumn") + """ + TBC + """ + DBT_MODEL: ClassVar[RelationField] = RelationField("dbtModel") + """ + TBC + """ + DBT_MODEL_COLUMN_SQL_COLUMNS: ClassVar[RelationField] = RelationField( + "dbtModelColumnSqlColumns" + ) + """ + TBC + """ + DBT_TESTS: ClassVar[RelationField] = RelationField("dbtTests") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "dbt_model_qualified_name", "dbt_model_column_data_type", "dbt_model_column_order", @@ -9141,11 +11716,77 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in DbtTest._convience_properties: + if name in DbtTest._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + DBT_TEST_STATUS: ClassVar[KeywordField] = KeywordField( + "dbtTestStatus", "dbtTestStatus" + ) + """ + Status provides the details of the results of a test. For errors, it reads "ERROR". + """ + DBT_TEST_STATE: ClassVar[KeywordField] = KeywordField( + "dbtTestState", "dbtTestState" + ) + """ + The test results. Can be one of, in order of severity, "error", "fail", "warn", "pass" + """ + DBT_TEST_ERROR: ClassVar[KeywordField] = KeywordField( + "dbtTestError", "dbtTestError" + ) + """ + The error message in the case of state being "error" + """ + DBT_TEST_RAW_SQL: ClassVar[KeywordTextField] = KeywordTextField( + "dbtTestRawSQL", "dbtTestRawSQL", "dbtTestRawSQL.text" + ) + """ + The raw sql of a test + """ + DBT_TEST_COMPILED_SQL: ClassVar[KeywordField] = KeywordField( + "dbtTestCompiledSQL", "dbtTestCompiledSQL" + ) + """ + The compiled sql of a test + """ + DBT_TEST_RAW_CODE: ClassVar[KeywordTextField] = KeywordTextField( + "dbtTestRawCode", "dbtTestRawCode", "dbtTestRawCode.text" + ) + """ + The raw code of a test ( tests in dbt can be defined using python ) + """ + DBT_TEST_COMPILED_CODE: ClassVar[KeywordField] = KeywordField( + "dbtTestCompiledCode", "dbtTestCompiledCode" + ) + """ + The compiled code of a test ( tests in dbt can be defined using python ) + """ + DBT_TEST_LANGUAGE: ClassVar[KeywordField] = KeywordField( + "dbtTestLanguage", "dbtTestLanguage" + ) + """ + The language in which a dbt test is written. Example: sql,python + """ + + DBT_SOURCES: ClassVar[RelationField] = RelationField("dbtSources") + """ + TBC + """ + SQL_ASSETS: ClassVar[RelationField] = RelationField("sqlAssets") + """ + TBC + """ + DBT_MODELS: ClassVar[RelationField] = RelationField("dbtModels") + """ + TBC + """ + DBT_MODEL_COLUMNS: ClassVar[RelationField] = RelationField("dbtModelColumns") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "dbt_test_status", "dbt_test_state", "dbt_test_error", @@ -9341,11 +11982,103 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in DbtModel._convience_properties: + if name in DbtModel._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + DBT_STATUS: ClassVar[KeywordField] = KeywordField("dbtStatus", "dbtStatus") + """ + TBC + """ + DBT_ERROR: ClassVar[KeywordField] = KeywordField("dbtError", "dbtError") + """ + TBC + """ + DBT_RAW_SQL: ClassVar[KeywordField] = KeywordField("dbtRawSQL", "dbtRawSQL") + """ + TBC + """ + DBT_COMPILED_SQL: ClassVar[KeywordField] = KeywordField( + "dbtCompiledSQL", "dbtCompiledSQL" + ) + """ + TBC + """ + DBT_STATS: ClassVar[KeywordField] = KeywordField("dbtStats", "dbtStats") + """ + TBC + """ + DBT_MATERIALIZATION_TYPE: ClassVar[KeywordField] = KeywordField( + "dbtMaterializationType", "dbtMaterializationType" + ) + """ + TBC + """ + DBT_MODEL_COMPILE_STARTED_AT: ClassVar[NumericField] = NumericField( + "dbtModelCompileStartedAt", "dbtModelCompileStartedAt" + ) + """ + TBC + """ + DBT_MODEL_COMPILE_COMPLETED_AT: ClassVar[NumericField] = NumericField( + "dbtModelCompileCompletedAt", "dbtModelCompileCompletedAt" + ) + """ + TBC + """ + DBT_MODEL_EXECUTE_STARTED_AT: ClassVar[NumericField] = NumericField( + "dbtModelExecuteStartedAt", "dbtModelExecuteStartedAt" + ) + """ + TBC + """ + DBT_MODEL_EXECUTE_COMPLETED_AT: ClassVar[NumericField] = NumericField( + "dbtModelExecuteCompletedAt", "dbtModelExecuteCompletedAt" + ) + """ + TBC + """ + DBT_MODEL_EXECUTION_TIME: ClassVar[NumericField] = NumericField( + "dbtModelExecutionTime", "dbtModelExecutionTime" + ) + """ + TBC + """ + DBT_MODEL_RUN_GENERATED_AT: ClassVar[NumericField] = NumericField( + "dbtModelRunGeneratedAt", "dbtModelRunGeneratedAt" + ) + """ + TBC + """ + DBT_MODEL_RUN_ELAPSED_TIME: ClassVar[NumericField] = NumericField( + "dbtModelRunElapsedTime", "dbtModelRunElapsedTime" + ) + """ + TBC + """ + + DBT_METRICS: ClassVar[RelationField] = RelationField("dbtMetrics") + """ + TBC + """ + DBT_TESTS: ClassVar[RelationField] = RelationField("dbtTests") + """ + TBC + """ + DBT_MODEL_SQL_ASSETS: ClassVar[RelationField] = RelationField("dbtModelSqlAssets") + """ + TBC + """ + DBT_MODEL_COLUMNS: ClassVar[RelationField] = RelationField("dbtModelColumns") + """ + TBC + """ + SQL_ASSET: ClassVar[RelationField] = RelationField("sqlAsset") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "dbt_status", "dbt_error", "dbt_raw_s_q_l", @@ -9655,11 +12388,173 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in DbtMetric._convience_properties: + if name in DbtMetric._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + DBT_METRIC_FILTERS: ClassVar[KeywordField] = KeywordField( + "dbtMetricFilters", "dbtMetricFilters" + ) + """ + TBC + """ + DBT_ALIAS: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAlias", "dbtAlias.keyword", "dbtAlias" + ) + """ + TBC + """ + DBT_META: ClassVar[KeywordField] = KeywordField("dbtMeta", "dbtMeta") + """ + TBC + """ + DBT_UNIQUE_ID: ClassVar[KeywordTextField] = KeywordTextField( + "dbtUniqueId", "dbtUniqueId.keyword", "dbtUniqueId" + ) + """ + TBC + """ + DBT_ACCOUNT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAccountName", "dbtAccountName.keyword", "dbtAccountName" + ) + """ + TBC + """ + DBT_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtProjectName", "dbtProjectName.keyword", "dbtProjectName" + ) + """ + TBC + """ + DBT_PACKAGE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtPackageName", "dbtPackageName.keyword", "dbtPackageName" + ) + """ + TBC + """ + DBT_JOB_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobName", "dbtJobName.keyword", "dbtJobName" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE: ClassVar[KeywordField] = KeywordField( + "dbtJobSchedule", "dbtJobSchedule" + ) + """ + TBC + """ + DBT_JOB_STATUS: ClassVar[KeywordField] = KeywordField( + "dbtJobStatus", "dbtJobStatus" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE_CRON_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobScheduleCronHumanized", + "dbtJobScheduleCronHumanized.keyword", + "dbtJobScheduleCronHumanized", + ) + """ + TBC + """ + DBT_JOB_LAST_RUN: ClassVar[NumericField] = NumericField( + "dbtJobLastRun", "dbtJobLastRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN: ClassVar[NumericField] = NumericField( + "dbtJobNextRun", "dbtJobNextRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobNextRunHumanized", + "dbtJobNextRunHumanized.keyword", + "dbtJobNextRunHumanized", + ) + """ + TBC + """ + DBT_ENVIRONMENT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentName", "dbtEnvironmentName.keyword", "dbtEnvironmentName" + ) + """ + TBC + """ + DBT_ENVIRONMENT_DBT_VERSION: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentDbtVersion", + "dbtEnvironmentDbtVersion.keyword", + "dbtEnvironmentDbtVersion", + ) + """ + TBC + """ + DBT_TAGS: ClassVar[KeywordField] = KeywordField("dbtTags", "dbtTags") + """ + TBC + """ + DBT_CONNECTION_CONTEXT: ClassVar[KeywordField] = KeywordField( + "dbtConnectionContext", "dbtConnectionContext" + ) + """ + TBC + """ + DBT_SEMANTIC_LAYER_PROXY_URL: ClassVar[KeywordField] = KeywordField( + "dbtSemanticLayerProxyUrl", "dbtSemanticLayerProxyUrl" + ) + """ + TBC + """ + METRIC_TYPE: ClassVar[KeywordField] = KeywordField("metricType", "metricType") + """ + TBC + """ + METRIC_SQL: ClassVar[KeywordField] = KeywordField("metricSQL", "metricSQL") + """ + TBC + """ + METRIC_FILTERS: ClassVar[TextField] = TextField("metricFilters", "metricFilters") + """ + TBC + """ + METRIC_TIME_GRAINS: ClassVar[TextField] = TextField( + "metricTimeGrains", "metricTimeGrains" + ) + """ + TBC + """ + + METRIC_TIMESTAMP_COLUMN: ClassVar[RelationField] = RelationField( + "metricTimestampColumn" + ) + """ + TBC + """ + DBT_MODEL: ClassVar[RelationField] = RelationField("dbtModel") + """ + TBC + """ + ASSETS: ClassVar[RelationField] = RelationField("assets") + """ + TBC + """ + METRIC_DIMENSION_COLUMNS: ClassVar[RelationField] = RelationField( + "metricDimensionColumns" + ) + """ + TBC + """ + DBT_METRIC_FILTER_COLUMNS: ClassVar[RelationField] = RelationField( + "dbtMetricFilterColumns" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "dbt_metric_filters", "dbt_alias", "dbt_meta", @@ -10097,11 +12992,35 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in DbtSource._convience_properties: + if name in DbtSource._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + DBT_STATE: ClassVar[KeywordField] = KeywordField("dbtState", "dbtState") + """ + TBC + """ + DBT_FRESHNESS_CRITERIA: ClassVar[KeywordField] = KeywordField( + "dbtFreshnessCriteria", "dbtFreshnessCriteria" + ) + """ + TBC + """ + + SQL_ASSETS: ClassVar[RelationField] = RelationField("sqlAssets") + """ + TBC + """ + DBT_TESTS: ClassVar[RelationField] = RelationField("dbtTests") + """ + TBC + """ + SQL_ASSET: ClassVar[RelationField] = RelationField("sqlAsset") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "dbt_state", "dbt_freshness_criteria", "sql_assets", @@ -10195,11 +13114,24 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in SchemaRegistry._convience_properties: + if name in SchemaRegistry._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SCHEMA_REGISTRY_SCHEMA_TYPE: ClassVar[KeywordField] = KeywordField( + "schemaRegistrySchemaType", "schemaRegistrySchemaType" + ) + """ + Type of language/specification used to define the schema like JSON, Protobuf etc. + """ + SCHEMA_REGISTRY_SCHEMA_ID: ClassVar[KeywordField] = KeywordField( + "schemaRegistrySchemaId", "schemaRegistrySchemaId" + ) + """ + Unique identifier for schema definition set by the schema registry + """ + + _convenience_properties: ClassVar[list[str]] = [ "schema_registry_schema_type", "schema_registry_schema_id", ] @@ -10261,11 +13193,61 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in SchemaRegistrySubject._convience_properties: + if name in SchemaRegistrySubject._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SCHEMA_REGISTRY_SUBJECT_BASE_NAME: ClassVar[KeywordField] = KeywordField( + "schemaRegistrySubjectBaseName", "schemaRegistrySubjectBaseName" + ) + """ + Base name of the subject (i.e. without -key, -value prefixes) + """ + SCHEMA_REGISTRY_SUBJECT_IS_KEY_SCHEMA: ClassVar[BooleanField] = BooleanField( + "schemaRegistrySubjectIsKeySchema", "schemaRegistrySubjectIsKeySchema" + ) + """ + If the subject is a schema for the keys of the messages. + """ + SCHEMA_REGISTRY_SUBJECT_SCHEMA_COMPATIBILITY: ClassVar[KeywordField] = KeywordField( + "schemaRegistrySubjectSchemaCompatibility", + "schemaRegistrySubjectSchemaCompatibility", + ) + """ + Compatibility of the schema across versions. + """ + SCHEMA_REGISTRY_SUBJECT_LATEST_SCHEMA_VERSION: ClassVar[ + KeywordField + ] = KeywordField( + "schemaRegistrySubjectLatestSchemaVersion", + "schemaRegistrySubjectLatestSchemaVersion", + ) + """ + Latest schema version of the subject. + """ + SCHEMA_REGISTRY_SUBJECT_LATEST_SCHEMA_DEFINITION: ClassVar[TextField] = TextField( + "schemaRegistrySubjectLatestSchemaDefinition", + "schemaRegistrySubjectLatestSchemaDefinition", + ) + """ + Definition of the latest schema in the subject. + """ + SCHEMA_REGISTRY_SUBJECT_GOVERNING_ASSET_QUALIFIED_NAMES: ClassVar[ + KeywordField + ] = KeywordField( + "schemaRegistrySubjectGoverningAssetQualifiedNames", + "schemaRegistrySubjectGoverningAssetQualifiedNames", + ) + """ + List of asset qualified names that this subject is governing/validating. + """ + + ASSETS: ClassVar[RelationField] = RelationField("assets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "schema_registry_subject_base_name", "schema_registry_subject_is_key_schema", "schema_registry_subject_schema_compatibility", @@ -10449,11 +13431,22 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in MonteCarlo._convience_properties: + if name in MonteCarlo._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + MC_LABELS: ClassVar[KeywordField] = KeywordField("mcLabels", "mcLabels") + """ + TBC + """ + MC_ASSET_QUALIFIED_NAMES: ClassVar[KeywordField] = KeywordField( + "mcAssetQualifiedNames", "mcAssetQualifiedNames" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "mc_labels", "mc_asset_qualified_names", ] @@ -10507,11 +13500,57 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in MCIncident._convience_properties: + if name in MCIncident._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + MC_INCIDENT_ID: ClassVar[KeywordField] = KeywordField( + "mcIncidentId", "mcIncidentId" + ) + """ + TBC + """ + MC_INCIDENT_TYPE: ClassVar[KeywordField] = KeywordField( + "mcIncidentType", "mcIncidentType" + ) + """ + TBC + """ + MC_INCIDENT_SUB_TYPES: ClassVar[KeywordField] = KeywordField( + "mcIncidentSubTypes", "mcIncidentSubTypes" + ) + """ + TBC + """ + MC_INCIDENT_SEVERITY: ClassVar[KeywordField] = KeywordField( + "mcIncidentSeverity", "mcIncidentSeverity" + ) + """ + TBC + """ + MC_INCIDENT_STATE: ClassVar[KeywordField] = KeywordField( + "mcIncidentState", "mcIncidentState" + ) + """ + TBC + """ + MC_INCIDENT_WAREHOUSE: ClassVar[KeywordField] = KeywordField( + "mcIncidentWarehouse", "mcIncidentWarehouse" + ) + """ + Incident warehouse name + """ + + MC_MONITOR: ClassVar[RelationField] = RelationField("mcMonitor") + """ + TBC + """ + MC_INCIDENT_ASSETS: ClassVar[RelationField] = RelationField("mcIncidentAssets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "mc_incident_id", "mc_incident_type", "mc_incident_sub_types", @@ -10651,11 +13690,117 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in MCMonitor._convience_properties: + if name in MCMonitor._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + MC_MONITOR_ID: ClassVar[KeywordField] = KeywordField("mcMonitorId", "mcMonitorId") + """ + Monitor Id + """ + MC_MONITOR_STATUS: ClassVar[KeywordField] = KeywordField( + "mcMonitorStatus", "mcMonitorStatus" + ) + """ + Monitor status + """ + MC_MONITOR_TYPE: ClassVar[KeywordField] = KeywordField( + "mcMonitorType", "mcMonitorType" + ) + """ + Monitor type + """ + MC_MONITOR_WAREHOUSE: ClassVar[KeywordField] = KeywordField( + "mcMonitorWarehouse", "mcMonitorWarehouse" + ) + """ + Monitor warehouse name + """ + MC_MONITOR_SCHEDULE_TYPE: ClassVar[KeywordField] = KeywordField( + "mcMonitorScheduleType", "mcMonitorScheduleType" + ) + """ + Monitor schedule type + """ + MC_MONITOR_NAMESPACE: ClassVar[KeywordTextField] = KeywordTextField( + "mcMonitorNamespace", "mcMonitorNamespace.keyword", "mcMonitorNamespace" + ) + """ + Monitor namespace + """ + MC_MONITOR_RULE_TYPE: ClassVar[KeywordField] = KeywordField( + "mcMonitorRuleType", "mcMonitorRuleType" + ) + """ + TBC + """ + MC_MONITOR_RULE_CUSTOM_SQL: ClassVar[KeywordField] = KeywordField( + "mcMonitorRuleCustomSql", "mcMonitorRuleCustomSql" + ) + """ + custom sql query + """ + MC_MONITOR_RULE_SCHEDULE_CONFIG: ClassVar[KeywordField] = KeywordField( + "mcMonitorRuleScheduleConfig", "mcMonitorRuleScheduleConfig" + ) + """ + TBC + """ + MC_MONITOR_RULE_SCHEDULE_CONFIG_HUMANIZED: ClassVar[TextField] = TextField( + "mcMonitorRuleScheduleConfigHumanized", "mcMonitorRuleScheduleConfigHumanized" + ) + """ + TBC + """ + MC_MONITOR_ALERT_CONDITION: ClassVar[TextField] = TextField( + "mcMonitorAlertCondition", "mcMonitorAlertCondition" + ) + """ + TBC + """ + MC_MONITOR_RULE_NEXT_EXECUTION_TIME: ClassVar[NumericField] = NumericField( + "mcMonitorRuleNextExecutionTime", "mcMonitorRuleNextExecutionTime" + ) + """ + TBC + """ + MC_MONITOR_RULE_PREVIOUS_EXECUTION_TIME: ClassVar[NumericField] = NumericField( + "mcMonitorRulePreviousExecutionTime", "mcMonitorRulePreviousExecutionTime" + ) + """ + TBC + """ + MC_MONITOR_RULE_COMPARISONS: ClassVar[KeywordField] = KeywordField( + "mcMonitorRuleComparisons", "mcMonitorRuleComparisons" + ) + """ + TBC + """ + MC_MONITOR_RULE_IS_SNOOZED: ClassVar[BooleanField] = BooleanField( + "mcMonitorRuleIsSnoozed", "mcMonitorRuleIsSnoozed" + ) + """ + TBC + """ + MC_MONITOR_BREACH_RATE: ClassVar[NumericField] = NumericField( + "mcMonitorBreachRate", "mcMonitorBreachRate" + ) + """ + TBC + """ + MC_MONITOR_INCIDENT_COUNT: ClassVar[NumericField] = NumericField( + "mcMonitorIncidentCount", "mcMonitorIncidentCount" + ) + """ + TBC + """ + + MC_MONITOR_ASSETS: ClassVar[RelationField] = RelationField("mcMonitorAssets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "mc_monitor_id", "mc_monitor_status", "mc_monitor_type", @@ -10989,11 +14134,11 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Soda._convience_properties: + if name in Soda._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] class SodaCheck(Soda): @@ -11008,11 +14153,49 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in SodaCheck._convience_properties: + if name in SodaCheck._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SODA_CHECK_ID: ClassVar[KeywordField] = KeywordField("sodaCheckId", "sodaCheckId") + """ + Check Id + """ + SODA_CHECK_EVALUATION_STATUS: ClassVar[KeywordField] = KeywordField( + "sodaCheckEvaluationStatus", "sodaCheckEvaluationStatus" + ) + """ + Check status + """ + SODA_CHECK_DEFINITION: ClassVar[KeywordField] = KeywordField( + "sodaCheckDefinition", "sodaCheckDefinition" + ) + """ + Check definition + """ + SODA_CHECK_LAST_SCAN_AT: ClassVar[NumericField] = NumericField( + "sodaCheckLastScanAt", "sodaCheckLastScanAt" + ) + """ + TBC + """ + SODA_CHECK_INCIDENT_COUNT: ClassVar[NumericField] = NumericField( + "sodaCheckIncidentCount", "sodaCheckIncidentCount" + ) + """ + TBC + """ + + SODA_CHECK_COLUMNS: ClassVar[RelationField] = RelationField("sodaCheckColumns") + """ + TBC + """ + SODA_CHECK_ASSETS: ClassVar[RelationField] = RelationField("sodaCheckAssets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "soda_check_id", "soda_check_evaluation_status", "soda_check_definition", diff --git a/pyatlan/model/assets/asset01.py b/pyatlan/model/assets/asset01.py index 96c6c0600..ed604831e 100644 --- a/pyatlan/model/assets/asset01.py +++ b/pyatlan/model/assets/asset01.py @@ -23,11 +23,11 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in DataSet._convience_properties: + if name in DataSet._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] DataSet.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset02.py b/pyatlan/model/assets/asset02.py index de308f347..c40134473 100644 --- a/pyatlan/model/assets/asset02.py +++ b/pyatlan/model/assets/asset02.py @@ -9,6 +9,7 @@ from pydantic import Field, validator from pyatlan.model.enums import AtlanConnectorType, QueryUsernameStrategy +from pyatlan.model.fields.atlan_fields import BooleanField, KeywordField, NumericField from pyatlan.utils import validate_required_fields from .asset00 import Asset @@ -77,11 +78,132 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in Connection._convience_properties: + if name in Connection._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + CATEGORY: ClassVar[KeywordField] = KeywordField("category", "category") + """ + WAREHOUSE, RDBMS, LAKE, BI + """ + SUB_CATEGORY: ClassVar[KeywordField] = KeywordField("subCategory", "subCategory") + """ + WAREHOUSE, RDBMS, LAKE, BI + """ + HOST: ClassVar[KeywordField] = KeywordField("host", "host") + """ + TBC + """ + PORT: ClassVar[NumericField] = NumericField("port", "port") + """ + TBC + """ + ALLOW_QUERY: ClassVar[BooleanField] = BooleanField("allowQuery", "allowQuery") + """ + TBC + """ + ALLOW_QUERY_PREVIEW: ClassVar[BooleanField] = BooleanField( + "allowQueryPreview", "allowQueryPreview" + ) + """ + TBC + """ + QUERY_PREVIEW_CONFIG: ClassVar[KeywordField] = KeywordField( + "queryPreviewConfig", "queryPreviewConfig" + ) + """ + TBC + """ + QUERY_CONFIG: ClassVar[KeywordField] = KeywordField("queryConfig", "queryConfig") + """ + TBC + """ + CREDENTIAL_STRATEGY: ClassVar[KeywordField] = KeywordField( + "credentialStrategy", "credentialStrategy" + ) + """ + TBC + """ + PREVIEW_CREDENTIAL_STRATEGY: ClassVar[KeywordField] = KeywordField( + "previewCredentialStrategy", "previewCredentialStrategy" + ) + """ + TBC + """ + POLICY_STRATEGY: ClassVar[KeywordField] = KeywordField( + "policyStrategy", "policyStrategy" + ) + """ + TBC + """ + QUERY_USERNAME_STRATEGY: ClassVar[KeywordField] = KeywordField( + "queryUsernameStrategy", "queryUsernameStrategy" + ) + """ + TBC + """ + ROW_LIMIT: ClassVar[NumericField] = NumericField("rowLimit", "rowLimit") + """ + TBC + """ + QUERY_TIMEOUT: ClassVar[NumericField] = NumericField("queryTimeout", "queryTimeout") + """ + TBC + """ + DEFAULT_CREDENTIAL_GUID: ClassVar[KeywordField] = KeywordField( + "defaultCredentialGuid", "defaultCredentialGuid" + ) + """ + TBC + """ + CONNECTOR_ICON: ClassVar[KeywordField] = KeywordField( + "connectorIcon", "connectorIcon" + ) + """ + TBC + """ + CONNECTOR_IMAGE: ClassVar[KeywordField] = KeywordField( + "connectorImage", "connectorImage" + ) + """ + TBC + """ + SOURCE_LOGO: ClassVar[KeywordField] = KeywordField("sourceLogo", "sourceLogo") + """ + TBC + """ + IS_SAMPLE_DATA_PREVIEW_ENABLED: ClassVar[BooleanField] = BooleanField( + "isSampleDataPreviewEnabled", "isSampleDataPreviewEnabled" + ) + """ + TBC + """ + POPULARITY_INSIGHTS_TIMEFRAME: ClassVar[NumericField] = NumericField( + "popularityInsightsTimeframe", "popularityInsightsTimeframe" + ) + """ + Number of days we are calculating popularity for, eg: 30 days + """ + HAS_POPULARITY_INSIGHTS: ClassVar[BooleanField] = BooleanField( + "hasPopularityInsights", "hasPopularityInsights" + ) + """ + Boolean flag to tell if connection has popularity insights or not + """ + CONNECTION_DBT_ENVIRONMENTS: ClassVar[KeywordField] = KeywordField( + "connectionDbtEnvironments", "connectionDbtEnvironments" + ) + """ + TBC + """ + CONNECTION_SSO_CREDENTIAL_GUID: ClassVar[KeywordField] = KeywordField( + "connectionSSOCredentialGuid", "connectionSSOCredentialGuid" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "category", "sub_category", "host", diff --git a/pyatlan/model/assets/asset03.py b/pyatlan/model/assets/asset03.py deleted file mode 100644 index 713958c07..000000000 --- a/pyatlan/model/assets/asset03.py +++ /dev/null @@ -1,125 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Atlan Pte. Ltd. - - -from __future__ import annotations - -from typing import ClassVar, Optional - -from pydantic import Field, StrictStr, validator - -from pyatlan.model.enums import EntityStatus -from pyatlan.model.structs import BadgeCondition -from pyatlan.utils import validate_required_fields - -from .asset00 import Asset - - -class Badge(Asset, type_name="Badge"): - """Description""" - - @classmethod - # @validate_arguments() - def create( - cls, - *, - name: StrictStr, - cm_name: str, - cm_attribute: str, - badge_conditions: list[BadgeCondition], - ) -> Badge: - return cls( - status=EntityStatus.ACTIVE, - attributes=Badge.Attributes.create( - name=name, - cm_name=cm_name, - cm_attribute=cm_attribute, - badge_conditions=badge_conditions, - ), - ) - - type_name: str = Field("Badge", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "Badge": - raise ValueError("must be Badge") - return v - - def __setattr__(self, name, value): - if name in Badge._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "badge_conditions", - "badge_metadata_attribute", - ] - - @property - def badge_conditions(self) -> Optional[list[BadgeCondition]]: - return None if self.attributes is None else self.attributes.badge_conditions - - @badge_conditions.setter - def badge_conditions(self, badge_conditions: Optional[list[BadgeCondition]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.badge_conditions = badge_conditions - - @property - def badge_metadata_attribute(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.badge_metadata_attribute - ) - - @badge_metadata_attribute.setter - def badge_metadata_attribute(self, badge_metadata_attribute: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.badge_metadata_attribute = badge_metadata_attribute - - class Attributes(Asset.Attributes): - badge_conditions: Optional[list[BadgeCondition]] = Field( - None, description="", alias="badgeConditions" - ) - badge_metadata_attribute: Optional[str] = Field( - None, description="", alias="badgeMetadataAttribute" - ) - - @classmethod - # @validate_arguments() - def create( - cls, - *, - name: StrictStr, - cm_name: str, - cm_attribute: str, - badge_conditions: list[BadgeCondition], - ) -> Badge.Attributes: - validate_required_fields( - ["name", "cm_name", "cm_attribute", "badge_conditions"], - [name, cm_name, cm_attribute, badge_conditions], - ) - from pyatlan.cache.custom_metadata_cache import CustomMetadataCache - - cm_id = CustomMetadataCache.get_id_for_name(cm_name) - cm_attr_id = CustomMetadataCache.get_attr_id_for_name( - set_name=cm_name, attr_name=cm_attribute - ) - return Badge.Attributes( - name=name, - qualified_name=f"badges/global/{cm_id}.{cm_attr_id}", - badge_metadata_attribute=f"{cm_id}.{cm_attr_id}", - badge_conditions=badge_conditions, - ) - - attributes: "Badge.Attributes" = Field( - default_factory=lambda: Badge.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -Badge.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset04.py b/pyatlan/model/assets/asset04.py index 9aa778a32..0b82c3883 100644 --- a/pyatlan/model/assets/asset04.py +++ b/pyatlan/model/assets/asset04.py @@ -6,433 +6,134 @@ from typing import ClassVar, Optional -from pydantic import Field, validator +from pydantic import Field, StrictStr, validator -from pyatlan.model.enums import AuthPolicyType -from pyatlan.model.structs import AuthPolicyCondition, AuthPolicyValiditySchedule +from pyatlan.model.enums import EntityStatus +from pyatlan.model.fields.atlan_fields import KeywordField +from pyatlan.model.structs import BadgeCondition from pyatlan.utils import validate_required_fields from .asset00 import Asset -class AuthPolicy(Asset, type_name="AuthPolicy"): +class Badge(Asset, type_name="Badge"): """Description""" @classmethod # @validate_arguments() - def __create(cls, *, name: str) -> AuthPolicy: - validate_required_fields(["name"], [name]) - attributes = AuthPolicy.Attributes._Attributes__create(name=name) # type: ignore - return cls(attributes=attributes) - - type_name: str = Field("AuthPolicy", allow_mutation=False) + def create( + cls, + *, + name: StrictStr, + cm_name: str, + cm_attribute: str, + badge_conditions: list[BadgeCondition], + ) -> Badge: + return cls( + status=EntityStatus.ACTIVE, + attributes=Badge.Attributes.create( + name=name, + cm_name=cm_name, + cm_attribute=cm_attribute, + badge_conditions=badge_conditions, + ), + ) + + type_name: str = Field("Badge", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "AuthPolicy": - raise ValueError("must be AuthPolicy") + if v != "Badge": + raise ValueError("must be Badge") return v def __setattr__(self, name, value): - if name in AuthPolicy._convience_properties: + if name in Badge._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "policy_type", - "policy_service_name", - "policy_category", - "policy_sub_category", - "policy_users", - "policy_groups", - "policy_roles", - "policy_actions", - "policy_resources", - "policy_resource_category", - "policy_priority", - "is_policy_enabled", - "policy_mask_type", - "policy_validity_schedule", - "policy_resource_signature", - "policy_delegate_admin", - "policy_conditions", - "access_control", - ] - - @property - def policy_type(self) -> Optional[AuthPolicyType]: - return None if self.attributes is None else self.attributes.policy_type - - @policy_type.setter - def policy_type(self, policy_type: Optional[AuthPolicyType]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_type = policy_type - - @property - def policy_service_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.policy_service_name - - @policy_service_name.setter - def policy_service_name(self, policy_service_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_service_name = policy_service_name - - @property - def policy_category(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.policy_category - - @policy_category.setter - def policy_category(self, policy_category: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_category = policy_category - - @property - def policy_sub_category(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.policy_sub_category - - @policy_sub_category.setter - def policy_sub_category(self, policy_sub_category: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_sub_category = policy_sub_category - - @property - def policy_users(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.policy_users - - @policy_users.setter - def policy_users(self, policy_users: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_users = policy_users - - @property - def policy_groups(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.policy_groups - - @policy_groups.setter - def policy_groups(self, policy_groups: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_groups = policy_groups - - @property - def policy_roles(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.policy_roles - - @policy_roles.setter - def policy_roles(self, policy_roles: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_roles = policy_roles - - @property - def policy_actions(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.policy_actions - - @policy_actions.setter - def policy_actions(self, policy_actions: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_actions = policy_actions - - @property - def policy_resources(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.policy_resources - - @policy_resources.setter - def policy_resources(self, policy_resources: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_resources = policy_resources - - @property - def policy_resource_category(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.policy_resource_category - ) - - @policy_resource_category.setter - def policy_resource_category(self, policy_resource_category: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_resource_category = policy_resource_category - - @property - def policy_priority(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.policy_priority - - @policy_priority.setter - def policy_priority(self, policy_priority: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_priority = policy_priority - - @property - def is_policy_enabled(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_policy_enabled - - @is_policy_enabled.setter - def is_policy_enabled(self, is_policy_enabled: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.is_policy_enabled = is_policy_enabled - - @property - def policy_mask_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.policy_mask_type + BADGE_CONDITIONS: ClassVar[KeywordField] = KeywordField( + "badgeConditions", "badgeConditions" + ) + """ + TBC + """ + BADGE_METADATA_ATTRIBUTE: ClassVar[KeywordField] = KeywordField( + "badgeMetadataAttribute", "badgeMetadataAttribute" + ) + """ + TBC + """ - @policy_mask_type.setter - def policy_mask_type(self, policy_mask_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_mask_type = policy_mask_type + _convenience_properties: ClassVar[list[str]] = [ + "badge_conditions", + "badge_metadata_attribute", + ] @property - def policy_validity_schedule(self) -> Optional[list[AuthPolicyValiditySchedule]]: - return ( - None - if self.attributes is None - else self.attributes.policy_validity_schedule - ) + def badge_conditions(self) -> Optional[list[BadgeCondition]]: + return None if self.attributes is None else self.attributes.badge_conditions - @policy_validity_schedule.setter - def policy_validity_schedule( - self, policy_validity_schedule: Optional[list[AuthPolicyValiditySchedule]] - ): + @badge_conditions.setter + def badge_conditions(self, badge_conditions: Optional[list[BadgeCondition]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.policy_validity_schedule = policy_validity_schedule + self.attributes.badge_conditions = badge_conditions @property - def policy_resource_signature(self) -> Optional[str]: + def badge_metadata_attribute(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.policy_resource_signature - ) - - @policy_resource_signature.setter - def policy_resource_signature(self, policy_resource_signature: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_resource_signature = policy_resource_signature - - @property - def policy_delegate_admin(self) -> Optional[bool]: - return ( - None if self.attributes is None else self.attributes.policy_delegate_admin + else self.attributes.badge_metadata_attribute ) - @policy_delegate_admin.setter - def policy_delegate_admin(self, policy_delegate_admin: Optional[bool]): + @badge_metadata_attribute.setter + def badge_metadata_attribute(self, badge_metadata_attribute: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.policy_delegate_admin = policy_delegate_admin - - @property - def policy_conditions(self) -> Optional[list[AuthPolicyCondition]]: - return None if self.attributes is None else self.attributes.policy_conditions - - @policy_conditions.setter - def policy_conditions(self, policy_conditions: Optional[list[AuthPolicyCondition]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policy_conditions = policy_conditions - - @property - def access_control(self) -> Optional[AccessControl]: - return None if self.attributes is None else self.attributes.access_control - - @access_control.setter - def access_control(self, access_control: Optional[AccessControl]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.access_control = access_control + self.attributes.badge_metadata_attribute = badge_metadata_attribute class Attributes(Asset.Attributes): - policy_type: Optional[AuthPolicyType] = Field( - None, description="", alias="policyType" - ) - policy_service_name: Optional[str] = Field( - None, description="", alias="policyServiceName" - ) - policy_category: Optional[str] = Field( - None, description="", alias="policyCategory" - ) - policy_sub_category: Optional[str] = Field( - None, description="", alias="policySubCategory" - ) - policy_users: Optional[set[str]] = Field( - None, description="", alias="policyUsers" - ) - policy_groups: Optional[set[str]] = Field( - None, description="", alias="policyGroups" - ) - policy_roles: Optional[set[str]] = Field( - None, description="", alias="policyRoles" - ) - policy_actions: Optional[set[str]] = Field( - None, description="", alias="policyActions" - ) - policy_resources: Optional[set[str]] = Field( - None, description="", alias="policyResources" - ) - policy_resource_category: Optional[str] = Field( - None, description="", alias="policyResourceCategory" - ) - policy_priority: Optional[int] = Field( - None, description="", alias="policyPriority" - ) - is_policy_enabled: Optional[bool] = Field( - None, description="", alias="isPolicyEnabled" + badge_conditions: Optional[list[BadgeCondition]] = Field( + None, description="", alias="badgeConditions" ) - policy_mask_type: Optional[str] = Field( - None, description="", alias="policyMaskType" + badge_metadata_attribute: Optional[str] = Field( + None, description="", alias="badgeMetadataAttribute" ) - policy_validity_schedule: Optional[list[AuthPolicyValiditySchedule]] = Field( - None, description="", alias="policyValiditySchedule" - ) - policy_resource_signature: Optional[str] = Field( - None, description="", alias="policyResourceSignature" - ) - policy_delegate_admin: Optional[bool] = Field( - None, description="", alias="policyDelegateAdmin" - ) - policy_conditions: Optional[list[AuthPolicyCondition]] = Field( - None, description="", alias="policyConditions" - ) - access_control: Optional[AccessControl] = Field( - None, description="", alias="accessControl" - ) # relationship @classmethod # @validate_arguments() - def __create(cls, name: str) -> AuthPolicy.Attributes: - validate_required_fields(["name"], [name]) - return AuthPolicy.Attributes( - qualified_name=name, name=name, display_name="" + def create( + cls, + *, + name: StrictStr, + cm_name: str, + cm_attribute: str, + badge_conditions: list[BadgeCondition], + ) -> Badge.Attributes: + validate_required_fields( + ["name", "cm_name", "cm_attribute", "badge_conditions"], + [name, cm_name, cm_attribute, badge_conditions], ) + from pyatlan.cache.custom_metadata_cache import CustomMetadataCache - attributes: "AuthPolicy.Attributes" = Field( - default_factory=lambda: AuthPolicy.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class AccessControl(Asset, type_name="AccessControl"): - """Description""" - - type_name: str = Field("AccessControl", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "AccessControl": - raise ValueError("must be AccessControl") - return v - - def __setattr__(self, name, value): - if name in AccessControl._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "is_access_control_enabled", - "deny_custom_metadata_guids", - "deny_asset_tabs", - "channel_link", - "policies", - ] - - @property - def is_access_control_enabled(self) -> Optional[bool]: - return ( - None - if self.attributes is None - else self.attributes.is_access_control_enabled - ) - - @is_access_control_enabled.setter - def is_access_control_enabled(self, is_access_control_enabled: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.is_access_control_enabled = is_access_control_enabled - - @property - def deny_custom_metadata_guids(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.deny_custom_metadata_guids - ) - - @deny_custom_metadata_guids.setter - def deny_custom_metadata_guids( - self, deny_custom_metadata_guids: Optional[set[str]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.deny_custom_metadata_guids = deny_custom_metadata_guids - - @property - def deny_asset_tabs(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.deny_asset_tabs - - @deny_asset_tabs.setter - def deny_asset_tabs(self, deny_asset_tabs: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.deny_asset_tabs = deny_asset_tabs - - @property - def channel_link(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.channel_link - - @channel_link.setter - def channel_link(self, channel_link: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.channel_link = channel_link - - @property - def policies(self) -> Optional[list[AuthPolicy]]: - return None if self.attributes is None else self.attributes.policies - - @policies.setter - def policies(self, policies: Optional[list[AuthPolicy]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.policies = policies - - class Attributes(Asset.Attributes): - is_access_control_enabled: Optional[bool] = Field( - None, description="", alias="isAccessControlEnabled" - ) - deny_custom_metadata_guids: Optional[set[str]] = Field( - None, description="", alias="denyCustomMetadataGuids" - ) - deny_asset_tabs: Optional[set[str]] = Field( - None, description="", alias="denyAssetTabs" - ) - channel_link: Optional[str] = Field(None, description="", alias="channelLink") - policies: Optional[list[AuthPolicy]] = Field( - None, description="", alias="policies" - ) # relationship + cm_id = CustomMetadataCache.get_id_for_name(cm_name) + cm_attr_id = CustomMetadataCache.get_attr_id_for_name( + set_name=cm_name, attr_name=cm_attribute + ) + return Badge.Attributes( + name=name, + qualified_name=f"badges/global/{cm_id}.{cm_attr_id}", + badge_metadata_attribute=f"{cm_id}.{cm_attr_id}", + badge_conditions=badge_conditions, + ) - attributes: "AccessControl.Attributes" = Field( - default_factory=lambda: AccessControl.Attributes(), + attributes: "Badge.Attributes" = Field( + default_factory=lambda: Badge.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -AuthPolicy.Attributes.update_forward_refs() - - -AccessControl.Attributes.update_forward_refs() +Badge.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset05.py b/pyatlan/model/assets/asset05.py index de9e50ab5..10c8a4cfc 100644 --- a/pyatlan/model/assets/asset05.py +++ b/pyatlan/model/assets/asset05.py @@ -4,30 +4,569 @@ from __future__ import annotations -from typing import ClassVar +from typing import ClassVar, Optional from pydantic import Field, validator +from pyatlan.model.enums import AuthPolicyType +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, +) +from pyatlan.model.structs import AuthPolicyCondition, AuthPolicyValiditySchedule +from pyatlan.utils import validate_required_fields + from .asset00 import Asset -class ProcessExecution(Asset, type_name="ProcessExecution"): +class AuthPolicy(Asset, type_name="AuthPolicy"): + """Description""" + + @classmethod + # @validate_arguments() + def __create(cls, *, name: str) -> AuthPolicy: + validate_required_fields(["name"], [name]) + attributes = AuthPolicy.Attributes._Attributes__create(name=name) # type: ignore + return cls(attributes=attributes) + + type_name: str = Field("AuthPolicy", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "AuthPolicy": + raise ValueError("must be AuthPolicy") + return v + + def __setattr__(self, name, value): + if name in AuthPolicy._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + POLICY_TYPE: ClassVar[KeywordField] = KeywordField("policyType", "policyType") + """ + TBC + """ + POLICY_SERVICE_NAME: ClassVar[KeywordField] = KeywordField( + "policyServiceName", "policyServiceName" + ) + """ + TBC + """ + POLICY_CATEGORY: ClassVar[KeywordField] = KeywordField( + "policyCategory", "policyCategory" + ) + """ + TBC + """ + POLICY_SUB_CATEGORY: ClassVar[KeywordField] = KeywordField( + "policySubCategory", "policySubCategory" + ) + """ + TBC + """ + POLICY_USERS: ClassVar[KeywordField] = KeywordField("policyUsers", "policyUsers") + """ + TBC + """ + POLICY_GROUPS: ClassVar[KeywordField] = KeywordField("policyGroups", "policyGroups") + """ + TBC + """ + POLICY_ROLES: ClassVar[KeywordField] = KeywordField("policyRoles", "policyRoles") + """ + TBC + """ + POLICY_ACTIONS: ClassVar[KeywordField] = KeywordField( + "policyActions", "policyActions" + ) + """ + TBC + """ + POLICY_RESOURCES: ClassVar[KeywordField] = KeywordField( + "policyResources", "policyResources" + ) + """ + TBC + """ + POLICY_RESOURCE_CATEGORY: ClassVar[KeywordField] = KeywordField( + "policyResourceCategory", "policyResourceCategory" + ) + """ + TBC + """ + POLICY_PRIORITY: ClassVar[NumericField] = NumericField( + "policyPriority", "policyPriority" + ) + """ + TBC + """ + IS_POLICY_ENABLED: ClassVar[BooleanField] = BooleanField( + "isPolicyEnabled", "isPolicyEnabled" + ) + """ + TBC + """ + POLICY_MASK_TYPE: ClassVar[KeywordField] = KeywordField( + "policyMaskType", "policyMaskType" + ) + """ + TBC + """ + POLICY_VALIDITY_SCHEDULE: ClassVar[KeywordField] = KeywordField( + "policyValiditySchedule", "policyValiditySchedule" + ) + """ + TBC + """ + POLICY_RESOURCE_SIGNATURE: ClassVar[KeywordField] = KeywordField( + "policyResourceSignature", "policyResourceSignature" + ) + """ + TBC + """ + POLICY_DELEGATE_ADMIN: ClassVar[BooleanField] = BooleanField( + "policyDelegateAdmin", "policyDelegateAdmin" + ) + """ + TBC + """ + POLICY_CONDITIONS: ClassVar[KeywordField] = KeywordField( + "policyConditions", "policyConditions" + ) + """ + TBC + """ + + ACCESS_CONTROL: ClassVar[RelationField] = RelationField("accessControl") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "policy_type", + "policy_service_name", + "policy_category", + "policy_sub_category", + "policy_users", + "policy_groups", + "policy_roles", + "policy_actions", + "policy_resources", + "policy_resource_category", + "policy_priority", + "is_policy_enabled", + "policy_mask_type", + "policy_validity_schedule", + "policy_resource_signature", + "policy_delegate_admin", + "policy_conditions", + "access_control", + ] + + @property + def policy_type(self) -> Optional[AuthPolicyType]: + return None if self.attributes is None else self.attributes.policy_type + + @policy_type.setter + def policy_type(self, policy_type: Optional[AuthPolicyType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_type = policy_type + + @property + def policy_service_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.policy_service_name + + @policy_service_name.setter + def policy_service_name(self, policy_service_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_service_name = policy_service_name + + @property + def policy_category(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.policy_category + + @policy_category.setter + def policy_category(self, policy_category: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_category = policy_category + + @property + def policy_sub_category(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.policy_sub_category + + @policy_sub_category.setter + def policy_sub_category(self, policy_sub_category: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_sub_category = policy_sub_category + + @property + def policy_users(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.policy_users + + @policy_users.setter + def policy_users(self, policy_users: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_users = policy_users + + @property + def policy_groups(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.policy_groups + + @policy_groups.setter + def policy_groups(self, policy_groups: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_groups = policy_groups + + @property + def policy_roles(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.policy_roles + + @policy_roles.setter + def policy_roles(self, policy_roles: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_roles = policy_roles + + @property + def policy_actions(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.policy_actions + + @policy_actions.setter + def policy_actions(self, policy_actions: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_actions = policy_actions + + @property + def policy_resources(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.policy_resources + + @policy_resources.setter + def policy_resources(self, policy_resources: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_resources = policy_resources + + @property + def policy_resource_category(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.policy_resource_category + ) + + @policy_resource_category.setter + def policy_resource_category(self, policy_resource_category: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_resource_category = policy_resource_category + + @property + def policy_priority(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.policy_priority + + @policy_priority.setter + def policy_priority(self, policy_priority: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_priority = policy_priority + + @property + def is_policy_enabled(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_policy_enabled + + @is_policy_enabled.setter + def is_policy_enabled(self, is_policy_enabled: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.is_policy_enabled = is_policy_enabled + + @property + def policy_mask_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.policy_mask_type + + @policy_mask_type.setter + def policy_mask_type(self, policy_mask_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_mask_type = policy_mask_type + + @property + def policy_validity_schedule(self) -> Optional[list[AuthPolicyValiditySchedule]]: + return ( + None + if self.attributes is None + else self.attributes.policy_validity_schedule + ) + + @policy_validity_schedule.setter + def policy_validity_schedule( + self, policy_validity_schedule: Optional[list[AuthPolicyValiditySchedule]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_validity_schedule = policy_validity_schedule + + @property + def policy_resource_signature(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.policy_resource_signature + ) + + @policy_resource_signature.setter + def policy_resource_signature(self, policy_resource_signature: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_resource_signature = policy_resource_signature + + @property + def policy_delegate_admin(self) -> Optional[bool]: + return ( + None if self.attributes is None else self.attributes.policy_delegate_admin + ) + + @policy_delegate_admin.setter + def policy_delegate_admin(self, policy_delegate_admin: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_delegate_admin = policy_delegate_admin + + @property + def policy_conditions(self) -> Optional[list[AuthPolicyCondition]]: + return None if self.attributes is None else self.attributes.policy_conditions + + @policy_conditions.setter + def policy_conditions(self, policy_conditions: Optional[list[AuthPolicyCondition]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policy_conditions = policy_conditions + + @property + def access_control(self) -> Optional[AccessControl]: + return None if self.attributes is None else self.attributes.access_control + + @access_control.setter + def access_control(self, access_control: Optional[AccessControl]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.access_control = access_control + + class Attributes(Asset.Attributes): + policy_type: Optional[AuthPolicyType] = Field( + None, description="", alias="policyType" + ) + policy_service_name: Optional[str] = Field( + None, description="", alias="policyServiceName" + ) + policy_category: Optional[str] = Field( + None, description="", alias="policyCategory" + ) + policy_sub_category: Optional[str] = Field( + None, description="", alias="policySubCategory" + ) + policy_users: Optional[set[str]] = Field( + None, description="", alias="policyUsers" + ) + policy_groups: Optional[set[str]] = Field( + None, description="", alias="policyGroups" + ) + policy_roles: Optional[set[str]] = Field( + None, description="", alias="policyRoles" + ) + policy_actions: Optional[set[str]] = Field( + None, description="", alias="policyActions" + ) + policy_resources: Optional[set[str]] = Field( + None, description="", alias="policyResources" + ) + policy_resource_category: Optional[str] = Field( + None, description="", alias="policyResourceCategory" + ) + policy_priority: Optional[int] = Field( + None, description="", alias="policyPriority" + ) + is_policy_enabled: Optional[bool] = Field( + None, description="", alias="isPolicyEnabled" + ) + policy_mask_type: Optional[str] = Field( + None, description="", alias="policyMaskType" + ) + policy_validity_schedule: Optional[list[AuthPolicyValiditySchedule]] = Field( + None, description="", alias="policyValiditySchedule" + ) + policy_resource_signature: Optional[str] = Field( + None, description="", alias="policyResourceSignature" + ) + policy_delegate_admin: Optional[bool] = Field( + None, description="", alias="policyDelegateAdmin" + ) + policy_conditions: Optional[list[AuthPolicyCondition]] = Field( + None, description="", alias="policyConditions" + ) + access_control: Optional[AccessControl] = Field( + None, description="", alias="accessControl" + ) # relationship + + @classmethod + # @validate_arguments() + def __create(cls, name: str) -> AuthPolicy.Attributes: + validate_required_fields(["name"], [name]) + return AuthPolicy.Attributes( + qualified_name=name, name=name, display_name="" + ) + + attributes: "AuthPolicy.Attributes" = Field( + default_factory=lambda: AuthPolicy.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class AccessControl(Asset, type_name="AccessControl"): """Description""" - type_name: str = Field("ProcessExecution", allow_mutation=False) + type_name: str = Field("AccessControl", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ProcessExecution": - raise ValueError("must be ProcessExecution") + if v != "AccessControl": + raise ValueError("must be AccessControl") return v def __setattr__(self, name, value): - if name in ProcessExecution._convience_properties: + if name in AccessControl._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + IS_ACCESS_CONTROL_ENABLED: ClassVar[BooleanField] = BooleanField( + "isAccessControlEnabled", "isAccessControlEnabled" + ) + """ + TBC + """ + DENY_CUSTOM_METADATA_GUIDS: ClassVar[KeywordField] = KeywordField( + "denyCustomMetadataGuids", "denyCustomMetadataGuids" + ) + """ + TBC + """ + DENY_ASSET_TABS: ClassVar[KeywordField] = KeywordField( + "denyAssetTabs", "denyAssetTabs" + ) + """ + TBC + """ + CHANNEL_LINK: ClassVar[KeywordField] = KeywordField("channelLink", "channelLink") + """ + TBC + """ + + POLICIES: ClassVar[RelationField] = RelationField("policies") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "is_access_control_enabled", + "deny_custom_metadata_guids", + "deny_asset_tabs", + "channel_link", + "policies", + ] + + @property + def is_access_control_enabled(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.is_access_control_enabled + ) + + @is_access_control_enabled.setter + def is_access_control_enabled(self, is_access_control_enabled: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.is_access_control_enabled = is_access_control_enabled + + @property + def deny_custom_metadata_guids(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.deny_custom_metadata_guids + ) + + @deny_custom_metadata_guids.setter + def deny_custom_metadata_guids( + self, deny_custom_metadata_guids: Optional[set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.deny_custom_metadata_guids = deny_custom_metadata_guids + + @property + def deny_asset_tabs(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.deny_asset_tabs + + @deny_asset_tabs.setter + def deny_asset_tabs(self, deny_asset_tabs: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.deny_asset_tabs = deny_asset_tabs + + @property + def channel_link(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.channel_link + + @channel_link.setter + def channel_link(self, channel_link: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.channel_link = channel_link + + @property + def policies(self) -> Optional[list[AuthPolicy]]: + return None if self.attributes is None else self.attributes.policies + + @policies.setter + def policies(self, policies: Optional[list[AuthPolicy]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.policies = policies + + class Attributes(Asset.Attributes): + is_access_control_enabled: Optional[bool] = Field( + None, description="", alias="isAccessControlEnabled" + ) + deny_custom_metadata_guids: Optional[set[str]] = Field( + None, description="", alias="denyCustomMetadataGuids" + ) + deny_asset_tabs: Optional[set[str]] = Field( + None, description="", alias="denyAssetTabs" + ) + channel_link: Optional[str] = Field(None, description="", alias="channelLink") + policies: Optional[list[AuthPolicy]] = Field( + None, description="", alias="policies" + ) # relationship + + attributes: "AccessControl.Attributes" = Field( + default_factory=lambda: AccessControl.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +AuthPolicy.Attributes.update_forward_refs() -ProcessExecution.Attributes.update_forward_refs() +AccessControl.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset06.py b/pyatlan/model/assets/asset06.py index 63f3a6998..9c75e7cdf 100644 --- a/pyatlan/model/assets/asset06.py +++ b/pyatlan/model/assets/asset06.py @@ -4,115 +4,30 @@ from __future__ import annotations -from typing import ClassVar, Optional +from typing import ClassVar from pydantic import Field, validator from .asset00 import Asset -class AuthService(Asset, type_name="AuthService"): +class ProcessExecution(Asset, type_name="ProcessExecution"): """Description""" - type_name: str = Field("AuthService", allow_mutation=False) + type_name: str = Field("ProcessExecution", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "AuthService": - raise ValueError("must be AuthService") + if v != "ProcessExecution": + raise ValueError("must be ProcessExecution") return v def __setattr__(self, name, value): - if name in AuthService._convience_properties: + if name in ProcessExecution._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "auth_service_type", - "tag_service", - "auth_service_is_enabled", - "auth_service_config", - "auth_service_policy_last_sync", - ] + _convenience_properties: ClassVar[list[str]] = [] - @property - def auth_service_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.auth_service_type - @auth_service_type.setter - def auth_service_type(self, auth_service_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.auth_service_type = auth_service_type - - @property - def tag_service(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.tag_service - - @tag_service.setter - def tag_service(self, tag_service: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tag_service = tag_service - - @property - def auth_service_is_enabled(self) -> Optional[bool]: - return ( - None if self.attributes is None else self.attributes.auth_service_is_enabled - ) - - @auth_service_is_enabled.setter - def auth_service_is_enabled(self, auth_service_is_enabled: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.auth_service_is_enabled = auth_service_is_enabled - - @property - def auth_service_config(self) -> Optional[dict[str, str]]: - return None if self.attributes is None else self.attributes.auth_service_config - - @auth_service_config.setter - def auth_service_config(self, auth_service_config: Optional[dict[str, str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.auth_service_config = auth_service_config - - @property - def auth_service_policy_last_sync(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.auth_service_policy_last_sync - ) - - @auth_service_policy_last_sync.setter - def auth_service_policy_last_sync( - self, auth_service_policy_last_sync: Optional[int] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.auth_service_policy_last_sync = auth_service_policy_last_sync - - class Attributes(Asset.Attributes): - auth_service_type: Optional[str] = Field( - None, description="", alias="authServiceType" - ) - tag_service: Optional[str] = Field(None, description="", alias="tagService") - auth_service_is_enabled: Optional[bool] = Field( - None, description="", alias="authServiceIsEnabled" - ) - auth_service_config: Optional[dict[str, str]] = Field( - None, description="", alias="authServiceConfig" - ) - auth_service_policy_last_sync: Optional[int] = Field( - None, description="", alias="authServicePolicyLastSync" - ) - - attributes: "AuthService.Attributes" = Field( - default_factory=lambda: AuthService.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -AuthService.Attributes.update_forward_refs() +ProcessExecution.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset07.py b/pyatlan/model/assets/asset07.py index c5f41ef1e..5d4285fa5 100644 --- a/pyatlan/model/assets/asset07.py +++ b/pyatlan/model/assets/asset07.py @@ -4,30 +4,146 @@ from __future__ import annotations -from typing import ClassVar +from typing import ClassVar, Optional from pydantic import Field, validator +from pyatlan.model.fields.atlan_fields import BooleanField, KeywordField, NumericField + from .asset00 import Asset -class Cloud(Asset, type_name="Cloud"): +class AuthService(Asset, type_name="AuthService"): """Description""" - type_name: str = Field("Cloud", allow_mutation=False) + type_name: str = Field("AuthService", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Cloud": - raise ValueError("must be Cloud") + if v != "AuthService": + raise ValueError("must be AuthService") return v def __setattr__(self, name, value): - if name in Cloud._convience_properties: + if name in AuthService._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + AUTH_SERVICE_TYPE: ClassVar[KeywordField] = KeywordField( + "authServiceType", "authServiceType" + ) + """ + TBC + """ + TAG_SERVICE: ClassVar[KeywordField] = KeywordField("tagService", "tagService") + """ + TBC + """ + AUTH_SERVICE_IS_ENABLED: ClassVar[BooleanField] = BooleanField( + "authServiceIsEnabled", "authServiceIsEnabled" + ) + """ + TBC + """ + AUTH_SERVICE_CONFIG: ClassVar[KeywordField] = KeywordField( + "authServiceConfig", "authServiceConfig" + ) + """ + TBC + """ + AUTH_SERVICE_POLICY_LAST_SYNC: ClassVar[NumericField] = NumericField( + "authServicePolicyLastSync", "authServicePolicyLastSync" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "auth_service_type", + "tag_service", + "auth_service_is_enabled", + "auth_service_config", + "auth_service_policy_last_sync", + ] + + @property + def auth_service_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.auth_service_type + + @auth_service_type.setter + def auth_service_type(self, auth_service_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.auth_service_type = auth_service_type + + @property + def tag_service(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.tag_service + + @tag_service.setter + def tag_service(self, tag_service: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tag_service = tag_service + + @property + def auth_service_is_enabled(self) -> Optional[bool]: + return ( + None if self.attributes is None else self.attributes.auth_service_is_enabled + ) + + @auth_service_is_enabled.setter + def auth_service_is_enabled(self, auth_service_is_enabled: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.auth_service_is_enabled = auth_service_is_enabled + + @property + def auth_service_config(self) -> Optional[dict[str, str]]: + return None if self.attributes is None else self.attributes.auth_service_config + + @auth_service_config.setter + def auth_service_config(self, auth_service_config: Optional[dict[str, str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.auth_service_config = auth_service_config + + @property + def auth_service_policy_last_sync(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.auth_service_policy_last_sync + ) + + @auth_service_policy_last_sync.setter + def auth_service_policy_last_sync( + self, auth_service_policy_last_sync: Optional[int] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.auth_service_policy_last_sync = auth_service_policy_last_sync + + class Attributes(Asset.Attributes): + auth_service_type: Optional[str] = Field( + None, description="", alias="authServiceType" + ) + tag_service: Optional[str] = Field(None, description="", alias="tagService") + auth_service_is_enabled: Optional[bool] = Field( + None, description="", alias="authServiceIsEnabled" + ) + auth_service_config: Optional[dict[str, str]] = Field( + None, description="", alias="authServiceConfig" + ) + auth_service_policy_last_sync: Optional[int] = Field( + None, description="", alias="authServicePolicyLastSync" + ) + + attributes: "AuthService.Attributes" = Field( + default_factory=lambda: AuthService.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) -Cloud.Attributes.update_forward_refs() +AuthService.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset08.py b/pyatlan/model/assets/asset08.py index b559c000f..54f951c2a 100644 --- a/pyatlan/model/assets/asset08.py +++ b/pyatlan/model/assets/asset08.py @@ -11,23 +11,23 @@ from .asset00 import Asset -class Infrastructure(Asset, type_name="Infrastructure"): +class Cloud(Asset, type_name="Cloud"): """Description""" - type_name: str = Field("Infrastructure", allow_mutation=False) + type_name: str = Field("Cloud", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Infrastructure": - raise ValueError("must be Infrastructure") + if v != "Cloud": + raise ValueError("must be Cloud") return v def __setattr__(self, name, value): - if name in Infrastructure._convience_properties: + if name in Cloud._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] -Infrastructure.Attributes.update_forward_refs() +Cloud.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset09.py b/pyatlan/model/assets/asset09.py index 7863fef9b..2ef41930d 100644 --- a/pyatlan/model/assets/asset09.py +++ b/pyatlan/model/assets/asset09.py @@ -4,67 +4,30 @@ from __future__ import annotations -from typing import ClassVar, Optional +from typing import ClassVar from pydantic import Field, validator -from .asset00 import Catalog, Process +from .asset00 import Asset -class BIProcess(Process): +class Infrastructure(Asset, type_name="Infrastructure"): """Description""" - type_name: str = Field("BIProcess", allow_mutation=False) + type_name: str = Field("Infrastructure", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "BIProcess": - raise ValueError("must be BIProcess") + if v != "Infrastructure": + raise ValueError("must be Infrastructure") return v def __setattr__(self, name, value): - if name in BIProcess._convience_properties: + if name in Infrastructure._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "outputs", - "inputs", - ] + _convenience_properties: ClassVar[list[str]] = [] - @property - def outputs(self) -> Optional[list[Catalog]]: - return None if self.attributes is None else self.attributes.outputs - @outputs.setter - def outputs(self, outputs: Optional[list[Catalog]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.outputs = outputs - - @property - def inputs(self) -> Optional[list[Catalog]]: - return None if self.attributes is None else self.attributes.inputs - - @inputs.setter - def inputs(self, inputs: Optional[list[Catalog]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.inputs = inputs - - class Attributes(Process.Attributes): - outputs: Optional[list[Catalog]] = Field( - None, description="", alias="outputs" - ) # relationship - inputs: Optional[list[Catalog]] = Field( - None, description="", alias="inputs" - ) # relationship - - attributes: "BIProcess.Attributes" = Field( - default_factory=lambda: BIProcess.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -BIProcess.Attributes.update_forward_refs() +Infrastructure.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset10.py b/pyatlan/model/assets/asset10.py index f86ae3b15..96c3b8e1a 100644 --- a/pyatlan/model/assets/asset10.py +++ b/pyatlan/model/assets/asset10.py @@ -4,283 +4,45 @@ from __future__ import annotations -from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset00 import AirflowTask, Catalog, ColumnProcess, Dbt +from pyatlan.model.fields.atlan_fields import RelationField +from .asset00 import Catalog, Process -class DbtProcess(Dbt): + +class BIProcess(Process): """Description""" - type_name: str = Field("DbtProcess", allow_mutation=False) + type_name: str = Field("BIProcess", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "DbtProcess": - raise ValueError("must be DbtProcess") + if v != "BIProcess": + raise ValueError("must be BIProcess") return v def __setattr__(self, name, value): - if name in DbtProcess._convience_properties: + if name in BIProcess._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "dbt_process_job_status", - "dbt_alias", - "dbt_meta", - "dbt_unique_id", - "dbt_account_name", - "dbt_project_name", - "dbt_package_name", - "dbt_job_name", - "dbt_job_schedule", - "dbt_job_status", - "dbt_job_schedule_cron_humanized", - "dbt_job_last_run", - "dbt_job_next_run", - "dbt_job_next_run_humanized", - "dbt_environment_name", - "dbt_environment_dbt_version", - "dbt_tags", - "dbt_connection_context", - "dbt_semantic_layer_proxy_url", - "inputs", + OUTPUTS: ClassVar[RelationField] = RelationField("outputs") + """ + TBC + """ + INPUTS: ClassVar[RelationField] = RelationField("inputs") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "outputs", - "code", - "sql", - "ast", - "airflow_tasks", - "column_processes", + "inputs", ] - @property - def dbt_process_job_status(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.dbt_process_job_status - ) - - @dbt_process_job_status.setter - def dbt_process_job_status(self, dbt_process_job_status: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_process_job_status = dbt_process_job_status - - @property - def dbt_alias(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_alias - - @dbt_alias.setter - def dbt_alias(self, dbt_alias: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_alias = dbt_alias - - @property - def dbt_meta(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_meta - - @dbt_meta.setter - def dbt_meta(self, dbt_meta: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_meta = dbt_meta - - @property - def dbt_unique_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_unique_id - - @dbt_unique_id.setter - def dbt_unique_id(self, dbt_unique_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_unique_id = dbt_unique_id - - @property - def dbt_account_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_account_name - - @dbt_account_name.setter - def dbt_account_name(self, dbt_account_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_account_name = dbt_account_name - - @property - def dbt_project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_project_name - - @dbt_project_name.setter - def dbt_project_name(self, dbt_project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_project_name = dbt_project_name - - @property - def dbt_package_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_package_name - - @dbt_package_name.setter - def dbt_package_name(self, dbt_package_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_package_name = dbt_package_name - - @property - def dbt_job_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_job_name - - @dbt_job_name.setter - def dbt_job_name(self, dbt_job_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_name = dbt_job_name - - @property - def dbt_job_schedule(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_job_schedule - - @dbt_job_schedule.setter - def dbt_job_schedule(self, dbt_job_schedule: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_schedule = dbt_job_schedule - - @property - def dbt_job_status(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_job_status - - @dbt_job_status.setter - def dbt_job_status(self, dbt_job_status: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_status = dbt_job_status - - @property - def dbt_job_schedule_cron_humanized(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_job_schedule_cron_humanized - ) - - @dbt_job_schedule_cron_humanized.setter - def dbt_job_schedule_cron_humanized( - self, dbt_job_schedule_cron_humanized: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_schedule_cron_humanized = ( - dbt_job_schedule_cron_humanized - ) - - @property - def dbt_job_last_run(self) -> Optional[datetime]: - return None if self.attributes is None else self.attributes.dbt_job_last_run - - @dbt_job_last_run.setter - def dbt_job_last_run(self, dbt_job_last_run: Optional[datetime]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_last_run = dbt_job_last_run - - @property - def dbt_job_next_run(self) -> Optional[datetime]: - return None if self.attributes is None else self.attributes.dbt_job_next_run - - @dbt_job_next_run.setter - def dbt_job_next_run(self, dbt_job_next_run: Optional[datetime]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_next_run = dbt_job_next_run - - @property - def dbt_job_next_run_humanized(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_job_next_run_humanized - ) - - @dbt_job_next_run_humanized.setter - def dbt_job_next_run_humanized(self, dbt_job_next_run_humanized: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_next_run_humanized = dbt_job_next_run_humanized - - @property - def dbt_environment_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_environment_name - - @dbt_environment_name.setter - def dbt_environment_name(self, dbt_environment_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_environment_name = dbt_environment_name - - @property - def dbt_environment_dbt_version(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_environment_dbt_version - ) - - @dbt_environment_dbt_version.setter - def dbt_environment_dbt_version(self, dbt_environment_dbt_version: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_environment_dbt_version = dbt_environment_dbt_version - - @property - def dbt_tags(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.dbt_tags - - @dbt_tags.setter - def dbt_tags(self, dbt_tags: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_tags = dbt_tags - - @property - def dbt_connection_context(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.dbt_connection_context - ) - - @dbt_connection_context.setter - def dbt_connection_context(self, dbt_connection_context: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_connection_context = dbt_connection_context - - @property - def dbt_semantic_layer_proxy_url(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_semantic_layer_proxy_url - ) - - @dbt_semantic_layer_proxy_url.setter - def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url - - @property - def inputs(self) -> Optional[list[Catalog]]: - return None if self.attributes is None else self.attributes.inputs - - @inputs.setter - def inputs(self, inputs: Optional[list[Catalog]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.inputs = inputs - @property def outputs(self) -> Optional[list[Catalog]]: return None if self.attributes is None else self.attributes.outputs @@ -292,120 +54,28 @@ def outputs(self, outputs: Optional[list[Catalog]]): self.attributes.outputs = outputs @property - def code(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.code - - @code.setter - def code(self, code: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.code = code - - @property - def sql(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.sql - - @sql.setter - def sql(self, sql: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sql = sql - - @property - def ast(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.ast - - @ast.setter - def ast(self, ast: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.ast = ast - - @property - def airflow_tasks(self) -> Optional[list[AirflowTask]]: - return None if self.attributes is None else self.attributes.airflow_tasks - - @airflow_tasks.setter - def airflow_tasks(self, airflow_tasks: Optional[list[AirflowTask]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.airflow_tasks = airflow_tasks - - @property - def column_processes(self) -> Optional[list[ColumnProcess]]: - return None if self.attributes is None else self.attributes.column_processes + def inputs(self) -> Optional[list[Catalog]]: + return None if self.attributes is None else self.attributes.inputs - @column_processes.setter - def column_processes(self, column_processes: Optional[list[ColumnProcess]]): + @inputs.setter + def inputs(self, inputs: Optional[list[Catalog]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.column_processes = column_processes + self.attributes.inputs = inputs - class Attributes(Dbt.Attributes): - dbt_process_job_status: Optional[str] = Field( - None, description="", alias="dbtProcessJobStatus" - ) - dbt_alias: Optional[str] = Field(None, description="", alias="dbtAlias") - dbt_meta: Optional[str] = Field(None, description="", alias="dbtMeta") - dbt_unique_id: Optional[str] = Field(None, description="", alias="dbtUniqueId") - dbt_account_name: Optional[str] = Field( - None, description="", alias="dbtAccountName" - ) - dbt_project_name: Optional[str] = Field( - None, description="", alias="dbtProjectName" - ) - dbt_package_name: Optional[str] = Field( - None, description="", alias="dbtPackageName" - ) - dbt_job_name: Optional[str] = Field(None, description="", alias="dbtJobName") - dbt_job_schedule: Optional[str] = Field( - None, description="", alias="dbtJobSchedule" - ) - dbt_job_status: Optional[str] = Field( - None, description="", alias="dbtJobStatus" - ) - dbt_job_schedule_cron_humanized: Optional[str] = Field( - None, description="", alias="dbtJobScheduleCronHumanized" - ) - dbt_job_last_run: Optional[datetime] = Field( - None, description="", alias="dbtJobLastRun" - ) - dbt_job_next_run: Optional[datetime] = Field( - None, description="", alias="dbtJobNextRun" - ) - dbt_job_next_run_humanized: Optional[str] = Field( - None, description="", alias="dbtJobNextRunHumanized" - ) - dbt_environment_name: Optional[str] = Field( - None, description="", alias="dbtEnvironmentName" - ) - dbt_environment_dbt_version: Optional[str] = Field( - None, description="", alias="dbtEnvironmentDbtVersion" - ) - dbt_tags: Optional[set[str]] = Field(None, description="", alias="dbtTags") - dbt_connection_context: Optional[str] = Field( - None, description="", alias="dbtConnectionContext" - ) - dbt_semantic_layer_proxy_url: Optional[str] = Field( - None, description="", alias="dbtSemanticLayerProxyUrl" - ) - inputs: Optional[list[Catalog]] = Field(None, description="", alias="inputs") - outputs: Optional[list[Catalog]] = Field(None, description="", alias="outputs") - code: Optional[str] = Field(None, description="", alias="code") - sql: Optional[str] = Field(None, description="", alias="sql") - ast: Optional[str] = Field(None, description="", alias="ast") - airflow_tasks: Optional[list[AirflowTask]] = Field( - None, description="", alias="airflowTasks" + class Attributes(Process.Attributes): + outputs: Optional[list[Catalog]] = Field( + None, description="", alias="outputs" ) # relationship - column_processes: Optional[list[ColumnProcess]] = Field( - None, description="", alias="columnProcesses" + inputs: Optional[list[Catalog]] = Field( + None, description="", alias="inputs" ) # relationship - attributes: "DbtProcess.Attributes" = Field( - default_factory=lambda: DbtProcess.Attributes(), + attributes: "BIProcess.Attributes" = Field( + default_factory=lambda: BIProcess.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -DbtProcess.Attributes.update_forward_refs() +BIProcess.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset11.py b/pyatlan/model/assets/asset11.py index 20b2d1f42..d7caa5c93 100644 --- a/pyatlan/model/assets/asset11.py +++ b/pyatlan/model/assets/asset11.py @@ -4,218 +4,553 @@ from __future__ import annotations -from typing import ClassVar, Optional, Set +from datetime import datetime +from typing import ClassVar, Optional from pydantic import Field, validator -from pyatlan.model.enums import ( - AuthPolicyCategory, - AuthPolicyResourceCategory, - AuthPolicyType, - DataAction, - PersonaGlossaryAction, - PersonaMetadataAction, +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, + RelationField, ) -from pyatlan.utils import validate_required_fields -from .asset00 import SelfAsset -from .asset04 import AccessControl, AuthPolicy +from .asset00 import AirflowTask, Catalog, ColumnProcess, Dbt -class Persona(AccessControl): +class DbtProcess(Dbt): """Description""" - @classmethod - # @validate_arguments() - def create(cls, *, name: str) -> Persona: - validate_required_fields(["name"], [name]) - attributes = Persona.Attributes.create(name=name) - return cls(attributes=attributes) - - @classmethod - # @validate_arguments() - def create_metadata_policy( - cls, - *, - name: str, - persona_id: str, - policy_type: AuthPolicyType, - actions: Set[PersonaMetadataAction], - connection_qualified_name: str, - resources: Set[str], - ) -> AuthPolicy: - validate_required_fields( - ["name", "persona_id", "policy_type", "actions", "resources"], - [name, persona_id, policy_type, actions, resources], - ) - policy = AuthPolicy._AuthPolicy__create(name=name) # type: ignore - policy.policy_actions = {x.value for x in actions} - policy.policy_category = AuthPolicyCategory.PERSONA.value - policy.policy_type = policy_type - policy.connection_qualified_name = connection_qualified_name - policy.policy_resources = resources - policy.policy_resource_category = AuthPolicyResourceCategory.CUSTOM.value - policy.policy_service_name = "atlas" - policy.policy_sub_category = "metadata" - persona = Persona() - persona.guid = persona_id - policy.access_control = persona - return policy - - @classmethod - # @validate_arguments() - def create_data_policy( - cls, - *, - name: str, - persona_id: str, - policy_type: AuthPolicyType, - connection_qualified_name: str, - resources: Set[str], - ) -> AuthPolicy: - validate_required_fields( - ["name", "persona_id", "policy_type", "resources"], - [name, persona_id, policy_type, resources], - ) - policy = AuthPolicy._AuthPolicy__create(name=name) # type: ignore - policy.policy_actions = {DataAction.SELECT.value} - policy.policy_category = AuthPolicyCategory.PERSONA.value - policy.policy_type = policy_type - policy.connection_qualified_name = connection_qualified_name - policy.policy_resources = resources - policy.policy_resources.add("entity-type:*") - policy.policy_resource_category = AuthPolicyResourceCategory.ENTITY.value - policy.policy_service_name = "heka" - policy.policy_sub_category = "data" - persona = Persona() - persona.guid = persona_id - policy.access_control = persona - return policy - - @classmethod - # @validate_arguments() - def create_glossary_policy( - cls, - *, - name: str, - persona_id: str, - policy_type: AuthPolicyType, - actions: Set[PersonaGlossaryAction], - resources: Set[str], - ) -> AuthPolicy: - validate_required_fields( - ["name", "persona_id", "policy_type", "actions", "resources"], - [name, persona_id, policy_type, actions, resources], - ) - policy = AuthPolicy._AuthPolicy__create(name=name) # type: ignore - policy.policy_actions = {x.value for x in actions} - policy.policy_category = AuthPolicyCategory.PERSONA.value - policy.policy_type = policy_type - policy.policy_resources = resources - policy.policy_resource_category = AuthPolicyResourceCategory.CUSTOM.value - policy.policy_service_name = "atlas" - policy.policy_sub_category = "glossary" - persona = Persona() - persona.guid = persona_id - policy.access_control = persona - return policy - - @classmethod - def create_for_modification( - cls: type[SelfAsset], - qualified_name: str = "", - name: str = "", - is_enabled: bool = True, - ) -> SelfAsset: - validate_required_fields( - ["name", "qualified_name", "is_enabled"], - [name, qualified_name, is_enabled], - ) - return cls( - attributes=cls.Attributes( - qualified_name=qualified_name, - name=name, - is_access_control_enabled=is_enabled, - ) - ) - - type_name: str = Field("Persona", allow_mutation=False) + type_name: str = Field("DbtProcess", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Persona": - raise ValueError("must be Persona") + if v != "DbtProcess": + raise ValueError("must be DbtProcess") return v def __setattr__(self, name, value): - if name in Persona._convience_properties: + if name in DbtProcess._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "persona_groups", - "persona_users", - "role_id", + DBT_PROCESS_JOB_STATUS: ClassVar[KeywordField] = KeywordField( + "dbtProcessJobStatus", "dbtProcessJobStatus" + ) + """ + TBC + """ + DBT_ALIAS: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAlias", "dbtAlias.keyword", "dbtAlias" + ) + """ + TBC + """ + DBT_META: ClassVar[KeywordField] = KeywordField("dbtMeta", "dbtMeta") + """ + TBC + """ + DBT_UNIQUE_ID: ClassVar[KeywordTextField] = KeywordTextField( + "dbtUniqueId", "dbtUniqueId.keyword", "dbtUniqueId" + ) + """ + TBC + """ + DBT_ACCOUNT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAccountName", "dbtAccountName.keyword", "dbtAccountName" + ) + """ + TBC + """ + DBT_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtProjectName", "dbtProjectName.keyword", "dbtProjectName" + ) + """ + TBC + """ + DBT_PACKAGE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtPackageName", "dbtPackageName.keyword", "dbtPackageName" + ) + """ + TBC + """ + DBT_JOB_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobName", "dbtJobName.keyword", "dbtJobName" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE: ClassVar[KeywordField] = KeywordField( + "dbtJobSchedule", "dbtJobSchedule" + ) + """ + TBC + """ + DBT_JOB_STATUS: ClassVar[KeywordField] = KeywordField( + "dbtJobStatus", "dbtJobStatus" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE_CRON_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobScheduleCronHumanized", + "dbtJobScheduleCronHumanized.keyword", + "dbtJobScheduleCronHumanized", + ) + """ + TBC + """ + DBT_JOB_LAST_RUN: ClassVar[NumericField] = NumericField( + "dbtJobLastRun", "dbtJobLastRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN: ClassVar[NumericField] = NumericField( + "dbtJobNextRun", "dbtJobNextRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobNextRunHumanized", + "dbtJobNextRunHumanized.keyword", + "dbtJobNextRunHumanized", + ) + """ + TBC + """ + DBT_ENVIRONMENT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentName", "dbtEnvironmentName.keyword", "dbtEnvironmentName" + ) + """ + TBC + """ + DBT_ENVIRONMENT_DBT_VERSION: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentDbtVersion", + "dbtEnvironmentDbtVersion.keyword", + "dbtEnvironmentDbtVersion", + ) + """ + TBC + """ + DBT_TAGS: ClassVar[KeywordField] = KeywordField("dbtTags", "dbtTags") + """ + TBC + """ + DBT_CONNECTION_CONTEXT: ClassVar[KeywordField] = KeywordField( + "dbtConnectionContext", "dbtConnectionContext" + ) + """ + TBC + """ + DBT_SEMANTIC_LAYER_PROXY_URL: ClassVar[KeywordField] = KeywordField( + "dbtSemanticLayerProxyUrl", "dbtSemanticLayerProxyUrl" + ) + """ + TBC + """ + CODE: ClassVar[KeywordField] = KeywordField("code", "code") + """ + TBC + """ + SQL: ClassVar[KeywordField] = KeywordField("sql", "sql") + """ + TBC + """ + AST: ClassVar[KeywordField] = KeywordField("ast", "ast") + """ + TBC + """ + + AIRFLOW_TASKS: ClassVar[RelationField] = RelationField("airflowTasks") + """ + TBC + """ + COLUMN_PROCESSES: ClassVar[RelationField] = RelationField("columnProcesses") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "dbt_process_job_status", + "dbt_alias", + "dbt_meta", + "dbt_unique_id", + "dbt_account_name", + "dbt_project_name", + "dbt_package_name", + "dbt_job_name", + "dbt_job_schedule", + "dbt_job_status", + "dbt_job_schedule_cron_humanized", + "dbt_job_last_run", + "dbt_job_next_run", + "dbt_job_next_run_humanized", + "dbt_environment_name", + "dbt_environment_dbt_version", + "dbt_tags", + "dbt_connection_context", + "dbt_semantic_layer_proxy_url", + "inputs", + "outputs", + "code", + "sql", + "ast", + "airflow_tasks", + "column_processes", ] @property - def persona_groups(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.persona_groups + def dbt_process_job_status(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.dbt_process_job_status + ) + + @dbt_process_job_status.setter + def dbt_process_job_status(self, dbt_process_job_status: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_process_job_status = dbt_process_job_status + + @property + def dbt_alias(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_alias + + @dbt_alias.setter + def dbt_alias(self, dbt_alias: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_alias = dbt_alias + + @property + def dbt_meta(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_meta + + @dbt_meta.setter + def dbt_meta(self, dbt_meta: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_meta = dbt_meta + + @property + def dbt_unique_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_unique_id + + @dbt_unique_id.setter + def dbt_unique_id(self, dbt_unique_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_unique_id = dbt_unique_id + + @property + def dbt_account_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_account_name + + @dbt_account_name.setter + def dbt_account_name(self, dbt_account_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_account_name = dbt_account_name + + @property + def dbt_project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_project_name + + @dbt_project_name.setter + def dbt_project_name(self, dbt_project_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_project_name = dbt_project_name + + @property + def dbt_package_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_package_name + + @dbt_package_name.setter + def dbt_package_name(self, dbt_package_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_package_name = dbt_package_name + + @property + def dbt_job_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_job_name + + @dbt_job_name.setter + def dbt_job_name(self, dbt_job_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_name = dbt_job_name + + @property + def dbt_job_schedule(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_job_schedule + + @dbt_job_schedule.setter + def dbt_job_schedule(self, dbt_job_schedule: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_schedule = dbt_job_schedule + + @property + def dbt_job_status(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_job_status + + @dbt_job_status.setter + def dbt_job_status(self, dbt_job_status: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_status = dbt_job_status + + @property + def dbt_job_schedule_cron_humanized(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_job_schedule_cron_humanized + ) + + @dbt_job_schedule_cron_humanized.setter + def dbt_job_schedule_cron_humanized( + self, dbt_job_schedule_cron_humanized: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_schedule_cron_humanized = ( + dbt_job_schedule_cron_humanized + ) + + @property + def dbt_job_last_run(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.dbt_job_last_run + + @dbt_job_last_run.setter + def dbt_job_last_run(self, dbt_job_last_run: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_last_run = dbt_job_last_run + + @property + def dbt_job_next_run(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.dbt_job_next_run - @persona_groups.setter - def persona_groups(self, persona_groups: Optional[set[str]]): + @dbt_job_next_run.setter + def dbt_job_next_run(self, dbt_job_next_run: Optional[datetime]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.persona_groups = persona_groups + self.attributes.dbt_job_next_run = dbt_job_next_run @property - def persona_users(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.persona_users + def dbt_job_next_run_humanized(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_job_next_run_humanized + ) - @persona_users.setter - def persona_users(self, persona_users: Optional[set[str]]): + @dbt_job_next_run_humanized.setter + def dbt_job_next_run_humanized(self, dbt_job_next_run_humanized: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.persona_users = persona_users + self.attributes.dbt_job_next_run_humanized = dbt_job_next_run_humanized @property - def role_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.role_id + def dbt_environment_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_environment_name - @role_id.setter - def role_id(self, role_id: Optional[str]): + @dbt_environment_name.setter + def dbt_environment_name(self, dbt_environment_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.role_id = role_id + self.attributes.dbt_environment_name = dbt_environment_name + + @property + def dbt_environment_dbt_version(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_environment_dbt_version + ) - class Attributes(AccessControl.Attributes): - persona_groups: Optional[set[str]] = Field( - None, description="", alias="personaGroups" + @dbt_environment_dbt_version.setter + def dbt_environment_dbt_version(self, dbt_environment_dbt_version: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_environment_dbt_version = dbt_environment_dbt_version + + @property + def dbt_tags(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.dbt_tags + + @dbt_tags.setter + def dbt_tags(self, dbt_tags: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_tags = dbt_tags + + @property + def dbt_connection_context(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.dbt_connection_context ) - persona_users: Optional[set[str]] = Field( - None, description="", alias="personaUsers" + + @dbt_connection_context.setter + def dbt_connection_context(self, dbt_connection_context: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_connection_context = dbt_connection_context + + @property + def dbt_semantic_layer_proxy_url(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_semantic_layer_proxy_url ) - role_id: Optional[str] = Field(None, description="", alias="roleId") - @classmethod - # @validate_arguments() - def create(cls, name: str) -> Persona.Attributes: - if not name: - raise ValueError("name cannot be blank") - validate_required_fields(["name"], [name]) - return Persona.Attributes( - qualified_name=name, - name=name, - display_name=name, - is_access_control_enabled=True, - description="", - ) + @dbt_semantic_layer_proxy_url.setter + def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url + + @property + def inputs(self) -> Optional[list[Catalog]]: + return None if self.attributes is None else self.attributes.inputs + + @inputs.setter + def inputs(self, inputs: Optional[list[Catalog]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.inputs = inputs + + @property + def outputs(self) -> Optional[list[Catalog]]: + return None if self.attributes is None else self.attributes.outputs + + @outputs.setter + def outputs(self, outputs: Optional[list[Catalog]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.outputs = outputs + + @property + def code(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.code + + @code.setter + def code(self, code: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.code = code + + @property + def sql(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.sql + + @sql.setter + def sql(self, sql: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sql = sql + + @property + def ast(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.ast + + @ast.setter + def ast(self, ast: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.ast = ast + + @property + def airflow_tasks(self) -> Optional[list[AirflowTask]]: + return None if self.attributes is None else self.attributes.airflow_tasks + + @airflow_tasks.setter + def airflow_tasks(self, airflow_tasks: Optional[list[AirflowTask]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.airflow_tasks = airflow_tasks + + @property + def column_processes(self) -> Optional[list[ColumnProcess]]: + return None if self.attributes is None else self.attributes.column_processes + + @column_processes.setter + def column_processes(self, column_processes: Optional[list[ColumnProcess]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.column_processes = column_processes + + class Attributes(Dbt.Attributes): + dbt_process_job_status: Optional[str] = Field( + None, description="", alias="dbtProcessJobStatus" + ) + dbt_alias: Optional[str] = Field(None, description="", alias="dbtAlias") + dbt_meta: Optional[str] = Field(None, description="", alias="dbtMeta") + dbt_unique_id: Optional[str] = Field(None, description="", alias="dbtUniqueId") + dbt_account_name: Optional[str] = Field( + None, description="", alias="dbtAccountName" + ) + dbt_project_name: Optional[str] = Field( + None, description="", alias="dbtProjectName" + ) + dbt_package_name: Optional[str] = Field( + None, description="", alias="dbtPackageName" + ) + dbt_job_name: Optional[str] = Field(None, description="", alias="dbtJobName") + dbt_job_schedule: Optional[str] = Field( + None, description="", alias="dbtJobSchedule" + ) + dbt_job_status: Optional[str] = Field( + None, description="", alias="dbtJobStatus" + ) + dbt_job_schedule_cron_humanized: Optional[str] = Field( + None, description="", alias="dbtJobScheduleCronHumanized" + ) + dbt_job_last_run: Optional[datetime] = Field( + None, description="", alias="dbtJobLastRun" + ) + dbt_job_next_run: Optional[datetime] = Field( + None, description="", alias="dbtJobNextRun" + ) + dbt_job_next_run_humanized: Optional[str] = Field( + None, description="", alias="dbtJobNextRunHumanized" + ) + dbt_environment_name: Optional[str] = Field( + None, description="", alias="dbtEnvironmentName" + ) + dbt_environment_dbt_version: Optional[str] = Field( + None, description="", alias="dbtEnvironmentDbtVersion" + ) + dbt_tags: Optional[set[str]] = Field(None, description="", alias="dbtTags") + dbt_connection_context: Optional[str] = Field( + None, description="", alias="dbtConnectionContext" + ) + dbt_semantic_layer_proxy_url: Optional[str] = Field( + None, description="", alias="dbtSemanticLayerProxyUrl" + ) + inputs: Optional[list[Catalog]] = Field(None, description="", alias="inputs") + outputs: Optional[list[Catalog]] = Field(None, description="", alias="outputs") + code: Optional[str] = Field(None, description="", alias="code") + sql: Optional[str] = Field(None, description="", alias="sql") + ast: Optional[str] = Field(None, description="", alias="ast") + airflow_tasks: Optional[list[AirflowTask]] = Field( + None, description="", alias="airflowTasks" + ) # relationship + column_processes: Optional[list[ColumnProcess]] = Field( + None, description="", alias="columnProcesses" + ) # relationship - attributes: "Persona.Attributes" = Field( - default_factory=lambda: Persona.Attributes(), + attributes: "DbtProcess.Attributes" = Field( + default_factory=lambda: DbtProcess.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Persona.Attributes.update_forward_refs() +DbtProcess.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset12.py b/pyatlan/model/assets/asset12.py index 8e60401e0..5f3631ff2 100644 --- a/pyatlan/model/assets/asset12.py +++ b/pyatlan/model/assets/asset12.py @@ -13,22 +13,24 @@ AuthPolicyResourceCategory, AuthPolicyType, DataAction, - PurposeMetadataAction, + PersonaGlossaryAction, + PersonaMetadataAction, ) +from pyatlan.model.fields.atlan_fields import KeywordField from pyatlan.utils import validate_required_fields from .asset00 import SelfAsset -from .asset04 import AccessControl, AuthPolicy +from .asset05 import AccessControl, AuthPolicy -class Purpose(AccessControl): +class Persona(AccessControl): """Description""" @classmethod # @validate_arguments() - def create(cls, *, name: str, atlan_tags: list[str]) -> Purpose: - validate_required_fields(["name", "atlan_tags"], [name, atlan_tags]) - attributes = Purpose.Attributes.create(name=name, atlan_tags=atlan_tags) + def create(cls, *, name: str) -> Persona: + validate_required_fields(["name"], [name]) + attributes = Persona.Attributes.create(name=name) return cls(attributes=attributes) @classmethod @@ -37,60 +39,29 @@ def create_metadata_policy( cls, *, name: str, - purpose_id: str, + persona_id: str, policy_type: AuthPolicyType, - actions: Set[PurposeMetadataAction], - policy_groups: Optional[Set[str]] = None, - policy_users: Optional[Set[str]] = None, - all_users: bool = False, + actions: Set[PersonaMetadataAction], + connection_qualified_name: str, + resources: Set[str], ) -> AuthPolicy: validate_required_fields( - ["name", "purpose_id", "policy_type", "actions"], - [name, purpose_id, policy_type, actions], + ["name", "persona_id", "policy_type", "actions", "resources"], + [name, persona_id, policy_type, actions, resources], ) - target_found = False policy = AuthPolicy._AuthPolicy__create(name=name) # type: ignore policy.policy_actions = {x.value for x in actions} - policy.policy_category = AuthPolicyCategory.PURPOSE.value + policy.policy_category = AuthPolicyCategory.PERSONA.value policy.policy_type = policy_type - policy.policy_resource_category = AuthPolicyResourceCategory.TAG.value - policy.policy_service_name = "atlas_tag" + policy.connection_qualified_name = connection_qualified_name + policy.policy_resources = resources + policy.policy_resource_category = AuthPolicyResourceCategory.CUSTOM.value + policy.policy_service_name = "atlas" policy.policy_sub_category = "metadata" - purpose = Purpose() - purpose.guid = purpose_id - policy.access_control = purpose - if all_users: - target_found = True - policy.policy_groups = {"public"} - else: - if policy_groups: - from pyatlan.cache.group_cache import GroupCache - - for group_alias in policy_groups: - if not GroupCache.get_id_for_alias(group_alias): - raise ValueError( - f"Provided group name {group_alias} was not found in Atlan." - ) - target_found = True - policy.policy_groups = policy_groups - else: - policy.policy_groups = None - if policy_users: - from pyatlan.cache.user_cache import UserCache - - for username in policy_users: - if not UserCache.get_id_for_name(username): - raise ValueError( - f"Provided username {username} was not found in Atlan." - ) - target_found = True - policy.policy_users = policy_users - else: - policy.policy_users = None - if target_found: - return policy - else: - raise ValueError("No user or group specified for the policy.") + persona = Persona() + persona.guid = persona_id + policy.access_control = persona + return policy @classmethod # @validate_arguments() @@ -98,57 +69,57 @@ def create_data_policy( cls, *, name: str, - purpose_id: str, + persona_id: str, policy_type: AuthPolicyType, - policy_groups: Optional[Set[str]] = None, - policy_users: Optional[Set[str]] = None, - all_users: bool = False, + connection_qualified_name: str, + resources: Set[str], ) -> AuthPolicy: validate_required_fields( - ["name", "purpose_id", "policy_type"], [name, purpose_id, policy_type] + ["name", "persona_id", "policy_type", "resources"], + [name, persona_id, policy_type, resources], ) policy = AuthPolicy._AuthPolicy__create(name=name) # type: ignore policy.policy_actions = {DataAction.SELECT.value} - policy.policy_category = AuthPolicyCategory.PURPOSE.value + policy.policy_category = AuthPolicyCategory.PERSONA.value policy.policy_type = policy_type - policy.policy_resource_category = AuthPolicyResourceCategory.TAG.value - policy.policy_service_name = "atlas_tag" + policy.connection_qualified_name = connection_qualified_name + policy.policy_resources = resources + policy.policy_resources.add("entity-type:*") + policy.policy_resource_category = AuthPolicyResourceCategory.ENTITY.value + policy.policy_service_name = "heka" policy.policy_sub_category = "data" - purpose = Purpose() - purpose.guid = purpose_id - policy.access_control = purpose - if all_users: - target_found = True - policy.policy_groups = {"public"} - else: - if policy_groups: - from pyatlan.cache.group_cache import GroupCache - - for group_alias in policy_groups: - if not GroupCache.get_id_for_alias(group_alias): - raise ValueError( - f"Provided group name {group_alias} was not found in Atlan." - ) - target_found = True - policy.policy_groups = policy_groups - else: - policy.policy_groups = None - if policy_users: - from pyatlan.cache.user_cache import UserCache - - for username in policy_users: - if not UserCache.get_id_for_name(username): - raise ValueError( - f"Provided username {username} was not found in Atlan." - ) - target_found = True - policy.policy_users = policy_users - else: - policy.policy_users = None - if target_found: - return policy - else: - raise ValueError("No user or group specified for the policy.") + persona = Persona() + persona.guid = persona_id + policy.access_control = persona + return policy + + @classmethod + # @validate_arguments() + def create_glossary_policy( + cls, + *, + name: str, + persona_id: str, + policy_type: AuthPolicyType, + actions: Set[PersonaGlossaryAction], + resources: Set[str], + ) -> AuthPolicy: + validate_required_fields( + ["name", "persona_id", "policy_type", "actions", "resources"], + [name, persona_id, policy_type, actions, resources], + ) + policy = AuthPolicy._AuthPolicy__create(name=name) # type: ignore + policy.policy_actions = {x.value for x in actions} + policy.policy_category = AuthPolicyCategory.PERSONA.value + policy.policy_type = policy_type + policy.policy_resources = resources + policy.policy_resource_category = AuthPolicyResourceCategory.CUSTOM.value + policy.policy_service_name = "atlas" + policy.policy_sub_category = "glossary" + persona = Persona() + persona.guid = persona_id + policy.access_control = persona + return policy @classmethod def create_for_modification( @@ -169,56 +140,98 @@ def create_for_modification( ) ) - type_name: str = Field("Purpose", allow_mutation=False) + type_name: str = Field("Persona", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Purpose": - raise ValueError("must be Purpose") + if v != "Persona": + raise ValueError("must be Persona") return v def __setattr__(self, name, value): - if name in Purpose._convience_properties: + if name in Persona._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "purpose_atlan_tags", + PERSONA_GROUPS: ClassVar[KeywordField] = KeywordField( + "personaGroups", "personaGroups" + ) + """ + TBC + """ + PERSONA_USERS: ClassVar[KeywordField] = KeywordField("personaUsers", "personaUsers") + """ + TBC + """ + ROLE_ID: ClassVar[KeywordField] = KeywordField("roleId", "roleId") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "persona_groups", + "persona_users", + "role_id", ] @property - def purpose_atlan_tags(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.purpose_atlan_tags + def persona_groups(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.persona_groups + + @persona_groups.setter + def persona_groups(self, persona_groups: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.persona_groups = persona_groups + + @property + def persona_users(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.persona_users - @purpose_atlan_tags.setter - def purpose_atlan_tags(self, purpose_atlan_tags: Optional[set[str]]): + @persona_users.setter + def persona_users(self, persona_users: Optional[set[str]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.purpose_atlan_tags = purpose_atlan_tags + self.attributes.persona_users = persona_users + + @property + def role_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.role_id + + @role_id.setter + def role_id(self, role_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.role_id = role_id class Attributes(AccessControl.Attributes): - purpose_atlan_tags: Optional[set[str]] = Field( - None, description="", alias="purposeClassifications" + persona_groups: Optional[set[str]] = Field( + None, description="", alias="personaGroups" + ) + persona_users: Optional[set[str]] = Field( + None, description="", alias="personaUsers" ) + role_id: Optional[str] = Field(None, description="", alias="roleId") @classmethod # @validate_arguments() - def create(cls, name: str, atlan_tags: list[str]) -> Purpose.Attributes: - validate_required_fields(["name", "atlan_tags"], [name, atlan_tags]) - return Purpose.Attributes( + def create(cls, name: str) -> Persona.Attributes: + if not name: + raise ValueError("name cannot be blank") + validate_required_fields(["name"], [name]) + return Persona.Attributes( qualified_name=name, name=name, display_name=name, is_access_control_enabled=True, description="", - purpose_atlan_tags=atlan_tags, ) - attributes: "Purpose.Attributes" = Field( - default_factory=lambda: Purpose.Attributes(), + attributes: "Persona.Attributes" = Field( + default_factory=lambda: Persona.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Purpose.Attributes.update_forward_refs() +Persona.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset13.py b/pyatlan/model/assets/asset13.py index 855f9a843..ea20103fd 100644 --- a/pyatlan/model/assets/asset13.py +++ b/pyatlan/model/assets/asset13.py @@ -4,65 +4,229 @@ from __future__ import annotations -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Set from pydantic import Field, validator -from pyatlan.model.enums import IconType +from pyatlan.model.enums import ( + AuthPolicyCategory, + AuthPolicyResourceCategory, + AuthPolicyType, + DataAction, + PurposeMetadataAction, +) +from pyatlan.model.fields.atlan_fields import KeywordField +from pyatlan.utils import validate_required_fields -from .asset00 import Namespace +from .asset00 import SelfAsset +from .asset05 import AccessControl, AuthPolicy -class Collection(Namespace): +class Purpose(AccessControl): """Description""" - type_name: str = Field("Collection", allow_mutation=False) + @classmethod + # @validate_arguments() + def create(cls, *, name: str, atlan_tags: list[str]) -> Purpose: + validate_required_fields(["name", "atlan_tags"], [name, atlan_tags]) + attributes = Purpose.Attributes.create(name=name, atlan_tags=atlan_tags) + return cls(attributes=attributes) + + @classmethod + # @validate_arguments() + def create_metadata_policy( + cls, + *, + name: str, + purpose_id: str, + policy_type: AuthPolicyType, + actions: Set[PurposeMetadataAction], + policy_groups: Optional[Set[str]] = None, + policy_users: Optional[Set[str]] = None, + all_users: bool = False, + ) -> AuthPolicy: + validate_required_fields( + ["name", "purpose_id", "policy_type", "actions"], + [name, purpose_id, policy_type, actions], + ) + target_found = False + policy = AuthPolicy._AuthPolicy__create(name=name) # type: ignore + policy.policy_actions = {x.value for x in actions} + policy.policy_category = AuthPolicyCategory.PURPOSE.value + policy.policy_type = policy_type + policy.policy_resource_category = AuthPolicyResourceCategory.TAG.value + policy.policy_service_name = "atlas_tag" + policy.policy_sub_category = "metadata" + purpose = Purpose() + purpose.guid = purpose_id + policy.access_control = purpose + if all_users: + target_found = True + policy.policy_groups = {"public"} + else: + if policy_groups: + from pyatlan.cache.group_cache import GroupCache + + for group_alias in policy_groups: + if not GroupCache.get_id_for_alias(group_alias): + raise ValueError( + f"Provided group name {group_alias} was not found in Atlan." + ) + target_found = True + policy.policy_groups = policy_groups + else: + policy.policy_groups = None + if policy_users: + from pyatlan.cache.user_cache import UserCache + + for username in policy_users: + if not UserCache.get_id_for_name(username): + raise ValueError( + f"Provided username {username} was not found in Atlan." + ) + target_found = True + policy.policy_users = policy_users + else: + policy.policy_users = None + if target_found: + return policy + else: + raise ValueError("No user or group specified for the policy.") + + @classmethod + # @validate_arguments() + def create_data_policy( + cls, + *, + name: str, + purpose_id: str, + policy_type: AuthPolicyType, + policy_groups: Optional[Set[str]] = None, + policy_users: Optional[Set[str]] = None, + all_users: bool = False, + ) -> AuthPolicy: + validate_required_fields( + ["name", "purpose_id", "policy_type"], [name, purpose_id, policy_type] + ) + policy = AuthPolicy._AuthPolicy__create(name=name) # type: ignore + policy.policy_actions = {DataAction.SELECT.value} + policy.policy_category = AuthPolicyCategory.PURPOSE.value + policy.policy_type = policy_type + policy.policy_resource_category = AuthPolicyResourceCategory.TAG.value + policy.policy_service_name = "atlas_tag" + policy.policy_sub_category = "data" + purpose = Purpose() + purpose.guid = purpose_id + policy.access_control = purpose + if all_users: + target_found = True + policy.policy_groups = {"public"} + else: + if policy_groups: + from pyatlan.cache.group_cache import GroupCache + + for group_alias in policy_groups: + if not GroupCache.get_id_for_alias(group_alias): + raise ValueError( + f"Provided group name {group_alias} was not found in Atlan." + ) + target_found = True + policy.policy_groups = policy_groups + else: + policy.policy_groups = None + if policy_users: + from pyatlan.cache.user_cache import UserCache + + for username in policy_users: + if not UserCache.get_id_for_name(username): + raise ValueError( + f"Provided username {username} was not found in Atlan." + ) + target_found = True + policy.policy_users = policy_users + else: + policy.policy_users = None + if target_found: + return policy + else: + raise ValueError("No user or group specified for the policy.") + + @classmethod + def create_for_modification( + cls: type[SelfAsset], + qualified_name: str = "", + name: str = "", + is_enabled: bool = True, + ) -> SelfAsset: + validate_required_fields( + ["name", "qualified_name", "is_enabled"], + [name, qualified_name, is_enabled], + ) + return cls( + attributes=cls.Attributes( + qualified_name=qualified_name, + name=name, + is_access_control_enabled=is_enabled, + ) + ) + + type_name: str = Field("Purpose", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Collection": - raise ValueError("must be Collection") + if v != "Purpose": + raise ValueError("must be Purpose") return v def __setattr__(self, name, value): - if name in Collection._convience_properties: + if name in Purpose._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "icon", - "icon_type", - ] - - @property - def icon(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.icon + PURPOSE_CLASSIFICATIONS: ClassVar[KeywordField] = KeywordField( + "purposeClassifications", "purposeClassifications" + ) + """ + TBC + """ - @icon.setter - def icon(self, icon: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.icon = icon + _convenience_properties: ClassVar[list[str]] = [ + "purpose_atlan_tags", + ] @property - def icon_type(self) -> Optional[IconType]: - return None if self.attributes is None else self.attributes.icon_type + def purpose_atlan_tags(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.purpose_atlan_tags - @icon_type.setter - def icon_type(self, icon_type: Optional[IconType]): + @purpose_atlan_tags.setter + def purpose_atlan_tags(self, purpose_atlan_tags: Optional[set[str]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.icon_type = icon_type - - class Attributes(Namespace.Attributes): - icon: Optional[str] = Field(None, description="", alias="icon") - icon_type: Optional[IconType] = Field(None, description="", alias="iconType") - - attributes: "Collection.Attributes" = Field( - default_factory=lambda: Collection.Attributes(), + self.attributes.purpose_atlan_tags = purpose_atlan_tags + + class Attributes(AccessControl.Attributes): + purpose_atlan_tags: Optional[set[str]] = Field( + None, description="", alias="purposeClassifications" + ) + + @classmethod + # @validate_arguments() + def create(cls, name: str, atlan_tags: list[str]) -> Purpose.Attributes: + validate_required_fields(["name", "atlan_tags"], [name, atlan_tags]) + return Purpose.Attributes( + qualified_name=name, + name=name, + display_name=name, + is_access_control_enabled=True, + description="", + purpose_atlan_tags=atlan_tags, + ) + + attributes: "Purpose.Attributes" = Field( + default_factory=lambda: Purpose.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Collection.Attributes.update_forward_refs() +Purpose.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset14.py b/pyatlan/model/assets/asset14.py new file mode 100644 index 000000000..46f8f6772 --- /dev/null +++ b/pyatlan/model/assets/asset14.py @@ -0,0 +1,78 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, Optional + +from pydantic import Field, validator + +from pyatlan.model.enums import IconType +from pyatlan.model.fields.atlan_fields import KeywordField + +from .asset00 import Namespace + + +class Collection(Namespace): + """Description""" + + type_name: str = Field("Collection", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "Collection": + raise ValueError("must be Collection") + return v + + def __setattr__(self, name, value): + if name in Collection._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + ICON: ClassVar[KeywordField] = KeywordField("icon", "icon") + """ + TBC + """ + ICON_TYPE: ClassVar[KeywordField] = KeywordField("iconType", "iconType") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "icon", + "icon_type", + ] + + @property + def icon(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.icon + + @icon.setter + def icon(self, icon: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.icon = icon + + @property + def icon_type(self) -> Optional[IconType]: + return None if self.attributes is None else self.attributes.icon_type + + @icon_type.setter + def icon_type(self, icon_type: Optional[IconType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.icon_type = icon_type + + class Attributes(Namespace.Attributes): + icon: Optional[str] = Field(None, description="", alias="icon") + icon_type: Optional[IconType] = Field(None, description="", alias="iconType") + + attributes: "Collection.Attributes" = Field( + default_factory=lambda: Collection.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +Collection.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset15.py b/pyatlan/model/assets/asset16.py similarity index 85% rename from pyatlan/model/assets/asset15.py rename to pyatlan/model/assets/asset16.py index 90f313bd3..90fcc2897 100644 --- a/pyatlan/model/assets/asset15.py +++ b/pyatlan/model/assets/asset16.py @@ -23,11 +23,11 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in ObjectStore._convience_properties: + if name in ObjectStore._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] ObjectStore.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset18.py b/pyatlan/model/assets/asset18.py index ae16839da..433a4d4b6 100644 --- a/pyatlan/model/assets/asset18.py +++ b/pyatlan/model/assets/asset18.py @@ -11,23 +11,23 @@ from .asset00 import Catalog -class SaaS(Catalog): +class BI(Catalog): """Description""" - type_name: str = Field("SaaS", allow_mutation=False) + type_name: str = Field("BI", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SaaS": - raise ValueError("must be SaaS") + if v != "BI": + raise ValueError("must be BI") return v def __setattr__(self, name, value): - if name in SaaS._convience_properties: + if name in BI._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] -SaaS.Attributes.update_forward_refs() +BI.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset17.py b/pyatlan/model/assets/asset19.py similarity index 61% rename from pyatlan/model/assets/asset17.py rename to pyatlan/model/assets/asset19.py index cc60685cf..25218db82 100644 --- a/pyatlan/model/assets/asset17.py +++ b/pyatlan/model/assets/asset19.py @@ -11,23 +11,23 @@ from .asset00 import Catalog -class BI(Catalog): +class SaaS(Catalog): """Description""" - type_name: str = Field("BI", allow_mutation=False) + type_name: str = Field("SaaS", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "BI": - raise ValueError("must be BI") + if v != "SaaS": + raise ValueError("must be SaaS") return v def __setattr__(self, name, value): - if name in BI._convience_properties: + if name in SaaS._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] -BI.Attributes.update_forward_refs() +SaaS.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset20.py b/pyatlan/model/assets/asset21.py similarity index 86% rename from pyatlan/model/assets/asset20.py rename to pyatlan/model/assets/asset21.py index d850d6589..06146f9c8 100644 --- a/pyatlan/model/assets/asset20.py +++ b/pyatlan/model/assets/asset21.py @@ -23,11 +23,11 @@ def validate_type_name(cls, v): return v def __setattr__(self, name, value): - if name in EventStore._convience_properties: + if name in EventStore._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] EventStore.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset23.py b/pyatlan/model/assets/asset23.py index 3ee521ad1..eb7a44ed4 100644 --- a/pyatlan/model/assets/asset23.py +++ b/pyatlan/model/assets/asset23.py @@ -4,121 +4,30 @@ from __future__ import annotations -from typing import ClassVar, Optional +from typing import ClassVar from pydantic import Field, validator from .asset00 import Catalog -class API(Catalog): +class Insight(Catalog): """Description""" - type_name: str = Field("API", allow_mutation=False) + type_name: str = Field("Insight", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "API": - raise ValueError("must be API") + if v != "Insight": + raise ValueError("must be Insight") return v def __setattr__(self, name, value): - if name in API._convience_properties: + if name in Insight._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "api_spec_type", - "api_spec_version", - "api_spec_name", - "api_spec_qualified_name", - "api_external_docs", - "api_is_auth_optional", - ] + _convenience_properties: ClassVar[list[str]] = [] - @property - def api_spec_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.api_spec_type - @api_spec_type.setter - def api_spec_type(self, api_spec_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.api_spec_type = api_spec_type - - @property - def api_spec_version(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.api_spec_version - - @api_spec_version.setter - def api_spec_version(self, api_spec_version: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.api_spec_version = api_spec_version - - @property - def api_spec_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.api_spec_name - - @api_spec_name.setter - def api_spec_name(self, api_spec_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.api_spec_name = api_spec_name - - @property - def api_spec_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.api_spec_qualified_name - ) - - @api_spec_qualified_name.setter - def api_spec_qualified_name(self, api_spec_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.api_spec_qualified_name = api_spec_qualified_name - - @property - def api_external_docs(self) -> Optional[dict[str, str]]: - return None if self.attributes is None else self.attributes.api_external_docs - - @api_external_docs.setter - def api_external_docs(self, api_external_docs: Optional[dict[str, str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.api_external_docs = api_external_docs - - @property - def api_is_auth_optional(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.api_is_auth_optional - - @api_is_auth_optional.setter - def api_is_auth_optional(self, api_is_auth_optional: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.api_is_auth_optional = api_is_auth_optional - - class Attributes(Catalog.Attributes): - api_spec_type: Optional[str] = Field(None, description="", alias="apiSpecType") - api_spec_version: Optional[str] = Field( - None, description="", alias="apiSpecVersion" - ) - api_spec_name: Optional[str] = Field(None, description="", alias="apiSpecName") - api_spec_qualified_name: Optional[str] = Field( - None, description="", alias="apiSpecQualifiedName" - ) - api_external_docs: Optional[dict[str, str]] = Field( - None, description="", alias="apiExternalDocs" - ) - api_is_auth_optional: Optional[bool] = Field( - None, description="", alias="apiIsAuthOptional" - ) - - attributes: "API.Attributes" = Field( - default_factory=lambda: API.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -API.Attributes.update_forward_refs() +Insight.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset24.py b/pyatlan/model/assets/asset24.py new file mode 100644 index 000000000..d4dde7bf2 --- /dev/null +++ b/pyatlan/model/assets/asset24.py @@ -0,0 +1,165 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, Optional + +from pydantic import Field, validator + +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, +) + +from .asset00 import Catalog + + +class API(Catalog): + """Description""" + + type_name: str = Field("API", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "API": + raise ValueError("must be API") + return v + + def __setattr__(self, name, value): + if name in API._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + API_SPEC_TYPE: ClassVar[KeywordField] = KeywordField("apiSpecType", "apiSpecType") + """ + TBC + """ + API_SPEC_VERSION: ClassVar[KeywordField] = KeywordField( + "apiSpecVersion", "apiSpecVersion" + ) + """ + TBC + """ + API_SPEC_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "apiSpecName", "apiSpecName.keyword", "apiSpecName" + ) + """ + TBC + """ + API_SPEC_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "apiSpecQualifiedName", "apiSpecQualifiedName", "apiSpecQualifiedName.text" + ) + """ + TBC + """ + API_EXTERNAL_DOCS: ClassVar[KeywordField] = KeywordField( + "apiExternalDocs", "apiExternalDocs" + ) + """ + TBC + """ + API_IS_AUTH_OPTIONAL: ClassVar[BooleanField] = BooleanField( + "apiIsAuthOptional", "apiIsAuthOptional" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "api_spec_type", + "api_spec_version", + "api_spec_name", + "api_spec_qualified_name", + "api_external_docs", + "api_is_auth_optional", + ] + + @property + def api_spec_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.api_spec_type + + @api_spec_type.setter + def api_spec_type(self, api_spec_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_spec_type = api_spec_type + + @property + def api_spec_version(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.api_spec_version + + @api_spec_version.setter + def api_spec_version(self, api_spec_version: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_spec_version = api_spec_version + + @property + def api_spec_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.api_spec_name + + @api_spec_name.setter + def api_spec_name(self, api_spec_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_spec_name = api_spec_name + + @property + def api_spec_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.api_spec_qualified_name + ) + + @api_spec_qualified_name.setter + def api_spec_qualified_name(self, api_spec_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_spec_qualified_name = api_spec_qualified_name + + @property + def api_external_docs(self) -> Optional[dict[str, str]]: + return None if self.attributes is None else self.attributes.api_external_docs + + @api_external_docs.setter + def api_external_docs(self, api_external_docs: Optional[dict[str, str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_external_docs = api_external_docs + + @property + def api_is_auth_optional(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.api_is_auth_optional + + @api_is_auth_optional.setter + def api_is_auth_optional(self, api_is_auth_optional: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_is_auth_optional = api_is_auth_optional + + class Attributes(Catalog.Attributes): + api_spec_type: Optional[str] = Field(None, description="", alias="apiSpecType") + api_spec_version: Optional[str] = Field( + None, description="", alias="apiSpecVersion" + ) + api_spec_name: Optional[str] = Field(None, description="", alias="apiSpecName") + api_spec_qualified_name: Optional[str] = Field( + None, description="", alias="apiSpecQualifiedName" + ) + api_external_docs: Optional[dict[str, str]] = Field( + None, description="", alias="apiExternalDocs" + ) + api_is_auth_optional: Optional[bool] = Field( + None, description="", alias="apiIsAuthOptional" + ) + + attributes: "API.Attributes" = Field( + default_factory=lambda: API.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +API.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset26.py b/pyatlan/model/assets/asset26.py deleted file mode 100644 index f9e5e02f0..000000000 --- a/pyatlan/model/assets/asset26.py +++ /dev/null @@ -1,158 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Atlan Pte. Ltd. - - -from __future__ import annotations - -from typing import ClassVar, Optional - -from pydantic import Field, validator - -from pyatlan.model.structs import GoogleLabel, GoogleTag - -from .asset07 import Cloud - - -class Google(Cloud): - """Description""" - - type_name: str = Field("Google", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "Google": - raise ValueError("must be Google") - return v - - def __setattr__(self, name, value): - if name in Google._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "google_service", - "google_project_name", - "google_project_id", - "google_project_number", - "google_location", - "google_location_type", - "google_labels", - "google_tags", - ] - - @property - def google_service(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_service - - @google_service.setter - def google_service(self, google_service: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_service = google_service - - @property - def google_project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_project_name - - @google_project_name.setter - def google_project_name(self, google_project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_project_name = google_project_name - - @property - def google_project_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_project_id - - @google_project_id.setter - def google_project_id(self, google_project_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_project_id = google_project_id - - @property - def google_project_number(self) -> Optional[int]: - return ( - None if self.attributes is None else self.attributes.google_project_number - ) - - @google_project_number.setter - def google_project_number(self, google_project_number: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_project_number = google_project_number - - @property - def google_location(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_location - - @google_location.setter - def google_location(self, google_location: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_location = google_location - - @property - def google_location_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_location_type - - @google_location_type.setter - def google_location_type(self, google_location_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_location_type = google_location_type - - @property - def google_labels(self) -> Optional[list[GoogleLabel]]: - return None if self.attributes is None else self.attributes.google_labels - - @google_labels.setter - def google_labels(self, google_labels: Optional[list[GoogleLabel]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_labels = google_labels - - @property - def google_tags(self) -> Optional[list[GoogleTag]]: - return None if self.attributes is None else self.attributes.google_tags - - @google_tags.setter - def google_tags(self, google_tags: Optional[list[GoogleTag]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_tags = google_tags - - class Attributes(Cloud.Attributes): - google_service: Optional[str] = Field( - None, description="", alias="googleService" - ) - google_project_name: Optional[str] = Field( - None, description="", alias="googleProjectName" - ) - google_project_id: Optional[str] = Field( - None, description="", alias="googleProjectId" - ) - google_project_number: Optional[int] = Field( - None, description="", alias="googleProjectNumber" - ) - google_location: Optional[str] = Field( - None, description="", alias="googleLocation" - ) - google_location_type: Optional[str] = Field( - None, description="", alias="googleLocationType" - ) - google_labels: Optional[list[GoogleLabel]] = Field( - None, description="", alias="googleLabels" - ) - google_tags: Optional[list[GoogleTag]] = Field( - None, description="", alias="googleTags" - ) - - attributes: "Google.Attributes" = Field( - default_factory=lambda: Google.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -Google.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset27.py b/pyatlan/model/assets/asset27.py index 1c42cb0c0..f1143a61b 100644 --- a/pyatlan/model/assets/asset27.py +++ b/pyatlan/model/assets/asset27.py @@ -8,101 +8,201 @@ from pydantic import Field, validator -from pyatlan.model.structs import AzureTag +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, +) +from pyatlan.model.structs import GoogleLabel, GoogleTag -from .asset07 import Cloud +from .asset08 import Cloud -class Azure(Cloud): +class Google(Cloud): """Description""" - type_name: str = Field("Azure", allow_mutation=False) + type_name: str = Field("Google", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Azure": - raise ValueError("must be Azure") + if v != "Google": + raise ValueError("must be Google") return v def __setattr__(self, name, value): - if name in Azure._convience_properties: + if name in Google._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "azure_resource_id", - "azure_location", - "adls_account_secondary_location", - "azure_tags", + GOOGLE_SERVICE: ClassVar[KeywordField] = KeywordField( + "googleService", "googleService" + ) + """ + TBC + """ + GOOGLE_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "googleProjectName", "googleProjectName", "googleProjectName.text" + ) + """ + TBC + """ + GOOGLE_PROJECT_ID: ClassVar[KeywordTextField] = KeywordTextField( + "googleProjectId", "googleProjectId", "googleProjectId.text" + ) + """ + TBC + """ + GOOGLE_PROJECT_NUMBER: ClassVar[NumericField] = NumericField( + "googleProjectNumber", "googleProjectNumber" + ) + """ + TBC + """ + GOOGLE_LOCATION: ClassVar[KeywordField] = KeywordField( + "googleLocation", "googleLocation" + ) + """ + TBC + """ + GOOGLE_LOCATION_TYPE: ClassVar[KeywordField] = KeywordField( + "googleLocationType", "googleLocationType" + ) + """ + TBC + """ + GOOGLE_LABELS: ClassVar[KeywordField] = KeywordField("googleLabels", "googleLabels") + """ + TBC + """ + GOOGLE_TAGS: ClassVar[KeywordField] = KeywordField("googleTags", "googleTags") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "google_service", + "google_project_name", + "google_project_id", + "google_project_number", + "google_location", + "google_location_type", + "google_labels", + "google_tags", ] @property - def azure_resource_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.azure_resource_id + def google_service(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_service + + @google_service.setter + def google_service(self, google_service: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_service = google_service + + @property + def google_project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_project_name - @azure_resource_id.setter - def azure_resource_id(self, azure_resource_id: Optional[str]): + @google_project_name.setter + def google_project_name(self, google_project_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.azure_resource_id = azure_resource_id + self.attributes.google_project_name = google_project_name @property - def azure_location(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.azure_location + def google_project_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_project_id - @azure_location.setter - def azure_location(self, azure_location: Optional[str]): + @google_project_id.setter + def google_project_id(self, google_project_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.azure_location = azure_location + self.attributes.google_project_id = google_project_id @property - def adls_account_secondary_location(self) -> Optional[str]: + def google_project_number(self) -> Optional[int]: return ( - None - if self.attributes is None - else self.attributes.adls_account_secondary_location + None if self.attributes is None else self.attributes.google_project_number ) - @adls_account_secondary_location.setter - def adls_account_secondary_location( - self, adls_account_secondary_location: Optional[str] - ): + @google_project_number.setter + def google_project_number(self, google_project_number: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_account_secondary_location = ( - adls_account_secondary_location - ) + self.attributes.google_project_number = google_project_number @property - def azure_tags(self) -> Optional[list[AzureTag]]: - return None if self.attributes is None else self.attributes.azure_tags + def google_location(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_location - @azure_tags.setter - def azure_tags(self, azure_tags: Optional[list[AzureTag]]): + @google_location.setter + def google_location(self, google_location: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.azure_tags = azure_tags + self.attributes.google_location = google_location + + @property + def google_location_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_location_type + + @google_location_type.setter + def google_location_type(self, google_location_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_location_type = google_location_type + + @property + def google_labels(self) -> Optional[list[GoogleLabel]]: + return None if self.attributes is None else self.attributes.google_labels + + @google_labels.setter + def google_labels(self, google_labels: Optional[list[GoogleLabel]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_labels = google_labels + + @property + def google_tags(self) -> Optional[list[GoogleTag]]: + return None if self.attributes is None else self.attributes.google_tags + + @google_tags.setter + def google_tags(self, google_tags: Optional[list[GoogleTag]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_tags = google_tags class Attributes(Cloud.Attributes): - azure_resource_id: Optional[str] = Field( - None, description="", alias="azureResourceId" + google_service: Optional[str] = Field( + None, description="", alias="googleService" + ) + google_project_name: Optional[str] = Field( + None, description="", alias="googleProjectName" + ) + google_project_id: Optional[str] = Field( + None, description="", alias="googleProjectId" + ) + google_project_number: Optional[int] = Field( + None, description="", alias="googleProjectNumber" + ) + google_location: Optional[str] = Field( + None, description="", alias="googleLocation" ) - azure_location: Optional[str] = Field( - None, description="", alias="azureLocation" + google_location_type: Optional[str] = Field( + None, description="", alias="googleLocationType" ) - adls_account_secondary_location: Optional[str] = Field( - None, description="", alias="adlsAccountSecondaryLocation" + google_labels: Optional[list[GoogleLabel]] = Field( + None, description="", alias="googleLabels" ) - azure_tags: Optional[list[AzureTag]] = Field( - None, description="", alias="azureTags" + google_tags: Optional[list[GoogleTag]] = Field( + None, description="", alias="googleTags" ) - attributes: "Azure.Attributes" = Field( - default_factory=lambda: Azure.Attributes(), + attributes: "Google.Attributes" = Field( + default_factory=lambda: Google.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Azure.Attributes.update_forward_refs() +Google.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset28.py b/pyatlan/model/assets/asset28.py index a8cd5ebd8..fc73e8633 100644 --- a/pyatlan/model/assets/asset28.py +++ b/pyatlan/model/assets/asset28.py @@ -8,151 +8,125 @@ from pydantic import Field, validator -from pyatlan.model.structs import AwsTag +from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField +from pyatlan.model.structs import AzureTag -from .asset07 import Cloud +from .asset08 import Cloud -class AWS(Cloud): +class Azure(Cloud): """Description""" - type_name: str = Field("AWS", allow_mutation=False) + type_name: str = Field("Azure", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "AWS": - raise ValueError("must be AWS") + if v != "Azure": + raise ValueError("must be Azure") return v def __setattr__(self, name, value): - if name in AWS._convience_properties: + if name in Azure._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "aws_arn", - "aws_partition", - "aws_service", - "aws_region", - "aws_account_id", - "aws_resource_id", - "aws_owner_name", - "aws_owner_id", - "aws_tags", + AZURE_RESOURCE_ID: ClassVar[KeywordTextField] = KeywordTextField( + "azureResourceId", "azureResourceId", "azureResourceId.text" + ) + """ + TBC + """ + AZURE_LOCATION: ClassVar[KeywordField] = KeywordField( + "azureLocation", "azureLocation" + ) + """ + TBC + """ + ADLS_ACCOUNT_SECONDARY_LOCATION: ClassVar[KeywordField] = KeywordField( + "adlsAccountSecondaryLocation", "adlsAccountSecondaryLocation" + ) + """ + TBC + """ + AZURE_TAGS: ClassVar[KeywordField] = KeywordField("azureTags", "azureTags") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "azure_resource_id", + "azure_location", + "adls_account_secondary_location", + "azure_tags", ] @property - def aws_arn(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_arn - - @aws_arn.setter - def aws_arn(self, aws_arn: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.aws_arn = aws_arn - - @property - def aws_partition(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_partition + def azure_resource_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.azure_resource_id - @aws_partition.setter - def aws_partition(self, aws_partition: Optional[str]): + @azure_resource_id.setter + def azure_resource_id(self, azure_resource_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_partition = aws_partition + self.attributes.azure_resource_id = azure_resource_id @property - def aws_service(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_service + def azure_location(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.azure_location - @aws_service.setter - def aws_service(self, aws_service: Optional[str]): + @azure_location.setter + def azure_location(self, azure_location: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_service = aws_service + self.attributes.azure_location = azure_location @property - def aws_region(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_region - - @aws_region.setter - def aws_region(self, aws_region: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.aws_region = aws_region - - @property - def aws_account_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_account_id - - @aws_account_id.setter - def aws_account_id(self, aws_account_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.aws_account_id = aws_account_id - - @property - def aws_resource_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_resource_id - - @aws_resource_id.setter - def aws_resource_id(self, aws_resource_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.aws_resource_id = aws_resource_id - - @property - def aws_owner_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_owner_name - - @aws_owner_name.setter - def aws_owner_name(self, aws_owner_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.aws_owner_name = aws_owner_name - - @property - def aws_owner_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_owner_id + def adls_account_secondary_location(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.adls_account_secondary_location + ) - @aws_owner_id.setter - def aws_owner_id(self, aws_owner_id: Optional[str]): + @adls_account_secondary_location.setter + def adls_account_secondary_location( + self, adls_account_secondary_location: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_owner_id = aws_owner_id + self.attributes.adls_account_secondary_location = ( + adls_account_secondary_location + ) @property - def aws_tags(self) -> Optional[list[AwsTag]]: - return None if self.attributes is None else self.attributes.aws_tags + def azure_tags(self) -> Optional[list[AzureTag]]: + return None if self.attributes is None else self.attributes.azure_tags - @aws_tags.setter - def aws_tags(self, aws_tags: Optional[list[AwsTag]]): + @azure_tags.setter + def azure_tags(self, azure_tags: Optional[list[AzureTag]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_tags = aws_tags + self.attributes.azure_tags = azure_tags class Attributes(Cloud.Attributes): - aws_arn: Optional[str] = Field(None, description="", alias="awsArn") - aws_partition: Optional[str] = Field(None, description="", alias="awsPartition") - aws_service: Optional[str] = Field(None, description="", alias="awsService") - aws_region: Optional[str] = Field(None, description="", alias="awsRegion") - aws_account_id: Optional[str] = Field( - None, description="", alias="awsAccountId" + azure_resource_id: Optional[str] = Field( + None, description="", alias="azureResourceId" + ) + azure_location: Optional[str] = Field( + None, description="", alias="azureLocation" ) - aws_resource_id: Optional[str] = Field( - None, description="", alias="awsResourceId" + adls_account_secondary_location: Optional[str] = Field( + None, description="", alias="adlsAccountSecondaryLocation" ) - aws_owner_name: Optional[str] = Field( - None, description="", alias="awsOwnerName" + azure_tags: Optional[list[AzureTag]] = Field( + None, description="", alias="azureTags" ) - aws_owner_id: Optional[str] = Field(None, description="", alias="awsOwnerId") - aws_tags: Optional[list[AwsTag]] = Field(None, description="", alias="awsTags") - attributes: "AWS.Attributes" = Field( - default_factory=lambda: AWS.Attributes(), + attributes: "Azure.Attributes" = Field( + default_factory=lambda: Azure.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -AWS.Attributes.update_forward_refs() +Azure.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset29.py b/pyatlan/model/assets/asset29.py index ca5603338..6e755cbd4 100644 --- a/pyatlan/model/assets/asset29.py +++ b/pyatlan/model/assets/asset29.py @@ -4,426 +4,201 @@ from __future__ import annotations -from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset00 import AirflowTask, Catalog, ColumnProcess, Dbt, Process +from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField +from pyatlan.model.structs import AwsTag +from .asset08 import Cloud -class DbtColumnProcess(Dbt): + +class AWS(Cloud): """Description""" - type_name: str = Field("DbtColumnProcess", allow_mutation=False) + type_name: str = Field("AWS", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "DbtColumnProcess": - raise ValueError("must be DbtColumnProcess") + if v != "AWS": + raise ValueError("must be AWS") return v def __setattr__(self, name, value): - if name in DbtColumnProcess._convience_properties: + if name in AWS._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "dbt_column_process_job_status", - "dbt_alias", - "dbt_meta", - "dbt_unique_id", - "dbt_account_name", - "dbt_project_name", - "dbt_package_name", - "dbt_job_name", - "dbt_job_schedule", - "dbt_job_status", - "dbt_job_schedule_cron_humanized", - "dbt_job_last_run", - "dbt_job_next_run", - "dbt_job_next_run_humanized", - "dbt_environment_name", - "dbt_environment_dbt_version", - "dbt_tags", - "dbt_connection_context", - "dbt_semantic_layer_proxy_url", - "inputs", - "outputs", - "code", - "sql", - "ast", - "process", - "airflow_tasks", - "column_processes", + AWS_ARN: ClassVar[KeywordTextField] = KeywordTextField( + "awsArn", "awsArn", "awsArn.text" + ) + """ + TBC + """ + AWS_PARTITION: ClassVar[KeywordField] = KeywordField("awsPartition", "awsPartition") + """ + TBC + """ + AWS_SERVICE: ClassVar[KeywordField] = KeywordField("awsService", "awsService") + """ + TBC + """ + AWS_REGION: ClassVar[KeywordField] = KeywordField("awsRegion", "awsRegion") + """ + TBC + """ + AWS_ACCOUNT_ID: ClassVar[KeywordField] = KeywordField( + "awsAccountId", "awsAccountId" + ) + """ + TBC + """ + AWS_RESOURCE_ID: ClassVar[KeywordField] = KeywordField( + "awsResourceId", "awsResourceId" + ) + """ + TBC + """ + AWS_OWNER_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "awsOwnerName", "awsOwnerName", "awsOwnerName.text" + ) + """ + TBC + """ + AWS_OWNER_ID: ClassVar[KeywordField] = KeywordField("awsOwnerId", "awsOwnerId") + """ + TBC + """ + AWS_TAGS: ClassVar[KeywordField] = KeywordField("awsTags", "awsTags") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "aws_arn", + "aws_partition", + "aws_service", + "aws_region", + "aws_account_id", + "aws_resource_id", + "aws_owner_name", + "aws_owner_id", + "aws_tags", ] @property - def dbt_column_process_job_status(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_column_process_job_status - ) - - @dbt_column_process_job_status.setter - def dbt_column_process_job_status( - self, dbt_column_process_job_status: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_column_process_job_status = dbt_column_process_job_status - - @property - def dbt_alias(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_alias - - @dbt_alias.setter - def dbt_alias(self, dbt_alias: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_alias = dbt_alias - - @property - def dbt_meta(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_meta - - @dbt_meta.setter - def dbt_meta(self, dbt_meta: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_meta = dbt_meta - - @property - def dbt_unique_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_unique_id - - @dbt_unique_id.setter - def dbt_unique_id(self, dbt_unique_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_unique_id = dbt_unique_id - - @property - def dbt_account_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_account_name - - @dbt_account_name.setter - def dbt_account_name(self, dbt_account_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_account_name = dbt_account_name - - @property - def dbt_project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_project_name - - @dbt_project_name.setter - def dbt_project_name(self, dbt_project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_project_name = dbt_project_name - - @property - def dbt_package_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_package_name + def aws_arn(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_arn - @dbt_package_name.setter - def dbt_package_name(self, dbt_package_name: Optional[str]): + @aws_arn.setter + def aws_arn(self, aws_arn: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dbt_package_name = dbt_package_name + self.attributes.aws_arn = aws_arn @property - def dbt_job_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_job_name + def aws_partition(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_partition - @dbt_job_name.setter - def dbt_job_name(self, dbt_job_name: Optional[str]): + @aws_partition.setter + def aws_partition(self, aws_partition: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dbt_job_name = dbt_job_name + self.attributes.aws_partition = aws_partition @property - def dbt_job_schedule(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_job_schedule + def aws_service(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_service - @dbt_job_schedule.setter - def dbt_job_schedule(self, dbt_job_schedule: Optional[str]): + @aws_service.setter + def aws_service(self, aws_service: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dbt_job_schedule = dbt_job_schedule + self.attributes.aws_service = aws_service @property - def dbt_job_status(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_job_status + def aws_region(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_region - @dbt_job_status.setter - def dbt_job_status(self, dbt_job_status: Optional[str]): + @aws_region.setter + def aws_region(self, aws_region: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dbt_job_status = dbt_job_status + self.attributes.aws_region = aws_region @property - def dbt_job_schedule_cron_humanized(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_job_schedule_cron_humanized - ) + def aws_account_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_account_id - @dbt_job_schedule_cron_humanized.setter - def dbt_job_schedule_cron_humanized( - self, dbt_job_schedule_cron_humanized: Optional[str] - ): + @aws_account_id.setter + def aws_account_id(self, aws_account_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dbt_job_schedule_cron_humanized = ( - dbt_job_schedule_cron_humanized - ) + self.attributes.aws_account_id = aws_account_id @property - def dbt_job_last_run(self) -> Optional[datetime]: - return None if self.attributes is None else self.attributes.dbt_job_last_run + def aws_resource_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_resource_id - @dbt_job_last_run.setter - def dbt_job_last_run(self, dbt_job_last_run: Optional[datetime]): + @aws_resource_id.setter + def aws_resource_id(self, aws_resource_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dbt_job_last_run = dbt_job_last_run + self.attributes.aws_resource_id = aws_resource_id @property - def dbt_job_next_run(self) -> Optional[datetime]: - return None if self.attributes is None else self.attributes.dbt_job_next_run + def aws_owner_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_owner_name - @dbt_job_next_run.setter - def dbt_job_next_run(self, dbt_job_next_run: Optional[datetime]): + @aws_owner_name.setter + def aws_owner_name(self, aws_owner_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dbt_job_next_run = dbt_job_next_run + self.attributes.aws_owner_name = aws_owner_name @property - def dbt_job_next_run_humanized(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_job_next_run_humanized - ) + def aws_owner_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_owner_id - @dbt_job_next_run_humanized.setter - def dbt_job_next_run_humanized(self, dbt_job_next_run_humanized: Optional[str]): + @aws_owner_id.setter + def aws_owner_id(self, aws_owner_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dbt_job_next_run_humanized = dbt_job_next_run_humanized + self.attributes.aws_owner_id = aws_owner_id @property - def dbt_environment_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_environment_name + def aws_tags(self) -> Optional[list[AwsTag]]: + return None if self.attributes is None else self.attributes.aws_tags - @dbt_environment_name.setter - def dbt_environment_name(self, dbt_environment_name: Optional[str]): + @aws_tags.setter + def aws_tags(self, aws_tags: Optional[list[AwsTag]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dbt_environment_name = dbt_environment_name + self.attributes.aws_tags = aws_tags - @property - def dbt_environment_dbt_version(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_environment_dbt_version + class Attributes(Cloud.Attributes): + aws_arn: Optional[str] = Field(None, description="", alias="awsArn") + aws_partition: Optional[str] = Field(None, description="", alias="awsPartition") + aws_service: Optional[str] = Field(None, description="", alias="awsService") + aws_region: Optional[str] = Field(None, description="", alias="awsRegion") + aws_account_id: Optional[str] = Field( + None, description="", alias="awsAccountId" ) - - @dbt_environment_dbt_version.setter - def dbt_environment_dbt_version(self, dbt_environment_dbt_version: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_environment_dbt_version = dbt_environment_dbt_version - - @property - def dbt_tags(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.dbt_tags - - @dbt_tags.setter - def dbt_tags(self, dbt_tags: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_tags = dbt_tags - - @property - def dbt_connection_context(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.dbt_connection_context + aws_resource_id: Optional[str] = Field( + None, description="", alias="awsResourceId" ) - - @dbt_connection_context.setter - def dbt_connection_context(self, dbt_connection_context: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_connection_context = dbt_connection_context - - @property - def dbt_semantic_layer_proxy_url(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_semantic_layer_proxy_url + aws_owner_name: Optional[str] = Field( + None, description="", alias="awsOwnerName" ) + aws_owner_id: Optional[str] = Field(None, description="", alias="awsOwnerId") + aws_tags: Optional[list[AwsTag]] = Field(None, description="", alias="awsTags") - @dbt_semantic_layer_proxy_url.setter - def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url - - @property - def inputs(self) -> Optional[list[Catalog]]: - return None if self.attributes is None else self.attributes.inputs - - @inputs.setter - def inputs(self, inputs: Optional[list[Catalog]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.inputs = inputs - - @property - def outputs(self) -> Optional[list[Catalog]]: - return None if self.attributes is None else self.attributes.outputs - - @outputs.setter - def outputs(self, outputs: Optional[list[Catalog]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.outputs = outputs - - @property - def code(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.code - - @code.setter - def code(self, code: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.code = code - - @property - def sql(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.sql - - @sql.setter - def sql(self, sql: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sql = sql - - @property - def ast(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.ast - - @ast.setter - def ast(self, ast: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.ast = ast - - @property - def process(self) -> Optional[Process]: - return None if self.attributes is None else self.attributes.process - - @process.setter - def process(self, process: Optional[Process]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.process = process - - @property - def airflow_tasks(self) -> Optional[list[AirflowTask]]: - return None if self.attributes is None else self.attributes.airflow_tasks - - @airflow_tasks.setter - def airflow_tasks(self, airflow_tasks: Optional[list[AirflowTask]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.airflow_tasks = airflow_tasks - - @property - def column_processes(self) -> Optional[list[ColumnProcess]]: - return None if self.attributes is None else self.attributes.column_processes - - @column_processes.setter - def column_processes(self, column_processes: Optional[list[ColumnProcess]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.column_processes = column_processes - - class Attributes(Dbt.Attributes): - dbt_column_process_job_status: Optional[str] = Field( - None, description="", alias="dbtColumnProcessJobStatus" - ) - dbt_alias: Optional[str] = Field(None, description="", alias="dbtAlias") - dbt_meta: Optional[str] = Field(None, description="", alias="dbtMeta") - dbt_unique_id: Optional[str] = Field(None, description="", alias="dbtUniqueId") - dbt_account_name: Optional[str] = Field( - None, description="", alias="dbtAccountName" - ) - dbt_project_name: Optional[str] = Field( - None, description="", alias="dbtProjectName" - ) - dbt_package_name: Optional[str] = Field( - None, description="", alias="dbtPackageName" - ) - dbt_job_name: Optional[str] = Field(None, description="", alias="dbtJobName") - dbt_job_schedule: Optional[str] = Field( - None, description="", alias="dbtJobSchedule" - ) - dbt_job_status: Optional[str] = Field( - None, description="", alias="dbtJobStatus" - ) - dbt_job_schedule_cron_humanized: Optional[str] = Field( - None, description="", alias="dbtJobScheduleCronHumanized" - ) - dbt_job_last_run: Optional[datetime] = Field( - None, description="", alias="dbtJobLastRun" - ) - dbt_job_next_run: Optional[datetime] = Field( - None, description="", alias="dbtJobNextRun" - ) - dbt_job_next_run_humanized: Optional[str] = Field( - None, description="", alias="dbtJobNextRunHumanized" - ) - dbt_environment_name: Optional[str] = Field( - None, description="", alias="dbtEnvironmentName" - ) - dbt_environment_dbt_version: Optional[str] = Field( - None, description="", alias="dbtEnvironmentDbtVersion" - ) - dbt_tags: Optional[set[str]] = Field(None, description="", alias="dbtTags") - dbt_connection_context: Optional[str] = Field( - None, description="", alias="dbtConnectionContext" - ) - dbt_semantic_layer_proxy_url: Optional[str] = Field( - None, description="", alias="dbtSemanticLayerProxyUrl" - ) - inputs: Optional[list[Catalog]] = Field(None, description="", alias="inputs") - outputs: Optional[list[Catalog]] = Field(None, description="", alias="outputs") - code: Optional[str] = Field(None, description="", alias="code") - sql: Optional[str] = Field(None, description="", alias="sql") - ast: Optional[str] = Field(None, description="", alias="ast") - process: Optional[Process] = Field( - None, description="", alias="process" - ) # relationship - airflow_tasks: Optional[list[AirflowTask]] = Field( - None, description="", alias="airflowTasks" - ) # relationship - column_processes: Optional[list[ColumnProcess]] = Field( - None, description="", alias="columnProcesses" - ) # relationship - - attributes: "DbtColumnProcess.Attributes" = Field( - default_factory=lambda: DbtColumnProcess.Attributes(), + attributes: "AWS.Attributes" = Field( + default_factory=lambda: AWS.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -DbtColumnProcess.Attributes.update_forward_refs() +AWS.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset30.py b/pyatlan/model/assets/asset30.py index 4e83673d9..6b65fe360 100644 --- a/pyatlan/model/assets/asset30.py +++ b/pyatlan/model/assets/asset30.py @@ -4,179 +4,575 @@ from __future__ import annotations +from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from pyatlan.model.structs import AwsTag +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, + RelationField, +) -from .asset15 import ObjectStore +from .asset00 import AirflowTask, Catalog, ColumnProcess, Dbt, Process -class S3(ObjectStore): +class DbtColumnProcess(Dbt): """Description""" - type_name: str = Field("S3", allow_mutation=False) + type_name: str = Field("DbtColumnProcess", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "S3": - raise ValueError("must be S3") + if v != "DbtColumnProcess": + raise ValueError("must be DbtColumnProcess") return v def __setattr__(self, name, value): - if name in S3._convience_properties: + if name in DbtColumnProcess._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "s3_e_tag", - "s3_encryption", - "aws_arn", - "aws_partition", - "aws_service", - "aws_region", - "aws_account_id", - "aws_resource_id", - "aws_owner_name", - "aws_owner_id", - "aws_tags", + DBT_COLUMN_PROCESS_JOB_STATUS: ClassVar[KeywordField] = KeywordField( + "dbtColumnProcessJobStatus", "dbtColumnProcessJobStatus" + ) + """ + TBC + """ + DBT_ALIAS: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAlias", "dbtAlias.keyword", "dbtAlias" + ) + """ + TBC + """ + DBT_META: ClassVar[KeywordField] = KeywordField("dbtMeta", "dbtMeta") + """ + TBC + """ + DBT_UNIQUE_ID: ClassVar[KeywordTextField] = KeywordTextField( + "dbtUniqueId", "dbtUniqueId.keyword", "dbtUniqueId" + ) + """ + TBC + """ + DBT_ACCOUNT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAccountName", "dbtAccountName.keyword", "dbtAccountName" + ) + """ + TBC + """ + DBT_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtProjectName", "dbtProjectName.keyword", "dbtProjectName" + ) + """ + TBC + """ + DBT_PACKAGE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtPackageName", "dbtPackageName.keyword", "dbtPackageName" + ) + """ + TBC + """ + DBT_JOB_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobName", "dbtJobName.keyword", "dbtJobName" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE: ClassVar[KeywordField] = KeywordField( + "dbtJobSchedule", "dbtJobSchedule" + ) + """ + TBC + """ + DBT_JOB_STATUS: ClassVar[KeywordField] = KeywordField( + "dbtJobStatus", "dbtJobStatus" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE_CRON_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobScheduleCronHumanized", + "dbtJobScheduleCronHumanized.keyword", + "dbtJobScheduleCronHumanized", + ) + """ + TBC + """ + DBT_JOB_LAST_RUN: ClassVar[NumericField] = NumericField( + "dbtJobLastRun", "dbtJobLastRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN: ClassVar[NumericField] = NumericField( + "dbtJobNextRun", "dbtJobNextRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobNextRunHumanized", + "dbtJobNextRunHumanized.keyword", + "dbtJobNextRunHumanized", + ) + """ + TBC + """ + DBT_ENVIRONMENT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentName", "dbtEnvironmentName.keyword", "dbtEnvironmentName" + ) + """ + TBC + """ + DBT_ENVIRONMENT_DBT_VERSION: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentDbtVersion", + "dbtEnvironmentDbtVersion.keyword", + "dbtEnvironmentDbtVersion", + ) + """ + TBC + """ + DBT_TAGS: ClassVar[KeywordField] = KeywordField("dbtTags", "dbtTags") + """ + TBC + """ + DBT_CONNECTION_CONTEXT: ClassVar[KeywordField] = KeywordField( + "dbtConnectionContext", "dbtConnectionContext" + ) + """ + TBC + """ + DBT_SEMANTIC_LAYER_PROXY_URL: ClassVar[KeywordField] = KeywordField( + "dbtSemanticLayerProxyUrl", "dbtSemanticLayerProxyUrl" + ) + """ + TBC + """ + CODE: ClassVar[KeywordField] = KeywordField("code", "code") + """ + TBC + """ + SQL: ClassVar[KeywordField] = KeywordField("sql", "sql") + """ + TBC + """ + AST: ClassVar[KeywordField] = KeywordField("ast", "ast") + """ + TBC + """ + + PROCESS: ClassVar[RelationField] = RelationField("process") + """ + TBC + """ + AIRFLOW_TASKS: ClassVar[RelationField] = RelationField("airflowTasks") + """ + TBC + """ + COLUMN_PROCESSES: ClassVar[RelationField] = RelationField("columnProcesses") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "dbt_column_process_job_status", + "dbt_alias", + "dbt_meta", + "dbt_unique_id", + "dbt_account_name", + "dbt_project_name", + "dbt_package_name", + "dbt_job_name", + "dbt_job_schedule", + "dbt_job_status", + "dbt_job_schedule_cron_humanized", + "dbt_job_last_run", + "dbt_job_next_run", + "dbt_job_next_run_humanized", + "dbt_environment_name", + "dbt_environment_dbt_version", + "dbt_tags", + "dbt_connection_context", + "dbt_semantic_layer_proxy_url", + "inputs", + "outputs", + "code", + "sql", + "ast", + "process", + "airflow_tasks", + "column_processes", ] @property - def s3_e_tag(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.s3_e_tag + def dbt_column_process_job_status(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_column_process_job_status + ) + + @dbt_column_process_job_status.setter + def dbt_column_process_job_status( + self, dbt_column_process_job_status: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_column_process_job_status = dbt_column_process_job_status + + @property + def dbt_alias(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_alias - @s3_e_tag.setter - def s3_e_tag(self, s3_e_tag: Optional[str]): + @dbt_alias.setter + def dbt_alias(self, dbt_alias: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_e_tag = s3_e_tag + self.attributes.dbt_alias = dbt_alias @property - def s3_encryption(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.s3_encryption + def dbt_meta(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_meta - @s3_encryption.setter - def s3_encryption(self, s3_encryption: Optional[str]): + @dbt_meta.setter + def dbt_meta(self, dbt_meta: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_encryption = s3_encryption + self.attributes.dbt_meta = dbt_meta @property - def aws_arn(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_arn + def dbt_unique_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_unique_id - @aws_arn.setter - def aws_arn(self, aws_arn: Optional[str]): + @dbt_unique_id.setter + def dbt_unique_id(self, dbt_unique_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_arn = aws_arn + self.attributes.dbt_unique_id = dbt_unique_id @property - def aws_partition(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_partition + def dbt_account_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_account_name - @aws_partition.setter - def aws_partition(self, aws_partition: Optional[str]): + @dbt_account_name.setter + def dbt_account_name(self, dbt_account_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_partition = aws_partition + self.attributes.dbt_account_name = dbt_account_name @property - def aws_service(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_service + def dbt_project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_project_name - @aws_service.setter - def aws_service(self, aws_service: Optional[str]): + @dbt_project_name.setter + def dbt_project_name(self, dbt_project_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_service = aws_service + self.attributes.dbt_project_name = dbt_project_name @property - def aws_region(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_region + def dbt_package_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_package_name - @aws_region.setter - def aws_region(self, aws_region: Optional[str]): + @dbt_package_name.setter + def dbt_package_name(self, dbt_package_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_region = aws_region + self.attributes.dbt_package_name = dbt_package_name @property - def aws_account_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_account_id + def dbt_job_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_job_name - @aws_account_id.setter - def aws_account_id(self, aws_account_id: Optional[str]): + @dbt_job_name.setter + def dbt_job_name(self, dbt_job_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_account_id = aws_account_id + self.attributes.dbt_job_name = dbt_job_name @property - def aws_resource_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_resource_id + def dbt_job_schedule(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_job_schedule - @aws_resource_id.setter - def aws_resource_id(self, aws_resource_id: Optional[str]): + @dbt_job_schedule.setter + def dbt_job_schedule(self, dbt_job_schedule: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_resource_id = aws_resource_id + self.attributes.dbt_job_schedule = dbt_job_schedule @property - def aws_owner_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_owner_name + def dbt_job_status(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_job_status - @aws_owner_name.setter - def aws_owner_name(self, aws_owner_name: Optional[str]): + @dbt_job_status.setter + def dbt_job_status(self, dbt_job_status: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_owner_name = aws_owner_name + self.attributes.dbt_job_status = dbt_job_status @property - def aws_owner_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.aws_owner_id + def dbt_job_schedule_cron_humanized(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_job_schedule_cron_humanized + ) - @aws_owner_id.setter - def aws_owner_id(self, aws_owner_id: Optional[str]): + @dbt_job_schedule_cron_humanized.setter + def dbt_job_schedule_cron_humanized( + self, dbt_job_schedule_cron_humanized: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_owner_id = aws_owner_id + self.attributes.dbt_job_schedule_cron_humanized = ( + dbt_job_schedule_cron_humanized + ) @property - def aws_tags(self) -> Optional[list[AwsTag]]: - return None if self.attributes is None else self.attributes.aws_tags + def dbt_job_last_run(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.dbt_job_last_run - @aws_tags.setter - def aws_tags(self, aws_tags: Optional[list[AwsTag]]): + @dbt_job_last_run.setter + def dbt_job_last_run(self, dbt_job_last_run: Optional[datetime]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.aws_tags = aws_tags + self.attributes.dbt_job_last_run = dbt_job_last_run - class Attributes(ObjectStore.Attributes): - s3_e_tag: Optional[str] = Field(None, description="", alias="s3ETag") - s3_encryption: Optional[str] = Field(None, description="", alias="s3Encryption") - aws_arn: Optional[str] = Field(None, description="", alias="awsArn") - aws_partition: Optional[str] = Field(None, description="", alias="awsPartition") - aws_service: Optional[str] = Field(None, description="", alias="awsService") - aws_region: Optional[str] = Field(None, description="", alias="awsRegion") - aws_account_id: Optional[str] = Field( - None, description="", alias="awsAccountId" + @property + def dbt_job_next_run(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.dbt_job_next_run + + @dbt_job_next_run.setter + def dbt_job_next_run(self, dbt_job_next_run: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_next_run = dbt_job_next_run + + @property + def dbt_job_next_run_humanized(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_job_next_run_humanized + ) + + @dbt_job_next_run_humanized.setter + def dbt_job_next_run_humanized(self, dbt_job_next_run_humanized: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_next_run_humanized = dbt_job_next_run_humanized + + @property + def dbt_environment_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_environment_name + + @dbt_environment_name.setter + def dbt_environment_name(self, dbt_environment_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_environment_name = dbt_environment_name + + @property + def dbt_environment_dbt_version(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_environment_dbt_version ) - aws_resource_id: Optional[str] = Field( - None, description="", alias="awsResourceId" + + @dbt_environment_dbt_version.setter + def dbt_environment_dbt_version(self, dbt_environment_dbt_version: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_environment_dbt_version = dbt_environment_dbt_version + + @property + def dbt_tags(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.dbt_tags + + @dbt_tags.setter + def dbt_tags(self, dbt_tags: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_tags = dbt_tags + + @property + def dbt_connection_context(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.dbt_connection_context ) - aws_owner_name: Optional[str] = Field( - None, description="", alias="awsOwnerName" + + @dbt_connection_context.setter + def dbt_connection_context(self, dbt_connection_context: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_connection_context = dbt_connection_context + + @property + def dbt_semantic_layer_proxy_url(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_semantic_layer_proxy_url ) - aws_owner_id: Optional[str] = Field(None, description="", alias="awsOwnerId") - aws_tags: Optional[list[AwsTag]] = Field(None, description="", alias="awsTags") - attributes: "S3.Attributes" = Field( - default_factory=lambda: S3.Attributes(), + @dbt_semantic_layer_proxy_url.setter + def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url + + @property + def inputs(self) -> Optional[list[Catalog]]: + return None if self.attributes is None else self.attributes.inputs + + @inputs.setter + def inputs(self, inputs: Optional[list[Catalog]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.inputs = inputs + + @property + def outputs(self) -> Optional[list[Catalog]]: + return None if self.attributes is None else self.attributes.outputs + + @outputs.setter + def outputs(self, outputs: Optional[list[Catalog]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.outputs = outputs + + @property + def code(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.code + + @code.setter + def code(self, code: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.code = code + + @property + def sql(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.sql + + @sql.setter + def sql(self, sql: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sql = sql + + @property + def ast(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.ast + + @ast.setter + def ast(self, ast: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.ast = ast + + @property + def process(self) -> Optional[Process]: + return None if self.attributes is None else self.attributes.process + + @process.setter + def process(self, process: Optional[Process]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.process = process + + @property + def airflow_tasks(self) -> Optional[list[AirflowTask]]: + return None if self.attributes is None else self.attributes.airflow_tasks + + @airflow_tasks.setter + def airflow_tasks(self, airflow_tasks: Optional[list[AirflowTask]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.airflow_tasks = airflow_tasks + + @property + def column_processes(self) -> Optional[list[ColumnProcess]]: + return None if self.attributes is None else self.attributes.column_processes + + @column_processes.setter + def column_processes(self, column_processes: Optional[list[ColumnProcess]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.column_processes = column_processes + + class Attributes(Dbt.Attributes): + dbt_column_process_job_status: Optional[str] = Field( + None, description="", alias="dbtColumnProcessJobStatus" + ) + dbt_alias: Optional[str] = Field(None, description="", alias="dbtAlias") + dbt_meta: Optional[str] = Field(None, description="", alias="dbtMeta") + dbt_unique_id: Optional[str] = Field(None, description="", alias="dbtUniqueId") + dbt_account_name: Optional[str] = Field( + None, description="", alias="dbtAccountName" + ) + dbt_project_name: Optional[str] = Field( + None, description="", alias="dbtProjectName" + ) + dbt_package_name: Optional[str] = Field( + None, description="", alias="dbtPackageName" + ) + dbt_job_name: Optional[str] = Field(None, description="", alias="dbtJobName") + dbt_job_schedule: Optional[str] = Field( + None, description="", alias="dbtJobSchedule" + ) + dbt_job_status: Optional[str] = Field( + None, description="", alias="dbtJobStatus" + ) + dbt_job_schedule_cron_humanized: Optional[str] = Field( + None, description="", alias="dbtJobScheduleCronHumanized" + ) + dbt_job_last_run: Optional[datetime] = Field( + None, description="", alias="dbtJobLastRun" + ) + dbt_job_next_run: Optional[datetime] = Field( + None, description="", alias="dbtJobNextRun" + ) + dbt_job_next_run_humanized: Optional[str] = Field( + None, description="", alias="dbtJobNextRunHumanized" + ) + dbt_environment_name: Optional[str] = Field( + None, description="", alias="dbtEnvironmentName" + ) + dbt_environment_dbt_version: Optional[str] = Field( + None, description="", alias="dbtEnvironmentDbtVersion" + ) + dbt_tags: Optional[set[str]] = Field(None, description="", alias="dbtTags") + dbt_connection_context: Optional[str] = Field( + None, description="", alias="dbtConnectionContext" + ) + dbt_semantic_layer_proxy_url: Optional[str] = Field( + None, description="", alias="dbtSemanticLayerProxyUrl" + ) + inputs: Optional[list[Catalog]] = Field(None, description="", alias="inputs") + outputs: Optional[list[Catalog]] = Field(None, description="", alias="outputs") + code: Optional[str] = Field(None, description="", alias="code") + sql: Optional[str] = Field(None, description="", alias="sql") + ast: Optional[str] = Field(None, description="", alias="ast") + process: Optional[Process] = Field( + None, description="", alias="process" + ) # relationship + airflow_tasks: Optional[list[AirflowTask]] = Field( + None, description="", alias="airflowTasks" + ) # relationship + column_processes: Optional[list[ColumnProcess]] = Field( + None, description="", alias="columnProcesses" + ) # relationship + + attributes: "DbtColumnProcess.Attributes" = Field( + default_factory=lambda: DbtColumnProcess.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -S3.Attributes.update_forward_refs() +DbtColumnProcess.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset31.py b/pyatlan/model/assets/asset31.py index 9dca13def..858ba0356 100644 --- a/pyatlan/model/assets/asset31.py +++ b/pyatlan/model/assets/asset31.py @@ -8,119 +8,231 @@ from pydantic import Field, validator -from pyatlan.model.structs import AzureTag +from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField +from pyatlan.model.structs import AwsTag -from .asset15 import ObjectStore +from .asset16 import ObjectStore -class ADLS(ObjectStore): +class S3(ObjectStore): """Description""" - type_name: str = Field("ADLS", allow_mutation=False) + type_name: str = Field("S3", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ADLS": - raise ValueError("must be ADLS") + if v != "S3": + raise ValueError("must be S3") return v def __setattr__(self, name, value): - if name in ADLS._convience_properties: + if name in S3._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "adls_account_qualified_name", - "azure_resource_id", - "azure_location", - "adls_account_secondary_location", - "azure_tags", + S3E_TAG: ClassVar[KeywordTextField] = KeywordTextField( + "s3ETag", "s3ETag", "s3ETag.text" + ) + """ + TBC + """ + S3ENCRYPTION: ClassVar[KeywordField] = KeywordField("s3Encryption", "s3Encryption") + """ + TBC + """ + AWS_ARN: ClassVar[KeywordTextField] = KeywordTextField( + "awsArn", "awsArn", "awsArn.text" + ) + """ + TBC + """ + AWS_PARTITION: ClassVar[KeywordField] = KeywordField("awsPartition", "awsPartition") + """ + TBC + """ + AWS_SERVICE: ClassVar[KeywordField] = KeywordField("awsService", "awsService") + """ + TBC + """ + AWS_REGION: ClassVar[KeywordField] = KeywordField("awsRegion", "awsRegion") + """ + TBC + """ + AWS_ACCOUNT_ID: ClassVar[KeywordField] = KeywordField( + "awsAccountId", "awsAccountId" + ) + """ + TBC + """ + AWS_RESOURCE_ID: ClassVar[KeywordField] = KeywordField( + "awsResourceId", "awsResourceId" + ) + """ + TBC + """ + AWS_OWNER_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "awsOwnerName", "awsOwnerName", "awsOwnerName.text" + ) + """ + TBC + """ + AWS_OWNER_ID: ClassVar[KeywordField] = KeywordField("awsOwnerId", "awsOwnerId") + """ + TBC + """ + AWS_TAGS: ClassVar[KeywordField] = KeywordField("awsTags", "awsTags") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "s3_e_tag", + "s3_encryption", + "aws_arn", + "aws_partition", + "aws_service", + "aws_region", + "aws_account_id", + "aws_resource_id", + "aws_owner_name", + "aws_owner_id", + "aws_tags", ] @property - def adls_account_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.adls_account_qualified_name - ) + def s3_e_tag(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.s3_e_tag - @adls_account_qualified_name.setter - def adls_account_qualified_name(self, adls_account_qualified_name: Optional[str]): + @s3_e_tag.setter + def s3_e_tag(self, s3_e_tag: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_account_qualified_name = adls_account_qualified_name + self.attributes.s3_e_tag = s3_e_tag @property - def azure_resource_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.azure_resource_id + def s3_encryption(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.s3_encryption - @azure_resource_id.setter - def azure_resource_id(self, azure_resource_id: Optional[str]): + @s3_encryption.setter + def s3_encryption(self, s3_encryption: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.azure_resource_id = azure_resource_id + self.attributes.s3_encryption = s3_encryption @property - def azure_location(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.azure_location + def aws_arn(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_arn - @azure_location.setter - def azure_location(self, azure_location: Optional[str]): + @aws_arn.setter + def aws_arn(self, aws_arn: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.azure_location = azure_location + self.attributes.aws_arn = aws_arn @property - def adls_account_secondary_location(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.adls_account_secondary_location - ) + def aws_partition(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_partition - @adls_account_secondary_location.setter - def adls_account_secondary_location( - self, adls_account_secondary_location: Optional[str] - ): + @aws_partition.setter + def aws_partition(self, aws_partition: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_account_secondary_location = ( - adls_account_secondary_location - ) + self.attributes.aws_partition = aws_partition + + @property + def aws_service(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_service + + @aws_service.setter + def aws_service(self, aws_service: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.aws_service = aws_service + + @property + def aws_region(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_region + + @aws_region.setter + def aws_region(self, aws_region: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.aws_region = aws_region + + @property + def aws_account_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_account_id + + @aws_account_id.setter + def aws_account_id(self, aws_account_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.aws_account_id = aws_account_id + + @property + def aws_resource_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_resource_id + + @aws_resource_id.setter + def aws_resource_id(self, aws_resource_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.aws_resource_id = aws_resource_id + + @property + def aws_owner_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_owner_name + + @aws_owner_name.setter + def aws_owner_name(self, aws_owner_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.aws_owner_name = aws_owner_name + + @property + def aws_owner_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.aws_owner_id + + @aws_owner_id.setter + def aws_owner_id(self, aws_owner_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.aws_owner_id = aws_owner_id @property - def azure_tags(self) -> Optional[list[AzureTag]]: - return None if self.attributes is None else self.attributes.azure_tags + def aws_tags(self) -> Optional[list[AwsTag]]: + return None if self.attributes is None else self.attributes.aws_tags - @azure_tags.setter - def azure_tags(self, azure_tags: Optional[list[AzureTag]]): + @aws_tags.setter + def aws_tags(self, aws_tags: Optional[list[AwsTag]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.azure_tags = azure_tags + self.attributes.aws_tags = aws_tags class Attributes(ObjectStore.Attributes): - adls_account_qualified_name: Optional[str] = Field( - None, description="", alias="adlsAccountQualifiedName" - ) - azure_resource_id: Optional[str] = Field( - None, description="", alias="azureResourceId" - ) - azure_location: Optional[str] = Field( - None, description="", alias="azureLocation" + s3_e_tag: Optional[str] = Field(None, description="", alias="s3ETag") + s3_encryption: Optional[str] = Field(None, description="", alias="s3Encryption") + aws_arn: Optional[str] = Field(None, description="", alias="awsArn") + aws_partition: Optional[str] = Field(None, description="", alias="awsPartition") + aws_service: Optional[str] = Field(None, description="", alias="awsService") + aws_region: Optional[str] = Field(None, description="", alias="awsRegion") + aws_account_id: Optional[str] = Field( + None, description="", alias="awsAccountId" ) - adls_account_secondary_location: Optional[str] = Field( - None, description="", alias="adlsAccountSecondaryLocation" + aws_resource_id: Optional[str] = Field( + None, description="", alias="awsResourceId" ) - azure_tags: Optional[list[AzureTag]] = Field( - None, description="", alias="azureTags" + aws_owner_name: Optional[str] = Field( + None, description="", alias="awsOwnerName" ) + aws_owner_id: Optional[str] = Field(None, description="", alias="awsOwnerId") + aws_tags: Optional[list[AwsTag]] = Field(None, description="", alias="awsTags") - attributes: "ADLS.Attributes" = Field( - default_factory=lambda: ADLS.Attributes(), + attributes: "S3.Attributes" = Field( + default_factory=lambda: S3.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -ADLS.Attributes.update_forward_refs() +S3.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset32.py b/pyatlan/model/assets/asset32.py index 276c0aba8..89b907178 100644 --- a/pyatlan/model/assets/asset32.py +++ b/pyatlan/model/assets/asset32.py @@ -8,43 +8,93 @@ from pydantic import Field, validator -from pyatlan.model.structs import GoogleLabel, GoogleTag +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + RelationField, +) +from pyatlan.model.structs import AzureTag from .asset00 import AirflowTask, Process -from .asset26 import Google +from .asset28 import Azure -class GCS(Google): +class ADLS(Azure): """Description""" - type_name: str = Field("GCS", allow_mutation=False) + type_name: str = Field("ADLS", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "GCS": - raise ValueError("must be GCS") + if v != "ADLS": + raise ValueError("must be ADLS") return v def __setattr__(self, name, value): - if name in GCS._convience_properties: + if name in ADLS._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "gcs_storage_class", - "gcs_encryption_type", - "gcs_e_tag", - "gcs_requester_pays", - "gcs_access_control", - "gcs_meta_generation_id", - "google_service", - "google_project_name", - "google_project_id", - "google_project_number", - "google_location", - "google_location_type", - "google_labels", - "google_tags", + ADLS_ACCOUNT_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "adlsAccountQualifiedName", + "adlsAccountQualifiedName", + "adlsAccountQualifiedName.text", + ) + """ + TBC + """ + AZURE_RESOURCE_ID: ClassVar[KeywordTextField] = KeywordTextField( + "azureResourceId", "azureResourceId", "azureResourceId.text" + ) + """ + TBC + """ + AZURE_LOCATION: ClassVar[KeywordField] = KeywordField( + "azureLocation", "azureLocation" + ) + """ + TBC + """ + ADLS_ACCOUNT_SECONDARY_LOCATION: ClassVar[KeywordField] = KeywordField( + "adlsAccountSecondaryLocation", "adlsAccountSecondaryLocation" + ) + """ + TBC + """ + AZURE_TAGS: ClassVar[KeywordField] = KeywordField("azureTags", "azureTags") + """ + TBC + """ + + INPUT_TO_PROCESSES: ClassVar[RelationField] = RelationField("inputToProcesses") + """ + TBC + """ + OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( + "outputFromAirflowTasks" + ) + """ + TBC + """ + INPUT_TO_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( + "inputToAirflowTasks" + ) + """ + TBC + """ + OUTPUT_FROM_PROCESSES: ClassVar[RelationField] = RelationField( + "outputFromProcesses" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "adls_account_qualified_name", + "azure_resource_id", + "azure_location", + "adls_account_secondary_location", + "azure_tags", "input_to_processes", "output_from_airflow_tasks", "input_to_airflow_tasks", @@ -52,148 +102,66 @@ def __setattr__(self, name, value): ] @property - def gcs_storage_class(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.gcs_storage_class - - @gcs_storage_class.setter - def gcs_storage_class(self, gcs_storage_class: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.gcs_storage_class = gcs_storage_class - - @property - def gcs_encryption_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.gcs_encryption_type - - @gcs_encryption_type.setter - def gcs_encryption_type(self, gcs_encryption_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.gcs_encryption_type = gcs_encryption_type - - @property - def gcs_e_tag(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.gcs_e_tag - - @gcs_e_tag.setter - def gcs_e_tag(self, gcs_e_tag: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.gcs_e_tag = gcs_e_tag - - @property - def gcs_requester_pays(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.gcs_requester_pays - - @gcs_requester_pays.setter - def gcs_requester_pays(self, gcs_requester_pays: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.gcs_requester_pays = gcs_requester_pays - - @property - def gcs_access_control(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.gcs_access_control - - @gcs_access_control.setter - def gcs_access_control(self, gcs_access_control: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.gcs_access_control = gcs_access_control - - @property - def gcs_meta_generation_id(self) -> Optional[int]: + def adls_account_qualified_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.gcs_meta_generation_id + None + if self.attributes is None + else self.attributes.adls_account_qualified_name ) - @gcs_meta_generation_id.setter - def gcs_meta_generation_id(self, gcs_meta_generation_id: Optional[int]): + @adls_account_qualified_name.setter + def adls_account_qualified_name(self, adls_account_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_meta_generation_id = gcs_meta_generation_id + self.attributes.adls_account_qualified_name = adls_account_qualified_name @property - def google_service(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_service + def azure_resource_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.azure_resource_id - @google_service.setter - def google_service(self, google_service: Optional[str]): + @azure_resource_id.setter + def azure_resource_id(self, azure_resource_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_service = google_service + self.attributes.azure_resource_id = azure_resource_id @property - def google_project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_project_name + def azure_location(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.azure_location - @google_project_name.setter - def google_project_name(self, google_project_name: Optional[str]): + @azure_location.setter + def azure_location(self, azure_location: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_project_name = google_project_name + self.attributes.azure_location = azure_location @property - def google_project_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_project_id - - @google_project_id.setter - def google_project_id(self, google_project_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_project_id = google_project_id - - @property - def google_project_number(self) -> Optional[int]: + def adls_account_secondary_location(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.google_project_number + None + if self.attributes is None + else self.attributes.adls_account_secondary_location ) - @google_project_number.setter - def google_project_number(self, google_project_number: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_project_number = google_project_number - - @property - def google_location(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_location - - @google_location.setter - def google_location(self, google_location: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_location = google_location - - @property - def google_location_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_location_type - - @google_location_type.setter - def google_location_type(self, google_location_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_location_type = google_location_type - - @property - def google_labels(self) -> Optional[list[GoogleLabel]]: - return None if self.attributes is None else self.attributes.google_labels - - @google_labels.setter - def google_labels(self, google_labels: Optional[list[GoogleLabel]]): + @adls_account_secondary_location.setter + def adls_account_secondary_location( + self, adls_account_secondary_location: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_labels = google_labels + self.attributes.adls_account_secondary_location = ( + adls_account_secondary_location + ) @property - def google_tags(self) -> Optional[list[GoogleTag]]: - return None if self.attributes is None else self.attributes.google_tags + def azure_tags(self) -> Optional[list[AzureTag]]: + return None if self.attributes is None else self.attributes.azure_tags - @google_tags.setter - def google_tags(self, google_tags: Optional[list[GoogleTag]]): + @azure_tags.setter + def azure_tags(self, azure_tags: Optional[list[AzureTag]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_tags = google_tags + self.attributes.azure_tags = azure_tags @property def input_to_processes(self) -> Optional[list[Process]]: @@ -247,46 +215,21 @@ def output_from_processes(self, output_from_processes: Optional[list[Process]]): self.attributes = self.Attributes() self.attributes.output_from_processes = output_from_processes - class Attributes(Google.Attributes): - gcs_storage_class: Optional[str] = Field( - None, description="", alias="gcsStorageClass" - ) - gcs_encryption_type: Optional[str] = Field( - None, description="", alias="gcsEncryptionType" - ) - gcs_e_tag: Optional[str] = Field(None, description="", alias="gcsETag") - gcs_requester_pays: Optional[bool] = Field( - None, description="", alias="gcsRequesterPays" - ) - gcs_access_control: Optional[str] = Field( - None, description="", alias="gcsAccessControl" - ) - gcs_meta_generation_id: Optional[int] = Field( - None, description="", alias="gcsMetaGenerationId" - ) - google_service: Optional[str] = Field( - None, description="", alias="googleService" - ) - google_project_name: Optional[str] = Field( - None, description="", alias="googleProjectName" - ) - google_project_id: Optional[str] = Field( - None, description="", alias="googleProjectId" - ) - google_project_number: Optional[int] = Field( - None, description="", alias="googleProjectNumber" + class Attributes(Azure.Attributes): + adls_account_qualified_name: Optional[str] = Field( + None, description="", alias="adlsAccountQualifiedName" ) - google_location: Optional[str] = Field( - None, description="", alias="googleLocation" + azure_resource_id: Optional[str] = Field( + None, description="", alias="azureResourceId" ) - google_location_type: Optional[str] = Field( - None, description="", alias="googleLocationType" + azure_location: Optional[str] = Field( + None, description="", alias="azureLocation" ) - google_labels: Optional[list[GoogleLabel]] = Field( - None, description="", alias="googleLabels" + adls_account_secondary_location: Optional[str] = Field( + None, description="", alias="adlsAccountSecondaryLocation" ) - google_tags: Optional[list[GoogleTag]] = Field( - None, description="", alias="googleTags" + azure_tags: Optional[list[AzureTag]] = Field( + None, description="", alias="azureTags" ) input_to_processes: Optional[list[Process]] = Field( None, description="", alias="inputToProcesses" @@ -301,11 +244,11 @@ class Attributes(Google.Attributes): None, description="", alias="outputFromProcesses" ) # relationship - attributes: "GCS.Attributes" = Field( - default_factory=lambda: GCS.Attributes(), + attributes: "ADLS.Attributes" = Field( + default_factory=lambda: ADLS.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -GCS.Attributes.update_forward_refs() +ADLS.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset33.py b/pyatlan/model/assets/asset33.py new file mode 100644 index 000000000..a5312fa3f --- /dev/null +++ b/pyatlan/model/assets/asset33.py @@ -0,0 +1,420 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2022 Atlan Pte. Ltd. + + +from __future__ import annotations + +from typing import ClassVar, Optional + +from pydantic import Field, validator + +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + NumericField, + RelationField, +) +from pyatlan.model.structs import GoogleLabel, GoogleTag + +from .asset00 import AirflowTask, Process +from .asset27 import Google + + +class GCS(Google): + """Description""" + + type_name: str = Field("GCS", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "GCS": + raise ValueError("must be GCS") + return v + + def __setattr__(self, name, value): + if name in GCS._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + GCS_STORAGE_CLASS: ClassVar[KeywordField] = KeywordField( + "gcsStorageClass", "gcsStorageClass" + ) + """ + TBC + """ + GCS_ENCRYPTION_TYPE: ClassVar[KeywordField] = KeywordField( + "gcsEncryptionType", "gcsEncryptionType" + ) + """ + TBC + """ + GCS_E_TAG: ClassVar[KeywordField] = KeywordField("gcsETag", "gcsETag") + """ + TBC + """ + GCS_REQUESTER_PAYS: ClassVar[BooleanField] = BooleanField( + "gcsRequesterPays", "gcsRequesterPays" + ) + """ + TBC + """ + GCS_ACCESS_CONTROL: ClassVar[KeywordField] = KeywordField( + "gcsAccessControl", "gcsAccessControl" + ) + """ + TBC + """ + GCS_META_GENERATION_ID: ClassVar[NumericField] = NumericField( + "gcsMetaGenerationId", "gcsMetaGenerationId" + ) + """ + TBC + """ + GOOGLE_SERVICE: ClassVar[KeywordField] = KeywordField( + "googleService", "googleService" + ) + """ + TBC + """ + GOOGLE_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "googleProjectName", "googleProjectName", "googleProjectName.text" + ) + """ + TBC + """ + GOOGLE_PROJECT_ID: ClassVar[KeywordTextField] = KeywordTextField( + "googleProjectId", "googleProjectId", "googleProjectId.text" + ) + """ + TBC + """ + GOOGLE_PROJECT_NUMBER: ClassVar[NumericField] = NumericField( + "googleProjectNumber", "googleProjectNumber" + ) + """ + TBC + """ + GOOGLE_LOCATION: ClassVar[KeywordField] = KeywordField( + "googleLocation", "googleLocation" + ) + """ + TBC + """ + GOOGLE_LOCATION_TYPE: ClassVar[KeywordField] = KeywordField( + "googleLocationType", "googleLocationType" + ) + """ + TBC + """ + GOOGLE_LABELS: ClassVar[KeywordField] = KeywordField("googleLabels", "googleLabels") + """ + TBC + """ + GOOGLE_TAGS: ClassVar[KeywordField] = KeywordField("googleTags", "googleTags") + """ + TBC + """ + + INPUT_TO_PROCESSES: ClassVar[RelationField] = RelationField("inputToProcesses") + """ + TBC + """ + OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( + "outputFromAirflowTasks" + ) + """ + TBC + """ + INPUT_TO_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( + "inputToAirflowTasks" + ) + """ + TBC + """ + OUTPUT_FROM_PROCESSES: ClassVar[RelationField] = RelationField( + "outputFromProcesses" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "gcs_storage_class", + "gcs_encryption_type", + "gcs_e_tag", + "gcs_requester_pays", + "gcs_access_control", + "gcs_meta_generation_id", + "google_service", + "google_project_name", + "google_project_id", + "google_project_number", + "google_location", + "google_location_type", + "google_labels", + "google_tags", + "input_to_processes", + "output_from_airflow_tasks", + "input_to_airflow_tasks", + "output_from_processes", + ] + + @property + def gcs_storage_class(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.gcs_storage_class + + @gcs_storage_class.setter + def gcs_storage_class(self, gcs_storage_class: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.gcs_storage_class = gcs_storage_class + + @property + def gcs_encryption_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.gcs_encryption_type + + @gcs_encryption_type.setter + def gcs_encryption_type(self, gcs_encryption_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.gcs_encryption_type = gcs_encryption_type + + @property + def gcs_e_tag(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.gcs_e_tag + + @gcs_e_tag.setter + def gcs_e_tag(self, gcs_e_tag: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.gcs_e_tag = gcs_e_tag + + @property + def gcs_requester_pays(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.gcs_requester_pays + + @gcs_requester_pays.setter + def gcs_requester_pays(self, gcs_requester_pays: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.gcs_requester_pays = gcs_requester_pays + + @property + def gcs_access_control(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.gcs_access_control + + @gcs_access_control.setter + def gcs_access_control(self, gcs_access_control: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.gcs_access_control = gcs_access_control + + @property + def gcs_meta_generation_id(self) -> Optional[int]: + return ( + None if self.attributes is None else self.attributes.gcs_meta_generation_id + ) + + @gcs_meta_generation_id.setter + def gcs_meta_generation_id(self, gcs_meta_generation_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.gcs_meta_generation_id = gcs_meta_generation_id + + @property + def google_service(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_service + + @google_service.setter + def google_service(self, google_service: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_service = google_service + + @property + def google_project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_project_name + + @google_project_name.setter + def google_project_name(self, google_project_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_project_name = google_project_name + + @property + def google_project_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_project_id + + @google_project_id.setter + def google_project_id(self, google_project_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_project_id = google_project_id + + @property + def google_project_number(self) -> Optional[int]: + return ( + None if self.attributes is None else self.attributes.google_project_number + ) + + @google_project_number.setter + def google_project_number(self, google_project_number: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_project_number = google_project_number + + @property + def google_location(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_location + + @google_location.setter + def google_location(self, google_location: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_location = google_location + + @property + def google_location_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_location_type + + @google_location_type.setter + def google_location_type(self, google_location_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_location_type = google_location_type + + @property + def google_labels(self) -> Optional[list[GoogleLabel]]: + return None if self.attributes is None else self.attributes.google_labels + + @google_labels.setter + def google_labels(self, google_labels: Optional[list[GoogleLabel]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_labels = google_labels + + @property + def google_tags(self) -> Optional[list[GoogleTag]]: + return None if self.attributes is None else self.attributes.google_tags + + @google_tags.setter + def google_tags(self, google_tags: Optional[list[GoogleTag]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_tags = google_tags + + @property + def input_to_processes(self) -> Optional[list[Process]]: + return None if self.attributes is None else self.attributes.input_to_processes + + @input_to_processes.setter + def input_to_processes(self, input_to_processes: Optional[list[Process]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.input_to_processes = input_to_processes + + @property + def output_from_airflow_tasks(self) -> Optional[list[AirflowTask]]: + return ( + None + if self.attributes is None + else self.attributes.output_from_airflow_tasks + ) + + @output_from_airflow_tasks.setter + def output_from_airflow_tasks( + self, output_from_airflow_tasks: Optional[list[AirflowTask]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.output_from_airflow_tasks = output_from_airflow_tasks + + @property + def input_to_airflow_tasks(self) -> Optional[list[AirflowTask]]: + return ( + None if self.attributes is None else self.attributes.input_to_airflow_tasks + ) + + @input_to_airflow_tasks.setter + def input_to_airflow_tasks( + self, input_to_airflow_tasks: Optional[list[AirflowTask]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.input_to_airflow_tasks = input_to_airflow_tasks + + @property + def output_from_processes(self) -> Optional[list[Process]]: + return ( + None if self.attributes is None else self.attributes.output_from_processes + ) + + @output_from_processes.setter + def output_from_processes(self, output_from_processes: Optional[list[Process]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.output_from_processes = output_from_processes + + class Attributes(Google.Attributes): + gcs_storage_class: Optional[str] = Field( + None, description="", alias="gcsStorageClass" + ) + gcs_encryption_type: Optional[str] = Field( + None, description="", alias="gcsEncryptionType" + ) + gcs_e_tag: Optional[str] = Field(None, description="", alias="gcsETag") + gcs_requester_pays: Optional[bool] = Field( + None, description="", alias="gcsRequesterPays" + ) + gcs_access_control: Optional[str] = Field( + None, description="", alias="gcsAccessControl" + ) + gcs_meta_generation_id: Optional[int] = Field( + None, description="", alias="gcsMetaGenerationId" + ) + google_service: Optional[str] = Field( + None, description="", alias="googleService" + ) + google_project_name: Optional[str] = Field( + None, description="", alias="googleProjectName" + ) + google_project_id: Optional[str] = Field( + None, description="", alias="googleProjectId" + ) + google_project_number: Optional[int] = Field( + None, description="", alias="googleProjectNumber" + ) + google_location: Optional[str] = Field( + None, description="", alias="googleLocation" + ) + google_location_type: Optional[str] = Field( + None, description="", alias="googleLocationType" + ) + google_labels: Optional[list[GoogleLabel]] = Field( + None, description="", alias="googleLabels" + ) + google_tags: Optional[list[GoogleTag]] = Field( + None, description="", alias="googleTags" + ) + input_to_processes: Optional[list[Process]] = Field( + None, description="", alias="inputToProcesses" + ) # relationship + output_from_airflow_tasks: Optional[list[AirflowTask]] = Field( + None, description="", alias="outputFromAirflowTasks" + ) # relationship + input_to_airflow_tasks: Optional[list[AirflowTask]] = Field( + None, description="", alias="inputToAirflowTasks" + ) # relationship + output_from_processes: Optional[list[Process]] = Field( + None, description="", alias="outputFromProcesses" + ) # relationship + + attributes: "GCS.Attributes" = Field( + default_factory=lambda: GCS.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +GCS.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset35.py b/pyatlan/model/assets/asset35.py deleted file mode 100644 index 33c39576b..000000000 --- a/pyatlan/model/assets/asset35.py +++ /dev/null @@ -1,114 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2022 Atlan Pte. Ltd. - - -from __future__ import annotations - -from typing import ClassVar, Optional - -from pydantic import Field, validator - -from .asset17 import BI - - -class Preset(BI): - """Description""" - - type_name: str = Field("Preset", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "Preset": - raise ValueError("must be Preset") - return v - - def __setattr__(self, name, value): - if name in Preset._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "preset_workspace_id", - "preset_workspace_qualified_name", - "preset_dashboard_id", - "preset_dashboard_qualified_name", - ] - - @property - def preset_workspace_id(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.preset_workspace_id - - @preset_workspace_id.setter - def preset_workspace_id(self, preset_workspace_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.preset_workspace_id = preset_workspace_id - - @property - def preset_workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.preset_workspace_qualified_name - ) - - @preset_workspace_qualified_name.setter - def preset_workspace_qualified_name( - self, preset_workspace_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.preset_workspace_qualified_name = ( - preset_workspace_qualified_name - ) - - @property - def preset_dashboard_id(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.preset_dashboard_id - - @preset_dashboard_id.setter - def preset_dashboard_id(self, preset_dashboard_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.preset_dashboard_id = preset_dashboard_id - - @property - def preset_dashboard_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.preset_dashboard_qualified_name - ) - - @preset_dashboard_qualified_name.setter - def preset_dashboard_qualified_name( - self, preset_dashboard_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.preset_dashboard_qualified_name = ( - preset_dashboard_qualified_name - ) - - class Attributes(BI.Attributes): - preset_workspace_id: Optional[int] = Field( - None, description="", alias="presetWorkspaceId" - ) - preset_workspace_qualified_name: Optional[str] = Field( - None, description="", alias="presetWorkspaceQualifiedName" - ) - preset_dashboard_id: Optional[int] = Field( - None, description="", alias="presetDashboardId" - ) - preset_dashboard_qualified_name: Optional[str] = Field( - None, description="", alias="presetDashboardQualifiedName" - ) - - attributes: "Preset.Attributes" = Field( - default_factory=lambda: Preset.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -Preset.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset36.py b/pyatlan/model/assets/asset36.py index c362289f6..abf3b8803 100644 --- a/pyatlan/model/assets/asset36.py +++ b/pyatlan/model/assets/asset36.py @@ -8,173 +8,138 @@ from pydantic import Field, validator -from .asset17 import BI +from pyatlan.model.fields.atlan_fields import KeywordTextField, NumericField +from .asset18 import BI -class Mode(BI): + +class Preset(BI): """Description""" - type_name: str = Field("Mode", allow_mutation=False) + type_name: str = Field("Preset", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Mode": - raise ValueError("must be Mode") + if v != "Preset": + raise ValueError("must be Preset") return v def __setattr__(self, name, value): - if name in Mode._convience_properties: + if name in Preset._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "mode_id", - "mode_token", - "mode_workspace_name", - "mode_workspace_username", - "mode_workspace_qualified_name", - "mode_report_name", - "mode_report_qualified_name", - "mode_query_name", - "mode_query_qualified_name", + PRESET_WORKSPACE_ID: ClassVar[NumericField] = NumericField( + "presetWorkspaceId", "presetWorkspaceId" + ) + """ + TBC + """ + PRESET_WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "presetWorkspaceQualifiedName", + "presetWorkspaceQualifiedName", + "presetWorkspaceQualifiedName.text", + ) + """ + TBC + """ + PRESET_DASHBOARD_ID: ClassVar[NumericField] = NumericField( + "presetDashboardId", "presetDashboardId" + ) + """ + TBC + """ + PRESET_DASHBOARD_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "presetDashboardQualifiedName", + "presetDashboardQualifiedName", + "presetDashboardQualifiedName.text", + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "preset_workspace_id", + "preset_workspace_qualified_name", + "preset_dashboard_id", + "preset_dashboard_qualified_name", ] @property - def mode_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.mode_id - - @mode_id.setter - def mode_id(self, mode_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.mode_id = mode_id - - @property - def mode_token(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.mode_token - - @mode_token.setter - def mode_token(self, mode_token: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.mode_token = mode_token - - @property - def mode_workspace_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.mode_workspace_name - - @mode_workspace_name.setter - def mode_workspace_name(self, mode_workspace_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.mode_workspace_name = mode_workspace_name - - @property - def mode_workspace_username(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.mode_workspace_username - ) + def preset_workspace_id(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.preset_workspace_id - @mode_workspace_username.setter - def mode_workspace_username(self, mode_workspace_username: Optional[str]): + @preset_workspace_id.setter + def preset_workspace_id(self, preset_workspace_id: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_workspace_username = mode_workspace_username + self.attributes.preset_workspace_id = preset_workspace_id @property - def mode_workspace_qualified_name(self) -> Optional[str]: + def preset_workspace_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.mode_workspace_qualified_name + else self.attributes.preset_workspace_qualified_name ) - @mode_workspace_qualified_name.setter - def mode_workspace_qualified_name( - self, mode_workspace_qualified_name: Optional[str] + @preset_workspace_qualified_name.setter + def preset_workspace_qualified_name( + self, preset_workspace_qualified_name: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_workspace_qualified_name = mode_workspace_qualified_name - - @property - def mode_report_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.mode_report_name - - @mode_report_name.setter - def mode_report_name(self, mode_report_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.mode_report_name = mode_report_name - - @property - def mode_report_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.mode_report_qualified_name + self.attributes.preset_workspace_qualified_name = ( + preset_workspace_qualified_name ) - @mode_report_qualified_name.setter - def mode_report_qualified_name(self, mode_report_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.mode_report_qualified_name = mode_report_qualified_name - @property - def mode_query_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.mode_query_name + def preset_dashboard_id(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.preset_dashboard_id - @mode_query_name.setter - def mode_query_name(self, mode_query_name: Optional[str]): + @preset_dashboard_id.setter + def preset_dashboard_id(self, preset_dashboard_id: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_query_name = mode_query_name + self.attributes.preset_dashboard_id = preset_dashboard_id @property - def mode_query_qualified_name(self) -> Optional[str]: + def preset_dashboard_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.mode_query_qualified_name + else self.attributes.preset_dashboard_qualified_name ) - @mode_query_qualified_name.setter - def mode_query_qualified_name(self, mode_query_qualified_name: Optional[str]): + @preset_dashboard_qualified_name.setter + def preset_dashboard_qualified_name( + self, preset_dashboard_qualified_name: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_query_qualified_name = mode_query_qualified_name + self.attributes.preset_dashboard_qualified_name = ( + preset_dashboard_qualified_name + ) class Attributes(BI.Attributes): - mode_id: Optional[str] = Field(None, description="", alias="modeId") - mode_token: Optional[str] = Field(None, description="", alias="modeToken") - mode_workspace_name: Optional[str] = Field( - None, description="", alias="modeWorkspaceName" - ) - mode_workspace_username: Optional[str] = Field( - None, description="", alias="modeWorkspaceUsername" - ) - mode_workspace_qualified_name: Optional[str] = Field( - None, description="", alias="modeWorkspaceQualifiedName" - ) - mode_report_name: Optional[str] = Field( - None, description="", alias="modeReportName" + preset_workspace_id: Optional[int] = Field( + None, description="", alias="presetWorkspaceId" ) - mode_report_qualified_name: Optional[str] = Field( - None, description="", alias="modeReportQualifiedName" + preset_workspace_qualified_name: Optional[str] = Field( + None, description="", alias="presetWorkspaceQualifiedName" ) - mode_query_name: Optional[str] = Field( - None, description="", alias="modeQueryName" + preset_dashboard_id: Optional[int] = Field( + None, description="", alias="presetDashboardId" ) - mode_query_qualified_name: Optional[str] = Field( - None, description="", alias="modeQueryQualifiedName" + preset_dashboard_qualified_name: Optional[str] = Field( + None, description="", alias="presetDashboardQualifiedName" ) - attributes: "Mode.Attributes" = Field( - default_factory=lambda: Mode.Attributes(), + attributes: "Preset.Attributes" = Field( + default_factory=lambda: Preset.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Mode.Attributes.update_forward_refs() +Preset.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset37.py b/pyatlan/model/assets/asset37.py index 1ac5a3dca..e821b5d8a 100644 --- a/pyatlan/model/assets/asset37.py +++ b/pyatlan/model/assets/asset37.py @@ -8,139 +8,234 @@ from pydantic import Field, validator -from .asset17 import BI +from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField +from .asset18 import BI -class Sigma(BI): + +class Mode(BI): """Description""" - type_name: str = Field("Sigma", allow_mutation=False) + type_name: str = Field("Mode", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Sigma": - raise ValueError("must be Sigma") + if v != "Mode": + raise ValueError("must be Mode") return v def __setattr__(self, name, value): - if name in Sigma._convience_properties: + if name in Mode._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "sigma_workbook_qualified_name", - "sigma_workbook_name", - "sigma_page_qualified_name", - "sigma_page_name", - "sigma_data_element_qualified_name", - "sigma_data_element_name", + MODE_ID: ClassVar[KeywordField] = KeywordField("modeId", "modeId") + """ + TBC + """ + MODE_TOKEN: ClassVar[KeywordTextField] = KeywordTextField( + "modeToken", "modeToken", "modeToken.text" + ) + """ + TBC + """ + MODE_WORKSPACE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "modeWorkspaceName", "modeWorkspaceName.keyword", "modeWorkspaceName" + ) + """ + TBC + """ + MODE_WORKSPACE_USERNAME: ClassVar[KeywordTextField] = KeywordTextField( + "modeWorkspaceUsername", "modeWorkspaceUsername", "modeWorkspaceUsername.text" + ) + """ + TBC + """ + MODE_WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "modeWorkspaceQualifiedName", + "modeWorkspaceQualifiedName", + "modeWorkspaceQualifiedName.text", + ) + """ + TBC + """ + MODE_REPORT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "modeReportName", "modeReportName.keyword", "modeReportName" + ) + """ + TBC + """ + MODE_REPORT_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "modeReportQualifiedName", + "modeReportQualifiedName", + "modeReportQualifiedName.text", + ) + """ + TBC + """ + MODE_QUERY_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "modeQueryName", "modeQueryName.keyword", "modeQueryName" + ) + """ + TBC + """ + MODE_QUERY_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "modeQueryQualifiedName", + "modeQueryQualifiedName", + "modeQueryQualifiedName.text", + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "mode_id", + "mode_token", + "mode_workspace_name", + "mode_workspace_username", + "mode_workspace_qualified_name", + "mode_report_name", + "mode_report_qualified_name", + "mode_query_name", + "mode_query_qualified_name", ] @property - def sigma_workbook_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.sigma_workbook_qualified_name - ) + def mode_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.mode_id - @sigma_workbook_qualified_name.setter - def sigma_workbook_qualified_name( - self, sigma_workbook_qualified_name: Optional[str] - ): + @mode_id.setter + def mode_id(self, mode_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_id = mode_id + + @property + def mode_token(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.mode_token + + @mode_token.setter + def mode_token(self, mode_token: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_workbook_qualified_name = sigma_workbook_qualified_name + self.attributes.mode_token = mode_token @property - def sigma_workbook_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.sigma_workbook_name + def mode_workspace_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.mode_workspace_name - @sigma_workbook_name.setter - def sigma_workbook_name(self, sigma_workbook_name: Optional[str]): + @mode_workspace_name.setter + def mode_workspace_name(self, mode_workspace_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_workbook_name = sigma_workbook_name + self.attributes.mode_workspace_name = mode_workspace_name @property - def sigma_page_qualified_name(self) -> Optional[str]: + def mode_workspace_username(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.mode_workspace_username + ) + + @mode_workspace_username.setter + def mode_workspace_username(self, mode_workspace_username: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_workspace_username = mode_workspace_username + + @property + def mode_workspace_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.sigma_page_qualified_name + else self.attributes.mode_workspace_qualified_name ) - @sigma_page_qualified_name.setter - def sigma_page_qualified_name(self, sigma_page_qualified_name: Optional[str]): + @mode_workspace_qualified_name.setter + def mode_workspace_qualified_name( + self, mode_workspace_qualified_name: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_page_qualified_name = sigma_page_qualified_name + self.attributes.mode_workspace_qualified_name = mode_workspace_qualified_name @property - def sigma_page_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.sigma_page_name + def mode_report_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.mode_report_name - @sigma_page_name.setter - def sigma_page_name(self, sigma_page_name: Optional[str]): + @mode_report_name.setter + def mode_report_name(self, mode_report_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_page_name = sigma_page_name + self.attributes.mode_report_name = mode_report_name @property - def sigma_data_element_qualified_name(self) -> Optional[str]: + def mode_report_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.sigma_data_element_qualified_name + else self.attributes.mode_report_qualified_name ) - @sigma_data_element_qualified_name.setter - def sigma_data_element_qualified_name( - self, sigma_data_element_qualified_name: Optional[str] - ): + @mode_report_qualified_name.setter + def mode_report_qualified_name(self, mode_report_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_data_element_qualified_name = ( - sigma_data_element_qualified_name - ) + self.attributes.mode_report_qualified_name = mode_report_qualified_name @property - def sigma_data_element_name(self) -> Optional[str]: + def mode_query_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.mode_query_name + + @mode_query_name.setter + def mode_query_name(self, mode_query_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_query_name = mode_query_name + + @property + def mode_query_qualified_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.sigma_data_element_name + None + if self.attributes is None + else self.attributes.mode_query_qualified_name ) - @sigma_data_element_name.setter - def sigma_data_element_name(self, sigma_data_element_name: Optional[str]): + @mode_query_qualified_name.setter + def mode_query_qualified_name(self, mode_query_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_data_element_name = sigma_data_element_name + self.attributes.mode_query_qualified_name = mode_query_qualified_name class Attributes(BI.Attributes): - sigma_workbook_qualified_name: Optional[str] = Field( - None, description="", alias="sigmaWorkbookQualifiedName" + mode_id: Optional[str] = Field(None, description="", alias="modeId") + mode_token: Optional[str] = Field(None, description="", alias="modeToken") + mode_workspace_name: Optional[str] = Field( + None, description="", alias="modeWorkspaceName" + ) + mode_workspace_username: Optional[str] = Field( + None, description="", alias="modeWorkspaceUsername" ) - sigma_workbook_name: Optional[str] = Field( - None, description="", alias="sigmaWorkbookName" + mode_workspace_qualified_name: Optional[str] = Field( + None, description="", alias="modeWorkspaceQualifiedName" ) - sigma_page_qualified_name: Optional[str] = Field( - None, description="", alias="sigmaPageQualifiedName" + mode_report_name: Optional[str] = Field( + None, description="", alias="modeReportName" ) - sigma_page_name: Optional[str] = Field( - None, description="", alias="sigmaPageName" + mode_report_qualified_name: Optional[str] = Field( + None, description="", alias="modeReportQualifiedName" ) - sigma_data_element_qualified_name: Optional[str] = Field( - None, description="", alias="sigmaDataElementQualifiedName" + mode_query_name: Optional[str] = Field( + None, description="", alias="modeQueryName" ) - sigma_data_element_name: Optional[str] = Field( - None, description="", alias="sigmaDataElementName" + mode_query_qualified_name: Optional[str] = Field( + None, description="", alias="modeQueryQualifiedName" ) - attributes: "Sigma.Attributes" = Field( - default_factory=lambda: Sigma.Attributes(), + attributes: "Mode.Attributes" = Field( + default_factory=lambda: Mode.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Sigma.Attributes.update_forward_refs() +Mode.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset38.py b/pyatlan/model/assets/asset38.py index 5a3a8ec57..33a26abbe 100644 --- a/pyatlan/model/assets/asset38.py +++ b/pyatlan/model/assets/asset38.py @@ -4,30 +4,188 @@ from __future__ import annotations -from typing import ClassVar +from typing import ClassVar, Optional from pydantic import Field, validator -from .asset17 import BI +from pyatlan.model.fields.atlan_fields import KeywordTextField +from .asset18 import BI -class Tableau(BI): + +class Sigma(BI): """Description""" - type_name: str = Field("Tableau", allow_mutation=False) + type_name: str = Field("Sigma", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Tableau": - raise ValueError("must be Tableau") + if v != "Sigma": + raise ValueError("must be Sigma") return v def __setattr__(self, name, value): - if name in Tableau._convience_properties: + if name in Sigma._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + SIGMA_WORKBOOK_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "sigmaWorkbookQualifiedName", + "sigmaWorkbookQualifiedName", + "sigmaWorkbookQualifiedName.text", + ) + """ + TBC + """ + SIGMA_WORKBOOK_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "sigmaWorkbookName", "sigmaWorkbookName.keyword", "sigmaWorkbookName" + ) + """ + TBC + """ + SIGMA_PAGE_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "sigmaPageQualifiedName", + "sigmaPageQualifiedName", + "sigmaPageQualifiedName.text", + ) + """ + TBC + """ + SIGMA_PAGE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "sigmaPageName", "sigmaPageName.keyword", "sigmaPageName" + ) + """ + TBC + """ + SIGMA_DATA_ELEMENT_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "sigmaDataElementQualifiedName", + "sigmaDataElementQualifiedName", + "sigmaDataElementQualifiedName.text", + ) + """ + TBC + """ + SIGMA_DATA_ELEMENT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "sigmaDataElementName", "sigmaDataElementName.keyword", "sigmaDataElementName" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "sigma_workbook_qualified_name", + "sigma_workbook_name", + "sigma_page_qualified_name", + "sigma_page_name", + "sigma_data_element_qualified_name", + "sigma_data_element_name", + ] + + @property + def sigma_workbook_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.sigma_workbook_qualified_name + ) + + @sigma_workbook_qualified_name.setter + def sigma_workbook_qualified_name( + self, sigma_workbook_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sigma_workbook_qualified_name = sigma_workbook_qualified_name + + @property + def sigma_workbook_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.sigma_workbook_name + + @sigma_workbook_name.setter + def sigma_workbook_name(self, sigma_workbook_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sigma_workbook_name = sigma_workbook_name + + @property + def sigma_page_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.sigma_page_qualified_name + ) + + @sigma_page_qualified_name.setter + def sigma_page_qualified_name(self, sigma_page_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sigma_page_qualified_name = sigma_page_qualified_name + + @property + def sigma_page_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.sigma_page_name + + @sigma_page_name.setter + def sigma_page_name(self, sigma_page_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sigma_page_name = sigma_page_name + + @property + def sigma_data_element_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.sigma_data_element_qualified_name + ) + + @sigma_data_element_qualified_name.setter + def sigma_data_element_qualified_name( + self, sigma_data_element_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sigma_data_element_qualified_name = ( + sigma_data_element_qualified_name + ) + + @property + def sigma_data_element_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.sigma_data_element_name + ) + + @sigma_data_element_name.setter + def sigma_data_element_name(self, sigma_data_element_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sigma_data_element_name = sigma_data_element_name + + class Attributes(BI.Attributes): + sigma_workbook_qualified_name: Optional[str] = Field( + None, description="", alias="sigmaWorkbookQualifiedName" + ) + sigma_workbook_name: Optional[str] = Field( + None, description="", alias="sigmaWorkbookName" + ) + sigma_page_qualified_name: Optional[str] = Field( + None, description="", alias="sigmaPageQualifiedName" + ) + sigma_page_name: Optional[str] = Field( + None, description="", alias="sigmaPageName" + ) + sigma_data_element_qualified_name: Optional[str] = Field( + None, description="", alias="sigmaDataElementQualifiedName" + ) + sigma_data_element_name: Optional[str] = Field( + None, description="", alias="sigmaDataElementName" + ) + + attributes: "Sigma.Attributes" = Field( + default_factory=lambda: Sigma.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) -Tableau.Attributes.update_forward_refs() +Sigma.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset39.py b/pyatlan/model/assets/asset39.py index 653a9aeb6..d422a8584 100644 --- a/pyatlan/model/assets/asset39.py +++ b/pyatlan/model/assets/asset39.py @@ -8,26 +8,26 @@ from pydantic import Field, validator -from .asset17 import BI +from .asset18 import BI -class Looker(BI): +class Tableau(BI): """Description""" - type_name: str = Field("Looker", allow_mutation=False) + type_name: str = Field("Tableau", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Looker": - raise ValueError("must be Looker") + if v != "Tableau": + raise ValueError("must be Tableau") return v def __setattr__(self, name, value): - if name in Looker._convience_properties: + if name in Tableau._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] -Looker.Attributes.update_forward_refs() +Tableau.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset40.py b/pyatlan/model/assets/asset40.py index 1a9dd791f..8b9f743b3 100644 --- a/pyatlan/model/assets/asset40.py +++ b/pyatlan/model/assets/asset40.py @@ -4,53 +4,30 @@ from __future__ import annotations -from typing import ClassVar, Optional +from typing import ClassVar from pydantic import Field, validator -from .asset17 import BI +from .asset18 import BI -class Redash(BI): +class Looker(BI): """Description""" - type_name: str = Field("Redash", allow_mutation=False) + type_name: str = Field("Looker", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Redash": - raise ValueError("must be Redash") + if v != "Looker": + raise ValueError("must be Looker") return v def __setattr__(self, name, value): - if name in Redash._convience_properties: + if name in Looker._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "redash_is_published", - ] + _convenience_properties: ClassVar[list[str]] = [] - @property - def redash_is_published(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.redash_is_published - @redash_is_published.setter - def redash_is_published(self, redash_is_published: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_is_published = redash_is_published - - class Attributes(BI.Attributes): - redash_is_published: Optional[bool] = Field( - None, description="", alias="redashIsPublished" - ) - - attributes: "Redash.Attributes" = Field( - default_factory=lambda: Redash.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -Redash.Attributes.update_forward_refs() +Looker.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset41.py b/pyatlan/model/assets/asset41.py index f3759ff2d..85a1bf46c 100644 --- a/pyatlan/model/assets/asset41.py +++ b/pyatlan/model/assets/asset41.py @@ -8,220 +8,58 @@ from pydantic import Field, validator -from pyatlan.model.structs import GoogleLabel, GoogleTag +from pyatlan.model.fields.atlan_fields import BooleanField -from .asset00 import AirflowTask, Process -from .asset26 import Google +from .asset18 import BI -class DataStudio(Google): +class Redash(BI): """Description""" - type_name: str = Field("DataStudio", allow_mutation=False) + type_name: str = Field("Redash", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "DataStudio": - raise ValueError("must be DataStudio") + if v != "Redash": + raise ValueError("must be Redash") return v def __setattr__(self, name, value): - if name in DataStudio._convience_properties: + if name in Redash._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "google_service", - "google_project_name", - "google_project_id", - "google_project_number", - "google_location", - "google_location_type", - "google_labels", - "google_tags", - "input_to_processes", - "output_from_airflow_tasks", - "input_to_airflow_tasks", - "output_from_processes", - ] - - @property - def google_service(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_service - - @google_service.setter - def google_service(self, google_service: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_service = google_service - - @property - def google_project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_project_name - - @google_project_name.setter - def google_project_name(self, google_project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_project_name = google_project_name - - @property - def google_project_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_project_id - - @google_project_id.setter - def google_project_id(self, google_project_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_project_id = google_project_id - - @property - def google_project_number(self) -> Optional[int]: - return ( - None if self.attributes is None else self.attributes.google_project_number - ) - - @google_project_number.setter - def google_project_number(self, google_project_number: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_project_number = google_project_number - - @property - def google_location(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_location - - @google_location.setter - def google_location(self, google_location: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_location = google_location - - @property - def google_location_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_location_type - - @google_location_type.setter - def google_location_type(self, google_location_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_location_type = google_location_type - - @property - def google_labels(self) -> Optional[list[GoogleLabel]]: - return None if self.attributes is None else self.attributes.google_labels - - @google_labels.setter - def google_labels(self, google_labels: Optional[list[GoogleLabel]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_labels = google_labels - - @property - def google_tags(self) -> Optional[list[GoogleTag]]: - return None if self.attributes is None else self.attributes.google_tags - - @google_tags.setter - def google_tags(self, google_tags: Optional[list[GoogleTag]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.google_tags = google_tags - - @property - def input_to_processes(self) -> Optional[list[Process]]: - return None if self.attributes is None else self.attributes.input_to_processes - - @input_to_processes.setter - def input_to_processes(self, input_to_processes: Optional[list[Process]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.input_to_processes = input_to_processes - - @property - def output_from_airflow_tasks(self) -> Optional[list[AirflowTask]]: - return ( - None - if self.attributes is None - else self.attributes.output_from_airflow_tasks - ) + REDASH_IS_PUBLISHED: ClassVar[BooleanField] = BooleanField( + "redashIsPublished", "redashIsPublished" + ) + """ + Status whether the asset is published or not on source + """ - @output_from_airflow_tasks.setter - def output_from_airflow_tasks( - self, output_from_airflow_tasks: Optional[list[AirflowTask]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.output_from_airflow_tasks = output_from_airflow_tasks + _convenience_properties: ClassVar[list[str]] = [ + "redash_is_published", + ] @property - def input_to_airflow_tasks(self) -> Optional[list[AirflowTask]]: - return ( - None if self.attributes is None else self.attributes.input_to_airflow_tasks - ) + def redash_is_published(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.redash_is_published - @input_to_airflow_tasks.setter - def input_to_airflow_tasks( - self, input_to_airflow_tasks: Optional[list[AirflowTask]] - ): + @redash_is_published.setter + def redash_is_published(self, redash_is_published: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.input_to_airflow_tasks = input_to_airflow_tasks + self.attributes.redash_is_published = redash_is_published - @property - def output_from_processes(self) -> Optional[list[Process]]: - return ( - None if self.attributes is None else self.attributes.output_from_processes + class Attributes(BI.Attributes): + redash_is_published: Optional[bool] = Field( + None, description="", alias="redashIsPublished" ) - @output_from_processes.setter - def output_from_processes(self, output_from_processes: Optional[list[Process]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.output_from_processes = output_from_processes - - class Attributes(Google.Attributes): - google_service: Optional[str] = Field( - None, description="", alias="googleService" - ) - google_project_name: Optional[str] = Field( - None, description="", alias="googleProjectName" - ) - google_project_id: Optional[str] = Field( - None, description="", alias="googleProjectId" - ) - google_project_number: Optional[int] = Field( - None, description="", alias="googleProjectNumber" - ) - google_location: Optional[str] = Field( - None, description="", alias="googleLocation" - ) - google_location_type: Optional[str] = Field( - None, description="", alias="googleLocationType" - ) - google_labels: Optional[list[GoogleLabel]] = Field( - None, description="", alias="googleLabels" - ) - google_tags: Optional[list[GoogleTag]] = Field( - None, description="", alias="googleTags" - ) - input_to_processes: Optional[list[Process]] = Field( - None, description="", alias="inputToProcesses" - ) # relationship - output_from_airflow_tasks: Optional[list[AirflowTask]] = Field( - None, description="", alias="outputFromAirflowTasks" - ) # relationship - input_to_airflow_tasks: Optional[list[AirflowTask]] = Field( - None, description="", alias="inputToAirflowTasks" - ) # relationship - output_from_processes: Optional[list[Process]] = Field( - None, description="", alias="outputFromProcesses" - ) # relationship - - attributes: "DataStudio.Attributes" = Field( - default_factory=lambda: DataStudio.Attributes(), + attributes: "Redash.Attributes" = Field( + default_factory=lambda: Redash.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -DataStudio.Attributes.update_forward_refs() +Redash.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset42.py b/pyatlan/model/assets/asset42.py index d1a5117d9..20c1cd456 100644 --- a/pyatlan/model/assets/asset42.py +++ b/pyatlan/model/assets/asset42.py @@ -8,75 +8,294 @@ from pydantic import Field, validator -from .asset17 import BI +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, + RelationField, +) +from pyatlan.model.structs import GoogleLabel, GoogleTag +from .asset00 import AirflowTask, Process +from .asset27 import Google -class Metabase(BI): + +class DataStudio(Google): """Description""" - type_name: str = Field("Metabase", allow_mutation=False) + type_name: str = Field("DataStudio", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Metabase": - raise ValueError("must be Metabase") + if v != "DataStudio": + raise ValueError("must be DataStudio") return v def __setattr__(self, name, value): - if name in Metabase._convience_properties: + if name in DataStudio._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "metabase_collection_name", - "metabase_collection_qualified_name", + GOOGLE_SERVICE: ClassVar[KeywordField] = KeywordField( + "googleService", "googleService" + ) + """ + TBC + """ + GOOGLE_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "googleProjectName", "googleProjectName", "googleProjectName.text" + ) + """ + TBC + """ + GOOGLE_PROJECT_ID: ClassVar[KeywordTextField] = KeywordTextField( + "googleProjectId", "googleProjectId", "googleProjectId.text" + ) + """ + TBC + """ + GOOGLE_PROJECT_NUMBER: ClassVar[NumericField] = NumericField( + "googleProjectNumber", "googleProjectNumber" + ) + """ + TBC + """ + GOOGLE_LOCATION: ClassVar[KeywordField] = KeywordField( + "googleLocation", "googleLocation" + ) + """ + TBC + """ + GOOGLE_LOCATION_TYPE: ClassVar[KeywordField] = KeywordField( + "googleLocationType", "googleLocationType" + ) + """ + TBC + """ + GOOGLE_LABELS: ClassVar[KeywordField] = KeywordField("googleLabels", "googleLabels") + """ + TBC + """ + GOOGLE_TAGS: ClassVar[KeywordField] = KeywordField("googleTags", "googleTags") + """ + TBC + """ + + INPUT_TO_PROCESSES: ClassVar[RelationField] = RelationField("inputToProcesses") + """ + TBC + """ + OUTPUT_FROM_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( + "outputFromAirflowTasks" + ) + """ + TBC + """ + INPUT_TO_AIRFLOW_TASKS: ClassVar[RelationField] = RelationField( + "inputToAirflowTasks" + ) + """ + TBC + """ + OUTPUT_FROM_PROCESSES: ClassVar[RelationField] = RelationField( + "outputFromProcesses" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "google_service", + "google_project_name", + "google_project_id", + "google_project_number", + "google_location", + "google_location_type", + "google_labels", + "google_tags", + "input_to_processes", + "output_from_airflow_tasks", + "input_to_airflow_tasks", + "output_from_processes", ] @property - def metabase_collection_name(self) -> Optional[str]: + def google_service(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_service + + @google_service.setter + def google_service(self, google_service: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_service = google_service + + @property + def google_project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_project_name + + @google_project_name.setter + def google_project_name(self, google_project_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_project_name = google_project_name + + @property + def google_project_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_project_id + + @google_project_id.setter + def google_project_id(self, google_project_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_project_id = google_project_id + + @property + def google_project_number(self) -> Optional[int]: return ( - None - if self.attributes is None - else self.attributes.metabase_collection_name + None if self.attributes is None else self.attributes.google_project_number ) - @metabase_collection_name.setter - def metabase_collection_name(self, metabase_collection_name: Optional[str]): + @google_project_number.setter + def google_project_number(self, google_project_number: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_project_number = google_project_number + + @property + def google_location(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_location + + @google_location.setter + def google_location(self, google_location: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_location = google_location + + @property + def google_location_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_location_type + + @google_location_type.setter + def google_location_type(self, google_location_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_location_type = google_location_type + + @property + def google_labels(self) -> Optional[list[GoogleLabel]]: + return None if self.attributes is None else self.attributes.google_labels + + @google_labels.setter + def google_labels(self, google_labels: Optional[list[GoogleLabel]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_collection_name = metabase_collection_name + self.attributes.google_labels = google_labels @property - def metabase_collection_qualified_name(self) -> Optional[str]: + def google_tags(self) -> Optional[list[GoogleTag]]: + return None if self.attributes is None else self.attributes.google_tags + + @google_tags.setter + def google_tags(self, google_tags: Optional[list[GoogleTag]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.google_tags = google_tags + + @property + def input_to_processes(self) -> Optional[list[Process]]: + return None if self.attributes is None else self.attributes.input_to_processes + + @input_to_processes.setter + def input_to_processes(self, input_to_processes: Optional[list[Process]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.input_to_processes = input_to_processes + + @property + def output_from_airflow_tasks(self) -> Optional[list[AirflowTask]]: return ( None if self.attributes is None - else self.attributes.metabase_collection_qualified_name + else self.attributes.output_from_airflow_tasks ) - @metabase_collection_qualified_name.setter - def metabase_collection_qualified_name( - self, metabase_collection_qualified_name: Optional[str] + @output_from_airflow_tasks.setter + def output_from_airflow_tasks( + self, output_from_airflow_tasks: Optional[list[AirflowTask]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_collection_qualified_name = ( - metabase_collection_qualified_name + self.attributes.output_from_airflow_tasks = output_from_airflow_tasks + + @property + def input_to_airflow_tasks(self) -> Optional[list[AirflowTask]]: + return ( + None if self.attributes is None else self.attributes.input_to_airflow_tasks + ) + + @input_to_airflow_tasks.setter + def input_to_airflow_tasks( + self, input_to_airflow_tasks: Optional[list[AirflowTask]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.input_to_airflow_tasks = input_to_airflow_tasks + + @property + def output_from_processes(self) -> Optional[list[Process]]: + return ( + None if self.attributes is None else self.attributes.output_from_processes ) - class Attributes(BI.Attributes): - metabase_collection_name: Optional[str] = Field( - None, description="", alias="metabaseCollectionName" + @output_from_processes.setter + def output_from_processes(self, output_from_processes: Optional[list[Process]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.output_from_processes = output_from_processes + + class Attributes(Google.Attributes): + google_service: Optional[str] = Field( + None, description="", alias="googleService" + ) + google_project_name: Optional[str] = Field( + None, description="", alias="googleProjectName" + ) + google_project_id: Optional[str] = Field( + None, description="", alias="googleProjectId" + ) + google_project_number: Optional[int] = Field( + None, description="", alias="googleProjectNumber" + ) + google_location: Optional[str] = Field( + None, description="", alias="googleLocation" + ) + google_location_type: Optional[str] = Field( + None, description="", alias="googleLocationType" + ) + google_labels: Optional[list[GoogleLabel]] = Field( + None, description="", alias="googleLabels" ) - metabase_collection_qualified_name: Optional[str] = Field( - None, description="", alias="metabaseCollectionQualifiedName" + google_tags: Optional[list[GoogleTag]] = Field( + None, description="", alias="googleTags" ) + input_to_processes: Optional[list[Process]] = Field( + None, description="", alias="inputToProcesses" + ) # relationship + output_from_airflow_tasks: Optional[list[AirflowTask]] = Field( + None, description="", alias="outputFromAirflowTasks" + ) # relationship + input_to_airflow_tasks: Optional[list[AirflowTask]] = Field( + None, description="", alias="inputToAirflowTasks" + ) # relationship + output_from_processes: Optional[list[Process]] = Field( + None, description="", alias="outputFromProcesses" + ) # relationship - attributes: "Metabase.Attributes" = Field( - default_factory=lambda: Metabase.Attributes(), + attributes: "DataStudio.Attributes" = Field( + default_factory=lambda: DataStudio.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Metabase.Attributes.update_forward_refs() +DataStudio.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset43.py b/pyatlan/model/assets/asset43.py index f2106bc7b..37b3beaad 100644 --- a/pyatlan/model/assets/asset43.py +++ b/pyatlan/model/assets/asset43.py @@ -8,79 +8,94 @@ from pydantic import Field, validator -from .asset17 import BI +from pyatlan.model.fields.atlan_fields import KeywordTextField +from .asset18 import BI -class QuickSight(BI): + +class Metabase(BI): """Description""" - type_name: str = Field("QuickSight", allow_mutation=False) + type_name: str = Field("Metabase", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QuickSight": - raise ValueError("must be QuickSight") + if v != "Metabase": + raise ValueError("must be Metabase") return v def __setattr__(self, name, value): - if name in QuickSight._convience_properties: + if name in Metabase._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "quick_sight_id", - "quick_sight_sheet_id", - "quick_sight_sheet_name", - ] - - @property - def quick_sight_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.quick_sight_id + METABASE_COLLECTION_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "metabaseCollectionName", + "metabaseCollectionName.keyword", + "metabaseCollectionName", + ) + """ + TBC + """ + METABASE_COLLECTION_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "metabaseCollectionQualifiedName", + "metabaseCollectionQualifiedName", + "metabaseCollectionQualifiedName.text", + ) + """ + TBC + """ - @quick_sight_id.setter - def quick_sight_id(self, quick_sight_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_id = quick_sight_id + _convenience_properties: ClassVar[list[str]] = [ + "metabase_collection_name", + "metabase_collection_qualified_name", + ] @property - def quick_sight_sheet_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.quick_sight_sheet_id + def metabase_collection_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.metabase_collection_name + ) - @quick_sight_sheet_id.setter - def quick_sight_sheet_id(self, quick_sight_sheet_id: Optional[str]): + @metabase_collection_name.setter + def metabase_collection_name(self, metabase_collection_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_sheet_id = quick_sight_sheet_id + self.attributes.metabase_collection_name = metabase_collection_name @property - def quick_sight_sheet_name(self) -> Optional[str]: + def metabase_collection_qualified_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.quick_sight_sheet_name + None + if self.attributes is None + else self.attributes.metabase_collection_qualified_name ) - @quick_sight_sheet_name.setter - def quick_sight_sheet_name(self, quick_sight_sheet_name: Optional[str]): + @metabase_collection_qualified_name.setter + def metabase_collection_qualified_name( + self, metabase_collection_qualified_name: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_sheet_name = quick_sight_sheet_name + self.attributes.metabase_collection_qualified_name = ( + metabase_collection_qualified_name + ) class Attributes(BI.Attributes): - quick_sight_id: Optional[str] = Field( - None, description="", alias="quickSightId" - ) - quick_sight_sheet_id: Optional[str] = Field( - None, description="", alias="quickSightSheetId" + metabase_collection_name: Optional[str] = Field( + None, description="", alias="metabaseCollectionName" ) - quick_sight_sheet_name: Optional[str] = Field( - None, description="", alias="quickSightSheetName" + metabase_collection_qualified_name: Optional[str] = Field( + None, description="", alias="metabaseCollectionQualifiedName" ) - attributes: "QuickSight.Attributes" = Field( - default_factory=lambda: QuickSight.Attributes(), + attributes: "Metabase.Attributes" = Field( + default_factory=lambda: Metabase.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -QuickSight.Attributes.update_forward_refs() +Metabase.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset44.py b/pyatlan/model/assets/asset44.py index 5ef161903..20a9a7f14 100644 --- a/pyatlan/model/assets/asset44.py +++ b/pyatlan/model/assets/asset44.py @@ -8,69 +8,100 @@ from pydantic import Field, validator -from .asset17 import BI +from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField +from .asset18 import BI -class Thoughtspot(BI): + +class QuickSight(BI): """Description""" - type_name: str = Field("Thoughtspot", allow_mutation=False) + type_name: str = Field("QuickSight", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Thoughtspot": - raise ValueError("must be Thoughtspot") + if v != "QuickSight": + raise ValueError("must be QuickSight") return v def __setattr__(self, name, value): - if name in Thoughtspot._convience_properties: + if name in QuickSight._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "thoughtspot_chart_type", - "thoughtspot_question_text", + QUICK_SIGHT_ID: ClassVar[KeywordField] = KeywordField( + "quickSightId", "quickSightId" + ) + """ + TBC + """ + QUICK_SIGHT_SHEET_ID: ClassVar[KeywordField] = KeywordField( + "quickSightSheetId", "quickSightSheetId" + ) + """ + TBC + """ + QUICK_SIGHT_SHEET_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "quickSightSheetName", "quickSightSheetName.keyword", "quickSightSheetName" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "quick_sight_id", + "quick_sight_sheet_id", + "quick_sight_sheet_name", ] @property - def thoughtspot_chart_type(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.thoughtspot_chart_type - ) + def quick_sight_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.quick_sight_id - @thoughtspot_chart_type.setter - def thoughtspot_chart_type(self, thoughtspot_chart_type: Optional[str]): + @quick_sight_id.setter + def quick_sight_id(self, quick_sight_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.thoughtspot_chart_type = thoughtspot_chart_type + self.attributes.quick_sight_id = quick_sight_id @property - def thoughtspot_question_text(self) -> Optional[str]: + def quick_sight_sheet_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.quick_sight_sheet_id + + @quick_sight_sheet_id.setter + def quick_sight_sheet_id(self, quick_sight_sheet_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_sheet_id = quick_sight_sheet_id + + @property + def quick_sight_sheet_name(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.thoughtspot_question_text + None if self.attributes is None else self.attributes.quick_sight_sheet_name ) - @thoughtspot_question_text.setter - def thoughtspot_question_text(self, thoughtspot_question_text: Optional[str]): + @quick_sight_sheet_name.setter + def quick_sight_sheet_name(self, quick_sight_sheet_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.thoughtspot_question_text = thoughtspot_question_text + self.attributes.quick_sight_sheet_name = quick_sight_sheet_name class Attributes(BI.Attributes): - thoughtspot_chart_type: Optional[str] = Field( - None, description="", alias="thoughtspotChartType" + quick_sight_id: Optional[str] = Field( + None, description="", alias="quickSightId" + ) + quick_sight_sheet_id: Optional[str] = Field( + None, description="", alias="quickSightSheetId" ) - thoughtspot_question_text: Optional[str] = Field( - None, description="", alias="thoughtspotQuestionText" + quick_sight_sheet_name: Optional[str] = Field( + None, description="", alias="quickSightSheetName" ) - attributes: "Thoughtspot.Attributes" = Field( - default_factory=lambda: Thoughtspot.Attributes(), + attributes: "QuickSight.Attributes" = Field( + default_factory=lambda: QuickSight.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Thoughtspot.Attributes.update_forward_refs() +QuickSight.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset45.py b/pyatlan/model/assets/asset45.py index b60201d30..feefa5409 100644 --- a/pyatlan/model/assets/asset45.py +++ b/pyatlan/model/assets/asset45.py @@ -8,105 +8,84 @@ from pydantic import Field, validator -from pyatlan.model.enums import PowerbiEndorsement +from pyatlan.model.fields.atlan_fields import KeywordField, TextField -from .asset17 import BI +from .asset18 import BI -class PowerBI(BI): +class Thoughtspot(BI): """Description""" - type_name: str = Field("PowerBI", allow_mutation=False) + type_name: str = Field("Thoughtspot", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "PowerBI": - raise ValueError("must be PowerBI") + if v != "Thoughtspot": + raise ValueError("must be Thoughtspot") return v def __setattr__(self, name, value): - if name in PowerBI._convience_properties: + if name in Thoughtspot._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "power_b_i_is_hidden", - "power_b_i_table_qualified_name", - "power_b_i_format_string", - "power_b_i_endorsement", - ] - - @property - def power_b_i_is_hidden(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.power_b_i_is_hidden - - @power_b_i_is_hidden.setter - def power_b_i_is_hidden(self, power_b_i_is_hidden: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_is_hidden = power_b_i_is_hidden - - @property - def power_b_i_table_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_table_qualified_name - ) + THOUGHTSPOT_CHART_TYPE: ClassVar[KeywordField] = KeywordField( + "thoughtspotChartType", "thoughtspotChartType" + ) + """ + TBC + """ + THOUGHTSPOT_QUESTION_TEXT: ClassVar[TextField] = TextField( + "thoughtspotQuestionText", "thoughtspotQuestionText" + ) + """ + TBC + """ - @power_b_i_table_qualified_name.setter - def power_b_i_table_qualified_name( - self, power_b_i_table_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_table_qualified_name = power_b_i_table_qualified_name + _convenience_properties: ClassVar[list[str]] = [ + "thoughtspot_chart_type", + "thoughtspot_question_text", + ] @property - def power_b_i_format_string(self) -> Optional[str]: + def thoughtspot_chart_type(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.power_b_i_format_string + None if self.attributes is None else self.attributes.thoughtspot_chart_type ) - @power_b_i_format_string.setter - def power_b_i_format_string(self, power_b_i_format_string: Optional[str]): + @thoughtspot_chart_type.setter + def thoughtspot_chart_type(self, thoughtspot_chart_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.power_b_i_format_string = power_b_i_format_string + self.attributes.thoughtspot_chart_type = thoughtspot_chart_type @property - def power_b_i_endorsement(self) -> Optional[PowerbiEndorsement]: + def thoughtspot_question_text(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.power_b_i_endorsement + None + if self.attributes is None + else self.attributes.thoughtspot_question_text ) - @power_b_i_endorsement.setter - def power_b_i_endorsement( - self, power_b_i_endorsement: Optional[PowerbiEndorsement] - ): + @thoughtspot_question_text.setter + def thoughtspot_question_text(self, thoughtspot_question_text: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.power_b_i_endorsement = power_b_i_endorsement + self.attributes.thoughtspot_question_text = thoughtspot_question_text class Attributes(BI.Attributes): - power_b_i_is_hidden: Optional[bool] = Field( - None, description="", alias="powerBIIsHidden" - ) - power_b_i_table_qualified_name: Optional[str] = Field( - None, description="", alias="powerBITableQualifiedName" - ) - power_b_i_format_string: Optional[str] = Field( - None, description="", alias="powerBIFormatString" + thoughtspot_chart_type: Optional[str] = Field( + None, description="", alias="thoughtspotChartType" ) - power_b_i_endorsement: Optional[PowerbiEndorsement] = Field( - None, description="", alias="powerBIEndorsement" + thoughtspot_question_text: Optional[str] = Field( + None, description="", alias="thoughtspotQuestionText" ) - attributes: "PowerBI.Attributes" = Field( - default_factory=lambda: PowerBI.Attributes(), + attributes: "Thoughtspot.Attributes" = Field( + default_factory=lambda: Thoughtspot.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -PowerBI.Attributes.update_forward_refs() +Thoughtspot.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset46.py b/pyatlan/model/assets/asset46.py index b3bb5cb9d..e9c940b78 100644 --- a/pyatlan/model/assets/asset46.py +++ b/pyatlan/model/assets/asset46.py @@ -4,236 +4,141 @@ from __future__ import annotations -from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset17 import BI +from pyatlan.model.enums import PowerbiEndorsement +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, +) +from .asset18 import BI -class MicroStrategy(BI): + +class PowerBI(BI): """Description""" - type_name: str = Field("MicroStrategy", allow_mutation=False) + type_name: str = Field("PowerBI", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategy": - raise ValueError("must be MicroStrategy") + if v != "PowerBI": + raise ValueError("must be PowerBI") return v def __setattr__(self, name, value): - if name in MicroStrategy._convience_properties: + if name in PowerBI._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_project_qualified_name", - "micro_strategy_project_name", - "micro_strategy_cube_qualified_names", - "micro_strategy_cube_names", - "micro_strategy_report_qualified_names", - "micro_strategy_report_names", - "micro_strategy_is_certified", - "micro_strategy_certified_by", - "micro_strategy_certified_at", - "micro_strategy_location", + POWER_BI_IS_HIDDEN: ClassVar[BooleanField] = BooleanField( + "powerBIIsHidden", "powerBIIsHidden" + ) + """ + TBC + """ + POWER_BI_TABLE_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "powerBITableQualifiedName", + "powerBITableQualifiedName", + "powerBITableQualifiedName.text", + ) + """ + TBC + """ + POWER_BI_FORMAT_STRING: ClassVar[KeywordField] = KeywordField( + "powerBIFormatString", "powerBIFormatString" + ) + """ + TBC + """ + POWER_BI_ENDORSEMENT: ClassVar[KeywordField] = KeywordField( + "powerBIEndorsement", "powerBIEndorsement" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "power_b_i_is_hidden", + "power_b_i_table_qualified_name", + "power_b_i_format_string", + "power_b_i_endorsement", ] @property - def micro_strategy_project_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_project_qualified_name - ) - - @micro_strategy_project_qualified_name.setter - def micro_strategy_project_qualified_name( - self, micro_strategy_project_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_project_qualified_name = ( - micro_strategy_project_qualified_name - ) - - @property - def micro_strategy_project_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_project_name - ) - - @micro_strategy_project_name.setter - def micro_strategy_project_name(self, micro_strategy_project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_project_name = micro_strategy_project_name - - @property - def micro_strategy_cube_qualified_names(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_cube_qualified_names - ) - - @micro_strategy_cube_qualified_names.setter - def micro_strategy_cube_qualified_names( - self, micro_strategy_cube_qualified_names: Optional[set[str]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_cube_qualified_names = ( - micro_strategy_cube_qualified_names - ) - - @property - def micro_strategy_cube_names(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_cube_names - ) - - @micro_strategy_cube_names.setter - def micro_strategy_cube_names(self, micro_strategy_cube_names: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_cube_names = micro_strategy_cube_names - - @property - def micro_strategy_report_qualified_names(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_report_qualified_names - ) + def power_b_i_is_hidden(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.power_b_i_is_hidden - @micro_strategy_report_qualified_names.setter - def micro_strategy_report_qualified_names( - self, micro_strategy_report_qualified_names: Optional[set[str]] - ): + @power_b_i_is_hidden.setter + def power_b_i_is_hidden(self, power_b_i_is_hidden: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_report_qualified_names = ( - micro_strategy_report_qualified_names - ) + self.attributes.power_b_i_is_hidden = power_b_i_is_hidden @property - def micro_strategy_report_names(self) -> Optional[set[str]]: + def power_b_i_table_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_report_names + else self.attributes.power_b_i_table_qualified_name ) - @micro_strategy_report_names.setter - def micro_strategy_report_names( - self, micro_strategy_report_names: Optional[set[str]] + @power_b_i_table_qualified_name.setter + def power_b_i_table_qualified_name( + self, power_b_i_table_qualified_name: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_report_names = micro_strategy_report_names + self.attributes.power_b_i_table_qualified_name = power_b_i_table_qualified_name @property - def micro_strategy_is_certified(self) -> Optional[bool]: + def power_b_i_format_string(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.micro_strategy_is_certified + None if self.attributes is None else self.attributes.power_b_i_format_string ) - @micro_strategy_is_certified.setter - def micro_strategy_is_certified(self, micro_strategy_is_certified: Optional[bool]): + @power_b_i_format_string.setter + def power_b_i_format_string(self, power_b_i_format_string: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_is_certified = micro_strategy_is_certified + self.attributes.power_b_i_format_string = power_b_i_format_string @property - def micro_strategy_certified_by(self) -> Optional[str]: + def power_b_i_endorsement(self) -> Optional[PowerbiEndorsement]: return ( - None - if self.attributes is None - else self.attributes.micro_strategy_certified_by + None if self.attributes is None else self.attributes.power_b_i_endorsement ) - @micro_strategy_certified_by.setter - def micro_strategy_certified_by(self, micro_strategy_certified_by: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_certified_by = micro_strategy_certified_by - - @property - def micro_strategy_certified_at(self) -> Optional[datetime]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_certified_at - ) - - @micro_strategy_certified_at.setter - def micro_strategy_certified_at( - self, micro_strategy_certified_at: Optional[datetime] + @power_b_i_endorsement.setter + def power_b_i_endorsement( + self, power_b_i_endorsement: Optional[PowerbiEndorsement] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_certified_at = micro_strategy_certified_at - - @property - def micro_strategy_location(self) -> Optional[list[dict[str, str]]]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_location - ) - - @micro_strategy_location.setter - def micro_strategy_location( - self, micro_strategy_location: Optional[list[dict[str, str]]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_location = micro_strategy_location + self.attributes.power_b_i_endorsement = power_b_i_endorsement class Attributes(BI.Attributes): - micro_strategy_project_qualified_name: Optional[str] = Field( - None, description="", alias="microStrategyProjectQualifiedName" - ) - micro_strategy_project_name: Optional[str] = Field( - None, description="", alias="microStrategyProjectName" - ) - micro_strategy_cube_qualified_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyCubeQualifiedNames" - ) - micro_strategy_cube_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyCubeNames" - ) - micro_strategy_report_qualified_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyReportQualifiedNames" - ) - micro_strategy_report_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyReportNames" - ) - micro_strategy_is_certified: Optional[bool] = Field( - None, description="", alias="microStrategyIsCertified" + power_b_i_is_hidden: Optional[bool] = Field( + None, description="", alias="powerBIIsHidden" ) - micro_strategy_certified_by: Optional[str] = Field( - None, description="", alias="microStrategyCertifiedBy" + power_b_i_table_qualified_name: Optional[str] = Field( + None, description="", alias="powerBITableQualifiedName" ) - micro_strategy_certified_at: Optional[datetime] = Field( - None, description="", alias="microStrategyCertifiedAt" + power_b_i_format_string: Optional[str] = Field( + None, description="", alias="powerBIFormatString" ) - micro_strategy_location: Optional[list[dict[str, str]]] = Field( - None, description="", alias="microStrategyLocation" + power_b_i_endorsement: Optional[PowerbiEndorsement] = Field( + None, description="", alias="powerBIEndorsement" ) - attributes: "MicroStrategy.Attributes" = Field( - default_factory=lambda: MicroStrategy.Attributes(), + attributes: "PowerBI.Attributes" = Field( + default_factory=lambda: PowerBI.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -MicroStrategy.Attributes.update_forward_refs() +PowerBI.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset47.py b/pyatlan/model/assets/asset47.py index f6c10fe5d..9992bd0fe 100644 --- a/pyatlan/model/assets/asset47.py +++ b/pyatlan/model/assets/asset47.py @@ -4,147 +4,320 @@ from __future__ import annotations +from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset17 import BI +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + NumericField, +) +from .asset18 import BI -class Qlik(BI): + +class MicroStrategy(BI): """Description""" - type_name: str = Field("Qlik", allow_mutation=False) + type_name: str = Field("MicroStrategy", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Qlik": - raise ValueError("must be Qlik") + if v != "MicroStrategy": + raise ValueError("must be MicroStrategy") return v def __setattr__(self, name, value): - if name in Qlik._convience_properties: + if name in MicroStrategy._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "qlik_id", - "qlik_q_r_i", - "qlik_space_id", - "qlik_space_qualified_name", - "qlik_app_id", - "qlik_app_qualified_name", - "qlik_owner_id", - "qlik_is_published", + MICRO_STRATEGY_PROJECT_QUALIFIED_NAME: ClassVar[ + KeywordTextField + ] = KeywordTextField( + "microStrategyProjectQualifiedName", + "microStrategyProjectQualifiedName", + "microStrategyProjectQualifiedName.text", + ) + """ + Related project qualified name + """ + MICRO_STRATEGY_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "microStrategyProjectName", + "microStrategyProjectName.keyword", + "microStrategyProjectName", + ) + """ + Related project name + """ + MICRO_STRATEGY_CUBE_QUALIFIED_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "microStrategyCubeQualifiedNames", + "microStrategyCubeQualifiedNames", + "microStrategyCubeQualifiedNames.text", + ) + """ + Related cube qualified name list + """ + MICRO_STRATEGY_CUBE_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "microStrategyCubeNames", + "microStrategyCubeNames.keyword", + "microStrategyCubeNames", + ) + """ + Related cube name list + """ + MICRO_STRATEGY_REPORT_QUALIFIED_NAMES: ClassVar[ + KeywordTextField + ] = KeywordTextField( + "microStrategyReportQualifiedNames", + "microStrategyReportQualifiedNames", + "microStrategyReportQualifiedNames.text", + ) + """ + Related report qualified name list + """ + MICRO_STRATEGY_REPORT_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "microStrategyReportNames", + "microStrategyReportNames.keyword", + "microStrategyReportNames", + ) + """ + Related report name list + """ + MICRO_STRATEGY_IS_CERTIFIED: ClassVar[BooleanField] = BooleanField( + "microStrategyIsCertified", "microStrategyIsCertified" + ) + """ + Whether certified in MicroStrategy + """ + MICRO_STRATEGY_CERTIFIED_BY: ClassVar[KeywordField] = KeywordField( + "microStrategyCertifiedBy", "microStrategyCertifiedBy" + ) + """ + User who certified in MicroStrategy + """ + MICRO_STRATEGY_CERTIFIED_AT: ClassVar[NumericField] = NumericField( + "microStrategyCertifiedAt", "microStrategyCertifiedAt" + ) + """ + Certified date in MicroStrategy + """ + MICRO_STRATEGY_LOCATION: ClassVar[KeywordField] = KeywordField( + "microStrategyLocation", "microStrategyLocation" + ) + """ + Location path in MicroStrategy + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_project_qualified_name", + "micro_strategy_project_name", + "micro_strategy_cube_qualified_names", + "micro_strategy_cube_names", + "micro_strategy_report_qualified_names", + "micro_strategy_report_names", + "micro_strategy_is_certified", + "micro_strategy_certified_by", + "micro_strategy_certified_at", + "micro_strategy_location", ] @property - def qlik_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_id + def micro_strategy_project_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_project_qualified_name + ) + + @micro_strategy_project_qualified_name.setter + def micro_strategy_project_qualified_name( + self, micro_strategy_project_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_project_qualified_name = ( + micro_strategy_project_qualified_name + ) + + @property + def micro_strategy_project_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_project_name + ) + + @micro_strategy_project_name.setter + def micro_strategy_project_name(self, micro_strategy_project_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_project_name = micro_strategy_project_name + + @property + def micro_strategy_cube_qualified_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_cube_qualified_names + ) - @qlik_id.setter - def qlik_id(self, qlik_id: Optional[str]): + @micro_strategy_cube_qualified_names.setter + def micro_strategy_cube_qualified_names( + self, micro_strategy_cube_qualified_names: Optional[set[str]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_id = qlik_id + self.attributes.micro_strategy_cube_qualified_names = ( + micro_strategy_cube_qualified_names + ) @property - def qlik_q_r_i(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_q_r_i + def micro_strategy_cube_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_cube_names + ) - @qlik_q_r_i.setter - def qlik_q_r_i(self, qlik_q_r_i: Optional[str]): + @micro_strategy_cube_names.setter + def micro_strategy_cube_names(self, micro_strategy_cube_names: Optional[set[str]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_q_r_i = qlik_q_r_i + self.attributes.micro_strategy_cube_names = micro_strategy_cube_names @property - def qlik_space_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_space_id + def micro_strategy_report_qualified_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_report_qualified_names + ) - @qlik_space_id.setter - def qlik_space_id(self, qlik_space_id: Optional[str]): + @micro_strategy_report_qualified_names.setter + def micro_strategy_report_qualified_names( + self, micro_strategy_report_qualified_names: Optional[set[str]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_space_id = qlik_space_id + self.attributes.micro_strategy_report_qualified_names = ( + micro_strategy_report_qualified_names + ) @property - def qlik_space_qualified_name(self) -> Optional[str]: + def micro_strategy_report_names(self) -> Optional[set[str]]: return ( None if self.attributes is None - else self.attributes.qlik_space_qualified_name + else self.attributes.micro_strategy_report_names ) - @qlik_space_qualified_name.setter - def qlik_space_qualified_name(self, qlik_space_qualified_name: Optional[str]): + @micro_strategy_report_names.setter + def micro_strategy_report_names( + self, micro_strategy_report_names: Optional[set[str]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_space_qualified_name = qlik_space_qualified_name + self.attributes.micro_strategy_report_names = micro_strategy_report_names @property - def qlik_app_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_app_id + def micro_strategy_is_certified(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_is_certified + ) - @qlik_app_id.setter - def qlik_app_id(self, qlik_app_id: Optional[str]): + @micro_strategy_is_certified.setter + def micro_strategy_is_certified(self, micro_strategy_is_certified: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_app_id = qlik_app_id + self.attributes.micro_strategy_is_certified = micro_strategy_is_certified @property - def qlik_app_qualified_name(self) -> Optional[str]: + def micro_strategy_certified_by(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.qlik_app_qualified_name + None + if self.attributes is None + else self.attributes.micro_strategy_certified_by ) - @qlik_app_qualified_name.setter - def qlik_app_qualified_name(self, qlik_app_qualified_name: Optional[str]): + @micro_strategy_certified_by.setter + def micro_strategy_certified_by(self, micro_strategy_certified_by: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_app_qualified_name = qlik_app_qualified_name + self.attributes.micro_strategy_certified_by = micro_strategy_certified_by @property - def qlik_owner_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_owner_id + def micro_strategy_certified_at(self) -> Optional[datetime]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_certified_at + ) - @qlik_owner_id.setter - def qlik_owner_id(self, qlik_owner_id: Optional[str]): + @micro_strategy_certified_at.setter + def micro_strategy_certified_at( + self, micro_strategy_certified_at: Optional[datetime] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_owner_id = qlik_owner_id + self.attributes.micro_strategy_certified_at = micro_strategy_certified_at @property - def qlik_is_published(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.qlik_is_published + def micro_strategy_location(self) -> Optional[list[dict[str, str]]]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_location + ) - @qlik_is_published.setter - def qlik_is_published(self, qlik_is_published: Optional[bool]): + @micro_strategy_location.setter + def micro_strategy_location( + self, micro_strategy_location: Optional[list[dict[str, str]]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_is_published = qlik_is_published + self.attributes.micro_strategy_location = micro_strategy_location class Attributes(BI.Attributes): - qlik_id: Optional[str] = Field(None, description="", alias="qlikId") - qlik_q_r_i: Optional[str] = Field(None, description="", alias="qlikQRI") - qlik_space_id: Optional[str] = Field(None, description="", alias="qlikSpaceId") - qlik_space_qualified_name: Optional[str] = Field( - None, description="", alias="qlikSpaceQualifiedName" + micro_strategy_project_qualified_name: Optional[str] = Field( + None, description="", alias="microStrategyProjectQualifiedName" + ) + micro_strategy_project_name: Optional[str] = Field( + None, description="", alias="microStrategyProjectName" + ) + micro_strategy_cube_qualified_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyCubeQualifiedNames" + ) + micro_strategy_cube_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyCubeNames" + ) + micro_strategy_report_qualified_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyReportQualifiedNames" + ) + micro_strategy_report_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyReportNames" + ) + micro_strategy_is_certified: Optional[bool] = Field( + None, description="", alias="microStrategyIsCertified" + ) + micro_strategy_certified_by: Optional[str] = Field( + None, description="", alias="microStrategyCertifiedBy" ) - qlik_app_id: Optional[str] = Field(None, description="", alias="qlikAppId") - qlik_app_qualified_name: Optional[str] = Field( - None, description="", alias="qlikAppQualifiedName" + micro_strategy_certified_at: Optional[datetime] = Field( + None, description="", alias="microStrategyCertifiedAt" ) - qlik_owner_id: Optional[str] = Field(None, description="", alias="qlikOwnerId") - qlik_is_published: Optional[bool] = Field( - None, description="", alias="qlikIsPublished" + micro_strategy_location: Optional[list[dict[str, str]]] = Field( + None, description="", alias="microStrategyLocation" ) - attributes: "Qlik.Attributes" = Field( - default_factory=lambda: Qlik.Attributes(), + attributes: "MicroStrategy.Attributes" = Field( + default_factory=lambda: MicroStrategy.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Qlik.Attributes.update_forward_refs() +MicroStrategy.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset48.py b/pyatlan/model/assets/asset48.py index db2b47102..c77609ac6 100644 --- a/pyatlan/model/assets/asset48.py +++ b/pyatlan/model/assets/asset48.py @@ -8,65 +8,192 @@ from pydantic import Field, validator -from .asset18 import SaaS +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, +) +from .asset18 import BI -class Salesforce(SaaS): + +class Qlik(BI): """Description""" - type_name: str = Field("Salesforce", allow_mutation=False) + type_name: str = Field("Qlik", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Salesforce": - raise ValueError("must be Salesforce") + if v != "Qlik": + raise ValueError("must be Qlik") return v def __setattr__(self, name, value): - if name in Salesforce._convience_properties: + if name in Qlik._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "organization_qualified_name", - "api_name", + QLIK_ID: ClassVar[KeywordField] = KeywordField("qlikId", "qlikId") + """ + qID/guid of the qlik object + """ + QLIK_QRI: ClassVar[KeywordTextField] = KeywordTextField( + "qlikQRI", "qlikQRI", "qlikQRI.text" + ) + """ + QRI of the qlik object, kind of like qualifiedName on Atlan + """ + QLIK_SPACE_ID: ClassVar[KeywordField] = KeywordField("qlikSpaceId", "qlikSpaceId") + """ + qID of a space where the qlik object belongs to + """ + QLIK_SPACE_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "qlikSpaceQualifiedName", + "qlikSpaceQualifiedName", + "qlikSpaceQualifiedName.text", + ) + """ + qualifiedName of a space where the qlik object belongs to + """ + QLIK_APP_ID: ClassVar[KeywordField] = KeywordField("qlikAppId", "qlikAppId") + """ + qID of a app where the qlik object belongs + """ + QLIK_APP_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "qlikAppQualifiedName", "qlikAppQualifiedName", "qlikAppQualifiedName.text" + ) + """ + qualifiedName of an app where the qlik object belongs to + """ + QLIK_OWNER_ID: ClassVar[KeywordField] = KeywordField("qlikOwnerId", "qlikOwnerId") + """ + Owner's guid of the qlik object + """ + QLIK_IS_PUBLISHED: ClassVar[BooleanField] = BooleanField( + "qlikIsPublished", "qlikIsPublished" + ) + """ + If the qlik object is published + """ + + _convenience_properties: ClassVar[list[str]] = [ + "qlik_id", + "qlik_q_r_i", + "qlik_space_id", + "qlik_space_qualified_name", + "qlik_app_id", + "qlik_app_qualified_name", + "qlik_owner_id", + "qlik_is_published", ] @property - def organization_qualified_name(self) -> Optional[str]: + def qlik_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_id + + @qlik_id.setter + def qlik_id(self, qlik_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.qlik_id = qlik_id + + @property + def qlik_q_r_i(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_q_r_i + + @qlik_q_r_i.setter + def qlik_q_r_i(self, qlik_q_r_i: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.qlik_q_r_i = qlik_q_r_i + + @property + def qlik_space_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_space_id + + @qlik_space_id.setter + def qlik_space_id(self, qlik_space_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.qlik_space_id = qlik_space_id + + @property + def qlik_space_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.organization_qualified_name + else self.attributes.qlik_space_qualified_name ) - @organization_qualified_name.setter - def organization_qualified_name(self, organization_qualified_name: Optional[str]): + @qlik_space_qualified_name.setter + def qlik_space_qualified_name(self, qlik_space_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.qlik_space_qualified_name = qlik_space_qualified_name + + @property + def qlik_app_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_app_id + + @qlik_app_id.setter + def qlik_app_id(self, qlik_app_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.organization_qualified_name = organization_qualified_name + self.attributes.qlik_app_id = qlik_app_id @property - def api_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.api_name + def qlik_app_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.qlik_app_qualified_name + ) - @api_name.setter - def api_name(self, api_name: Optional[str]): + @qlik_app_qualified_name.setter + def qlik_app_qualified_name(self, qlik_app_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_name = api_name + self.attributes.qlik_app_qualified_name = qlik_app_qualified_name + + @property + def qlik_owner_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_owner_id - class Attributes(SaaS.Attributes): - organization_qualified_name: Optional[str] = Field( - None, description="", alias="organizationQualifiedName" + @qlik_owner_id.setter + def qlik_owner_id(self, qlik_owner_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.qlik_owner_id = qlik_owner_id + + @property + def qlik_is_published(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.qlik_is_published + + @qlik_is_published.setter + def qlik_is_published(self, qlik_is_published: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.qlik_is_published = qlik_is_published + + class Attributes(BI.Attributes): + qlik_id: Optional[str] = Field(None, description="", alias="qlikId") + qlik_q_r_i: Optional[str] = Field(None, description="", alias="qlikQRI") + qlik_space_id: Optional[str] = Field(None, description="", alias="qlikSpaceId") + qlik_space_qualified_name: Optional[str] = Field( + None, description="", alias="qlikSpaceQualifiedName" + ) + qlik_app_id: Optional[str] = Field(None, description="", alias="qlikAppId") + qlik_app_qualified_name: Optional[str] = Field( + None, description="", alias="qlikAppQualifiedName" + ) + qlik_owner_id: Optional[str] = Field(None, description="", alias="qlikOwnerId") + qlik_is_published: Optional[bool] = Field( + None, description="", alias="qlikIsPublished" ) - api_name: Optional[str] = Field(None, description="", alias="apiName") - attributes: "Salesforce.Attributes" = Field( - default_factory=lambda: Salesforce.Attributes(), + attributes: "Qlik.Attributes" = Field( + default_factory=lambda: Qlik.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -Salesforce.Attributes.update_forward_refs() +Qlik.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset49.py b/pyatlan/model/assets/asset49.py index ffc14ed53..a48a1d8a8 100644 --- a/pyatlan/model/assets/asset49.py +++ b/pyatlan/model/assets/asset49.py @@ -8,61 +8,80 @@ from pydantic import Field, validator -from pyatlan.model.enums import IconType +from pyatlan.model.fields.atlan_fields import KeywordField, KeywordTextField -from .asset00 import Resource +from .asset19 import SaaS -class ReadmeTemplate(Resource): +class Salesforce(SaaS): """Description""" - type_name: str = Field("ReadmeTemplate", allow_mutation=False) + type_name: str = Field("Salesforce", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ReadmeTemplate": - raise ValueError("must be ReadmeTemplate") + if v != "Salesforce": + raise ValueError("must be Salesforce") return v def __setattr__(self, name, value): - if name in ReadmeTemplate._convience_properties: + if name in Salesforce._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "icon", - "icon_type", + ORGANIZATION_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "organizationQualifiedName", "organizationQualifiedName" + ) + """ + TBC + """ + API_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "apiName", "apiName.keyword", "apiName" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "organization_qualified_name", + "api_name", ] @property - def icon(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.icon - - @icon.setter - def icon(self, icon: Optional[str]): + def organization_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.organization_qualified_name + ) + + @organization_qualified_name.setter + def organization_qualified_name(self, organization_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.icon = icon + self.attributes.organization_qualified_name = organization_qualified_name @property - def icon_type(self) -> Optional[IconType]: - return None if self.attributes is None else self.attributes.icon_type + def api_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.api_name - @icon_type.setter - def icon_type(self, icon_type: Optional[IconType]): + @api_name.setter + def api_name(self, api_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.icon_type = icon_type + self.attributes.api_name = api_name - class Attributes(Resource.Attributes): - icon: Optional[str] = Field(None, description="", alias="icon") - icon_type: Optional[IconType] = Field(None, description="", alias="iconType") + class Attributes(SaaS.Attributes): + organization_qualified_name: Optional[str] = Field( + None, description="", alias="organizationQualifiedName" + ) + api_name: Optional[str] = Field(None, description="", alias="apiName") - attributes: "ReadmeTemplate.Attributes" = Field( - default_factory=lambda: ReadmeTemplate.Attributes(), + attributes: "Salesforce.Attributes" = Field( + default_factory=lambda: Salesforce.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -ReadmeTemplate.Attributes.update_forward_refs() +Salesforce.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset50.py b/pyatlan/model/assets/asset50.py index 624a92b28..1595713ce 100644 --- a/pyatlan/model/assets/asset50.py +++ b/pyatlan/model/assets/asset50.py @@ -4,30 +4,75 @@ from __future__ import annotations -from typing import ClassVar +from typing import ClassVar, Optional from pydantic import Field, validator -from .asset20 import EventStore +from pyatlan.model.enums import IconType +from pyatlan.model.fields.atlan_fields import KeywordField +from .asset00 import Resource -class Kafka(EventStore): + +class ReadmeTemplate(Resource): """Description""" - type_name: str = Field("Kafka", allow_mutation=False) + type_name: str = Field("ReadmeTemplate", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Kafka": - raise ValueError("must be Kafka") + if v != "ReadmeTemplate": + raise ValueError("must be ReadmeTemplate") return v def __setattr__(self, name, value): - if name in Kafka._convience_properties: + if name in ReadmeTemplate._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + ICON: ClassVar[KeywordField] = KeywordField("icon", "icon") + """ + TBC + """ + ICON_TYPE: ClassVar[KeywordField] = KeywordField("iconType", "iconType") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "icon", + "icon_type", + ] + + @property + def icon(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.icon + + @icon.setter + def icon(self, icon: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.icon = icon + + @property + def icon_type(self) -> Optional[IconType]: + return None if self.attributes is None else self.attributes.icon_type + + @icon_type.setter + def icon_type(self, icon_type: Optional[IconType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.icon_type = icon_type + + class Attributes(Resource.Attributes): + icon: Optional[str] = Field(None, description="", alias="icon") + icon_type: Optional[IconType] = Field(None, description="", alias="iconType") + + attributes: "ReadmeTemplate.Attributes" = Field( + default_factory=lambda: ReadmeTemplate.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) -Kafka.Attributes.update_forward_refs() +ReadmeTemplate.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset51.py b/pyatlan/model/assets/asset51.py index a22608953..0194dd718 100644 --- a/pyatlan/model/assets/asset51.py +++ b/pyatlan/model/assets/asset51.py @@ -4,362 +4,30 @@ from __future__ import annotations -from datetime import datetime -from typing import ClassVar, Optional +from typing import ClassVar from pydantic import Field, validator -from pyatlan.model.structs import SourceTagAttribute +from .asset21 import EventStore -from .asset00 import Dbt - -class DbtTag(Dbt): +class Kafka(EventStore): """Description""" - type_name: str = Field("DbtTag", allow_mutation=False) + type_name: str = Field("Kafka", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "DbtTag": - raise ValueError("must be DbtTag") + if v != "Kafka": + raise ValueError("must be Kafka") return v def __setattr__(self, name, value): - if name in DbtTag._convience_properties: + if name in Kafka._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "dbt_alias", - "dbt_meta", - "dbt_unique_id", - "dbt_account_name", - "dbt_project_name", - "dbt_package_name", - "dbt_job_name", - "dbt_job_schedule", - "dbt_job_status", - "dbt_job_schedule_cron_humanized", - "dbt_job_last_run", - "dbt_job_next_run", - "dbt_job_next_run_humanized", - "dbt_environment_name", - "dbt_environment_dbt_version", - "dbt_tags", - "dbt_connection_context", - "dbt_semantic_layer_proxy_url", - "tag_id", - "tag_attributes", - "tag_allowed_values", - "mapped_atlan_tag_name", - ] - - @property - def dbt_alias(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_alias - - @dbt_alias.setter - def dbt_alias(self, dbt_alias: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_alias = dbt_alias - - @property - def dbt_meta(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_meta - - @dbt_meta.setter - def dbt_meta(self, dbt_meta: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_meta = dbt_meta - - @property - def dbt_unique_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_unique_id - - @dbt_unique_id.setter - def dbt_unique_id(self, dbt_unique_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_unique_id = dbt_unique_id - - @property - def dbt_account_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_account_name - - @dbt_account_name.setter - def dbt_account_name(self, dbt_account_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_account_name = dbt_account_name - - @property - def dbt_project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_project_name - - @dbt_project_name.setter - def dbt_project_name(self, dbt_project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_project_name = dbt_project_name - - @property - def dbt_package_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_package_name - - @dbt_package_name.setter - def dbt_package_name(self, dbt_package_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_package_name = dbt_package_name - - @property - def dbt_job_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_job_name - - @dbt_job_name.setter - def dbt_job_name(self, dbt_job_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_name = dbt_job_name - - @property - def dbt_job_schedule(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_job_schedule - - @dbt_job_schedule.setter - def dbt_job_schedule(self, dbt_job_schedule: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_schedule = dbt_job_schedule - - @property - def dbt_job_status(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_job_status - - @dbt_job_status.setter - def dbt_job_status(self, dbt_job_status: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_status = dbt_job_status - - @property - def dbt_job_schedule_cron_humanized(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_job_schedule_cron_humanized - ) - - @dbt_job_schedule_cron_humanized.setter - def dbt_job_schedule_cron_humanized( - self, dbt_job_schedule_cron_humanized: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_schedule_cron_humanized = ( - dbt_job_schedule_cron_humanized - ) - - @property - def dbt_job_last_run(self) -> Optional[datetime]: - return None if self.attributes is None else self.attributes.dbt_job_last_run - - @dbt_job_last_run.setter - def dbt_job_last_run(self, dbt_job_last_run: Optional[datetime]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_last_run = dbt_job_last_run - - @property - def dbt_job_next_run(self) -> Optional[datetime]: - return None if self.attributes is None else self.attributes.dbt_job_next_run - - @dbt_job_next_run.setter - def dbt_job_next_run(self, dbt_job_next_run: Optional[datetime]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_next_run = dbt_job_next_run - - @property - def dbt_job_next_run_humanized(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_job_next_run_humanized - ) - - @dbt_job_next_run_humanized.setter - def dbt_job_next_run_humanized(self, dbt_job_next_run_humanized: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_job_next_run_humanized = dbt_job_next_run_humanized - - @property - def dbt_environment_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dbt_environment_name - - @dbt_environment_name.setter - def dbt_environment_name(self, dbt_environment_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_environment_name = dbt_environment_name - - @property - def dbt_environment_dbt_version(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_environment_dbt_version - ) - - @dbt_environment_dbt_version.setter - def dbt_environment_dbt_version(self, dbt_environment_dbt_version: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_environment_dbt_version = dbt_environment_dbt_version - - @property - def dbt_tags(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.dbt_tags - - @dbt_tags.setter - def dbt_tags(self, dbt_tags: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_tags = dbt_tags - - @property - def dbt_connection_context(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.dbt_connection_context - ) - - @dbt_connection_context.setter - def dbt_connection_context(self, dbt_connection_context: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_connection_context = dbt_connection_context - - @property - def dbt_semantic_layer_proxy_url(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dbt_semantic_layer_proxy_url - ) - - @dbt_semantic_layer_proxy_url.setter - def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url - - @property - def tag_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.tag_id - - @tag_id.setter - def tag_id(self, tag_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tag_id = tag_id - - @property - def tag_attributes(self) -> Optional[list[SourceTagAttribute]]: - return None if self.attributes is None else self.attributes.tag_attributes - - @tag_attributes.setter - def tag_attributes(self, tag_attributes: Optional[list[SourceTagAttribute]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tag_attributes = tag_attributes - - @property - def tag_allowed_values(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.tag_allowed_values - - @tag_allowed_values.setter - def tag_allowed_values(self, tag_allowed_values: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tag_allowed_values = tag_allowed_values - - @property - def mapped_atlan_tag_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.mapped_atlan_tag_name - ) - - @mapped_atlan_tag_name.setter - def mapped_atlan_tag_name(self, mapped_atlan_tag_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.mapped_atlan_tag_name = mapped_atlan_tag_name - - class Attributes(Dbt.Attributes): - dbt_alias: Optional[str] = Field(None, description="", alias="dbtAlias") - dbt_meta: Optional[str] = Field(None, description="", alias="dbtMeta") - dbt_unique_id: Optional[str] = Field(None, description="", alias="dbtUniqueId") - dbt_account_name: Optional[str] = Field( - None, description="", alias="dbtAccountName" - ) - dbt_project_name: Optional[str] = Field( - None, description="", alias="dbtProjectName" - ) - dbt_package_name: Optional[str] = Field( - None, description="", alias="dbtPackageName" - ) - dbt_job_name: Optional[str] = Field(None, description="", alias="dbtJobName") - dbt_job_schedule: Optional[str] = Field( - None, description="", alias="dbtJobSchedule" - ) - dbt_job_status: Optional[str] = Field( - None, description="", alias="dbtJobStatus" - ) - dbt_job_schedule_cron_humanized: Optional[str] = Field( - None, description="", alias="dbtJobScheduleCronHumanized" - ) - dbt_job_last_run: Optional[datetime] = Field( - None, description="", alias="dbtJobLastRun" - ) - dbt_job_next_run: Optional[datetime] = Field( - None, description="", alias="dbtJobNextRun" - ) - dbt_job_next_run_humanized: Optional[str] = Field( - None, description="", alias="dbtJobNextRunHumanized" - ) - dbt_environment_name: Optional[str] = Field( - None, description="", alias="dbtEnvironmentName" - ) - dbt_environment_dbt_version: Optional[str] = Field( - None, description="", alias="dbtEnvironmentDbtVersion" - ) - dbt_tags: Optional[set[str]] = Field(None, description="", alias="dbtTags") - dbt_connection_context: Optional[str] = Field( - None, description="", alias="dbtConnectionContext" - ) - dbt_semantic_layer_proxy_url: Optional[str] = Field( - None, description="", alias="dbtSemanticLayerProxyUrl" - ) - tag_id: Optional[str] = Field(None, description="", alias="tagId") - tag_attributes: Optional[list[SourceTagAttribute]] = Field( - None, description="", alias="tagAttributes" - ) - tag_allowed_values: Optional[set[str]] = Field( - None, description="", alias="tagAllowedValues" - ) - mapped_atlan_tag_name: Optional[str] = Field( - None, description="", alias="mappedClassificationName" - ) - - attributes: "DbtTag.Attributes" = Field( - default_factory=lambda: DbtTag.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) + _convenience_properties: ClassVar[list[str]] = [] -DbtTag.Attributes.update_forward_refs() +Kafka.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset52.py b/pyatlan/model/assets/asset52.py index 5f063371d..e9d3b6a83 100644 --- a/pyatlan/model/assets/asset52.py +++ b/pyatlan/model/assets/asset52.py @@ -4,332 +4,500 @@ from __future__ import annotations +from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset23 import API +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, +) +from pyatlan.model.structs import SourceTagAttribute +from .asset00 import Dbt -class APISpec(API): + +class DbtTag(Dbt): """Description""" - type_name: str = Field("APISpec", allow_mutation=False) + type_name: str = Field("DbtTag", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "APISpec": - raise ValueError("must be APISpec") + if v != "DbtTag": + raise ValueError("must be DbtTag") return v def __setattr__(self, name, value): - if name in APISpec._convience_properties: + if name in DbtTag._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "api_spec_terms_of_service_url", - "api_spec_contact_email", - "api_spec_contact_name", - "api_spec_contact_url", - "api_spec_license_name", - "api_spec_license_url", - "api_spec_contract_version", - "api_spec_service_alias", - "api_paths", + DBT_ALIAS: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAlias", "dbtAlias.keyword", "dbtAlias" + ) + """ + TBC + """ + DBT_META: ClassVar[KeywordField] = KeywordField("dbtMeta", "dbtMeta") + """ + TBC + """ + DBT_UNIQUE_ID: ClassVar[KeywordTextField] = KeywordTextField( + "dbtUniqueId", "dbtUniqueId.keyword", "dbtUniqueId" + ) + """ + TBC + """ + DBT_ACCOUNT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtAccountName", "dbtAccountName.keyword", "dbtAccountName" + ) + """ + TBC + """ + DBT_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtProjectName", "dbtProjectName.keyword", "dbtProjectName" + ) + """ + TBC + """ + DBT_PACKAGE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtPackageName", "dbtPackageName.keyword", "dbtPackageName" + ) + """ + TBC + """ + DBT_JOB_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobName", "dbtJobName.keyword", "dbtJobName" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE: ClassVar[KeywordField] = KeywordField( + "dbtJobSchedule", "dbtJobSchedule" + ) + """ + TBC + """ + DBT_JOB_STATUS: ClassVar[KeywordField] = KeywordField( + "dbtJobStatus", "dbtJobStatus" + ) + """ + TBC + """ + DBT_JOB_SCHEDULE_CRON_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobScheduleCronHumanized", + "dbtJobScheduleCronHumanized.keyword", + "dbtJobScheduleCronHumanized", + ) + """ + TBC + """ + DBT_JOB_LAST_RUN: ClassVar[NumericField] = NumericField( + "dbtJobLastRun", "dbtJobLastRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN: ClassVar[NumericField] = NumericField( + "dbtJobNextRun", "dbtJobNextRun" + ) + """ + TBC + """ + DBT_JOB_NEXT_RUN_HUMANIZED: ClassVar[KeywordTextField] = KeywordTextField( + "dbtJobNextRunHumanized", + "dbtJobNextRunHumanized.keyword", + "dbtJobNextRunHumanized", + ) + """ + TBC + """ + DBT_ENVIRONMENT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentName", "dbtEnvironmentName.keyword", "dbtEnvironmentName" + ) + """ + TBC + """ + DBT_ENVIRONMENT_DBT_VERSION: ClassVar[KeywordTextField] = KeywordTextField( + "dbtEnvironmentDbtVersion", + "dbtEnvironmentDbtVersion.keyword", + "dbtEnvironmentDbtVersion", + ) + """ + TBC + """ + DBT_TAGS: ClassVar[KeywordField] = KeywordField("dbtTags", "dbtTags") + """ + TBC + """ + DBT_CONNECTION_CONTEXT: ClassVar[KeywordField] = KeywordField( + "dbtConnectionContext", "dbtConnectionContext" + ) + """ + TBC + """ + DBT_SEMANTIC_LAYER_PROXY_URL: ClassVar[KeywordField] = KeywordField( + "dbtSemanticLayerProxyUrl", "dbtSemanticLayerProxyUrl" + ) + """ + TBC + """ + TAG_ID: ClassVar[KeywordField] = KeywordField("tagId", "tagId") + """ + Unique source tag identifier + """ + TAG_ATTRIBUTES: ClassVar[KeywordField] = KeywordField( + "tagAttributes", "tagAttributes" + ) + """ + Source tag attributes + """ + TAG_ALLOWED_VALUES: ClassVar[KeywordTextField] = KeywordTextField( + "tagAllowedValues", "tagAllowedValues", "tagAllowedValues.text" + ) + """ + Allowed values for the tag at source. De-normalised from sourceTagAttributed for ease of querying + """ + MAPPED_CLASSIFICATION_NAME: ClassVar[KeywordField] = KeywordField( + "mappedClassificationName", "mappedClassificationName" + ) + """ + Mapped atlan classification name + """ + + _convenience_properties: ClassVar[list[str]] = [ + "dbt_alias", + "dbt_meta", + "dbt_unique_id", + "dbt_account_name", + "dbt_project_name", + "dbt_package_name", + "dbt_job_name", + "dbt_job_schedule", + "dbt_job_status", + "dbt_job_schedule_cron_humanized", + "dbt_job_last_run", + "dbt_job_next_run", + "dbt_job_next_run_humanized", + "dbt_environment_name", + "dbt_environment_dbt_version", + "dbt_tags", + "dbt_connection_context", + "dbt_semantic_layer_proxy_url", + "tag_id", + "tag_attributes", + "tag_allowed_values", + "mapped_atlan_tag_name", ] @property - def api_spec_terms_of_service_url(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.api_spec_terms_of_service_url - ) + def dbt_alias(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_alias - @api_spec_terms_of_service_url.setter - def api_spec_terms_of_service_url( - self, api_spec_terms_of_service_url: Optional[str] - ): + @dbt_alias.setter + def dbt_alias(self, dbt_alias: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_spec_terms_of_service_url = api_spec_terms_of_service_url + self.attributes.dbt_alias = dbt_alias @property - def api_spec_contact_email(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.api_spec_contact_email - ) + def dbt_meta(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_meta - @api_spec_contact_email.setter - def api_spec_contact_email(self, api_spec_contact_email: Optional[str]): + @dbt_meta.setter + def dbt_meta(self, dbt_meta: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_spec_contact_email = api_spec_contact_email + self.attributes.dbt_meta = dbt_meta @property - def api_spec_contact_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.api_spec_contact_name - ) + def dbt_unique_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_unique_id - @api_spec_contact_name.setter - def api_spec_contact_name(self, api_spec_contact_name: Optional[str]): + @dbt_unique_id.setter + def dbt_unique_id(self, dbt_unique_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_spec_contact_name = api_spec_contact_name + self.attributes.dbt_unique_id = dbt_unique_id @property - def api_spec_contact_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.api_spec_contact_url + def dbt_account_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_account_name - @api_spec_contact_url.setter - def api_spec_contact_url(self, api_spec_contact_url: Optional[str]): + @dbt_account_name.setter + def dbt_account_name(self, dbt_account_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_spec_contact_url = api_spec_contact_url + self.attributes.dbt_account_name = dbt_account_name @property - def api_spec_license_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.api_spec_license_name - ) + def dbt_project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_project_name - @api_spec_license_name.setter - def api_spec_license_name(self, api_spec_license_name: Optional[str]): + @dbt_project_name.setter + def dbt_project_name(self, dbt_project_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_spec_license_name = api_spec_license_name + self.attributes.dbt_project_name = dbt_project_name @property - def api_spec_license_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.api_spec_license_url + def dbt_package_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_package_name - @api_spec_license_url.setter - def api_spec_license_url(self, api_spec_license_url: Optional[str]): + @dbt_package_name.setter + def dbt_package_name(self, dbt_package_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_spec_license_url = api_spec_license_url + self.attributes.dbt_package_name = dbt_package_name @property - def api_spec_contract_version(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.api_spec_contract_version - ) + def dbt_job_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_job_name - @api_spec_contract_version.setter - def api_spec_contract_version(self, api_spec_contract_version: Optional[str]): + @dbt_job_name.setter + def dbt_job_name(self, dbt_job_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_spec_contract_version = api_spec_contract_version + self.attributes.dbt_job_name = dbt_job_name @property - def api_spec_service_alias(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.api_spec_service_alias - ) + def dbt_job_schedule(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_job_schedule - @api_spec_service_alias.setter - def api_spec_service_alias(self, api_spec_service_alias: Optional[str]): + @dbt_job_schedule.setter + def dbt_job_schedule(self, dbt_job_schedule: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_spec_service_alias = api_spec_service_alias + self.attributes.dbt_job_schedule = dbt_job_schedule @property - def api_paths(self) -> Optional[list[APIPath]]: - return None if self.attributes is None else self.attributes.api_paths + def dbt_job_status(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_job_status - @api_paths.setter - def api_paths(self, api_paths: Optional[list[APIPath]]): + @dbt_job_status.setter + def dbt_job_status(self, dbt_job_status: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_paths = api_paths + self.attributes.dbt_job_status = dbt_job_status - class Attributes(API.Attributes): - api_spec_terms_of_service_url: Optional[str] = Field( - None, description="", alias="apiSpecTermsOfServiceURL" - ) - api_spec_contact_email: Optional[str] = Field( - None, description="", alias="apiSpecContactEmail" - ) - api_spec_contact_name: Optional[str] = Field( - None, description="", alias="apiSpecContactName" - ) - api_spec_contact_url: Optional[str] = Field( - None, description="", alias="apiSpecContactURL" - ) - api_spec_license_name: Optional[str] = Field( - None, description="", alias="apiSpecLicenseName" - ) - api_spec_license_url: Optional[str] = Field( - None, description="", alias="apiSpecLicenseURL" - ) - api_spec_contract_version: Optional[str] = Field( - None, description="", alias="apiSpecContractVersion" + @property + def dbt_job_schedule_cron_humanized(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_job_schedule_cron_humanized ) - api_spec_service_alias: Optional[str] = Field( - None, description="", alias="apiSpecServiceAlias" + + @dbt_job_schedule_cron_humanized.setter + def dbt_job_schedule_cron_humanized( + self, dbt_job_schedule_cron_humanized: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_schedule_cron_humanized = ( + dbt_job_schedule_cron_humanized ) - api_paths: Optional[list[APIPath]] = Field( - None, description="", alias="apiPaths" - ) # relationship - attributes: "APISpec.Attributes" = Field( - default_factory=lambda: APISpec.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) + @property + def dbt_job_last_run(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.dbt_job_last_run + + @dbt_job_last_run.setter + def dbt_job_last_run(self, dbt_job_last_run: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_last_run = dbt_job_last_run + @property + def dbt_job_next_run(self) -> Optional[datetime]: + return None if self.attributes is None else self.attributes.dbt_job_next_run -class APIPath(API): - """Description""" + @dbt_job_next_run.setter + def dbt_job_next_run(self, dbt_job_next_run: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_next_run = dbt_job_next_run - type_name: str = Field("APIPath", allow_mutation=False) + @property + def dbt_job_next_run_humanized(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_job_next_run_humanized + ) - @validator("type_name") - def validate_type_name(cls, v): - if v != "APIPath": - raise ValueError("must be APIPath") - return v + @dbt_job_next_run_humanized.setter + def dbt_job_next_run_humanized(self, dbt_job_next_run_humanized: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_job_next_run_humanized = dbt_job_next_run_humanized - def __setattr__(self, name, value): - if name in APIPath._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) + @property + def dbt_environment_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dbt_environment_name - _convience_properties: ClassVar[list[str]] = [ - "api_path_summary", - "api_path_raw_u_r_i", - "api_path_is_templated", - "api_path_available_operations", - "api_path_available_response_codes", - "api_path_is_ingress_exposed", - "api_spec", - ] + @dbt_environment_name.setter + def dbt_environment_name(self, dbt_environment_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dbt_environment_name = dbt_environment_name @property - def api_path_summary(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.api_path_summary + def dbt_environment_dbt_version(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.dbt_environment_dbt_version + ) - @api_path_summary.setter - def api_path_summary(self, api_path_summary: Optional[str]): + @dbt_environment_dbt_version.setter + def dbt_environment_dbt_version(self, dbt_environment_dbt_version: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_path_summary = api_path_summary + self.attributes.dbt_environment_dbt_version = dbt_environment_dbt_version @property - def api_path_raw_u_r_i(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.api_path_raw_u_r_i + def dbt_tags(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.dbt_tags - @api_path_raw_u_r_i.setter - def api_path_raw_u_r_i(self, api_path_raw_u_r_i: Optional[str]): + @dbt_tags.setter + def dbt_tags(self, dbt_tags: Optional[set[str]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_path_raw_u_r_i = api_path_raw_u_r_i + self.attributes.dbt_tags = dbt_tags @property - def api_path_is_templated(self) -> Optional[bool]: + def dbt_connection_context(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.api_path_is_templated + None if self.attributes is None else self.attributes.dbt_connection_context ) - @api_path_is_templated.setter - def api_path_is_templated(self, api_path_is_templated: Optional[bool]): + @dbt_connection_context.setter + def dbt_connection_context(self, dbt_connection_context: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_path_is_templated = api_path_is_templated + self.attributes.dbt_connection_context = dbt_connection_context @property - def api_path_available_operations(self) -> Optional[set[str]]: + def dbt_semantic_layer_proxy_url(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.api_path_available_operations + else self.attributes.dbt_semantic_layer_proxy_url ) - @api_path_available_operations.setter - def api_path_available_operations( - self, api_path_available_operations: Optional[set[str]] - ): + @dbt_semantic_layer_proxy_url.setter + def dbt_semantic_layer_proxy_url(self, dbt_semantic_layer_proxy_url: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_path_available_operations = api_path_available_operations + self.attributes.dbt_semantic_layer_proxy_url = dbt_semantic_layer_proxy_url @property - def api_path_available_response_codes(self) -> Optional[dict[str, str]]: - return ( - None - if self.attributes is None - else self.attributes.api_path_available_response_codes - ) + def tag_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.tag_id - @api_path_available_response_codes.setter - def api_path_available_response_codes( - self, api_path_available_response_codes: Optional[dict[str, str]] - ): + @tag_id.setter + def tag_id(self, tag_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_path_available_response_codes = ( - api_path_available_response_codes - ) + self.attributes.tag_id = tag_id @property - def api_path_is_ingress_exposed(self) -> Optional[bool]: - return ( - None - if self.attributes is None - else self.attributes.api_path_is_ingress_exposed - ) + def tag_attributes(self) -> Optional[list[SourceTagAttribute]]: + return None if self.attributes is None else self.attributes.tag_attributes - @api_path_is_ingress_exposed.setter - def api_path_is_ingress_exposed(self, api_path_is_ingress_exposed: Optional[bool]): + @tag_attributes.setter + def tag_attributes(self, tag_attributes: Optional[list[SourceTagAttribute]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_path_is_ingress_exposed = api_path_is_ingress_exposed + self.attributes.tag_attributes = tag_attributes @property - def api_spec(self) -> Optional[APISpec]: - return None if self.attributes is None else self.attributes.api_spec + def tag_allowed_values(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.tag_allowed_values - @api_spec.setter - def api_spec(self, api_spec: Optional[APISpec]): + @tag_allowed_values.setter + def tag_allowed_values(self, tag_allowed_values: Optional[set[str]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.api_spec = api_spec + self.attributes.tag_allowed_values = tag_allowed_values + + @property + def mapped_atlan_tag_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.mapped_atlan_tag_name + ) - class Attributes(API.Attributes): - api_path_summary: Optional[str] = Field( - None, description="", alias="apiPathSummary" + @mapped_atlan_tag_name.setter + def mapped_atlan_tag_name(self, mapped_atlan_tag_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mapped_atlan_tag_name = mapped_atlan_tag_name + + class Attributes(Dbt.Attributes): + dbt_alias: Optional[str] = Field(None, description="", alias="dbtAlias") + dbt_meta: Optional[str] = Field(None, description="", alias="dbtMeta") + dbt_unique_id: Optional[str] = Field(None, description="", alias="dbtUniqueId") + dbt_account_name: Optional[str] = Field( + None, description="", alias="dbtAccountName" + ) + dbt_project_name: Optional[str] = Field( + None, description="", alias="dbtProjectName" + ) + dbt_package_name: Optional[str] = Field( + None, description="", alias="dbtPackageName" + ) + dbt_job_name: Optional[str] = Field(None, description="", alias="dbtJobName") + dbt_job_schedule: Optional[str] = Field( + None, description="", alias="dbtJobSchedule" + ) + dbt_job_status: Optional[str] = Field( + None, description="", alias="dbtJobStatus" + ) + dbt_job_schedule_cron_humanized: Optional[str] = Field( + None, description="", alias="dbtJobScheduleCronHumanized" ) - api_path_raw_u_r_i: Optional[str] = Field( - None, description="", alias="apiPathRawURI" + dbt_job_last_run: Optional[datetime] = Field( + None, description="", alias="dbtJobLastRun" ) - api_path_is_templated: Optional[bool] = Field( - None, description="", alias="apiPathIsTemplated" + dbt_job_next_run: Optional[datetime] = Field( + None, description="", alias="dbtJobNextRun" ) - api_path_available_operations: Optional[set[str]] = Field( - None, description="", alias="apiPathAvailableOperations" + dbt_job_next_run_humanized: Optional[str] = Field( + None, description="", alias="dbtJobNextRunHumanized" ) - api_path_available_response_codes: Optional[dict[str, str]] = Field( - None, description="", alias="apiPathAvailableResponseCodes" + dbt_environment_name: Optional[str] = Field( + None, description="", alias="dbtEnvironmentName" ) - api_path_is_ingress_exposed: Optional[bool] = Field( - None, description="", alias="apiPathIsIngressExposed" + dbt_environment_dbt_version: Optional[str] = Field( + None, description="", alias="dbtEnvironmentDbtVersion" + ) + dbt_tags: Optional[set[str]] = Field(None, description="", alias="dbtTags") + dbt_connection_context: Optional[str] = Field( + None, description="", alias="dbtConnectionContext" + ) + dbt_semantic_layer_proxy_url: Optional[str] = Field( + None, description="", alias="dbtSemanticLayerProxyUrl" + ) + tag_id: Optional[str] = Field(None, description="", alias="tagId") + tag_attributes: Optional[list[SourceTagAttribute]] = Field( + None, description="", alias="tagAttributes" + ) + tag_allowed_values: Optional[set[str]] = Field( + None, description="", alias="tagAllowedValues" + ) + mapped_atlan_tag_name: Optional[str] = Field( + None, description="", alias="mappedClassificationName" ) - api_spec: Optional[APISpec] = Field( - None, description="", alias="apiSpec" - ) # relationship - attributes: "APIPath.Attributes" = Field( - default_factory=lambda: APIPath.Attributes(), + attributes: "DbtTag.Attributes" = Field( + default_factory=lambda: DbtTag.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -APISpec.Attributes.update_forward_refs() - - -APIPath.Attributes.update_forward_refs() +DbtTag.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset53.py b/pyatlan/model/assets/asset53.py index 397a9c74e..8efd2fa3b 100644 --- a/pyatlan/model/assets/asset53.py +++ b/pyatlan/model/assets/asset53.py @@ -8,222 +8,434 @@ from pydantic import Field, validator -from pyatlan.model.enums import GoogleDatastudioAssetType -from pyatlan.model.structs import GoogleLabel, GoogleTag +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + RelationField, + TextField, +) -from .asset41 import DataStudio +from .asset24 import API -class DataStudioAsset(DataStudio): +class APISpec(API): """Description""" - type_name: str = Field("DataStudioAsset", allow_mutation=False) + type_name: str = Field("APISpec", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "DataStudioAsset": - raise ValueError("must be DataStudioAsset") + if v != "APISpec": + raise ValueError("must be APISpec") return v def __setattr__(self, name, value): - if name in DataStudioAsset._convience_properties: + if name in APISpec._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "data_studio_asset_type", - "data_studio_asset_title", - "data_studio_asset_owner", - "is_trashed_data_studio_asset", - "google_service", - "google_project_name", - "google_project_id", - "google_project_number", - "google_location", - "google_location_type", - "google_labels", - "google_tags", + API_SPEC_TERMS_OF_SERVICE_URL: ClassVar[KeywordTextField] = KeywordTextField( + "apiSpecTermsOfServiceURL", + "apiSpecTermsOfServiceURL", + "apiSpecTermsOfServiceURL.text", + ) + """ + TBC + """ + API_SPEC_CONTACT_EMAIL: ClassVar[KeywordTextField] = KeywordTextField( + "apiSpecContactEmail", "apiSpecContactEmail", "apiSpecContactEmail.text" + ) + """ + TBC + """ + API_SPEC_CONTACT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "apiSpecContactName", "apiSpecContactName.keyword", "apiSpecContactName" + ) + """ + TBC + """ + API_SPEC_CONTACT_URL: ClassVar[KeywordTextField] = KeywordTextField( + "apiSpecContactURL", "apiSpecContactURL", "apiSpecContactURL.text" + ) + """ + TBC + """ + API_SPEC_LICENSE_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "apiSpecLicenseName", "apiSpecLicenseName.keyword", "apiSpecLicenseName" + ) + """ + TBC + """ + API_SPEC_LICENSE_URL: ClassVar[KeywordTextField] = KeywordTextField( + "apiSpecLicenseURL", "apiSpecLicenseURL", "apiSpecLicenseURL.text" + ) + """ + TBC + """ + API_SPEC_CONTRACT_VERSION: ClassVar[KeywordField] = KeywordField( + "apiSpecContractVersion", "apiSpecContractVersion" + ) + """ + TBC + """ + API_SPEC_SERVICE_ALIAS: ClassVar[KeywordTextField] = KeywordTextField( + "apiSpecServiceAlias", "apiSpecServiceAlias", "apiSpecServiceAlias.text" + ) + """ + TBC + """ + + API_PATHS: ClassVar[RelationField] = RelationField("apiPaths") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "api_spec_terms_of_service_url", + "api_spec_contact_email", + "api_spec_contact_name", + "api_spec_contact_url", + "api_spec_license_name", + "api_spec_license_url", + "api_spec_contract_version", + "api_spec_service_alias", + "api_paths", ] @property - def data_studio_asset_type(self) -> Optional[GoogleDatastudioAssetType]: + def api_spec_terms_of_service_url(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.data_studio_asset_type + None + if self.attributes is None + else self.attributes.api_spec_terms_of_service_url ) - @data_studio_asset_type.setter - def data_studio_asset_type( - self, data_studio_asset_type: Optional[GoogleDatastudioAssetType] + @api_spec_terms_of_service_url.setter + def api_spec_terms_of_service_url( + self, api_spec_terms_of_service_url: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.data_studio_asset_type = data_studio_asset_type + self.attributes.api_spec_terms_of_service_url = api_spec_terms_of_service_url @property - def data_studio_asset_title(self) -> Optional[str]: + def api_spec_contact_email(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.data_studio_asset_title + None if self.attributes is None else self.attributes.api_spec_contact_email ) - @data_studio_asset_title.setter - def data_studio_asset_title(self, data_studio_asset_title: Optional[str]): + @api_spec_contact_email.setter + def api_spec_contact_email(self, api_spec_contact_email: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.data_studio_asset_title = data_studio_asset_title + self.attributes.api_spec_contact_email = api_spec_contact_email @property - def data_studio_asset_owner(self) -> Optional[str]: + def api_spec_contact_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.data_studio_asset_owner + None if self.attributes is None else self.attributes.api_spec_contact_name ) - @data_studio_asset_owner.setter - def data_studio_asset_owner(self, data_studio_asset_owner: Optional[str]): + @api_spec_contact_name.setter + def api_spec_contact_name(self, api_spec_contact_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.data_studio_asset_owner = data_studio_asset_owner + self.attributes.api_spec_contact_name = api_spec_contact_name @property - def is_trashed_data_studio_asset(self) -> Optional[bool]: - return ( - None - if self.attributes is None - else self.attributes.is_trashed_data_studio_asset - ) + def api_spec_contact_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.api_spec_contact_url - @is_trashed_data_studio_asset.setter - def is_trashed_data_studio_asset( - self, is_trashed_data_studio_asset: Optional[bool] - ): + @api_spec_contact_url.setter + def api_spec_contact_url(self, api_spec_contact_url: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.is_trashed_data_studio_asset = is_trashed_data_studio_asset + self.attributes.api_spec_contact_url = api_spec_contact_url @property - def google_service(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_service + def api_spec_license_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.api_spec_license_name + ) - @google_service.setter - def google_service(self, google_service: Optional[str]): + @api_spec_license_name.setter + def api_spec_license_name(self, api_spec_license_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_service = google_service + self.attributes.api_spec_license_name = api_spec_license_name @property - def google_project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_project_name + def api_spec_license_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.api_spec_license_url - @google_project_name.setter - def google_project_name(self, google_project_name: Optional[str]): + @api_spec_license_url.setter + def api_spec_license_url(self, api_spec_license_url: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_project_name = google_project_name + self.attributes.api_spec_license_url = api_spec_license_url @property - def google_project_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_project_id + def api_spec_contract_version(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.api_spec_contract_version + ) - @google_project_id.setter - def google_project_id(self, google_project_id: Optional[str]): + @api_spec_contract_version.setter + def api_spec_contract_version(self, api_spec_contract_version: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_project_id = google_project_id + self.attributes.api_spec_contract_version = api_spec_contract_version @property - def google_project_number(self) -> Optional[int]: + def api_spec_service_alias(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.google_project_number + None if self.attributes is None else self.attributes.api_spec_service_alias ) - @google_project_number.setter - def google_project_number(self, google_project_number: Optional[int]): + @api_spec_service_alias.setter + def api_spec_service_alias(self, api_spec_service_alias: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_project_number = google_project_number + self.attributes.api_spec_service_alias = api_spec_service_alias @property - def google_location(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_location + def api_paths(self) -> Optional[list[APIPath]]: + return None if self.attributes is None else self.attributes.api_paths - @google_location.setter - def google_location(self, google_location: Optional[str]): + @api_paths.setter + def api_paths(self, api_paths: Optional[list[APIPath]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_location = google_location + self.attributes.api_paths = api_paths + + class Attributes(API.Attributes): + api_spec_terms_of_service_url: Optional[str] = Field( + None, description="", alias="apiSpecTermsOfServiceURL" + ) + api_spec_contact_email: Optional[str] = Field( + None, description="", alias="apiSpecContactEmail" + ) + api_spec_contact_name: Optional[str] = Field( + None, description="", alias="apiSpecContactName" + ) + api_spec_contact_url: Optional[str] = Field( + None, description="", alias="apiSpecContactURL" + ) + api_spec_license_name: Optional[str] = Field( + None, description="", alias="apiSpecLicenseName" + ) + api_spec_license_url: Optional[str] = Field( + None, description="", alias="apiSpecLicenseURL" + ) + api_spec_contract_version: Optional[str] = Field( + None, description="", alias="apiSpecContractVersion" + ) + api_spec_service_alias: Optional[str] = Field( + None, description="", alias="apiSpecServiceAlias" + ) + api_paths: Optional[list[APIPath]] = Field( + None, description="", alias="apiPaths" + ) # relationship + + attributes: "APISpec.Attributes" = Field( + default_factory=lambda: APISpec.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class APIPath(API): + """Description""" + + type_name: str = Field("APIPath", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "APIPath": + raise ValueError("must be APIPath") + return v + + def __setattr__(self, name, value): + if name in APIPath._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + API_PATH_SUMMARY: ClassVar[TextField] = TextField( + "apiPathSummary", "apiPathSummary" + ) + """ + TBC + """ + API_PATH_RAW_URI: ClassVar[KeywordTextField] = KeywordTextField( + "apiPathRawURI", "apiPathRawURI", "apiPathRawURI.text" + ) + """ + TBC + """ + API_PATH_IS_TEMPLATED: ClassVar[BooleanField] = BooleanField( + "apiPathIsTemplated", "apiPathIsTemplated" + ) + """ + TBC + """ + API_PATH_AVAILABLE_OPERATIONS: ClassVar[KeywordField] = KeywordField( + "apiPathAvailableOperations", "apiPathAvailableOperations" + ) + """ + TBC + """ + API_PATH_AVAILABLE_RESPONSE_CODES: ClassVar[KeywordField] = KeywordField( + "apiPathAvailableResponseCodes", "apiPathAvailableResponseCodes" + ) + """ + TBC + """ + API_PATH_IS_INGRESS_EXPOSED: ClassVar[BooleanField] = BooleanField( + "apiPathIsIngressExposed", "apiPathIsIngressExposed" + ) + """ + TBC + """ + + API_SPEC: ClassVar[RelationField] = RelationField("apiSpec") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "api_path_summary", + "api_path_raw_u_r_i", + "api_path_is_templated", + "api_path_available_operations", + "api_path_available_response_codes", + "api_path_is_ingress_exposed", + "api_spec", + ] @property - def google_location_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.google_location_type + def api_path_summary(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.api_path_summary - @google_location_type.setter - def google_location_type(self, google_location_type: Optional[str]): + @api_path_summary.setter + def api_path_summary(self, api_path_summary: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_location_type = google_location_type + self.attributes.api_path_summary = api_path_summary @property - def google_labels(self) -> Optional[list[GoogleLabel]]: - return None if self.attributes is None else self.attributes.google_labels + def api_path_raw_u_r_i(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.api_path_raw_u_r_i - @google_labels.setter - def google_labels(self, google_labels: Optional[list[GoogleLabel]]): + @api_path_raw_u_r_i.setter + def api_path_raw_u_r_i(self, api_path_raw_u_r_i: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_labels = google_labels + self.attributes.api_path_raw_u_r_i = api_path_raw_u_r_i @property - def google_tags(self) -> Optional[list[GoogleTag]]: - return None if self.attributes is None else self.attributes.google_tags + def api_path_is_templated(self) -> Optional[bool]: + return ( + None if self.attributes is None else self.attributes.api_path_is_templated + ) - @google_tags.setter - def google_tags(self, google_tags: Optional[list[GoogleTag]]): + @api_path_is_templated.setter + def api_path_is_templated(self, api_path_is_templated: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.google_tags = google_tags + self.attributes.api_path_is_templated = api_path_is_templated - class Attributes(DataStudio.Attributes): - data_studio_asset_type: Optional[GoogleDatastudioAssetType] = Field( - None, description="", alias="dataStudioAssetType" - ) - data_studio_asset_title: Optional[str] = Field( - None, description="", alias="dataStudioAssetTitle" - ) - data_studio_asset_owner: Optional[str] = Field( - None, description="", alias="dataStudioAssetOwner" + @property + def api_path_available_operations(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.api_path_available_operations ) - is_trashed_data_studio_asset: Optional[bool] = Field( - None, description="", alias="isTrashedDataStudioAsset" + + @api_path_available_operations.setter + def api_path_available_operations( + self, api_path_available_operations: Optional[set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_path_available_operations = api_path_available_operations + + @property + def api_path_available_response_codes(self) -> Optional[dict[str, str]]: + return ( + None + if self.attributes is None + else self.attributes.api_path_available_response_codes ) - google_service: Optional[str] = Field( - None, description="", alias="googleService" + + @api_path_available_response_codes.setter + def api_path_available_response_codes( + self, api_path_available_response_codes: Optional[dict[str, str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_path_available_response_codes = ( + api_path_available_response_codes ) - google_project_name: Optional[str] = Field( - None, description="", alias="googleProjectName" + + @property + def api_path_is_ingress_exposed(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.api_path_is_ingress_exposed ) - google_project_id: Optional[str] = Field( - None, description="", alias="googleProjectId" + + @api_path_is_ingress_exposed.setter + def api_path_is_ingress_exposed(self, api_path_is_ingress_exposed: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_path_is_ingress_exposed = api_path_is_ingress_exposed + + @property + def api_spec(self) -> Optional[APISpec]: + return None if self.attributes is None else self.attributes.api_spec + + @api_spec.setter + def api_spec(self, api_spec: Optional[APISpec]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.api_spec = api_spec + + class Attributes(API.Attributes): + api_path_summary: Optional[str] = Field( + None, description="", alias="apiPathSummary" ) - google_project_number: Optional[int] = Field( - None, description="", alias="googleProjectNumber" + api_path_raw_u_r_i: Optional[str] = Field( + None, description="", alias="apiPathRawURI" ) - google_location: Optional[str] = Field( - None, description="", alias="googleLocation" + api_path_is_templated: Optional[bool] = Field( + None, description="", alias="apiPathIsTemplated" ) - google_location_type: Optional[str] = Field( - None, description="", alias="googleLocationType" + api_path_available_operations: Optional[set[str]] = Field( + None, description="", alias="apiPathAvailableOperations" ) - google_labels: Optional[list[GoogleLabel]] = Field( - None, description="", alias="googleLabels" + api_path_available_response_codes: Optional[dict[str, str]] = Field( + None, description="", alias="apiPathAvailableResponseCodes" ) - google_tags: Optional[list[GoogleTag]] = Field( - None, description="", alias="googleTags" + api_path_is_ingress_exposed: Optional[bool] = Field( + None, description="", alias="apiPathIsIngressExposed" ) + api_spec: Optional[APISpec] = Field( + None, description="", alias="apiSpec" + ) # relationship - attributes: "DataStudioAsset.Attributes" = Field( - default_factory=lambda: DataStudioAsset.Attributes(), + attributes: "APIPath.Attributes" = Field( + default_factory=lambda: APIPath.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -DataStudioAsset.Attributes.update_forward_refs() +APISpec.Attributes.update_forward_refs() + + +APIPath.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset54.py b/pyatlan/model/assets/asset54.py index e3411049e..fc8855190 100644 --- a/pyatlan/model/assets/asset54.py +++ b/pyatlan/model/assets/asset54.py @@ -4,391 +4,308 @@ from __future__ import annotations -from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from pyatlan.model.enums import AtlanConnectorType -from pyatlan.utils import validate_required_fields +from pyatlan.model.enums import GoogleDatastudioAssetType +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + KeywordTextStemmedField, + NumericField, + RelationField, +) +from pyatlan.model.structs import GoogleLabel, GoogleTag -from .asset30 import S3 +from .asset42 import DataStudio -class S3Bucket(S3): +class DataStudioAsset(DataStudio): """Description""" - @classmethod - # @validate_arguments() - def create( - cls, *, name: str, connection_qualified_name: str, aws_arn: str - ) -> S3Bucket: - validate_required_fields( - ["name", "connection_qualified_name", "aws_arn"], - [name, connection_qualified_name, aws_arn], - ) - attributes = S3Bucket.Attributes.create( - name=name, - connection_qualified_name=connection_qualified_name, - aws_arn=aws_arn, - ) - return cls(attributes=attributes) - - type_name: str = Field("S3Bucket", allow_mutation=False) + type_name: str = Field("DataStudioAsset", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "S3Bucket": - raise ValueError("must be S3Bucket") + if v != "DataStudioAsset": + raise ValueError("must be DataStudioAsset") return v def __setattr__(self, name, value): - if name in S3Bucket._convience_properties: + if name in DataStudioAsset._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "s3_object_count", - "s3_bucket_versioning_enabled", - "objects", + DATA_STUDIO_ASSET_TYPE: ClassVar[RelationField] = RelationField( + "dataStudioAssetType" + ) + """ + TBC + """ + DATA_STUDIO_ASSET_TITLE: ClassVar[ + KeywordTextStemmedField + ] = KeywordTextStemmedField( + "dataStudioAssetTitle", + "dataStudioAssetTitle.keyword", + "dataStudioAssetTitle", + "dataStudioAssetTitle.stemmed", + ) + """ + TBC + """ + DATA_STUDIO_ASSET_OWNER: ClassVar[KeywordField] = KeywordField( + "dataStudioAssetOwner", "dataStudioAssetOwner" + ) + """ + TBC + """ + IS_TRASHED_DATA_STUDIO_ASSET: ClassVar[BooleanField] = BooleanField( + "isTrashedDataStudioAsset", "isTrashedDataStudioAsset" + ) + """ + TBC + """ + GOOGLE_SERVICE: ClassVar[KeywordField] = KeywordField( + "googleService", "googleService" + ) + """ + TBC + """ + GOOGLE_PROJECT_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "googleProjectName", "googleProjectName", "googleProjectName.text" + ) + """ + TBC + """ + GOOGLE_PROJECT_ID: ClassVar[KeywordTextField] = KeywordTextField( + "googleProjectId", "googleProjectId", "googleProjectId.text" + ) + """ + TBC + """ + GOOGLE_PROJECT_NUMBER: ClassVar[NumericField] = NumericField( + "googleProjectNumber", "googleProjectNumber" + ) + """ + TBC + """ + GOOGLE_LOCATION: ClassVar[KeywordField] = KeywordField( + "googleLocation", "googleLocation" + ) + """ + TBC + """ + GOOGLE_LOCATION_TYPE: ClassVar[KeywordField] = KeywordField( + "googleLocationType", "googleLocationType" + ) + """ + TBC + """ + GOOGLE_LABELS: ClassVar[KeywordField] = KeywordField("googleLabels", "googleLabels") + """ + TBC + """ + GOOGLE_TAGS: ClassVar[KeywordField] = KeywordField("googleTags", "googleTags") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "data_studio_asset_type", + "data_studio_asset_title", + "data_studio_asset_owner", + "is_trashed_data_studio_asset", + "google_service", + "google_project_name", + "google_project_id", + "google_project_number", + "google_location", + "google_location_type", + "google_labels", + "google_tags", ] @property - def s3_object_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.s3_object_count + def data_studio_asset_type(self) -> Optional[GoogleDatastudioAssetType]: + return ( + None if self.attributes is None else self.attributes.data_studio_asset_type + ) - @s3_object_count.setter - def s3_object_count(self, s3_object_count: Optional[int]): + @data_studio_asset_type.setter + def data_studio_asset_type( + self, data_studio_asset_type: Optional[GoogleDatastudioAssetType] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_object_count = s3_object_count + self.attributes.data_studio_asset_type = data_studio_asset_type @property - def s3_bucket_versioning_enabled(self) -> Optional[bool]: + def data_studio_asset_title(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.s3_bucket_versioning_enabled + None if self.attributes is None else self.attributes.data_studio_asset_title ) - @s3_bucket_versioning_enabled.setter - def s3_bucket_versioning_enabled( - self, s3_bucket_versioning_enabled: Optional[bool] - ): + @data_studio_asset_title.setter + def data_studio_asset_title(self, data_studio_asset_title: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_bucket_versioning_enabled = s3_bucket_versioning_enabled + self.attributes.data_studio_asset_title = data_studio_asset_title @property - def objects(self) -> Optional[list[S3Object]]: - return None if self.attributes is None else self.attributes.objects + def data_studio_asset_owner(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.data_studio_asset_owner + ) - @objects.setter - def objects(self, objects: Optional[list[S3Object]]): + @data_studio_asset_owner.setter + def data_studio_asset_owner(self, data_studio_asset_owner: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.objects = objects - - class Attributes(S3.Attributes): - s3_object_count: Optional[int] = Field( - None, description="", alias="s3ObjectCount" - ) - s3_bucket_versioning_enabled: Optional[bool] = Field( - None, description="", alias="s3BucketVersioningEnabled" - ) - objects: Optional[list[S3Object]] = Field( - None, description="", alias="objects" - ) # relationship - - @classmethod - # @validate_arguments() - def create( - cls, *, name: str, connection_qualified_name: str, aws_arn: str - ) -> S3Bucket.Attributes: - validate_required_fields( - ["name", "connection_qualified_name", "aws_arn"], - [name, connection_qualified_name, aws_arn], - ) - fields = connection_qualified_name.split("/") - if len(fields) != 3: - raise ValueError("Invalid connection_qualified_name") - try: - if fields[0].replace(" ", "") == "" or fields[2].replace(" ", "") == "": - raise ValueError("Invalid connection_qualified_name") - connector_type = AtlanConnectorType(fields[1]) # type:ignore - if connector_type != AtlanConnectorType.S3: - raise ValueError("Connector type must be s3") - except ValueError as e: - raise ValueError("Invalid connection_qualified_name") from e - return S3Bucket.Attributes( - aws_arn=aws_arn, - name=name, - connection_qualified_name=connection_qualified_name, - qualified_name=f"{connection_qualified_name}/{aws_arn}", - connector_name=connector_type.value, - ) - - attributes: "S3Bucket.Attributes" = Field( - default_factory=lambda: S3Bucket.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class S3Object(S3): - """Description""" - - @classmethod - # @validate_arguments() - def create( - cls, - *, - name: str, - connection_qualified_name: str, - aws_arn: str, - s3_bucket_qualified_name: str, - ) -> S3Object: - validate_required_fields( - [ - "name", - "connection_qualified_name", - "aws_arn", - "s3_bucket_qualified_name", - ], - [name, connection_qualified_name, aws_arn, s3_bucket_qualified_name], - ) - attributes = S3Object.Attributes.create( - name=name, - connection_qualified_name=connection_qualified_name, - aws_arn=aws_arn, - s3_bucket_qualified_name=s3_bucket_qualified_name, - ) - return cls(attributes=attributes) - - type_name: str = Field("S3Object", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "S3Object": - raise ValueError("must be S3Object") - return v - - def __setattr__(self, name, value): - if name in S3Object._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "s3_object_last_modified_time", - "s3_bucket_name", - "s3_bucket_qualified_name", - "s3_object_size", - "s3_object_storage_class", - "s3_object_key", - "s3_object_content_type", - "s3_object_content_disposition", - "s3_object_version_id", - "bucket", - ] + self.attributes.data_studio_asset_owner = data_studio_asset_owner @property - def s3_object_last_modified_time(self) -> Optional[datetime]: + def is_trashed_data_studio_asset(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.s3_object_last_modified_time + else self.attributes.is_trashed_data_studio_asset ) - @s3_object_last_modified_time.setter - def s3_object_last_modified_time( - self, s3_object_last_modified_time: Optional[datetime] + @is_trashed_data_studio_asset.setter + def is_trashed_data_studio_asset( + self, is_trashed_data_studio_asset: Optional[bool] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_object_last_modified_time = s3_object_last_modified_time + self.attributes.is_trashed_data_studio_asset = is_trashed_data_studio_asset @property - def s3_bucket_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.s3_bucket_name + def google_service(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_service - @s3_bucket_name.setter - def s3_bucket_name(self, s3_bucket_name: Optional[str]): + @google_service.setter + def google_service(self, google_service: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_bucket_name = s3_bucket_name + self.attributes.google_service = google_service @property - def s3_bucket_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.s3_bucket_qualified_name - ) + def google_project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_project_name - @s3_bucket_qualified_name.setter - def s3_bucket_qualified_name(self, s3_bucket_qualified_name: Optional[str]): + @google_project_name.setter + def google_project_name(self, google_project_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_bucket_qualified_name = s3_bucket_qualified_name + self.attributes.google_project_name = google_project_name @property - def s3_object_size(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.s3_object_size + def google_project_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_project_id - @s3_object_size.setter - def s3_object_size(self, s3_object_size: Optional[int]): + @google_project_id.setter + def google_project_id(self, google_project_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_object_size = s3_object_size + self.attributes.google_project_id = google_project_id @property - def s3_object_storage_class(self) -> Optional[str]: + def google_project_number(self) -> Optional[int]: return ( - None if self.attributes is None else self.attributes.s3_object_storage_class + None if self.attributes is None else self.attributes.google_project_number ) - @s3_object_storage_class.setter - def s3_object_storage_class(self, s3_object_storage_class: Optional[str]): + @google_project_number.setter + def google_project_number(self, google_project_number: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_object_storage_class = s3_object_storage_class + self.attributes.google_project_number = google_project_number @property - def s3_object_key(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.s3_object_key + def google_location(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_location - @s3_object_key.setter - def s3_object_key(self, s3_object_key: Optional[str]): + @google_location.setter + def google_location(self, google_location: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_object_key = s3_object_key + self.attributes.google_location = google_location @property - def s3_object_content_type(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.s3_object_content_type - ) + def google_location_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.google_location_type - @s3_object_content_type.setter - def s3_object_content_type(self, s3_object_content_type: Optional[str]): + @google_location_type.setter + def google_location_type(self, google_location_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_object_content_type = s3_object_content_type + self.attributes.google_location_type = google_location_type @property - def s3_object_content_disposition(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.s3_object_content_disposition - ) - - @s3_object_content_disposition.setter - def s3_object_content_disposition( - self, s3_object_content_disposition: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.s3_object_content_disposition = s3_object_content_disposition - - @property - def s3_object_version_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.s3_object_version_id + def google_labels(self) -> Optional[list[GoogleLabel]]: + return None if self.attributes is None else self.attributes.google_labels - @s3_object_version_id.setter - def s3_object_version_id(self, s3_object_version_id: Optional[str]): + @google_labels.setter + def google_labels(self, google_labels: Optional[list[GoogleLabel]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.s3_object_version_id = s3_object_version_id + self.attributes.google_labels = google_labels @property - def bucket(self) -> Optional[S3Bucket]: - return None if self.attributes is None else self.attributes.bucket + def google_tags(self) -> Optional[list[GoogleTag]]: + return None if self.attributes is None else self.attributes.google_tags - @bucket.setter - def bucket(self, bucket: Optional[S3Bucket]): + @google_tags.setter + def google_tags(self, google_tags: Optional[list[GoogleTag]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.bucket = bucket + self.attributes.google_tags = google_tags - class Attributes(S3.Attributes): - s3_object_last_modified_time: Optional[datetime] = Field( - None, description="", alias="s3ObjectLastModifiedTime" + class Attributes(DataStudio.Attributes): + data_studio_asset_type: Optional[GoogleDatastudioAssetType] = Field( + None, description="", alias="dataStudioAssetType" + ) + data_studio_asset_title: Optional[str] = Field( + None, description="", alias="dataStudioAssetTitle" + ) + data_studio_asset_owner: Optional[str] = Field( + None, description="", alias="dataStudioAssetOwner" + ) + is_trashed_data_studio_asset: Optional[bool] = Field( + None, description="", alias="isTrashedDataStudioAsset" ) - s3_bucket_name: Optional[str] = Field( - None, description="", alias="s3BucketName" + google_service: Optional[str] = Field( + None, description="", alias="googleService" ) - s3_bucket_qualified_name: Optional[str] = Field( - None, description="", alias="s3BucketQualifiedName" + google_project_name: Optional[str] = Field( + None, description="", alias="googleProjectName" ) - s3_object_size: Optional[int] = Field( - None, description="", alias="s3ObjectSize" + google_project_id: Optional[str] = Field( + None, description="", alias="googleProjectId" ) - s3_object_storage_class: Optional[str] = Field( - None, description="", alias="s3ObjectStorageClass" + google_project_number: Optional[int] = Field( + None, description="", alias="googleProjectNumber" ) - s3_object_key: Optional[str] = Field(None, description="", alias="s3ObjectKey") - s3_object_content_type: Optional[str] = Field( - None, description="", alias="s3ObjectContentType" + google_location: Optional[str] = Field( + None, description="", alias="googleLocation" ) - s3_object_content_disposition: Optional[str] = Field( - None, description="", alias="s3ObjectContentDisposition" + google_location_type: Optional[str] = Field( + None, description="", alias="googleLocationType" ) - s3_object_version_id: Optional[str] = Field( - None, description="", alias="s3ObjectVersionId" + google_labels: Optional[list[GoogleLabel]] = Field( + None, description="", alias="googleLabels" ) - bucket: Optional[S3Bucket] = Field( - None, description="", alias="bucket" - ) # relationship - - @classmethod - # @validate_arguments() - def create( - cls, - *, - name: str, - connection_qualified_name: str, - aws_arn: str, - s3_bucket_qualified_name: str, - ) -> S3Object.Attributes: - validate_required_fields( - [ - "name", - "connection_qualified_name", - "aws_arn", - "s3_bucket_qualified_name", - ], - [name, connection_qualified_name, aws_arn, s3_bucket_qualified_name], - ) - fields = connection_qualified_name.split("/") - if len(fields) != 3: - raise ValueError("Invalid connection_qualified_name") - try: - if fields[0].replace(" ", "") == "" or fields[2].replace(" ", "") == "": - raise ValueError("Invalid connection_qualified_name") - connector_type = AtlanConnectorType(fields[1]) # type:ignore - if connector_type != AtlanConnectorType.S3: - raise ValueError("Connector type must be s3") - except ValueError as e: - raise ValueError("Invalid connection_qualified_name") from e - return S3Object.Attributes( - aws_arn=aws_arn, - name=name, - connection_qualified_name=connection_qualified_name, - qualified_name=f"{connection_qualified_name}/{aws_arn}", - connector_name=connector_type.value, - s3_bucket_qualified_name=s3_bucket_qualified_name, - bucket=S3Bucket.ref_by_qualified_name(s3_bucket_qualified_name), - ) - - attributes: "S3Object.Attributes" = Field( - default_factory=lambda: S3Object.Attributes(), + google_tags: Optional[list[GoogleTag]] = Field( + None, description="", alias="googleTags" + ) + + attributes: "DataStudioAsset.Attributes" = Field( + default_factory=lambda: DataStudioAsset.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -S3Bucket.Attributes.update_forward_refs() - - -S3Object.Attributes.update_forward_refs() +DataStudioAsset.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset55.py b/pyatlan/model/assets/asset55.py index 5dee7117e..444891cb6 100644 --- a/pyatlan/model/assets/asset55.py +++ b/pyatlan/model/assets/asset55.py @@ -9,759 +9,469 @@ from pydantic import Field, validator -from pyatlan.model.enums import ( - ADLSAccessTier, - ADLSAccountStatus, - ADLSEncryptionTypes, - ADLSLeaseState, - ADLSLeaseStatus, - ADLSObjectArchiveStatus, - ADLSObjectType, - ADLSPerformance, - ADLSProvisionState, - ADLSReplicationType, - ADLSStorageKind, +from pyatlan.model.enums import AtlanConnectorType +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + NumericField, + RelationField, ) +from pyatlan.utils import validate_required_fields -from .asset31 import ADLS +from .asset31 import S3 -class ADLSAccount(ADLS): +class S3Bucket(S3): """Description""" - type_name: str = Field("ADLSAccount", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "ADLSAccount": - raise ValueError("must be ADLSAccount") - return v - - def __setattr__(self, name, value): - if name in ADLSAccount._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "adls_e_tag", - "adls_encryption_type", - "adls_account_resource_group", - "adls_account_subscription", - "adls_account_performance", - "adls_account_replication", - "adls_account_kind", - "adls_primary_disk_state", - "adls_account_provision_state", - "adls_account_access_tier", - "adls_containers", - ] - - @property - def adls_e_tag(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.adls_e_tag - - @adls_e_tag.setter - def adls_e_tag(self, adls_e_tag: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_e_tag = adls_e_tag - - @property - def adls_encryption_type(self) -> Optional[ADLSEncryptionTypes]: - return None if self.attributes is None else self.attributes.adls_encryption_type - - @adls_encryption_type.setter - def adls_encryption_type(self, adls_encryption_type: Optional[ADLSEncryptionTypes]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_encryption_type = adls_encryption_type - - @property - def adls_account_resource_group(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.adls_account_resource_group - ) - - @adls_account_resource_group.setter - def adls_account_resource_group(self, adls_account_resource_group: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_account_resource_group = adls_account_resource_group - - @property - def adls_account_subscription(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.adls_account_subscription - ) - - @adls_account_subscription.setter - def adls_account_subscription(self, adls_account_subscription: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_account_subscription = adls_account_subscription - - @property - def adls_account_performance(self) -> Optional[ADLSPerformance]: - return ( - None - if self.attributes is None - else self.attributes.adls_account_performance - ) - - @adls_account_performance.setter - def adls_account_performance( - self, adls_account_performance: Optional[ADLSPerformance] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_account_performance = adls_account_performance - - @property - def adls_account_replication(self) -> Optional[ADLSReplicationType]: - return ( - None - if self.attributes is None - else self.attributes.adls_account_replication - ) - - @adls_account_replication.setter - def adls_account_replication( - self, adls_account_replication: Optional[ADLSReplicationType] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_account_replication = adls_account_replication - - @property - def adls_account_kind(self) -> Optional[ADLSStorageKind]: - return None if self.attributes is None else self.attributes.adls_account_kind - - @adls_account_kind.setter - def adls_account_kind(self, adls_account_kind: Optional[ADLSStorageKind]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_account_kind = adls_account_kind - - @property - def adls_primary_disk_state(self) -> Optional[ADLSAccountStatus]: - return ( - None if self.attributes is None else self.attributes.adls_primary_disk_state + @classmethod + # @validate_arguments() + def create( + cls, *, name: str, connection_qualified_name: str, aws_arn: str + ) -> S3Bucket: + validate_required_fields( + ["name", "connection_qualified_name", "aws_arn"], + [name, connection_qualified_name, aws_arn], ) - - @adls_primary_disk_state.setter - def adls_primary_disk_state( - self, adls_primary_disk_state: Optional[ADLSAccountStatus] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_primary_disk_state = adls_primary_disk_state - - @property - def adls_account_provision_state(self) -> Optional[ADLSProvisionState]: - return ( - None - if self.attributes is None - else self.attributes.adls_account_provision_state + attributes = S3Bucket.Attributes.create( + name=name, + connection_qualified_name=connection_qualified_name, + aws_arn=aws_arn, ) + return cls(attributes=attributes) - @adls_account_provision_state.setter - def adls_account_provision_state( - self, adls_account_provision_state: Optional[ADLSProvisionState] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_account_provision_state = adls_account_provision_state - - @property - def adls_account_access_tier(self) -> Optional[ADLSAccessTier]: - return ( - None - if self.attributes is None - else self.attributes.adls_account_access_tier - ) - - @adls_account_access_tier.setter - def adls_account_access_tier( - self, adls_account_access_tier: Optional[ADLSAccessTier] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_account_access_tier = adls_account_access_tier - - @property - def adls_containers(self) -> Optional[list[ADLSContainer]]: - return None if self.attributes is None else self.attributes.adls_containers - - @adls_containers.setter - def adls_containers(self, adls_containers: Optional[list[ADLSContainer]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_containers = adls_containers - - class Attributes(ADLS.Attributes): - adls_e_tag: Optional[str] = Field(None, description="", alias="adlsETag") - adls_encryption_type: Optional[ADLSEncryptionTypes] = Field( - None, description="", alias="adlsEncryptionType" - ) - adls_account_resource_group: Optional[str] = Field( - None, description="", alias="adlsAccountResourceGroup" - ) - adls_account_subscription: Optional[str] = Field( - None, description="", alias="adlsAccountSubscription" - ) - adls_account_performance: Optional[ADLSPerformance] = Field( - None, description="", alias="adlsAccountPerformance" - ) - adls_account_replication: Optional[ADLSReplicationType] = Field( - None, description="", alias="adlsAccountReplication" - ) - adls_account_kind: Optional[ADLSStorageKind] = Field( - None, description="", alias="adlsAccountKind" - ) - adls_primary_disk_state: Optional[ADLSAccountStatus] = Field( - None, description="", alias="adlsPrimaryDiskState" - ) - adls_account_provision_state: Optional[ADLSProvisionState] = Field( - None, description="", alias="adlsAccountProvisionState" - ) - adls_account_access_tier: Optional[ADLSAccessTier] = Field( - None, description="", alias="adlsAccountAccessTier" - ) - adls_containers: Optional[list[ADLSContainer]] = Field( - None, description="", alias="adlsContainers" - ) # relationship - - attributes: "ADLSAccount.Attributes" = Field( - default_factory=lambda: ADLSAccount.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class ADLSContainer(ADLS): - """Description""" - - type_name: str = Field("ADLSContainer", allow_mutation=False) + type_name: str = Field("S3Bucket", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ADLSContainer": - raise ValueError("must be ADLSContainer") + if v != "S3Bucket": + raise ValueError("must be S3Bucket") return v def __setattr__(self, name, value): - if name in ADLSContainer._convience_properties: + if name in S3Bucket._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "adls_container_url", - "adls_container_lease_state", - "adls_container_lease_status", - "adls_container_encryption_scope", - "adls_container_version_level_immutability_support", - "adls_object_count", - "adls_objects", - "adls_account", + S3OBJECT_COUNT: ClassVar[NumericField] = NumericField( + "s3ObjectCount", "s3ObjectCount" + ) + """ + TBC + """ + S3BUCKET_VERSIONING_ENABLED: ClassVar[BooleanField] = BooleanField( + "s3BucketVersioningEnabled", "s3BucketVersioningEnabled" + ) + """ + TBC + """ + + OBJECTS: ClassVar[RelationField] = RelationField("objects") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "s3_object_count", + "s3_bucket_versioning_enabled", + "objects", ] @property - def adls_container_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.adls_container_url + def s3_object_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.s3_object_count - @adls_container_url.setter - def adls_container_url(self, adls_container_url: Optional[str]): + @s3_object_count.setter + def s3_object_count(self, s3_object_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_container_url = adls_container_url + self.attributes.s3_object_count = s3_object_count @property - def adls_container_lease_state(self) -> Optional[ADLSLeaseState]: + def s3_bucket_versioning_enabled(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.adls_container_lease_state + else self.attributes.s3_bucket_versioning_enabled ) - @adls_container_lease_state.setter - def adls_container_lease_state( - self, adls_container_lease_state: Optional[ADLSLeaseState] + @s3_bucket_versioning_enabled.setter + def s3_bucket_versioning_enabled( + self, s3_bucket_versioning_enabled: Optional[bool] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_container_lease_state = adls_container_lease_state + self.attributes.s3_bucket_versioning_enabled = s3_bucket_versioning_enabled @property - def adls_container_lease_status(self) -> Optional[ADLSLeaseStatus]: - return ( - None - if self.attributes is None - else self.attributes.adls_container_lease_status - ) + def objects(self) -> Optional[list[S3Object]]: + return None if self.attributes is None else self.attributes.objects - @adls_container_lease_status.setter - def adls_container_lease_status( - self, adls_container_lease_status: Optional[ADLSLeaseStatus] - ): + @objects.setter + def objects(self, objects: Optional[list[S3Object]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_container_lease_status = adls_container_lease_status + self.attributes.objects = objects - @property - def adls_container_encryption_scope(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.adls_container_encryption_scope + class Attributes(S3.Attributes): + s3_object_count: Optional[int] = Field( + None, description="", alias="s3ObjectCount" ) - - @adls_container_encryption_scope.setter - def adls_container_encryption_scope( - self, adls_container_encryption_scope: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_container_encryption_scope = ( - adls_container_encryption_scope + s3_bucket_versioning_enabled: Optional[bool] = Field( + None, description="", alias="s3BucketVersioningEnabled" ) - - @property - def adls_container_version_level_immutability_support(self) -> Optional[bool]: - return ( - None - if self.attributes is None - else self.attributes.adls_container_version_level_immutability_support - ) - - @adls_container_version_level_immutability_support.setter - def adls_container_version_level_immutability_support( - self, adls_container_version_level_immutability_support: Optional[bool] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_container_version_level_immutability_support = ( - adls_container_version_level_immutability_support - ) - - @property - def adls_object_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.adls_object_count - - @adls_object_count.setter - def adls_object_count(self, adls_object_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_object_count = adls_object_count - - @property - def adls_objects(self) -> Optional[list[ADLSObject]]: - return None if self.attributes is None else self.attributes.adls_objects - - @adls_objects.setter - def adls_objects(self, adls_objects: Optional[list[ADLSObject]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_objects = adls_objects - - @property - def adls_account(self) -> Optional[ADLSAccount]: - return None if self.attributes is None else self.attributes.adls_account - - @adls_account.setter - def adls_account(self, adls_account: Optional[ADLSAccount]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_account = adls_account - - class Attributes(ADLS.Attributes): - adls_container_url: Optional[str] = Field( - None, description="", alias="adlsContainerUrl" - ) - adls_container_lease_state: Optional[ADLSLeaseState] = Field( - None, description="", alias="adlsContainerLeaseState" - ) - adls_container_lease_status: Optional[ADLSLeaseStatus] = Field( - None, description="", alias="adlsContainerLeaseStatus" - ) - adls_container_encryption_scope: Optional[str] = Field( - None, description="", alias="adlsContainerEncryptionScope" - ) - adls_container_version_level_immutability_support: Optional[bool] = Field( - None, description="", alias="adlsContainerVersionLevelImmutabilitySupport" - ) - adls_object_count: Optional[int] = Field( - None, description="", alias="adlsObjectCount" - ) - adls_objects: Optional[list[ADLSObject]] = Field( - None, description="", alias="adlsObjects" - ) # relationship - adls_account: Optional[ADLSAccount] = Field( - None, description="", alias="adlsAccount" + objects: Optional[list[S3Object]] = Field( + None, description="", alias="objects" ) # relationship - attributes: "ADLSContainer.Attributes" = Field( - default_factory=lambda: ADLSContainer.Attributes(), + @classmethod + # @validate_arguments() + def create( + cls, *, name: str, connection_qualified_name: str, aws_arn: str + ) -> S3Bucket.Attributes: + validate_required_fields( + ["name", "connection_qualified_name", "aws_arn"], + [name, connection_qualified_name, aws_arn], + ) + fields = connection_qualified_name.split("/") + if len(fields) != 3: + raise ValueError("Invalid connection_qualified_name") + try: + if fields[0].replace(" ", "") == "" or fields[2].replace(" ", "") == "": + raise ValueError("Invalid connection_qualified_name") + connector_type = AtlanConnectorType(fields[1]) # type:ignore + if connector_type != AtlanConnectorType.S3: + raise ValueError("Connector type must be s3") + except ValueError as e: + raise ValueError("Invalid connection_qualified_name") from e + return S3Bucket.Attributes( + aws_arn=aws_arn, + name=name, + connection_qualified_name=connection_qualified_name, + qualified_name=f"{connection_qualified_name}/{aws_arn}", + connector_name=connector_type.value, + ) + + attributes: "S3Bucket.Attributes" = Field( + default_factory=lambda: S3Bucket.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class ADLSObject(ADLS): +class S3Object(S3): """Description""" - type_name: str = Field("ADLSObject", allow_mutation=False) + @classmethod + # @validate_arguments() + def create( + cls, + *, + name: str, + connection_qualified_name: str, + aws_arn: str, + s3_bucket_qualified_name: str, + ) -> S3Object: + validate_required_fields( + [ + "name", + "connection_qualified_name", + "aws_arn", + "s3_bucket_qualified_name", + ], + [name, connection_qualified_name, aws_arn, s3_bucket_qualified_name], + ) + attributes = S3Object.Attributes.create( + name=name, + connection_qualified_name=connection_qualified_name, + aws_arn=aws_arn, + s3_bucket_qualified_name=s3_bucket_qualified_name, + ) + return cls(attributes=attributes) + + type_name: str = Field("S3Object", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ADLSObject": - raise ValueError("must be ADLSObject") + if v != "S3Object": + raise ValueError("must be S3Object") return v def __setattr__(self, name, value): - if name in ADLSObject._convience_properties: + if name in S3Object._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "adls_object_url", - "adls_object_version_id", - "adls_object_type", - "adls_object_size", - "adls_object_access_tier", - "adls_object_access_tier_last_modified_time", - "adls_object_archive_status", - "adls_object_server_encrypted", - "adls_object_version_level_immutability_support", - "adls_object_cache_control", - "adls_object_content_type", - "adls_object_content_m_d5_hash", - "adls_object_content_language", - "adls_object_lease_status", - "adls_object_lease_state", - "adls_object_metadata", - "adls_container_qualified_name", - "adls_container", + S3OBJECT_LAST_MODIFIED_TIME: ClassVar[NumericField] = NumericField( + "s3ObjectLastModifiedTime", "s3ObjectLastModifiedTime" + ) + """ + TBC + """ + S3BUCKET_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "s3BucketName", "s3BucketName", "s3BucketName.text" + ) + """ + TBC + """ + S3BUCKET_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "s3BucketQualifiedName", "s3BucketQualifiedName" + ) + """ + TBC + """ + S3OBJECT_SIZE: ClassVar[NumericField] = NumericField("s3ObjectSize", "s3ObjectSize") + """ + TBC + """ + S3OBJECT_STORAGE_CLASS: ClassVar[KeywordField] = KeywordField( + "s3ObjectStorageClass", "s3ObjectStorageClass" + ) + """ + TBC + """ + S3OBJECT_KEY: ClassVar[KeywordTextField] = KeywordTextField( + "s3ObjectKey", "s3ObjectKey", "s3ObjectKey.text" + ) + """ + TBC + """ + S3OBJECT_CONTENT_TYPE: ClassVar[KeywordField] = KeywordField( + "s3ObjectContentType", "s3ObjectContentType" + ) + """ + TBC + """ + S3OBJECT_CONTENT_DISPOSITION: ClassVar[KeywordField] = KeywordField( + "s3ObjectContentDisposition", "s3ObjectContentDisposition" + ) + """ + TBC + """ + S3OBJECT_VERSION_ID: ClassVar[KeywordField] = KeywordField( + "s3ObjectVersionId", "s3ObjectVersionId" + ) + """ + TBC + """ + + BUCKET: ClassVar[RelationField] = RelationField("bucket") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "s3_object_last_modified_time", + "s3_bucket_name", + "s3_bucket_qualified_name", + "s3_object_size", + "s3_object_storage_class", + "s3_object_key", + "s3_object_content_type", + "s3_object_content_disposition", + "s3_object_version_id", + "bucket", ] @property - def adls_object_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.adls_object_url - - @adls_object_url.setter - def adls_object_url(self, adls_object_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_object_url = adls_object_url - - @property - def adls_object_version_id(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.adls_object_version_id - ) - - @adls_object_version_id.setter - def adls_object_version_id(self, adls_object_version_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_object_version_id = adls_object_version_id - - @property - def adls_object_type(self) -> Optional[ADLSObjectType]: - return None if self.attributes is None else self.attributes.adls_object_type - - @adls_object_type.setter - def adls_object_type(self, adls_object_type: Optional[ADLSObjectType]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_object_type = adls_object_type - - @property - def adls_object_size(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.adls_object_size - - @adls_object_size.setter - def adls_object_size(self, adls_object_size: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_object_size = adls_object_size - - @property - def adls_object_access_tier(self) -> Optional[ADLSAccessTier]: - return ( - None if self.attributes is None else self.attributes.adls_object_access_tier - ) - - @adls_object_access_tier.setter - def adls_object_access_tier( - self, adls_object_access_tier: Optional[ADLSAccessTier] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_object_access_tier = adls_object_access_tier - - @property - def adls_object_access_tier_last_modified_time(self) -> Optional[datetime]: - return ( - None - if self.attributes is None - else self.attributes.adls_object_access_tier_last_modified_time - ) - - @adls_object_access_tier_last_modified_time.setter - def adls_object_access_tier_last_modified_time( - self, adls_object_access_tier_last_modified_time: Optional[datetime] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_object_access_tier_last_modified_time = ( - adls_object_access_tier_last_modified_time - ) - - @property - def adls_object_archive_status(self) -> Optional[ADLSObjectArchiveStatus]: + def s3_object_last_modified_time(self) -> Optional[datetime]: return ( None if self.attributes is None - else self.attributes.adls_object_archive_status + else self.attributes.s3_object_last_modified_time ) - @adls_object_archive_status.setter - def adls_object_archive_status( - self, adls_object_archive_status: Optional[ADLSObjectArchiveStatus] + @s3_object_last_modified_time.setter + def s3_object_last_modified_time( + self, s3_object_last_modified_time: Optional[datetime] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_object_archive_status = adls_object_archive_status + self.attributes.s3_object_last_modified_time = s3_object_last_modified_time @property - def adls_object_server_encrypted(self) -> Optional[bool]: - return ( - None - if self.attributes is None - else self.attributes.adls_object_server_encrypted - ) + def s3_bucket_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.s3_bucket_name - @adls_object_server_encrypted.setter - def adls_object_server_encrypted( - self, adls_object_server_encrypted: Optional[bool] - ): + @s3_bucket_name.setter + def s3_bucket_name(self, s3_bucket_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_object_server_encrypted = adls_object_server_encrypted + self.attributes.s3_bucket_name = s3_bucket_name @property - def adls_object_version_level_immutability_support(self) -> Optional[bool]: + def s3_bucket_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.adls_object_version_level_immutability_support + else self.attributes.s3_bucket_qualified_name ) - @adls_object_version_level_immutability_support.setter - def adls_object_version_level_immutability_support( - self, adls_object_version_level_immutability_support: Optional[bool] - ): + @s3_bucket_qualified_name.setter + def s3_bucket_qualified_name(self, s3_bucket_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_object_version_level_immutability_support = ( - adls_object_version_level_immutability_support - ) + self.attributes.s3_bucket_qualified_name = s3_bucket_qualified_name @property - def adls_object_cache_control(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.adls_object_cache_control - ) + def s3_object_size(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.s3_object_size - @adls_object_cache_control.setter - def adls_object_cache_control(self, adls_object_cache_control: Optional[str]): + @s3_object_size.setter + def s3_object_size(self, s3_object_size: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_object_cache_control = adls_object_cache_control + self.attributes.s3_object_size = s3_object_size @property - def adls_object_content_type(self) -> Optional[str]: + def s3_object_storage_class(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.adls_object_content_type + None if self.attributes is None else self.attributes.s3_object_storage_class ) - @adls_object_content_type.setter - def adls_object_content_type(self, adls_object_content_type: Optional[str]): + @s3_object_storage_class.setter + def s3_object_storage_class(self, s3_object_storage_class: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_object_content_type = adls_object_content_type + self.attributes.s3_object_storage_class = s3_object_storage_class @property - def adls_object_content_m_d5_hash(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.adls_object_content_m_d5_hash - ) + def s3_object_key(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.s3_object_key - @adls_object_content_m_d5_hash.setter - def adls_object_content_m_d5_hash( - self, adls_object_content_m_d5_hash: Optional[str] - ): + @s3_object_key.setter + def s3_object_key(self, s3_object_key: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_object_content_m_d5_hash = adls_object_content_m_d5_hash + self.attributes.s3_object_key = s3_object_key @property - def adls_object_content_language(self) -> Optional[str]: + def s3_object_content_type(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.adls_object_content_language + None if self.attributes is None else self.attributes.s3_object_content_type ) - @adls_object_content_language.setter - def adls_object_content_language(self, adls_object_content_language: Optional[str]): + @s3_object_content_type.setter + def s3_object_content_type(self, s3_object_content_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_object_content_language = adls_object_content_language + self.attributes.s3_object_content_type = s3_object_content_type @property - def adls_object_lease_status(self) -> Optional[ADLSLeaseStatus]: + def s3_object_content_disposition(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.adls_object_lease_status - ) - - @adls_object_lease_status.setter - def adls_object_lease_status( - self, adls_object_lease_status: Optional[ADLSLeaseStatus] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_object_lease_status = adls_object_lease_status - - @property - def adls_object_lease_state(self) -> Optional[ADLSLeaseState]: - return ( - None if self.attributes is None else self.attributes.adls_object_lease_state + else self.attributes.s3_object_content_disposition ) - @adls_object_lease_state.setter - def adls_object_lease_state( - self, adls_object_lease_state: Optional[ADLSLeaseState] + @s3_object_content_disposition.setter + def s3_object_content_disposition( + self, s3_object_content_disposition: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_object_lease_state = adls_object_lease_state - - @property - def adls_object_metadata(self) -> Optional[dict[str, str]]: - return None if self.attributes is None else self.attributes.adls_object_metadata - - @adls_object_metadata.setter - def adls_object_metadata(self, adls_object_metadata: Optional[dict[str, str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.adls_object_metadata = adls_object_metadata + self.attributes.s3_object_content_disposition = s3_object_content_disposition @property - def adls_container_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.adls_container_qualified_name - ) + def s3_object_version_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.s3_object_version_id - @adls_container_qualified_name.setter - def adls_container_qualified_name( - self, adls_container_qualified_name: Optional[str] - ): + @s3_object_version_id.setter + def s3_object_version_id(self, s3_object_version_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_container_qualified_name = adls_container_qualified_name + self.attributes.s3_object_version_id = s3_object_version_id @property - def adls_container(self) -> Optional[ADLSContainer]: - return None if self.attributes is None else self.attributes.adls_container + def bucket(self) -> Optional[S3Bucket]: + return None if self.attributes is None else self.attributes.bucket - @adls_container.setter - def adls_container(self, adls_container: Optional[ADLSContainer]): + @bucket.setter + def bucket(self, bucket: Optional[S3Bucket]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.adls_container = adls_container + self.attributes.bucket = bucket - class Attributes(ADLS.Attributes): - adls_object_url: Optional[str] = Field( - None, description="", alias="adlsObjectUrl" - ) - adls_object_version_id: Optional[str] = Field( - None, description="", alias="adlsObjectVersionId" - ) - adls_object_type: Optional[ADLSObjectType] = Field( - None, description="", alias="adlsObjectType" - ) - adls_object_size: Optional[int] = Field( - None, description="", alias="adlsObjectSize" + class Attributes(S3.Attributes): + s3_object_last_modified_time: Optional[datetime] = Field( + None, description="", alias="s3ObjectLastModifiedTime" ) - adls_object_access_tier: Optional[ADLSAccessTier] = Field( - None, description="", alias="adlsObjectAccessTier" + s3_bucket_name: Optional[str] = Field( + None, description="", alias="s3BucketName" ) - adls_object_access_tier_last_modified_time: Optional[datetime] = Field( - None, description="", alias="adlsObjectAccessTierLastModifiedTime" + s3_bucket_qualified_name: Optional[str] = Field( + None, description="", alias="s3BucketQualifiedName" ) - adls_object_archive_status: Optional[ADLSObjectArchiveStatus] = Field( - None, description="", alias="adlsObjectArchiveStatus" + s3_object_size: Optional[int] = Field( + None, description="", alias="s3ObjectSize" ) - adls_object_server_encrypted: Optional[bool] = Field( - None, description="", alias="adlsObjectServerEncrypted" + s3_object_storage_class: Optional[str] = Field( + None, description="", alias="s3ObjectStorageClass" ) - adls_object_version_level_immutability_support: Optional[bool] = Field( - None, description="", alias="adlsObjectVersionLevelImmutabilitySupport" + s3_object_key: Optional[str] = Field(None, description="", alias="s3ObjectKey") + s3_object_content_type: Optional[str] = Field( + None, description="", alias="s3ObjectContentType" ) - adls_object_cache_control: Optional[str] = Field( - None, description="", alias="adlsObjectCacheControl" + s3_object_content_disposition: Optional[str] = Field( + None, description="", alias="s3ObjectContentDisposition" ) - adls_object_content_type: Optional[str] = Field( - None, description="", alias="adlsObjectContentType" + s3_object_version_id: Optional[str] = Field( + None, description="", alias="s3ObjectVersionId" ) - adls_object_content_m_d5_hash: Optional[str] = Field( - None, description="", alias="adlsObjectContentMD5Hash" - ) - adls_object_content_language: Optional[str] = Field( - None, description="", alias="adlsObjectContentLanguage" - ) - adls_object_lease_status: Optional[ADLSLeaseStatus] = Field( - None, description="", alias="adlsObjectLeaseStatus" - ) - adls_object_lease_state: Optional[ADLSLeaseState] = Field( - None, description="", alias="adlsObjectLeaseState" - ) - adls_object_metadata: Optional[dict[str, str]] = Field( - None, description="", alias="adlsObjectMetadata" - ) - adls_container_qualified_name: Optional[str] = Field( - None, description="", alias="adlsContainerQualifiedName" - ) - adls_container: Optional[ADLSContainer] = Field( - None, description="", alias="adlsContainer" + bucket: Optional[S3Bucket] = Field( + None, description="", alias="bucket" ) # relationship - attributes: "ADLSObject.Attributes" = Field( - default_factory=lambda: ADLSObject.Attributes(), + @classmethod + # @validate_arguments() + def create( + cls, + *, + name: str, + connection_qualified_name: str, + aws_arn: str, + s3_bucket_qualified_name: str, + ) -> S3Object.Attributes: + validate_required_fields( + [ + "name", + "connection_qualified_name", + "aws_arn", + "s3_bucket_qualified_name", + ], + [name, connection_qualified_name, aws_arn, s3_bucket_qualified_name], + ) + fields = connection_qualified_name.split("/") + if len(fields) != 3: + raise ValueError("Invalid connection_qualified_name") + try: + if fields[0].replace(" ", "") == "" or fields[2].replace(" ", "") == "": + raise ValueError("Invalid connection_qualified_name") + connector_type = AtlanConnectorType(fields[1]) # type:ignore + if connector_type != AtlanConnectorType.S3: + raise ValueError("Connector type must be s3") + except ValueError as e: + raise ValueError("Invalid connection_qualified_name") from e + return S3Object.Attributes( + aws_arn=aws_arn, + name=name, + connection_qualified_name=connection_qualified_name, + qualified_name=f"{connection_qualified_name}/{aws_arn}", + connector_name=connector_type.value, + s3_bucket_qualified_name=s3_bucket_qualified_name, + bucket=S3Bucket.ref_by_qualified_name(s3_bucket_qualified_name), + ) + + attributes: "S3Object.Attributes" = Field( + default_factory=lambda: S3Object.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -ADLSAccount.Attributes.update_forward_refs() - - -ADLSContainer.Attributes.update_forward_refs() +S3Bucket.Attributes.update_forward_refs() -ADLSObject.Attributes.update_forward_refs() +S3Object.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset56.py b/pyatlan/model/assets/asset56.py index cb0a3e207..cc08e9b8c 100644 --- a/pyatlan/model/assets/asset56.py +++ b/pyatlan/model/assets/asset56.py @@ -9,478 +9,999 @@ from pydantic import Field, validator -from .asset32 import GCS - - -class GCSObject(GCS): +from pyatlan.model.enums import ( + ADLSAccessTier, + ADLSAccountStatus, + ADLSEncryptionTypes, + ADLSLeaseState, + ADLSLeaseStatus, + ADLSObjectArchiveStatus, + ADLSObjectType, + ADLSPerformance, + ADLSProvisionState, + ADLSReplicationType, + ADLSStorageKind, +) +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + NumericField, + RelationField, + TextField, +) + +from .asset32 import ADLS + + +class ADLSAccount(ADLS): """Description""" - type_name: str = Field("GCSObject", allow_mutation=False) + type_name: str = Field("ADLSAccount", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "GCSObject": - raise ValueError("must be GCSObject") + if v != "ADLSAccount": + raise ValueError("must be ADLSAccount") return v def __setattr__(self, name, value): - if name in GCSObject._convience_properties: + if name in ADLSAccount._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "gcs_bucket_name", - "gcs_bucket_qualified_name", - "gcs_object_size", - "gcs_object_key", - "gcs_object_media_link", - "gcs_object_hold_type", - "gcs_object_generation_id", - "gcs_object_c_r_c32_c_hash", - "gcs_object_m_d5_hash", - "gcs_object_data_last_modified_time", - "gcs_object_content_type", - "gcs_object_content_encoding", - "gcs_object_content_disposition", - "gcs_object_content_language", - "gcs_object_retention_expiration_date", - "gcs_bucket", + ADLS_E_TAG: ClassVar[KeywordField] = KeywordField("adlsETag", "adlsETag") + """ + TBC + """ + ADLS_ENCRYPTION_TYPE: ClassVar[KeywordField] = KeywordField( + "adlsEncryptionType", "adlsEncryptionType" + ) + """ + TBC + """ + ADLS_ACCOUNT_RESOURCE_GROUP: ClassVar[KeywordTextField] = KeywordTextField( + "adlsAccountResourceGroup", + "adlsAccountResourceGroup.keyword", + "adlsAccountResourceGroup", + ) + """ + TBC + """ + ADLS_ACCOUNT_SUBSCRIPTION: ClassVar[KeywordTextField] = KeywordTextField( + "adlsAccountSubscription", + "adlsAccountSubscription.keyword", + "adlsAccountSubscription", + ) + """ + TBC + """ + ADLS_ACCOUNT_PERFORMANCE: ClassVar[KeywordField] = KeywordField( + "adlsAccountPerformance", "adlsAccountPerformance" + ) + """ + TBC + """ + ADLS_ACCOUNT_REPLICATION: ClassVar[KeywordField] = KeywordField( + "adlsAccountReplication", "adlsAccountReplication" + ) + """ + TBC + """ + ADLS_ACCOUNT_KIND: ClassVar[KeywordField] = KeywordField( + "adlsAccountKind", "adlsAccountKind" + ) + """ + TBC + """ + ADLS_PRIMARY_DISK_STATE: ClassVar[KeywordField] = KeywordField( + "adlsPrimaryDiskState", "adlsPrimaryDiskState" + ) + """ + TBC + """ + ADLS_ACCOUNT_PROVISION_STATE: ClassVar[KeywordField] = KeywordField( + "adlsAccountProvisionState", "adlsAccountProvisionState" + ) + """ + TBC + """ + ADLS_ACCOUNT_ACCESS_TIER: ClassVar[KeywordField] = KeywordField( + "adlsAccountAccessTier", "adlsAccountAccessTier" + ) + """ + TBC + """ + + ADLS_CONTAINERS: ClassVar[RelationField] = RelationField("adlsContainers") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "adls_e_tag", + "adls_encryption_type", + "adls_account_resource_group", + "adls_account_subscription", + "adls_account_performance", + "adls_account_replication", + "adls_account_kind", + "adls_primary_disk_state", + "adls_account_provision_state", + "adls_account_access_tier", + "adls_containers", ] @property - def gcs_bucket_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.gcs_bucket_name + def adls_e_tag(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.adls_e_tag - @gcs_bucket_name.setter - def gcs_bucket_name(self, gcs_bucket_name: Optional[str]): + @adls_e_tag.setter + def adls_e_tag(self, adls_e_tag: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_bucket_name = gcs_bucket_name + self.attributes.adls_e_tag = adls_e_tag @property - def gcs_bucket_qualified_name(self) -> Optional[str]: + def adls_encryption_type(self) -> Optional[ADLSEncryptionTypes]: + return None if self.attributes is None else self.attributes.adls_encryption_type + + @adls_encryption_type.setter + def adls_encryption_type(self, adls_encryption_type: Optional[ADLSEncryptionTypes]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_encryption_type = adls_encryption_type + + @property + def adls_account_resource_group(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.gcs_bucket_qualified_name + else self.attributes.adls_account_resource_group ) - @gcs_bucket_qualified_name.setter - def gcs_bucket_qualified_name(self, gcs_bucket_qualified_name: Optional[str]): + @adls_account_resource_group.setter + def adls_account_resource_group(self, adls_account_resource_group: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_bucket_qualified_name = gcs_bucket_qualified_name + self.attributes.adls_account_resource_group = adls_account_resource_group @property - def gcs_object_size(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.gcs_object_size + def adls_account_subscription(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.adls_account_subscription + ) - @gcs_object_size.setter - def gcs_object_size(self, gcs_object_size: Optional[int]): + @adls_account_subscription.setter + def adls_account_subscription(self, adls_account_subscription: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_size = gcs_object_size + self.attributes.adls_account_subscription = adls_account_subscription @property - def gcs_object_key(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.gcs_object_key + def adls_account_performance(self) -> Optional[ADLSPerformance]: + return ( + None + if self.attributes is None + else self.attributes.adls_account_performance + ) - @gcs_object_key.setter - def gcs_object_key(self, gcs_object_key: Optional[str]): + @adls_account_performance.setter + def adls_account_performance( + self, adls_account_performance: Optional[ADLSPerformance] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_key = gcs_object_key + self.attributes.adls_account_performance = adls_account_performance @property - def gcs_object_media_link(self) -> Optional[str]: + def adls_account_replication(self) -> Optional[ADLSReplicationType]: return ( - None if self.attributes is None else self.attributes.gcs_object_media_link + None + if self.attributes is None + else self.attributes.adls_account_replication ) - @gcs_object_media_link.setter - def gcs_object_media_link(self, gcs_object_media_link: Optional[str]): + @adls_account_replication.setter + def adls_account_replication( + self, adls_account_replication: Optional[ADLSReplicationType] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_media_link = gcs_object_media_link + self.attributes.adls_account_replication = adls_account_replication @property - def gcs_object_hold_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.gcs_object_hold_type + def adls_account_kind(self) -> Optional[ADLSStorageKind]: + return None if self.attributes is None else self.attributes.adls_account_kind - @gcs_object_hold_type.setter - def gcs_object_hold_type(self, gcs_object_hold_type: Optional[str]): + @adls_account_kind.setter + def adls_account_kind(self, adls_account_kind: Optional[ADLSStorageKind]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_hold_type = gcs_object_hold_type + self.attributes.adls_account_kind = adls_account_kind @property - def gcs_object_generation_id(self) -> Optional[int]: + def adls_primary_disk_state(self) -> Optional[ADLSAccountStatus]: return ( - None - if self.attributes is None - else self.attributes.gcs_object_generation_id + None if self.attributes is None else self.attributes.adls_primary_disk_state ) - @gcs_object_generation_id.setter - def gcs_object_generation_id(self, gcs_object_generation_id: Optional[int]): + @adls_primary_disk_state.setter + def adls_primary_disk_state( + self, adls_primary_disk_state: Optional[ADLSAccountStatus] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_generation_id = gcs_object_generation_id + self.attributes.adls_primary_disk_state = adls_primary_disk_state @property - def gcs_object_c_r_c32_c_hash(self) -> Optional[str]: + def adls_account_provision_state(self) -> Optional[ADLSProvisionState]: return ( None if self.attributes is None - else self.attributes.gcs_object_c_r_c32_c_hash + else self.attributes.adls_account_provision_state ) - @gcs_object_c_r_c32_c_hash.setter - def gcs_object_c_r_c32_c_hash(self, gcs_object_c_r_c32_c_hash: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.gcs_object_c_r_c32_c_hash = gcs_object_c_r_c32_c_hash - - @property - def gcs_object_m_d5_hash(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.gcs_object_m_d5_hash - - @gcs_object_m_d5_hash.setter - def gcs_object_m_d5_hash(self, gcs_object_m_d5_hash: Optional[str]): + @adls_account_provision_state.setter + def adls_account_provision_state( + self, adls_account_provision_state: Optional[ADLSProvisionState] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_m_d5_hash = gcs_object_m_d5_hash + self.attributes.adls_account_provision_state = adls_account_provision_state @property - def gcs_object_data_last_modified_time(self) -> Optional[datetime]: + def adls_account_access_tier(self) -> Optional[ADLSAccessTier]: return ( None if self.attributes is None - else self.attributes.gcs_object_data_last_modified_time + else self.attributes.adls_account_access_tier ) - @gcs_object_data_last_modified_time.setter - def gcs_object_data_last_modified_time( - self, gcs_object_data_last_modified_time: Optional[datetime] + @adls_account_access_tier.setter + def adls_account_access_tier( + self, adls_account_access_tier: Optional[ADLSAccessTier] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_data_last_modified_time = ( - gcs_object_data_last_modified_time - ) + self.attributes.adls_account_access_tier = adls_account_access_tier @property - def gcs_object_content_type(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.gcs_object_content_type + def adls_containers(self) -> Optional[list[ADLSContainer]]: + return None if self.attributes is None else self.attributes.adls_containers + + @adls_containers.setter + def adls_containers(self, adls_containers: Optional[list[ADLSContainer]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_containers = adls_containers + + class Attributes(ADLS.Attributes): + adls_e_tag: Optional[str] = Field(None, description="", alias="adlsETag") + adls_encryption_type: Optional[ADLSEncryptionTypes] = Field( + None, description="", alias="adlsEncryptionType" + ) + adls_account_resource_group: Optional[str] = Field( + None, description="", alias="adlsAccountResourceGroup" + ) + adls_account_subscription: Optional[str] = Field( + None, description="", alias="adlsAccountSubscription" + ) + adls_account_performance: Optional[ADLSPerformance] = Field( + None, description="", alias="adlsAccountPerformance" + ) + adls_account_replication: Optional[ADLSReplicationType] = Field( + None, description="", alias="adlsAccountReplication" ) + adls_account_kind: Optional[ADLSStorageKind] = Field( + None, description="", alias="adlsAccountKind" + ) + adls_primary_disk_state: Optional[ADLSAccountStatus] = Field( + None, description="", alias="adlsPrimaryDiskState" + ) + adls_account_provision_state: Optional[ADLSProvisionState] = Field( + None, description="", alias="adlsAccountProvisionState" + ) + adls_account_access_tier: Optional[ADLSAccessTier] = Field( + None, description="", alias="adlsAccountAccessTier" + ) + adls_containers: Optional[list[ADLSContainer]] = Field( + None, description="", alias="adlsContainers" + ) # relationship - @gcs_object_content_type.setter - def gcs_object_content_type(self, gcs_object_content_type: Optional[str]): + attributes: "ADLSAccount.Attributes" = Field( + default_factory=lambda: ADLSAccount.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class ADLSContainer(ADLS): + """Description""" + + type_name: str = Field("ADLSContainer", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ADLSContainer": + raise ValueError("must be ADLSContainer") + return v + + def __setattr__(self, name, value): + if name in ADLSContainer._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + ADLS_CONTAINER_URL: ClassVar[KeywordTextField] = KeywordTextField( + "adlsContainerUrl", "adlsContainerUrl.keyword", "adlsContainerUrl" + ) + """ + TBC + """ + ADLS_CONTAINER_LEASE_STATE: ClassVar[KeywordField] = KeywordField( + "adlsContainerLeaseState", "adlsContainerLeaseState" + ) + """ + TBC + """ + ADLS_CONTAINER_LEASE_STATUS: ClassVar[KeywordField] = KeywordField( + "adlsContainerLeaseStatus", "adlsContainerLeaseStatus" + ) + """ + TBC + """ + ADLS_CONTAINER_ENCRYPTION_SCOPE: ClassVar[KeywordField] = KeywordField( + "adlsContainerEncryptionScope", "adlsContainerEncryptionScope" + ) + """ + TBC + """ + ADLS_CONTAINER_VERSION_LEVEL_IMMUTABILITY_SUPPORT: ClassVar[ + BooleanField + ] = BooleanField( + "adlsContainerVersionLevelImmutabilitySupport", + "adlsContainerVersionLevelImmutabilitySupport", + ) + """ + TBC + """ + ADLS_OBJECT_COUNT: ClassVar[NumericField] = NumericField( + "adlsObjectCount", "adlsObjectCount" + ) + """ + TBC + """ + + ADLS_OBJECTS: ClassVar[RelationField] = RelationField("adlsObjects") + """ + TBC + """ + ADLS_ACCOUNT: ClassVar[RelationField] = RelationField("adlsAccount") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "adls_container_url", + "adls_container_lease_state", + "adls_container_lease_status", + "adls_container_encryption_scope", + "adls_container_version_level_immutability_support", + "adls_object_count", + "adls_objects", + "adls_account", + ] + + @property + def adls_container_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.adls_container_url + + @adls_container_url.setter + def adls_container_url(self, adls_container_url: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_content_type = gcs_object_content_type + self.attributes.adls_container_url = adls_container_url @property - def gcs_object_content_encoding(self) -> Optional[str]: + def adls_container_lease_state(self) -> Optional[ADLSLeaseState]: return ( None if self.attributes is None - else self.attributes.gcs_object_content_encoding + else self.attributes.adls_container_lease_state ) - @gcs_object_content_encoding.setter - def gcs_object_content_encoding(self, gcs_object_content_encoding: Optional[str]): + @adls_container_lease_state.setter + def adls_container_lease_state( + self, adls_container_lease_state: Optional[ADLSLeaseState] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_content_encoding = gcs_object_content_encoding + self.attributes.adls_container_lease_state = adls_container_lease_state @property - def gcs_object_content_disposition(self) -> Optional[str]: + def adls_container_lease_status(self) -> Optional[ADLSLeaseStatus]: return ( None if self.attributes is None - else self.attributes.gcs_object_content_disposition + else self.attributes.adls_container_lease_status ) - @gcs_object_content_disposition.setter - def gcs_object_content_disposition( - self, gcs_object_content_disposition: Optional[str] + @adls_container_lease_status.setter + def adls_container_lease_status( + self, adls_container_lease_status: Optional[ADLSLeaseStatus] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_content_disposition = gcs_object_content_disposition + self.attributes.adls_container_lease_status = adls_container_lease_status @property - def gcs_object_content_language(self) -> Optional[str]: + def adls_container_encryption_scope(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.gcs_object_content_language + else self.attributes.adls_container_encryption_scope ) - @gcs_object_content_language.setter - def gcs_object_content_language(self, gcs_object_content_language: Optional[str]): + @adls_container_encryption_scope.setter + def adls_container_encryption_scope( + self, adls_container_encryption_scope: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_content_language = gcs_object_content_language + self.attributes.adls_container_encryption_scope = ( + adls_container_encryption_scope + ) @property - def gcs_object_retention_expiration_date(self) -> Optional[datetime]: + def adls_container_version_level_immutability_support(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.gcs_object_retention_expiration_date + else self.attributes.adls_container_version_level_immutability_support ) - @gcs_object_retention_expiration_date.setter - def gcs_object_retention_expiration_date( - self, gcs_object_retention_expiration_date: Optional[datetime] + @adls_container_version_level_immutability_support.setter + def adls_container_version_level_immutability_support( + self, adls_container_version_level_immutability_support: Optional[bool] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_retention_expiration_date = ( - gcs_object_retention_expiration_date + self.attributes.adls_container_version_level_immutability_support = ( + adls_container_version_level_immutability_support ) @property - def gcs_bucket(self) -> Optional[GCSBucket]: - return None if self.attributes is None else self.attributes.gcs_bucket + def adls_object_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.adls_object_count - @gcs_bucket.setter - def gcs_bucket(self, gcs_bucket: Optional[GCSBucket]): + @adls_object_count.setter + def adls_object_count(self, adls_object_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_bucket = gcs_bucket + self.attributes.adls_object_count = adls_object_count - class Attributes(GCS.Attributes): - gcs_bucket_name: Optional[str] = Field( - None, description="", alias="gcsBucketName" - ) - gcs_bucket_qualified_name: Optional[str] = Field( - None, description="", alias="gcsBucketQualifiedName" - ) - gcs_object_size: Optional[int] = Field( - None, description="", alias="gcsObjectSize" - ) - gcs_object_key: Optional[str] = Field( - None, description="", alias="gcsObjectKey" - ) - gcs_object_media_link: Optional[str] = Field( - None, description="", alias="gcsObjectMediaLink" - ) - gcs_object_hold_type: Optional[str] = Field( - None, description="", alias="gcsObjectHoldType" - ) - gcs_object_generation_id: Optional[int] = Field( - None, description="", alias="gcsObjectGenerationId" - ) - gcs_object_c_r_c32_c_hash: Optional[str] = Field( - None, description="", alias="gcsObjectCRC32CHash" - ) - gcs_object_m_d5_hash: Optional[str] = Field( - None, description="", alias="gcsObjectMD5Hash" - ) - gcs_object_data_last_modified_time: Optional[datetime] = Field( - None, description="", alias="gcsObjectDataLastModifiedTime" + @property + def adls_objects(self) -> Optional[list[ADLSObject]]: + return None if self.attributes is None else self.attributes.adls_objects + + @adls_objects.setter + def adls_objects(self, adls_objects: Optional[list[ADLSObject]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_objects = adls_objects + + @property + def adls_account(self) -> Optional[ADLSAccount]: + return None if self.attributes is None else self.attributes.adls_account + + @adls_account.setter + def adls_account(self, adls_account: Optional[ADLSAccount]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_account = adls_account + + class Attributes(ADLS.Attributes): + adls_container_url: Optional[str] = Field( + None, description="", alias="adlsContainerUrl" ) - gcs_object_content_type: Optional[str] = Field( - None, description="", alias="gcsObjectContentType" + adls_container_lease_state: Optional[ADLSLeaseState] = Field( + None, description="", alias="adlsContainerLeaseState" ) - gcs_object_content_encoding: Optional[str] = Field( - None, description="", alias="gcsObjectContentEncoding" + adls_container_lease_status: Optional[ADLSLeaseStatus] = Field( + None, description="", alias="adlsContainerLeaseStatus" ) - gcs_object_content_disposition: Optional[str] = Field( - None, description="", alias="gcsObjectContentDisposition" + adls_container_encryption_scope: Optional[str] = Field( + None, description="", alias="adlsContainerEncryptionScope" ) - gcs_object_content_language: Optional[str] = Field( - None, description="", alias="gcsObjectContentLanguage" + adls_container_version_level_immutability_support: Optional[bool] = Field( + None, description="", alias="adlsContainerVersionLevelImmutabilitySupport" ) - gcs_object_retention_expiration_date: Optional[datetime] = Field( - None, description="", alias="gcsObjectRetentionExpirationDate" + adls_object_count: Optional[int] = Field( + None, description="", alias="adlsObjectCount" ) - gcs_bucket: Optional[GCSBucket] = Field( - None, description="", alias="gcsBucket" + adls_objects: Optional[list[ADLSObject]] = Field( + None, description="", alias="adlsObjects" + ) # relationship + adls_account: Optional[ADLSAccount] = Field( + None, description="", alias="adlsAccount" ) # relationship - attributes: "GCSObject.Attributes" = Field( - default_factory=lambda: GCSObject.Attributes(), + attributes: "ADLSContainer.Attributes" = Field( + default_factory=lambda: ADLSContainer.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class GCSBucket(GCS): +class ADLSObject(ADLS): """Description""" - type_name: str = Field("GCSBucket", allow_mutation=False) + type_name: str = Field("ADLSObject", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "GCSBucket": - raise ValueError("must be GCSBucket") + if v != "ADLSObject": + raise ValueError("must be ADLSObject") return v def __setattr__(self, name, value): - if name in GCSBucket._convience_properties: + if name in ADLSObject._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "gcs_object_count", - "gcs_bucket_versioning_enabled", - "gcs_bucket_retention_locked", - "gcs_bucket_retention_period", - "gcs_bucket_retention_effective_time", - "gcs_bucket_lifecycle_rules", - "gcs_bucket_retention_policy", - "gcs_objects", + ADLS_OBJECT_URL: ClassVar[KeywordTextField] = KeywordTextField( + "adlsObjectUrl", "adlsObjectUrl.keyword", "adlsObjectUrl" + ) + """ + TBC + """ + ADLS_OBJECT_VERSION_ID: ClassVar[KeywordField] = KeywordField( + "adlsObjectVersionId", "adlsObjectVersionId" + ) + """ + TBC + """ + ADLS_OBJECT_TYPE: ClassVar[KeywordField] = KeywordField( + "adlsObjectType", "adlsObjectType" + ) + """ + TBC + """ + ADLS_OBJECT_SIZE: ClassVar[NumericField] = NumericField( + "adlsObjectSize", "adlsObjectSize" + ) + """ + TBC + """ + ADLS_OBJECT_ACCESS_TIER: ClassVar[KeywordField] = KeywordField( + "adlsObjectAccessTier", "adlsObjectAccessTier" + ) + """ + TBC + """ + ADLS_OBJECT_ACCESS_TIER_LAST_MODIFIED_TIME: ClassVar[NumericField] = NumericField( + "adlsObjectAccessTierLastModifiedTime", "adlsObjectAccessTierLastModifiedTime" + ) + """ + TBC + """ + ADLS_OBJECT_ARCHIVE_STATUS: ClassVar[KeywordField] = KeywordField( + "adlsObjectArchiveStatus", "adlsObjectArchiveStatus" + ) + """ + TBC + """ + ADLS_OBJECT_SERVER_ENCRYPTED: ClassVar[BooleanField] = BooleanField( + "adlsObjectServerEncrypted", "adlsObjectServerEncrypted" + ) + """ + TBC + """ + ADLS_OBJECT_VERSION_LEVEL_IMMUTABILITY_SUPPORT: ClassVar[ + BooleanField + ] = BooleanField( + "adlsObjectVersionLevelImmutabilitySupport", + "adlsObjectVersionLevelImmutabilitySupport", + ) + """ + TBC + """ + ADLS_OBJECT_CACHE_CONTROL: ClassVar[TextField] = TextField( + "adlsObjectCacheControl", "adlsObjectCacheControl" + ) + """ + TBC + """ + ADLS_OBJECT_CONTENT_TYPE: ClassVar[TextField] = TextField( + "adlsObjectContentType", "adlsObjectContentType" + ) + """ + TBC + """ + ADLS_OBJECT_CONTENT_MD5HASH: ClassVar[KeywordField] = KeywordField( + "adlsObjectContentMD5Hash", "adlsObjectContentMD5Hash" + ) + """ + TBC + """ + ADLS_OBJECT_CONTENT_LANGUAGE: ClassVar[KeywordTextField] = KeywordTextField( + "adlsObjectContentLanguage", + "adlsObjectContentLanguage.keyword", + "adlsObjectContentLanguage", + ) + """ + TBC + """ + ADLS_OBJECT_LEASE_STATUS: ClassVar[KeywordField] = KeywordField( + "adlsObjectLeaseStatus", "adlsObjectLeaseStatus" + ) + """ + TBC + """ + ADLS_OBJECT_LEASE_STATE: ClassVar[KeywordField] = KeywordField( + "adlsObjectLeaseState", "adlsObjectLeaseState" + ) + """ + TBC + """ + ADLS_OBJECT_METADATA: ClassVar[KeywordField] = KeywordField( + "adlsObjectMetadata", "adlsObjectMetadata" + ) + """ + TBC + """ + ADLS_CONTAINER_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "adlsContainerQualifiedName", + "adlsContainerQualifiedName", + "adlsContainerQualifiedName.text", + ) + """ + TBC + """ + + ADLS_CONTAINER: ClassVar[RelationField] = RelationField("adlsContainer") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "adls_object_url", + "adls_object_version_id", + "adls_object_type", + "adls_object_size", + "adls_object_access_tier", + "adls_object_access_tier_last_modified_time", + "adls_object_archive_status", + "adls_object_server_encrypted", + "adls_object_version_level_immutability_support", + "adls_object_cache_control", + "adls_object_content_type", + "adls_object_content_m_d5_hash", + "adls_object_content_language", + "adls_object_lease_status", + "adls_object_lease_state", + "adls_object_metadata", + "adls_container_qualified_name", + "adls_container", ] @property - def gcs_object_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.gcs_object_count + def adls_object_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.adls_object_url - @gcs_object_count.setter - def gcs_object_count(self, gcs_object_count: Optional[int]): + @adls_object_url.setter + def adls_object_url(self, adls_object_url: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_object_count = gcs_object_count + self.attributes.adls_object_url = adls_object_url @property - def gcs_bucket_versioning_enabled(self) -> Optional[bool]: + def adls_object_version_id(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.adls_object_version_id + ) + + @adls_object_version_id.setter + def adls_object_version_id(self, adls_object_version_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_object_version_id = adls_object_version_id + + @property + def adls_object_type(self) -> Optional[ADLSObjectType]: + return None if self.attributes is None else self.attributes.adls_object_type + + @adls_object_type.setter + def adls_object_type(self, adls_object_type: Optional[ADLSObjectType]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_object_type = adls_object_type + + @property + def adls_object_size(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.adls_object_size + + @adls_object_size.setter + def adls_object_size(self, adls_object_size: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_object_size = adls_object_size + + @property + def adls_object_access_tier(self) -> Optional[ADLSAccessTier]: + return ( + None if self.attributes is None else self.attributes.adls_object_access_tier + ) + + @adls_object_access_tier.setter + def adls_object_access_tier( + self, adls_object_access_tier: Optional[ADLSAccessTier] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_object_access_tier = adls_object_access_tier + + @property + def adls_object_access_tier_last_modified_time(self) -> Optional[datetime]: return ( None if self.attributes is None - else self.attributes.gcs_bucket_versioning_enabled + else self.attributes.adls_object_access_tier_last_modified_time ) - @gcs_bucket_versioning_enabled.setter - def gcs_bucket_versioning_enabled( - self, gcs_bucket_versioning_enabled: Optional[bool] + @adls_object_access_tier_last_modified_time.setter + def adls_object_access_tier_last_modified_time( + self, adls_object_access_tier_last_modified_time: Optional[datetime] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_bucket_versioning_enabled = gcs_bucket_versioning_enabled + self.attributes.adls_object_access_tier_last_modified_time = ( + adls_object_access_tier_last_modified_time + ) @property - def gcs_bucket_retention_locked(self) -> Optional[bool]: + def adls_object_archive_status(self) -> Optional[ADLSObjectArchiveStatus]: return ( None if self.attributes is None - else self.attributes.gcs_bucket_retention_locked + else self.attributes.adls_object_archive_status ) - @gcs_bucket_retention_locked.setter - def gcs_bucket_retention_locked(self, gcs_bucket_retention_locked: Optional[bool]): + @adls_object_archive_status.setter + def adls_object_archive_status( + self, adls_object_archive_status: Optional[ADLSObjectArchiveStatus] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_bucket_retention_locked = gcs_bucket_retention_locked + self.attributes.adls_object_archive_status = adls_object_archive_status @property - def gcs_bucket_retention_period(self) -> Optional[int]: + def adls_object_server_encrypted(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.gcs_bucket_retention_period + else self.attributes.adls_object_server_encrypted ) - @gcs_bucket_retention_period.setter - def gcs_bucket_retention_period(self, gcs_bucket_retention_period: Optional[int]): + @adls_object_server_encrypted.setter + def adls_object_server_encrypted( + self, adls_object_server_encrypted: Optional[bool] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_bucket_retention_period = gcs_bucket_retention_period + self.attributes.adls_object_server_encrypted = adls_object_server_encrypted @property - def gcs_bucket_retention_effective_time(self) -> Optional[datetime]: + def adls_object_version_level_immutability_support(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.gcs_bucket_retention_effective_time + else self.attributes.adls_object_version_level_immutability_support ) - @gcs_bucket_retention_effective_time.setter - def gcs_bucket_retention_effective_time( - self, gcs_bucket_retention_effective_time: Optional[datetime] + @adls_object_version_level_immutability_support.setter + def adls_object_version_level_immutability_support( + self, adls_object_version_level_immutability_support: Optional[bool] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_bucket_retention_effective_time = ( - gcs_bucket_retention_effective_time + self.attributes.adls_object_version_level_immutability_support = ( + adls_object_version_level_immutability_support ) @property - def gcs_bucket_lifecycle_rules(self) -> Optional[str]: + def adls_object_cache_control(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.gcs_bucket_lifecycle_rules + else self.attributes.adls_object_cache_control ) - @gcs_bucket_lifecycle_rules.setter - def gcs_bucket_lifecycle_rules(self, gcs_bucket_lifecycle_rules: Optional[str]): + @adls_object_cache_control.setter + def adls_object_cache_control(self, adls_object_cache_control: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_bucket_lifecycle_rules = gcs_bucket_lifecycle_rules + self.attributes.adls_object_cache_control = adls_object_cache_control @property - def gcs_bucket_retention_policy(self) -> Optional[str]: + def adls_object_content_type(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.gcs_bucket_retention_policy + else self.attributes.adls_object_content_type ) - @gcs_bucket_retention_policy.setter - def gcs_bucket_retention_policy(self, gcs_bucket_retention_policy: Optional[str]): + @adls_object_content_type.setter + def adls_object_content_type(self, adls_object_content_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_bucket_retention_policy = gcs_bucket_retention_policy + self.attributes.adls_object_content_type = adls_object_content_type @property - def gcs_objects(self) -> Optional[list[GCSObject]]: - return None if self.attributes is None else self.attributes.gcs_objects + def adls_object_content_m_d5_hash(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.adls_object_content_m_d5_hash + ) - @gcs_objects.setter - def gcs_objects(self, gcs_objects: Optional[list[GCSObject]]): + @adls_object_content_m_d5_hash.setter + def adls_object_content_m_d5_hash( + self, adls_object_content_m_d5_hash: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.gcs_objects = gcs_objects + self.attributes.adls_object_content_m_d5_hash = adls_object_content_m_d5_hash - class Attributes(GCS.Attributes): - gcs_object_count: Optional[int] = Field( - None, description="", alias="gcsObjectCount" + @property + def adls_object_content_language(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.adls_object_content_language ) - gcs_bucket_versioning_enabled: Optional[bool] = Field( - None, description="", alias="gcsBucketVersioningEnabled" + + @adls_object_content_language.setter + def adls_object_content_language(self, adls_object_content_language: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_object_content_language = adls_object_content_language + + @property + def adls_object_lease_status(self) -> Optional[ADLSLeaseStatus]: + return ( + None + if self.attributes is None + else self.attributes.adls_object_lease_status + ) + + @adls_object_lease_status.setter + def adls_object_lease_status( + self, adls_object_lease_status: Optional[ADLSLeaseStatus] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_object_lease_status = adls_object_lease_status + + @property + def adls_object_lease_state(self) -> Optional[ADLSLeaseState]: + return ( + None if self.attributes is None else self.attributes.adls_object_lease_state + ) + + @adls_object_lease_state.setter + def adls_object_lease_state( + self, adls_object_lease_state: Optional[ADLSLeaseState] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_object_lease_state = adls_object_lease_state + + @property + def adls_object_metadata(self) -> Optional[dict[str, str]]: + return None if self.attributes is None else self.attributes.adls_object_metadata + + @adls_object_metadata.setter + def adls_object_metadata(self, adls_object_metadata: Optional[dict[str, str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_object_metadata = adls_object_metadata + + @property + def adls_container_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.adls_container_qualified_name + ) + + @adls_container_qualified_name.setter + def adls_container_qualified_name( + self, adls_container_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_container_qualified_name = adls_container_qualified_name + + @property + def adls_container(self) -> Optional[ADLSContainer]: + return None if self.attributes is None else self.attributes.adls_container + + @adls_container.setter + def adls_container(self, adls_container: Optional[ADLSContainer]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.adls_container = adls_container + + class Attributes(ADLS.Attributes): + adls_object_url: Optional[str] = Field( + None, description="", alias="adlsObjectUrl" ) - gcs_bucket_retention_locked: Optional[bool] = Field( - None, description="", alias="gcsBucketRetentionLocked" + adls_object_version_id: Optional[str] = Field( + None, description="", alias="adlsObjectVersionId" ) - gcs_bucket_retention_period: Optional[int] = Field( - None, description="", alias="gcsBucketRetentionPeriod" + adls_object_type: Optional[ADLSObjectType] = Field( + None, description="", alias="adlsObjectType" ) - gcs_bucket_retention_effective_time: Optional[datetime] = Field( - None, description="", alias="gcsBucketRetentionEffectiveTime" + adls_object_size: Optional[int] = Field( + None, description="", alias="adlsObjectSize" ) - gcs_bucket_lifecycle_rules: Optional[str] = Field( - None, description="", alias="gcsBucketLifecycleRules" + adls_object_access_tier: Optional[ADLSAccessTier] = Field( + None, description="", alias="adlsObjectAccessTier" ) - gcs_bucket_retention_policy: Optional[str] = Field( - None, description="", alias="gcsBucketRetentionPolicy" + adls_object_access_tier_last_modified_time: Optional[datetime] = Field( + None, description="", alias="adlsObjectAccessTierLastModifiedTime" ) - gcs_objects: Optional[list[GCSObject]] = Field( - None, description="", alias="gcsObjects" + adls_object_archive_status: Optional[ADLSObjectArchiveStatus] = Field( + None, description="", alias="adlsObjectArchiveStatus" + ) + adls_object_server_encrypted: Optional[bool] = Field( + None, description="", alias="adlsObjectServerEncrypted" + ) + adls_object_version_level_immutability_support: Optional[bool] = Field( + None, description="", alias="adlsObjectVersionLevelImmutabilitySupport" + ) + adls_object_cache_control: Optional[str] = Field( + None, description="", alias="adlsObjectCacheControl" + ) + adls_object_content_type: Optional[str] = Field( + None, description="", alias="adlsObjectContentType" + ) + adls_object_content_m_d5_hash: Optional[str] = Field( + None, description="", alias="adlsObjectContentMD5Hash" + ) + adls_object_content_language: Optional[str] = Field( + None, description="", alias="adlsObjectContentLanguage" + ) + adls_object_lease_status: Optional[ADLSLeaseStatus] = Field( + None, description="", alias="adlsObjectLeaseStatus" + ) + adls_object_lease_state: Optional[ADLSLeaseState] = Field( + None, description="", alias="adlsObjectLeaseState" + ) + adls_object_metadata: Optional[dict[str, str]] = Field( + None, description="", alias="adlsObjectMetadata" + ) + adls_container_qualified_name: Optional[str] = Field( + None, description="", alias="adlsContainerQualifiedName" + ) + adls_container: Optional[ADLSContainer] = Field( + None, description="", alias="adlsContainer" ) # relationship - attributes: "GCSBucket.Attributes" = Field( - default_factory=lambda: GCSBucket.Attributes(), + attributes: "ADLSObject.Attributes" = Field( + default_factory=lambda: ADLSObject.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -GCSObject.Attributes.update_forward_refs() +ADLSAccount.Attributes.update_forward_refs() + + +ADLSContainer.Attributes.update_forward_refs() -GCSBucket.Attributes.update_forward_refs() +ADLSObject.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset57.py b/pyatlan/model/assets/asset57.py index fc8d38720..5f17a9098 100644 --- a/pyatlan/model/assets/asset57.py +++ b/pyatlan/model/assets/asset57.py @@ -4,600 +4,638 @@ from __future__ import annotations +from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset35 import Preset +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + NumericField, + RelationField, + TextField, +) +from .asset33 import GCS -class PresetChart(Preset): + +class GCSObject(GCS): """Description""" - type_name: str = Field("PresetChart", allow_mutation=False) + type_name: str = Field("GCSObject", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "PresetChart": - raise ValueError("must be PresetChart") + if v != "GCSObject": + raise ValueError("must be GCSObject") return v def __setattr__(self, name, value): - if name in PresetChart._convience_properties: + if name in GCSObject._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "preset_chart_description_markdown", - "preset_chart_form_data", - "preset_dashboard", + GCS_BUCKET_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "gcsBucketName", "gcsBucketName.keyword", "gcsBucketName" + ) + """ + TBC + """ + GCS_BUCKET_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "gcsBucketQualifiedName", + "gcsBucketQualifiedName", + "gcsBucketQualifiedName.text", + ) + """ + TBC + """ + GCS_OBJECT_SIZE: ClassVar[NumericField] = NumericField( + "gcsObjectSize", "gcsObjectSize" + ) + """ + TBC + """ + GCS_OBJECT_KEY: ClassVar[KeywordTextField] = KeywordTextField( + "gcsObjectKey", "gcsObjectKey", "gcsObjectKey.text" + ) + """ + TBC + """ + GCS_OBJECT_MEDIA_LINK: ClassVar[KeywordTextField] = KeywordTextField( + "gcsObjectMediaLink", "gcsObjectMediaLink", "gcsObjectMediaLink.text" + ) + """ + TBC + """ + GCS_OBJECT_HOLD_TYPE: ClassVar[KeywordField] = KeywordField( + "gcsObjectHoldType", "gcsObjectHoldType" + ) + """ + TBC + """ + GCS_OBJECT_GENERATION_ID: ClassVar[NumericField] = NumericField( + "gcsObjectGenerationId", "gcsObjectGenerationId" + ) + """ + TBC + """ + GCS_OBJECT_CRC32C_HASH: ClassVar[KeywordField] = KeywordField( + "gcsObjectCRC32CHash", "gcsObjectCRC32CHash" + ) + """ + TBC + """ + GCS_OBJECT_MD5HASH: ClassVar[KeywordField] = KeywordField( + "gcsObjectMD5Hash", "gcsObjectMD5Hash" + ) + """ + TBC + """ + GCS_OBJECT_DATA_LAST_MODIFIED_TIME: ClassVar[NumericField] = NumericField( + "gcsObjectDataLastModifiedTime", "gcsObjectDataLastModifiedTime" + ) + """ + TBC + """ + GCS_OBJECT_CONTENT_TYPE: ClassVar[KeywordField] = KeywordField( + "gcsObjectContentType", "gcsObjectContentType" + ) + """ + TBC + """ + GCS_OBJECT_CONTENT_ENCODING: ClassVar[KeywordField] = KeywordField( + "gcsObjectContentEncoding", "gcsObjectContentEncoding" + ) + """ + TBC + """ + GCS_OBJECT_CONTENT_DISPOSITION: ClassVar[KeywordField] = KeywordField( + "gcsObjectContentDisposition", "gcsObjectContentDisposition" + ) + """ + TBC + """ + GCS_OBJECT_CONTENT_LANGUAGE: ClassVar[KeywordField] = KeywordField( + "gcsObjectContentLanguage", "gcsObjectContentLanguage" + ) + """ + TBC + """ + GCS_OBJECT_RETENTION_EXPIRATION_DATE: ClassVar[NumericField] = NumericField( + "gcsObjectRetentionExpirationDate", "gcsObjectRetentionExpirationDate" + ) + """ + TBC + """ + + GCS_BUCKET: ClassVar[RelationField] = RelationField("gcsBucket") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "gcs_bucket_name", + "gcs_bucket_qualified_name", + "gcs_object_size", + "gcs_object_key", + "gcs_object_media_link", + "gcs_object_hold_type", + "gcs_object_generation_id", + "gcs_object_c_r_c32_c_hash", + "gcs_object_m_d5_hash", + "gcs_object_data_last_modified_time", + "gcs_object_content_type", + "gcs_object_content_encoding", + "gcs_object_content_disposition", + "gcs_object_content_language", + "gcs_object_retention_expiration_date", + "gcs_bucket", ] @property - def preset_chart_description_markdown(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.preset_chart_description_markdown - ) + def gcs_bucket_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.gcs_bucket_name - @preset_chart_description_markdown.setter - def preset_chart_description_markdown( - self, preset_chart_description_markdown: Optional[str] - ): + @gcs_bucket_name.setter + def gcs_bucket_name(self, gcs_bucket_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_chart_description_markdown = ( - preset_chart_description_markdown - ) + self.attributes.gcs_bucket_name = gcs_bucket_name @property - def preset_chart_form_data(self) -> Optional[dict[str, str]]: + def gcs_bucket_qualified_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.preset_chart_form_data + None + if self.attributes is None + else self.attributes.gcs_bucket_qualified_name ) - @preset_chart_form_data.setter - def preset_chart_form_data(self, preset_chart_form_data: Optional[dict[str, str]]): + @gcs_bucket_qualified_name.setter + def gcs_bucket_qualified_name(self, gcs_bucket_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_chart_form_data = preset_chart_form_data + self.attributes.gcs_bucket_qualified_name = gcs_bucket_qualified_name @property - def preset_dashboard(self) -> Optional[PresetDashboard]: - return None if self.attributes is None else self.attributes.preset_dashboard + def gcs_object_size(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.gcs_object_size - @preset_dashboard.setter - def preset_dashboard(self, preset_dashboard: Optional[PresetDashboard]): + @gcs_object_size.setter + def gcs_object_size(self, gcs_object_size: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dashboard = preset_dashboard - - class Attributes(Preset.Attributes): - preset_chart_description_markdown: Optional[str] = Field( - None, description="", alias="presetChartDescriptionMarkdown" - ) - preset_chart_form_data: Optional[dict[str, str]] = Field( - None, description="", alias="presetChartFormData" - ) - preset_dashboard: Optional[PresetDashboard] = Field( - None, description="", alias="presetDashboard" - ) # relationship - - attributes: "PresetChart.Attributes" = Field( - default_factory=lambda: PresetChart.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PresetDataset(Preset): - """Description""" - - type_name: str = Field("PresetDataset", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PresetDataset": - raise ValueError("must be PresetDataset") - return v + self.attributes.gcs_object_size = gcs_object_size - def __setattr__(self, name, value): - if name in PresetDataset._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) + @property + def gcs_object_key(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.gcs_object_key - _convience_properties: ClassVar[list[str]] = [ - "preset_dataset_datasource_name", - "preset_dataset_id", - "preset_dataset_type", - "preset_dashboard", - ] + @gcs_object_key.setter + def gcs_object_key(self, gcs_object_key: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.gcs_object_key = gcs_object_key @property - def preset_dataset_datasource_name(self) -> Optional[str]: + def gcs_object_media_link(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.preset_dataset_datasource_name + None if self.attributes is None else self.attributes.gcs_object_media_link ) - @preset_dataset_datasource_name.setter - def preset_dataset_datasource_name( - self, preset_dataset_datasource_name: Optional[str] - ): + @gcs_object_media_link.setter + def gcs_object_media_link(self, gcs_object_media_link: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dataset_datasource_name = preset_dataset_datasource_name + self.attributes.gcs_object_media_link = gcs_object_media_link @property - def preset_dataset_id(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.preset_dataset_id + def gcs_object_hold_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.gcs_object_hold_type - @preset_dataset_id.setter - def preset_dataset_id(self, preset_dataset_id: Optional[int]): + @gcs_object_hold_type.setter + def gcs_object_hold_type(self, gcs_object_hold_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dataset_id = preset_dataset_id + self.attributes.gcs_object_hold_type = gcs_object_hold_type @property - def preset_dataset_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.preset_dataset_type + def gcs_object_generation_id(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.gcs_object_generation_id + ) - @preset_dataset_type.setter - def preset_dataset_type(self, preset_dataset_type: Optional[str]): + @gcs_object_generation_id.setter + def gcs_object_generation_id(self, gcs_object_generation_id: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dataset_type = preset_dataset_type + self.attributes.gcs_object_generation_id = gcs_object_generation_id @property - def preset_dashboard(self) -> Optional[PresetDashboard]: - return None if self.attributes is None else self.attributes.preset_dashboard + def gcs_object_c_r_c32_c_hash(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.gcs_object_c_r_c32_c_hash + ) - @preset_dashboard.setter - def preset_dashboard(self, preset_dashboard: Optional[PresetDashboard]): + @gcs_object_c_r_c32_c_hash.setter + def gcs_object_c_r_c32_c_hash(self, gcs_object_c_r_c32_c_hash: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dashboard = preset_dashboard - - class Attributes(Preset.Attributes): - preset_dataset_datasource_name: Optional[str] = Field( - None, description="", alias="presetDatasetDatasourceName" - ) - preset_dataset_id: Optional[int] = Field( - None, description="", alias="presetDatasetId" - ) - preset_dataset_type: Optional[str] = Field( - None, description="", alias="presetDatasetType" - ) - preset_dashboard: Optional[PresetDashboard] = Field( - None, description="", alias="presetDashboard" - ) # relationship - - attributes: "PresetDataset.Attributes" = Field( - default_factory=lambda: PresetDataset.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) + self.attributes.gcs_object_c_r_c32_c_hash = gcs_object_c_r_c32_c_hash + @property + def gcs_object_m_d5_hash(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.gcs_object_m_d5_hash -class PresetDashboard(Preset): - """Description""" - - type_name: str = Field("PresetDashboard", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PresetDashboard": - raise ValueError("must be PresetDashboard") - return v - - def __setattr__(self, name, value): - if name in PresetDashboard._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "preset_dashboard_changed_by_name", - "preset_dashboard_changed_by_url", - "preset_dashboard_is_managed_externally", - "preset_dashboard_is_published", - "preset_dashboard_thumbnail_url", - "preset_dashboard_chart_count", - "preset_datasets", - "preset_charts", - "preset_workspace", - ] + @gcs_object_m_d5_hash.setter + def gcs_object_m_d5_hash(self, gcs_object_m_d5_hash: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.gcs_object_m_d5_hash = gcs_object_m_d5_hash @property - def preset_dashboard_changed_by_name(self) -> Optional[str]: + def gcs_object_data_last_modified_time(self) -> Optional[datetime]: return ( None if self.attributes is None - else self.attributes.preset_dashboard_changed_by_name + else self.attributes.gcs_object_data_last_modified_time ) - @preset_dashboard_changed_by_name.setter - def preset_dashboard_changed_by_name( - self, preset_dashboard_changed_by_name: Optional[str] + @gcs_object_data_last_modified_time.setter + def gcs_object_data_last_modified_time( + self, gcs_object_data_last_modified_time: Optional[datetime] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dashboard_changed_by_name = ( - preset_dashboard_changed_by_name + self.attributes.gcs_object_data_last_modified_time = ( + gcs_object_data_last_modified_time ) @property - def preset_dashboard_changed_by_url(self) -> Optional[str]: + def gcs_object_content_type(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.preset_dashboard_changed_by_url + None if self.attributes is None else self.attributes.gcs_object_content_type ) - @preset_dashboard_changed_by_url.setter - def preset_dashboard_changed_by_url( - self, preset_dashboard_changed_by_url: Optional[str] - ): + @gcs_object_content_type.setter + def gcs_object_content_type(self, gcs_object_content_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dashboard_changed_by_url = ( - preset_dashboard_changed_by_url - ) + self.attributes.gcs_object_content_type = gcs_object_content_type @property - def preset_dashboard_is_managed_externally(self) -> Optional[bool]: + def gcs_object_content_encoding(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.preset_dashboard_is_managed_externally + else self.attributes.gcs_object_content_encoding ) - @preset_dashboard_is_managed_externally.setter - def preset_dashboard_is_managed_externally( - self, preset_dashboard_is_managed_externally: Optional[bool] - ): + @gcs_object_content_encoding.setter + def gcs_object_content_encoding(self, gcs_object_content_encoding: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dashboard_is_managed_externally = ( - preset_dashboard_is_managed_externally - ) + self.attributes.gcs_object_content_encoding = gcs_object_content_encoding @property - def preset_dashboard_is_published(self) -> Optional[bool]: + def gcs_object_content_disposition(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.preset_dashboard_is_published + else self.attributes.gcs_object_content_disposition ) - @preset_dashboard_is_published.setter - def preset_dashboard_is_published( - self, preset_dashboard_is_published: Optional[bool] + @gcs_object_content_disposition.setter + def gcs_object_content_disposition( + self, gcs_object_content_disposition: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dashboard_is_published = preset_dashboard_is_published + self.attributes.gcs_object_content_disposition = gcs_object_content_disposition @property - def preset_dashboard_thumbnail_url(self) -> Optional[str]: + def gcs_object_content_language(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.preset_dashboard_thumbnail_url + else self.attributes.gcs_object_content_language ) - @preset_dashboard_thumbnail_url.setter - def preset_dashboard_thumbnail_url( - self, preset_dashboard_thumbnail_url: Optional[str] - ): + @gcs_object_content_language.setter + def gcs_object_content_language(self, gcs_object_content_language: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dashboard_thumbnail_url = preset_dashboard_thumbnail_url + self.attributes.gcs_object_content_language = gcs_object_content_language @property - def preset_dashboard_chart_count(self) -> Optional[int]: + def gcs_object_retention_expiration_date(self) -> Optional[datetime]: return ( None if self.attributes is None - else self.attributes.preset_dashboard_chart_count + else self.attributes.gcs_object_retention_expiration_date ) - @preset_dashboard_chart_count.setter - def preset_dashboard_chart_count(self, preset_dashboard_chart_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.preset_dashboard_chart_count = preset_dashboard_chart_count - - @property - def preset_datasets(self) -> Optional[list[PresetDataset]]: - return None if self.attributes is None else self.attributes.preset_datasets - - @preset_datasets.setter - def preset_datasets(self, preset_datasets: Optional[list[PresetDataset]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.preset_datasets = preset_datasets - - @property - def preset_charts(self) -> Optional[list[PresetChart]]: - return None if self.attributes is None else self.attributes.preset_charts - - @preset_charts.setter - def preset_charts(self, preset_charts: Optional[list[PresetChart]]): + @gcs_object_retention_expiration_date.setter + def gcs_object_retention_expiration_date( + self, gcs_object_retention_expiration_date: Optional[datetime] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_charts = preset_charts + self.attributes.gcs_object_retention_expiration_date = ( + gcs_object_retention_expiration_date + ) @property - def preset_workspace(self) -> Optional[PresetWorkspace]: - return None if self.attributes is None else self.attributes.preset_workspace + def gcs_bucket(self) -> Optional[GCSBucket]: + return None if self.attributes is None else self.attributes.gcs_bucket - @preset_workspace.setter - def preset_workspace(self, preset_workspace: Optional[PresetWorkspace]): + @gcs_bucket.setter + def gcs_bucket(self, gcs_bucket: Optional[GCSBucket]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_workspace = preset_workspace + self.attributes.gcs_bucket = gcs_bucket - class Attributes(Preset.Attributes): - preset_dashboard_changed_by_name: Optional[str] = Field( - None, description="", alias="presetDashboardChangedByName" + class Attributes(GCS.Attributes): + gcs_bucket_name: Optional[str] = Field( + None, description="", alias="gcsBucketName" ) - preset_dashboard_changed_by_url: Optional[str] = Field( - None, description="", alias="presetDashboardChangedByURL" + gcs_bucket_qualified_name: Optional[str] = Field( + None, description="", alias="gcsBucketQualifiedName" ) - preset_dashboard_is_managed_externally: Optional[bool] = Field( - None, description="", alias="presetDashboardIsManagedExternally" + gcs_object_size: Optional[int] = Field( + None, description="", alias="gcsObjectSize" ) - preset_dashboard_is_published: Optional[bool] = Field( - None, description="", alias="presetDashboardIsPublished" + gcs_object_key: Optional[str] = Field( + None, description="", alias="gcsObjectKey" ) - preset_dashboard_thumbnail_url: Optional[str] = Field( - None, description="", alias="presetDashboardThumbnailURL" + gcs_object_media_link: Optional[str] = Field( + None, description="", alias="gcsObjectMediaLink" ) - preset_dashboard_chart_count: Optional[int] = Field( - None, description="", alias="presetDashboardChartCount" + gcs_object_hold_type: Optional[str] = Field( + None, description="", alias="gcsObjectHoldType" ) - preset_datasets: Optional[list[PresetDataset]] = Field( - None, description="", alias="presetDatasets" - ) # relationship - preset_charts: Optional[list[PresetChart]] = Field( - None, description="", alias="presetCharts" - ) # relationship - preset_workspace: Optional[PresetWorkspace] = Field( - None, description="", alias="presetWorkspace" + gcs_object_generation_id: Optional[int] = Field( + None, description="", alias="gcsObjectGenerationId" + ) + gcs_object_c_r_c32_c_hash: Optional[str] = Field( + None, description="", alias="gcsObjectCRC32CHash" + ) + gcs_object_m_d5_hash: Optional[str] = Field( + None, description="", alias="gcsObjectMD5Hash" + ) + gcs_object_data_last_modified_time: Optional[datetime] = Field( + None, description="", alias="gcsObjectDataLastModifiedTime" + ) + gcs_object_content_type: Optional[str] = Field( + None, description="", alias="gcsObjectContentType" + ) + gcs_object_content_encoding: Optional[str] = Field( + None, description="", alias="gcsObjectContentEncoding" + ) + gcs_object_content_disposition: Optional[str] = Field( + None, description="", alias="gcsObjectContentDisposition" + ) + gcs_object_content_language: Optional[str] = Field( + None, description="", alias="gcsObjectContentLanguage" + ) + gcs_object_retention_expiration_date: Optional[datetime] = Field( + None, description="", alias="gcsObjectRetentionExpirationDate" + ) + gcs_bucket: Optional[GCSBucket] = Field( + None, description="", alias="gcsBucket" ) # relationship - attributes: "PresetDashboard.Attributes" = Field( - default_factory=lambda: PresetDashboard.Attributes(), + attributes: "GCSObject.Attributes" = Field( + default_factory=lambda: GCSObject.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class PresetWorkspace(Preset): +class GCSBucket(GCS): """Description""" - type_name: str = Field("PresetWorkspace", allow_mutation=False) + type_name: str = Field("GCSBucket", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "PresetWorkspace": - raise ValueError("must be PresetWorkspace") + if v != "GCSBucket": + raise ValueError("must be GCSBucket") return v def __setattr__(self, name, value): - if name in PresetWorkspace._convience_properties: + if name in GCSBucket._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "preset_workspace_public_dashboards_allowed", - "preset_workspace_cluster_id", - "preset_workspace_hostname", - "preset_workspace_is_in_maintenance_mode", - "preset_workspace_region", - "preset_workspace_status", - "preset_workspace_deployment_id", - "preset_workspace_dashboard_count", - "preset_workspace_dataset_count", - "preset_dashboards", + GCS_OBJECT_COUNT: ClassVar[NumericField] = NumericField( + "gcsObjectCount", "gcsObjectCount" + ) + """ + TBC + """ + GCS_BUCKET_VERSIONING_ENABLED: ClassVar[BooleanField] = BooleanField( + "gcsBucketVersioningEnabled", "gcsBucketVersioningEnabled" + ) + """ + TBC + """ + GCS_BUCKET_RETENTION_LOCKED: ClassVar[BooleanField] = BooleanField( + "gcsBucketRetentionLocked", "gcsBucketRetentionLocked" + ) + """ + TBC + """ + GCS_BUCKET_RETENTION_PERIOD: ClassVar[NumericField] = NumericField( + "gcsBucketRetentionPeriod", "gcsBucketRetentionPeriod" + ) + """ + TBC + """ + GCS_BUCKET_RETENTION_EFFECTIVE_TIME: ClassVar[NumericField] = NumericField( + "gcsBucketRetentionEffectiveTime", "gcsBucketRetentionEffectiveTime" + ) + """ + TBC + """ + GCS_BUCKET_LIFECYCLE_RULES: ClassVar[TextField] = TextField( + "gcsBucketLifecycleRules", "gcsBucketLifecycleRules" + ) + """ + TBC + """ + GCS_BUCKET_RETENTION_POLICY: ClassVar[TextField] = TextField( + "gcsBucketRetentionPolicy", "gcsBucketRetentionPolicy" + ) + """ + TBC + """ + + GCS_OBJECTS: ClassVar[RelationField] = RelationField("gcsObjects") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "gcs_object_count", + "gcs_bucket_versioning_enabled", + "gcs_bucket_retention_locked", + "gcs_bucket_retention_period", + "gcs_bucket_retention_effective_time", + "gcs_bucket_lifecycle_rules", + "gcs_bucket_retention_policy", + "gcs_objects", ] @property - def preset_workspace_public_dashboards_allowed(self) -> Optional[bool]: - return ( - None - if self.attributes is None - else self.attributes.preset_workspace_public_dashboards_allowed - ) + def gcs_object_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.gcs_object_count - @preset_workspace_public_dashboards_allowed.setter - def preset_workspace_public_dashboards_allowed( - self, preset_workspace_public_dashboards_allowed: Optional[bool] - ): + @gcs_object_count.setter + def gcs_object_count(self, gcs_object_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_workspace_public_dashboards_allowed = ( - preset_workspace_public_dashboards_allowed - ) + self.attributes.gcs_object_count = gcs_object_count @property - def preset_workspace_cluster_id(self) -> Optional[int]: + def gcs_bucket_versioning_enabled(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.preset_workspace_cluster_id + else self.attributes.gcs_bucket_versioning_enabled ) - @preset_workspace_cluster_id.setter - def preset_workspace_cluster_id(self, preset_workspace_cluster_id: Optional[int]): + @gcs_bucket_versioning_enabled.setter + def gcs_bucket_versioning_enabled( + self, gcs_bucket_versioning_enabled: Optional[bool] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_workspace_cluster_id = preset_workspace_cluster_id + self.attributes.gcs_bucket_versioning_enabled = gcs_bucket_versioning_enabled @property - def preset_workspace_hostname(self) -> Optional[str]: + def gcs_bucket_retention_locked(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.preset_workspace_hostname + else self.attributes.gcs_bucket_retention_locked ) - @preset_workspace_hostname.setter - def preset_workspace_hostname(self, preset_workspace_hostname: Optional[str]): + @gcs_bucket_retention_locked.setter + def gcs_bucket_retention_locked(self, gcs_bucket_retention_locked: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_workspace_hostname = preset_workspace_hostname + self.attributes.gcs_bucket_retention_locked = gcs_bucket_retention_locked @property - def preset_workspace_is_in_maintenance_mode(self) -> Optional[bool]: + def gcs_bucket_retention_period(self) -> Optional[int]: return ( None if self.attributes is None - else self.attributes.preset_workspace_is_in_maintenance_mode - ) - - @preset_workspace_is_in_maintenance_mode.setter - def preset_workspace_is_in_maintenance_mode( - self, preset_workspace_is_in_maintenance_mode: Optional[bool] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.preset_workspace_is_in_maintenance_mode = ( - preset_workspace_is_in_maintenance_mode - ) - - @property - def preset_workspace_region(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.preset_workspace_region - ) - - @preset_workspace_region.setter - def preset_workspace_region(self, preset_workspace_region: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.preset_workspace_region = preset_workspace_region - - @property - def preset_workspace_status(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.preset_workspace_status + else self.attributes.gcs_bucket_retention_period ) - @preset_workspace_status.setter - def preset_workspace_status(self, preset_workspace_status: Optional[str]): + @gcs_bucket_retention_period.setter + def gcs_bucket_retention_period(self, gcs_bucket_retention_period: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_workspace_status = preset_workspace_status + self.attributes.gcs_bucket_retention_period = gcs_bucket_retention_period @property - def preset_workspace_deployment_id(self) -> Optional[int]: + def gcs_bucket_retention_effective_time(self) -> Optional[datetime]: return ( None if self.attributes is None - else self.attributes.preset_workspace_deployment_id + else self.attributes.gcs_bucket_retention_effective_time ) - @preset_workspace_deployment_id.setter - def preset_workspace_deployment_id( - self, preset_workspace_deployment_id: Optional[int] + @gcs_bucket_retention_effective_time.setter + def gcs_bucket_retention_effective_time( + self, gcs_bucket_retention_effective_time: Optional[datetime] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_workspace_deployment_id = preset_workspace_deployment_id + self.attributes.gcs_bucket_retention_effective_time = ( + gcs_bucket_retention_effective_time + ) @property - def preset_workspace_dashboard_count(self) -> Optional[int]: + def gcs_bucket_lifecycle_rules(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.preset_workspace_dashboard_count + else self.attributes.gcs_bucket_lifecycle_rules ) - @preset_workspace_dashboard_count.setter - def preset_workspace_dashboard_count( - self, preset_workspace_dashboard_count: Optional[int] - ): + @gcs_bucket_lifecycle_rules.setter + def gcs_bucket_lifecycle_rules(self, gcs_bucket_lifecycle_rules: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_workspace_dashboard_count = ( - preset_workspace_dashboard_count - ) + self.attributes.gcs_bucket_lifecycle_rules = gcs_bucket_lifecycle_rules @property - def preset_workspace_dataset_count(self) -> Optional[int]: + def gcs_bucket_retention_policy(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.preset_workspace_dataset_count + else self.attributes.gcs_bucket_retention_policy ) - @preset_workspace_dataset_count.setter - def preset_workspace_dataset_count( - self, preset_workspace_dataset_count: Optional[int] - ): + @gcs_bucket_retention_policy.setter + def gcs_bucket_retention_policy(self, gcs_bucket_retention_policy: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_workspace_dataset_count = preset_workspace_dataset_count + self.attributes.gcs_bucket_retention_policy = gcs_bucket_retention_policy @property - def preset_dashboards(self) -> Optional[list[PresetDashboard]]: - return None if self.attributes is None else self.attributes.preset_dashboards + def gcs_objects(self) -> Optional[list[GCSObject]]: + return None if self.attributes is None else self.attributes.gcs_objects - @preset_dashboards.setter - def preset_dashboards(self, preset_dashboards: Optional[list[PresetDashboard]]): + @gcs_objects.setter + def gcs_objects(self, gcs_objects: Optional[list[GCSObject]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.preset_dashboards = preset_dashboards + self.attributes.gcs_objects = gcs_objects - class Attributes(Preset.Attributes): - preset_workspace_public_dashboards_allowed: Optional[bool] = Field( - None, description="", alias="presetWorkspacePublicDashboardsAllowed" - ) - preset_workspace_cluster_id: Optional[int] = Field( - None, description="", alias="presetWorkspaceClusterId" - ) - preset_workspace_hostname: Optional[str] = Field( - None, description="", alias="presetWorkspaceHostname" + class Attributes(GCS.Attributes): + gcs_object_count: Optional[int] = Field( + None, description="", alias="gcsObjectCount" ) - preset_workspace_is_in_maintenance_mode: Optional[bool] = Field( - None, description="", alias="presetWorkspaceIsInMaintenanceMode" + gcs_bucket_versioning_enabled: Optional[bool] = Field( + None, description="", alias="gcsBucketVersioningEnabled" ) - preset_workspace_region: Optional[str] = Field( - None, description="", alias="presetWorkspaceRegion" + gcs_bucket_retention_locked: Optional[bool] = Field( + None, description="", alias="gcsBucketRetentionLocked" ) - preset_workspace_status: Optional[str] = Field( - None, description="", alias="presetWorkspaceStatus" + gcs_bucket_retention_period: Optional[int] = Field( + None, description="", alias="gcsBucketRetentionPeriod" ) - preset_workspace_deployment_id: Optional[int] = Field( - None, description="", alias="presetWorkspaceDeploymentId" + gcs_bucket_retention_effective_time: Optional[datetime] = Field( + None, description="", alias="gcsBucketRetentionEffectiveTime" ) - preset_workspace_dashboard_count: Optional[int] = Field( - None, description="", alias="presetWorkspaceDashboardCount" + gcs_bucket_lifecycle_rules: Optional[str] = Field( + None, description="", alias="gcsBucketLifecycleRules" ) - preset_workspace_dataset_count: Optional[int] = Field( - None, description="", alias="presetWorkspaceDatasetCount" + gcs_bucket_retention_policy: Optional[str] = Field( + None, description="", alias="gcsBucketRetentionPolicy" ) - preset_dashboards: Optional[list[PresetDashboard]] = Field( - None, description="", alias="presetDashboards" + gcs_objects: Optional[list[GCSObject]] = Field( + None, description="", alias="gcsObjects" ) # relationship - attributes: "PresetWorkspace.Attributes" = Field( - default_factory=lambda: PresetWorkspace.Attributes(), + attributes: "GCSBucket.Attributes" = Field( + default_factory=lambda: GCSBucket.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -PresetChart.Attributes.update_forward_refs() - - -PresetDataset.Attributes.update_forward_refs() - - -PresetDashboard.Attributes.update_forward_refs() +GCSObject.Attributes.update_forward_refs() -PresetWorkspace.Attributes.update_forward_refs() +GCSBucket.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset58.py b/pyatlan/model/assets/asset58.py index 71d675451..60106f660 100644 --- a/pyatlan/model/assets/asset58.py +++ b/pyatlan/model/assets/asset58.py @@ -4,472 +4,775 @@ from __future__ import annotations -from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset36 import Mode +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + KeywordTextStemmedField, + NumericField, + RelationField, + TextField, +) +from .asset36 import Preset -class ModeReport(Mode): + +class PresetChart(Preset): """Description""" - type_name: str = Field("ModeReport", allow_mutation=False) + type_name: str = Field("PresetChart", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ModeReport": - raise ValueError("must be ModeReport") + if v != "PresetChart": + raise ValueError("must be PresetChart") return v def __setattr__(self, name, value): - if name in ModeReport._convience_properties: + if name in PresetChart._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "mode_collection_token", - "mode_report_published_at", - "mode_query_count", - "mode_chart_count", - "mode_query_preview", - "mode_is_public", - "mode_is_shared", - "mode_queries", - "mode_collections", + PRESET_CHART_DESCRIPTION_MARKDOWN: ClassVar[TextField] = TextField( + "presetChartDescriptionMarkdown", "presetChartDescriptionMarkdown" + ) + """ + TBC + """ + PRESET_CHART_FORM_DATA: ClassVar[KeywordField] = KeywordField( + "presetChartFormData", "presetChartFormData" + ) + """ + TBC + """ + + PRESET_DASHBOARD: ClassVar[RelationField] = RelationField("presetDashboard") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "preset_chart_description_markdown", + "preset_chart_form_data", + "preset_dashboard", ] @property - def mode_collection_token(self) -> Optional[str]: + def preset_chart_description_markdown(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.mode_collection_token + None + if self.attributes is None + else self.attributes.preset_chart_description_markdown ) - @mode_collection_token.setter - def mode_collection_token(self, mode_collection_token: Optional[str]): + @preset_chart_description_markdown.setter + def preset_chart_description_markdown( + self, preset_chart_description_markdown: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_collection_token = mode_collection_token + self.attributes.preset_chart_description_markdown = ( + preset_chart_description_markdown + ) @property - def mode_report_published_at(self) -> Optional[datetime]: + def preset_chart_form_data(self) -> Optional[dict[str, str]]: return ( - None - if self.attributes is None - else self.attributes.mode_report_published_at + None if self.attributes is None else self.attributes.preset_chart_form_data ) - @mode_report_published_at.setter - def mode_report_published_at(self, mode_report_published_at: Optional[datetime]): + @preset_chart_form_data.setter + def preset_chart_form_data(self, preset_chart_form_data: Optional[dict[str, str]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_report_published_at = mode_report_published_at + self.attributes.preset_chart_form_data = preset_chart_form_data @property - def mode_query_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.mode_query_count + def preset_dashboard(self) -> Optional[PresetDashboard]: + return None if self.attributes is None else self.attributes.preset_dashboard - @mode_query_count.setter - def mode_query_count(self, mode_query_count: Optional[int]): + @preset_dashboard.setter + def preset_dashboard(self, preset_dashboard: Optional[PresetDashboard]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_query_count = mode_query_count + self.attributes.preset_dashboard = preset_dashboard - @property - def mode_chart_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.mode_chart_count + class Attributes(Preset.Attributes): + preset_chart_description_markdown: Optional[str] = Field( + None, description="", alias="presetChartDescriptionMarkdown" + ) + preset_chart_form_data: Optional[dict[str, str]] = Field( + None, description="", alias="presetChartFormData" + ) + preset_dashboard: Optional[PresetDashboard] = Field( + None, description="", alias="presetDashboard" + ) # relationship - @mode_chart_count.setter - def mode_chart_count(self, mode_chart_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.mode_chart_count = mode_chart_count + attributes: "PresetChart.Attributes" = Field( + default_factory=lambda: PresetChart.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) - @property - def mode_query_preview(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.mode_query_preview - @mode_query_preview.setter - def mode_query_preview(self, mode_query_preview: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.mode_query_preview = mode_query_preview +class PresetDataset(Preset): + """Description""" + + type_name: str = Field("PresetDataset", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "PresetDataset": + raise ValueError("must be PresetDataset") + return v + + def __setattr__(self, name, value): + if name in PresetDataset._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + PRESET_DATASET_DATASOURCE_NAME: ClassVar[ + KeywordTextStemmedField + ] = KeywordTextStemmedField( + "presetDatasetDatasourceName", + "presetDatasetDatasourceName.keyword", + "presetDatasetDatasourceName", + "presetDatasetDatasourceName.stemmed", + ) + """ + TBC + """ + PRESET_DATASET_ID: ClassVar[NumericField] = NumericField( + "presetDatasetId", "presetDatasetId" + ) + """ + TBC + """ + PRESET_DATASET_TYPE: ClassVar[KeywordField] = KeywordField( + "presetDatasetType", "presetDatasetType" + ) + """ + TBC + """ + + PRESET_DASHBOARD: ClassVar[RelationField] = RelationField("presetDashboard") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "preset_dataset_datasource_name", + "preset_dataset_id", + "preset_dataset_type", + "preset_dashboard", + ] @property - def mode_is_public(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.mode_is_public + def preset_dataset_datasource_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.preset_dataset_datasource_name + ) - @mode_is_public.setter - def mode_is_public(self, mode_is_public: Optional[bool]): + @preset_dataset_datasource_name.setter + def preset_dataset_datasource_name( + self, preset_dataset_datasource_name: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_is_public = mode_is_public + self.attributes.preset_dataset_datasource_name = preset_dataset_datasource_name @property - def mode_is_shared(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.mode_is_shared + def preset_dataset_id(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.preset_dataset_id - @mode_is_shared.setter - def mode_is_shared(self, mode_is_shared: Optional[bool]): + @preset_dataset_id.setter + def preset_dataset_id(self, preset_dataset_id: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_is_shared = mode_is_shared + self.attributes.preset_dataset_id = preset_dataset_id @property - def mode_queries(self) -> Optional[list[ModeQuery]]: - return None if self.attributes is None else self.attributes.mode_queries + def preset_dataset_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.preset_dataset_type - @mode_queries.setter - def mode_queries(self, mode_queries: Optional[list[ModeQuery]]): + @preset_dataset_type.setter + def preset_dataset_type(self, preset_dataset_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_queries = mode_queries + self.attributes.preset_dataset_type = preset_dataset_type @property - def mode_collections(self) -> Optional[list[ModeCollection]]: - return None if self.attributes is None else self.attributes.mode_collections + def preset_dashboard(self) -> Optional[PresetDashboard]: + return None if self.attributes is None else self.attributes.preset_dashboard - @mode_collections.setter - def mode_collections(self, mode_collections: Optional[list[ModeCollection]]): + @preset_dashboard.setter + def preset_dashboard(self, preset_dashboard: Optional[PresetDashboard]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_collections = mode_collections + self.attributes.preset_dashboard = preset_dashboard - class Attributes(Mode.Attributes): - mode_collection_token: Optional[str] = Field( - None, description="", alias="modeCollectionToken" - ) - mode_report_published_at: Optional[datetime] = Field( - None, description="", alias="modeReportPublishedAt" + class Attributes(Preset.Attributes): + preset_dataset_datasource_name: Optional[str] = Field( + None, description="", alias="presetDatasetDatasourceName" ) - mode_query_count: Optional[int] = Field( - None, description="", alias="modeQueryCount" + preset_dataset_id: Optional[int] = Field( + None, description="", alias="presetDatasetId" ) - mode_chart_count: Optional[int] = Field( - None, description="", alias="modeChartCount" + preset_dataset_type: Optional[str] = Field( + None, description="", alias="presetDatasetType" ) - mode_query_preview: Optional[str] = Field( - None, description="", alias="modeQueryPreview" - ) - mode_is_public: Optional[bool] = Field( - None, description="", alias="modeIsPublic" - ) - mode_is_shared: Optional[bool] = Field( - None, description="", alias="modeIsShared" - ) - mode_queries: Optional[list[ModeQuery]] = Field( - None, description="", alias="modeQueries" - ) # relationship - mode_collections: Optional[list[ModeCollection]] = Field( - None, description="", alias="modeCollections" + preset_dashboard: Optional[PresetDashboard] = Field( + None, description="", alias="presetDashboard" ) # relationship - attributes: "ModeReport.Attributes" = Field( - default_factory=lambda: ModeReport.Attributes(), + attributes: "PresetDataset.Attributes" = Field( + default_factory=lambda: PresetDataset.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class ModeQuery(Mode): +class PresetDashboard(Preset): """Description""" - type_name: str = Field("ModeQuery", allow_mutation=False) + type_name: str = Field("PresetDashboard", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ModeQuery": - raise ValueError("must be ModeQuery") + if v != "PresetDashboard": + raise ValueError("must be PresetDashboard") return v def __setattr__(self, name, value): - if name in ModeQuery._convience_properties: + if name in PresetDashboard._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "mode_raw_query", - "mode_report_import_count", - "mode_charts", - "mode_report", + PRESET_DASHBOARD_CHANGED_BY_NAME: ClassVar[ + KeywordTextStemmedField + ] = KeywordTextStemmedField( + "presetDashboardChangedByName", + "presetDashboardChangedByName.keyword", + "presetDashboardChangedByName", + "presetDashboardChangedByName.stemmed", + ) + """ + TBC + """ + PRESET_DASHBOARD_CHANGED_BY_URL: ClassVar[KeywordField] = KeywordField( + "presetDashboardChangedByURL", "presetDashboardChangedByURL" + ) + """ + TBC + """ + PRESET_DASHBOARD_IS_MANAGED_EXTERNALLY: ClassVar[BooleanField] = BooleanField( + "presetDashboardIsManagedExternally", "presetDashboardIsManagedExternally" + ) + """ + TBC + """ + PRESET_DASHBOARD_IS_PUBLISHED: ClassVar[BooleanField] = BooleanField( + "presetDashboardIsPublished", "presetDashboardIsPublished" + ) + """ + TBC + """ + PRESET_DASHBOARD_THUMBNAIL_URL: ClassVar[KeywordField] = KeywordField( + "presetDashboardThumbnailURL", "presetDashboardThumbnailURL" + ) + """ + TBC + """ + PRESET_DASHBOARD_CHART_COUNT: ClassVar[NumericField] = NumericField( + "presetDashboardChartCount", "presetDashboardChartCount" + ) + """ + TBC + """ + + PRESET_DATASETS: ClassVar[RelationField] = RelationField("presetDatasets") + """ + TBC + """ + PRESET_CHARTS: ClassVar[RelationField] = RelationField("presetCharts") + """ + TBC + """ + PRESET_WORKSPACE: ClassVar[RelationField] = RelationField("presetWorkspace") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "preset_dashboard_changed_by_name", + "preset_dashboard_changed_by_url", + "preset_dashboard_is_managed_externally", + "preset_dashboard_is_published", + "preset_dashboard_thumbnail_url", + "preset_dashboard_chart_count", + "preset_datasets", + "preset_charts", + "preset_workspace", ] @property - def mode_raw_query(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.mode_raw_query + def preset_dashboard_changed_by_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.preset_dashboard_changed_by_name + ) - @mode_raw_query.setter - def mode_raw_query(self, mode_raw_query: Optional[str]): + @preset_dashboard_changed_by_name.setter + def preset_dashboard_changed_by_name( + self, preset_dashboard_changed_by_name: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_raw_query = mode_raw_query + self.attributes.preset_dashboard_changed_by_name = ( + preset_dashboard_changed_by_name + ) @property - def mode_report_import_count(self) -> Optional[int]: + def preset_dashboard_changed_by_url(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.mode_report_import_count + else self.attributes.preset_dashboard_changed_by_url ) - @mode_report_import_count.setter - def mode_report_import_count(self, mode_report_import_count: Optional[int]): + @preset_dashboard_changed_by_url.setter + def preset_dashboard_changed_by_url( + self, preset_dashboard_changed_by_url: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_report_import_count = mode_report_import_count + self.attributes.preset_dashboard_changed_by_url = ( + preset_dashboard_changed_by_url + ) @property - def mode_charts(self) -> Optional[list[ModeChart]]: - return None if self.attributes is None else self.attributes.mode_charts + def preset_dashboard_is_managed_externally(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.preset_dashboard_is_managed_externally + ) - @mode_charts.setter - def mode_charts(self, mode_charts: Optional[list[ModeChart]]): + @preset_dashboard_is_managed_externally.setter + def preset_dashboard_is_managed_externally( + self, preset_dashboard_is_managed_externally: Optional[bool] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_charts = mode_charts + self.attributes.preset_dashboard_is_managed_externally = ( + preset_dashboard_is_managed_externally + ) @property - def mode_report(self) -> Optional[ModeReport]: - return None if self.attributes is None else self.attributes.mode_report + def preset_dashboard_is_published(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.preset_dashboard_is_published + ) - @mode_report.setter - def mode_report(self, mode_report: Optional[ModeReport]): + @preset_dashboard_is_published.setter + def preset_dashboard_is_published( + self, preset_dashboard_is_published: Optional[bool] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_report = mode_report + self.attributes.preset_dashboard_is_published = preset_dashboard_is_published - class Attributes(Mode.Attributes): - mode_raw_query: Optional[str] = Field( - None, description="", alias="modeRawQuery" - ) - mode_report_import_count: Optional[int] = Field( - None, description="", alias="modeReportImportCount" + @property + def preset_dashboard_thumbnail_url(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.preset_dashboard_thumbnail_url ) - mode_charts: Optional[list[ModeChart]] = Field( - None, description="", alias="modeCharts" - ) # relationship - mode_report: Optional[ModeReport] = Field( - None, description="", alias="modeReport" - ) # relationship - attributes: "ModeQuery.Attributes" = Field( - default_factory=lambda: ModeQuery.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class ModeChart(Mode): - """Description""" + @preset_dashboard_thumbnail_url.setter + def preset_dashboard_thumbnail_url( + self, preset_dashboard_thumbnail_url: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.preset_dashboard_thumbnail_url = preset_dashboard_thumbnail_url - type_name: str = Field("ModeChart", allow_mutation=False) + @property + def preset_dashboard_chart_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.preset_dashboard_chart_count + ) - @validator("type_name") - def validate_type_name(cls, v): - if v != "ModeChart": - raise ValueError("must be ModeChart") - return v + @preset_dashboard_chart_count.setter + def preset_dashboard_chart_count(self, preset_dashboard_chart_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.preset_dashboard_chart_count = preset_dashboard_chart_count - def __setattr__(self, name, value): - if name in ModeChart._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) + @property + def preset_datasets(self) -> Optional[list[PresetDataset]]: + return None if self.attributes is None else self.attributes.preset_datasets - _convience_properties: ClassVar[list[str]] = [ - "mode_chart_type", - "mode_query", - ] + @preset_datasets.setter + def preset_datasets(self, preset_datasets: Optional[list[PresetDataset]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.preset_datasets = preset_datasets @property - def mode_chart_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.mode_chart_type + def preset_charts(self) -> Optional[list[PresetChart]]: + return None if self.attributes is None else self.attributes.preset_charts - @mode_chart_type.setter - def mode_chart_type(self, mode_chart_type: Optional[str]): + @preset_charts.setter + def preset_charts(self, preset_charts: Optional[list[PresetChart]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_chart_type = mode_chart_type + self.attributes.preset_charts = preset_charts @property - def mode_query(self) -> Optional[ModeQuery]: - return None if self.attributes is None else self.attributes.mode_query + def preset_workspace(self) -> Optional[PresetWorkspace]: + return None if self.attributes is None else self.attributes.preset_workspace - @mode_query.setter - def mode_query(self, mode_query: Optional[ModeQuery]): + @preset_workspace.setter + def preset_workspace(self, preset_workspace: Optional[PresetWorkspace]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_query = mode_query + self.attributes.preset_workspace = preset_workspace - class Attributes(Mode.Attributes): - mode_chart_type: Optional[str] = Field( - None, description="", alias="modeChartType" + class Attributes(Preset.Attributes): + preset_dashboard_changed_by_name: Optional[str] = Field( + None, description="", alias="presetDashboardChangedByName" + ) + preset_dashboard_changed_by_url: Optional[str] = Field( + None, description="", alias="presetDashboardChangedByURL" + ) + preset_dashboard_is_managed_externally: Optional[bool] = Field( + None, description="", alias="presetDashboardIsManagedExternally" + ) + preset_dashboard_is_published: Optional[bool] = Field( + None, description="", alias="presetDashboardIsPublished" ) - mode_query: Optional[ModeQuery] = Field( - None, description="", alias="modeQuery" + preset_dashboard_thumbnail_url: Optional[str] = Field( + None, description="", alias="presetDashboardThumbnailURL" + ) + preset_dashboard_chart_count: Optional[int] = Field( + None, description="", alias="presetDashboardChartCount" + ) + preset_datasets: Optional[list[PresetDataset]] = Field( + None, description="", alias="presetDatasets" + ) # relationship + preset_charts: Optional[list[PresetChart]] = Field( + None, description="", alias="presetCharts" + ) # relationship + preset_workspace: Optional[PresetWorkspace] = Field( + None, description="", alias="presetWorkspace" ) # relationship - attributes: "ModeChart.Attributes" = Field( - default_factory=lambda: ModeChart.Attributes(), + attributes: "PresetDashboard.Attributes" = Field( + default_factory=lambda: PresetDashboard.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class ModeWorkspace(Mode): +class PresetWorkspace(Preset): """Description""" - type_name: str = Field("ModeWorkspace", allow_mutation=False) + type_name: str = Field("PresetWorkspace", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ModeWorkspace": - raise ValueError("must be ModeWorkspace") + if v != "PresetWorkspace": + raise ValueError("must be PresetWorkspace") return v def __setattr__(self, name, value): - if name in ModeWorkspace._convience_properties: + if name in PresetWorkspace._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "mode_collection_count", - "mode_collections", + PRESET_WORKSPACE_PUBLIC_DASHBOARDS_ALLOWED: ClassVar[BooleanField] = BooleanField( + "presetWorkspacePublicDashboardsAllowed", + "presetWorkspacePublicDashboardsAllowed", + ) + """ + TBC + """ + PRESET_WORKSPACE_CLUSTER_ID: ClassVar[NumericField] = NumericField( + "presetWorkspaceClusterId", "presetWorkspaceClusterId" + ) + """ + TBC + """ + PRESET_WORKSPACE_HOSTNAME: ClassVar[KeywordTextField] = KeywordTextField( + "presetWorkspaceHostname", + "presetWorkspaceHostname", + "presetWorkspaceHostname.text", + ) + """ + TBC + """ + PRESET_WORKSPACE_IS_IN_MAINTENANCE_MODE: ClassVar[BooleanField] = BooleanField( + "presetWorkspaceIsInMaintenanceMode", "presetWorkspaceIsInMaintenanceMode" + ) + """ + TBC + """ + PRESET_WORKSPACE_REGION: ClassVar[KeywordTextField] = KeywordTextField( + "presetWorkspaceRegion", "presetWorkspaceRegion", "presetWorkspaceRegion.text" + ) + """ + TBC + """ + PRESET_WORKSPACE_STATUS: ClassVar[KeywordField] = KeywordField( + "presetWorkspaceStatus", "presetWorkspaceStatus" + ) + """ + TBC + """ + PRESET_WORKSPACE_DEPLOYMENT_ID: ClassVar[NumericField] = NumericField( + "presetWorkspaceDeploymentId", "presetWorkspaceDeploymentId" + ) + """ + TBC + """ + PRESET_WORKSPACE_DASHBOARD_COUNT: ClassVar[NumericField] = NumericField( + "presetWorkspaceDashboardCount", "presetWorkspaceDashboardCount" + ) + """ + TBC + """ + PRESET_WORKSPACE_DATASET_COUNT: ClassVar[NumericField] = NumericField( + "presetWorkspaceDatasetCount", "presetWorkspaceDatasetCount" + ) + """ + TBC + """ + + PRESET_DASHBOARDS: ClassVar[RelationField] = RelationField("presetDashboards") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "preset_workspace_public_dashboards_allowed", + "preset_workspace_cluster_id", + "preset_workspace_hostname", + "preset_workspace_is_in_maintenance_mode", + "preset_workspace_region", + "preset_workspace_status", + "preset_workspace_deployment_id", + "preset_workspace_dashboard_count", + "preset_workspace_dataset_count", + "preset_dashboards", ] @property - def mode_collection_count(self) -> Optional[int]: + def preset_workspace_public_dashboards_allowed(self) -> Optional[bool]: return ( - None if self.attributes is None else self.attributes.mode_collection_count + None + if self.attributes is None + else self.attributes.preset_workspace_public_dashboards_allowed ) - @mode_collection_count.setter - def mode_collection_count(self, mode_collection_count: Optional[int]): + @preset_workspace_public_dashboards_allowed.setter + def preset_workspace_public_dashboards_allowed( + self, preset_workspace_public_dashboards_allowed: Optional[bool] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_collection_count = mode_collection_count + self.attributes.preset_workspace_public_dashboards_allowed = ( + preset_workspace_public_dashboards_allowed + ) @property - def mode_collections(self) -> Optional[list[ModeCollection]]: - return None if self.attributes is None else self.attributes.mode_collections + def preset_workspace_cluster_id(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.preset_workspace_cluster_id + ) - @mode_collections.setter - def mode_collections(self, mode_collections: Optional[list[ModeCollection]]): + @preset_workspace_cluster_id.setter + def preset_workspace_cluster_id(self, preset_workspace_cluster_id: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_collections = mode_collections + self.attributes.preset_workspace_cluster_id = preset_workspace_cluster_id - class Attributes(Mode.Attributes): - mode_collection_count: Optional[int] = Field( - None, description="", alias="modeCollectionCount" + @property + def preset_workspace_hostname(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.preset_workspace_hostname ) - mode_collections: Optional[list[ModeCollection]] = Field( - None, description="", alias="modeCollections" - ) # relationship - attributes: "ModeWorkspace.Attributes" = Field( - default_factory=lambda: ModeWorkspace.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) + @preset_workspace_hostname.setter + def preset_workspace_hostname(self, preset_workspace_hostname: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.preset_workspace_hostname = preset_workspace_hostname + @property + def preset_workspace_is_in_maintenance_mode(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.preset_workspace_is_in_maintenance_mode + ) -class ModeCollection(Mode): - """Description""" + @preset_workspace_is_in_maintenance_mode.setter + def preset_workspace_is_in_maintenance_mode( + self, preset_workspace_is_in_maintenance_mode: Optional[bool] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.preset_workspace_is_in_maintenance_mode = ( + preset_workspace_is_in_maintenance_mode + ) - type_name: str = Field("ModeCollection", allow_mutation=False) + @property + def preset_workspace_region(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.preset_workspace_region + ) - @validator("type_name") - def validate_type_name(cls, v): - if v != "ModeCollection": - raise ValueError("must be ModeCollection") - return v + @preset_workspace_region.setter + def preset_workspace_region(self, preset_workspace_region: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.preset_workspace_region = preset_workspace_region - def __setattr__(self, name, value): - if name in ModeCollection._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) + @property + def preset_workspace_status(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.preset_workspace_status + ) - _convience_properties: ClassVar[list[str]] = [ - "mode_collection_type", - "mode_collection_state", - "mode_workspace", - "mode_reports", - ] + @preset_workspace_status.setter + def preset_workspace_status(self, preset_workspace_status: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.preset_workspace_status = preset_workspace_status @property - def mode_collection_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.mode_collection_type + def preset_workspace_deployment_id(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.preset_workspace_deployment_id + ) - @mode_collection_type.setter - def mode_collection_type(self, mode_collection_type: Optional[str]): + @preset_workspace_deployment_id.setter + def preset_workspace_deployment_id( + self, preset_workspace_deployment_id: Optional[int] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_collection_type = mode_collection_type + self.attributes.preset_workspace_deployment_id = preset_workspace_deployment_id @property - def mode_collection_state(self) -> Optional[str]: + def preset_workspace_dashboard_count(self) -> Optional[int]: return ( - None if self.attributes is None else self.attributes.mode_collection_state + None + if self.attributes is None + else self.attributes.preset_workspace_dashboard_count ) - @mode_collection_state.setter - def mode_collection_state(self, mode_collection_state: Optional[str]): + @preset_workspace_dashboard_count.setter + def preset_workspace_dashboard_count( + self, preset_workspace_dashboard_count: Optional[int] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_collection_state = mode_collection_state + self.attributes.preset_workspace_dashboard_count = ( + preset_workspace_dashboard_count + ) @property - def mode_workspace(self) -> Optional[ModeWorkspace]: - return None if self.attributes is None else self.attributes.mode_workspace + def preset_workspace_dataset_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.preset_workspace_dataset_count + ) - @mode_workspace.setter - def mode_workspace(self, mode_workspace: Optional[ModeWorkspace]): + @preset_workspace_dataset_count.setter + def preset_workspace_dataset_count( + self, preset_workspace_dataset_count: Optional[int] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_workspace = mode_workspace + self.attributes.preset_workspace_dataset_count = preset_workspace_dataset_count @property - def mode_reports(self) -> Optional[list[ModeReport]]: - return None if self.attributes is None else self.attributes.mode_reports + def preset_dashboards(self) -> Optional[list[PresetDashboard]]: + return None if self.attributes is None else self.attributes.preset_dashboards - @mode_reports.setter - def mode_reports(self, mode_reports: Optional[list[ModeReport]]): + @preset_dashboards.setter + def preset_dashboards(self, preset_dashboards: Optional[list[PresetDashboard]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.mode_reports = mode_reports + self.attributes.preset_dashboards = preset_dashboards - class Attributes(Mode.Attributes): - mode_collection_type: Optional[str] = Field( - None, description="", alias="modeCollectionType" + class Attributes(Preset.Attributes): + preset_workspace_public_dashboards_allowed: Optional[bool] = Field( + None, description="", alias="presetWorkspacePublicDashboardsAllowed" ) - mode_collection_state: Optional[str] = Field( - None, description="", alias="modeCollectionState" + preset_workspace_cluster_id: Optional[int] = Field( + None, description="", alias="presetWorkspaceClusterId" ) - mode_workspace: Optional[ModeWorkspace] = Field( - None, description="", alias="modeWorkspace" - ) # relationship - mode_reports: Optional[list[ModeReport]] = Field( - None, description="", alias="modeReports" + preset_workspace_hostname: Optional[str] = Field( + None, description="", alias="presetWorkspaceHostname" + ) + preset_workspace_is_in_maintenance_mode: Optional[bool] = Field( + None, description="", alias="presetWorkspaceIsInMaintenanceMode" + ) + preset_workspace_region: Optional[str] = Field( + None, description="", alias="presetWorkspaceRegion" + ) + preset_workspace_status: Optional[str] = Field( + None, description="", alias="presetWorkspaceStatus" + ) + preset_workspace_deployment_id: Optional[int] = Field( + None, description="", alias="presetWorkspaceDeploymentId" + ) + preset_workspace_dashboard_count: Optional[int] = Field( + None, description="", alias="presetWorkspaceDashboardCount" + ) + preset_workspace_dataset_count: Optional[int] = Field( + None, description="", alias="presetWorkspaceDatasetCount" + ) + preset_dashboards: Optional[list[PresetDashboard]] = Field( + None, description="", alias="presetDashboards" ) # relationship - attributes: "ModeCollection.Attributes" = Field( - default_factory=lambda: ModeCollection.Attributes(), + attributes: "PresetWorkspace.Attributes" = Field( + default_factory=lambda: PresetWorkspace.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -ModeReport.Attributes.update_forward_refs() - - -ModeQuery.Attributes.update_forward_refs() +PresetChart.Attributes.update_forward_refs() -ModeChart.Attributes.update_forward_refs() +PresetDataset.Attributes.update_forward_refs() -ModeWorkspace.Attributes.update_forward_refs() +PresetDashboard.Attributes.update_forward_refs() -ModeCollection.Attributes.update_forward_refs() +PresetWorkspace.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset59.py b/pyatlan/model/assets/asset59.py index 287da02a1..8467e3f2d 100644 --- a/pyatlan/model/assets/asset59.py +++ b/pyatlan/model/assets/asset59.py @@ -4,152 +4,598 @@ from __future__ import annotations +from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset37 import Sigma +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, + TextField, +) +from .asset37 import Mode -class SigmaDatasetColumn(Sigma): + +class ModeReport(Mode): """Description""" - type_name: str = Field("SigmaDatasetColumn", allow_mutation=False) + type_name: str = Field("ModeReport", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SigmaDatasetColumn": - raise ValueError("must be SigmaDatasetColumn") + if v != "ModeReport": + raise ValueError("must be ModeReport") return v def __setattr__(self, name, value): - if name in SigmaDatasetColumn._convience_properties: + if name in ModeReport._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "sigma_dataset_qualified_name", - "sigma_dataset_name", - "sigma_dataset", + MODE_COLLECTION_TOKEN: ClassVar[KeywordField] = KeywordField( + "modeCollectionToken", "modeCollectionToken" + ) + """ + TBC + """ + MODE_REPORT_PUBLISHED_AT: ClassVar[NumericField] = NumericField( + "modeReportPublishedAt", "modeReportPublishedAt" + ) + """ + TBC + """ + MODE_QUERY_COUNT: ClassVar[NumericField] = NumericField( + "modeQueryCount", "modeQueryCount" + ) + """ + TBC + """ + MODE_CHART_COUNT: ClassVar[NumericField] = NumericField( + "modeChartCount", "modeChartCount" + ) + """ + TBC + """ + MODE_QUERY_PREVIEW: ClassVar[TextField] = TextField( + "modeQueryPreview", "modeQueryPreview" + ) + """ + TBC + """ + MODE_IS_PUBLIC: ClassVar[BooleanField] = BooleanField( + "modeIsPublic", "modeIsPublic" + ) + """ + TBC + """ + MODE_IS_SHARED: ClassVar[BooleanField] = BooleanField( + "modeIsShared", "modeIsShared" + ) + """ + TBC + """ + + MODE_QUERIES: ClassVar[RelationField] = RelationField("modeQueries") + """ + TBC + """ + MODE_COLLECTIONS: ClassVar[RelationField] = RelationField("modeCollections") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "mode_collection_token", + "mode_report_published_at", + "mode_query_count", + "mode_chart_count", + "mode_query_preview", + "mode_is_public", + "mode_is_shared", + "mode_queries", + "mode_collections", ] @property - def sigma_dataset_qualified_name(self) -> Optional[str]: + def mode_collection_token(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.mode_collection_token + ) + + @mode_collection_token.setter + def mode_collection_token(self, mode_collection_token: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_collection_token = mode_collection_token + + @property + def mode_report_published_at(self) -> Optional[datetime]: return ( None if self.attributes is None - else self.attributes.sigma_dataset_qualified_name + else self.attributes.mode_report_published_at ) - @sigma_dataset_qualified_name.setter - def sigma_dataset_qualified_name(self, sigma_dataset_qualified_name: Optional[str]): + @mode_report_published_at.setter + def mode_report_published_at(self, mode_report_published_at: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_report_published_at = mode_report_published_at + + @property + def mode_query_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.mode_query_count + + @mode_query_count.setter + def mode_query_count(self, mode_query_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_query_count = mode_query_count + + @property + def mode_chart_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.mode_chart_count + + @mode_chart_count.setter + def mode_chart_count(self, mode_chart_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_chart_count = mode_chart_count + + @property + def mode_query_preview(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.mode_query_preview + + @mode_query_preview.setter + def mode_query_preview(self, mode_query_preview: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_query_preview = mode_query_preview + + @property + def mode_is_public(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.mode_is_public + + @mode_is_public.setter + def mode_is_public(self, mode_is_public: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_dataset_qualified_name = sigma_dataset_qualified_name + self.attributes.mode_is_public = mode_is_public @property - def sigma_dataset_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.sigma_dataset_name + def mode_is_shared(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.mode_is_shared - @sigma_dataset_name.setter - def sigma_dataset_name(self, sigma_dataset_name: Optional[str]): + @mode_is_shared.setter + def mode_is_shared(self, mode_is_shared: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_dataset_name = sigma_dataset_name + self.attributes.mode_is_shared = mode_is_shared @property - def sigma_dataset(self) -> Optional[SigmaDataset]: - return None if self.attributes is None else self.attributes.sigma_dataset + def mode_queries(self) -> Optional[list[ModeQuery]]: + return None if self.attributes is None else self.attributes.mode_queries - @sigma_dataset.setter - def sigma_dataset(self, sigma_dataset: Optional[SigmaDataset]): + @mode_queries.setter + def mode_queries(self, mode_queries: Optional[list[ModeQuery]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_dataset = sigma_dataset + self.attributes.mode_queries = mode_queries + + @property + def mode_collections(self) -> Optional[list[ModeCollection]]: + return None if self.attributes is None else self.attributes.mode_collections - class Attributes(Sigma.Attributes): - sigma_dataset_qualified_name: Optional[str] = Field( - None, description="", alias="sigmaDatasetQualifiedName" + @mode_collections.setter + def mode_collections(self, mode_collections: Optional[list[ModeCollection]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_collections = mode_collections + + class Attributes(Mode.Attributes): + mode_collection_token: Optional[str] = Field( + None, description="", alias="modeCollectionToken" + ) + mode_report_published_at: Optional[datetime] = Field( + None, description="", alias="modeReportPublishedAt" + ) + mode_query_count: Optional[int] = Field( + None, description="", alias="modeQueryCount" + ) + mode_chart_count: Optional[int] = Field( + None, description="", alias="modeChartCount" + ) + mode_query_preview: Optional[str] = Field( + None, description="", alias="modeQueryPreview" ) - sigma_dataset_name: Optional[str] = Field( - None, description="", alias="sigmaDatasetName" + mode_is_public: Optional[bool] = Field( + None, description="", alias="modeIsPublic" ) - sigma_dataset: Optional[SigmaDataset] = Field( - None, description="", alias="sigmaDataset" + mode_is_shared: Optional[bool] = Field( + None, description="", alias="modeIsShared" + ) + mode_queries: Optional[list[ModeQuery]] = Field( + None, description="", alias="modeQueries" + ) # relationship + mode_collections: Optional[list[ModeCollection]] = Field( + None, description="", alias="modeCollections" ) # relationship - attributes: "SigmaDatasetColumn.Attributes" = Field( - default_factory=lambda: SigmaDatasetColumn.Attributes(), + attributes: "ModeReport.Attributes" = Field( + default_factory=lambda: ModeReport.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class SigmaDataset(Sigma): +class ModeQuery(Mode): """Description""" - type_name: str = Field("SigmaDataset", allow_mutation=False) + type_name: str = Field("ModeQuery", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SigmaDataset": - raise ValueError("must be SigmaDataset") + if v != "ModeQuery": + raise ValueError("must be ModeQuery") return v def __setattr__(self, name, value): - if name in SigmaDataset._convience_properties: + if name in ModeQuery._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "sigma_dataset_column_count", - "sigma_dataset_columns", + MODE_RAW_QUERY: ClassVar[TextField] = TextField("modeRawQuery", "modeRawQuery") + """ + TBC + """ + MODE_REPORT_IMPORT_COUNT: ClassVar[NumericField] = NumericField( + "modeReportImportCount", "modeReportImportCount" + ) + """ + TBC + """ + + MODE_CHARTS: ClassVar[RelationField] = RelationField("modeCharts") + """ + TBC + """ + MODE_REPORT: ClassVar[RelationField] = RelationField("modeReport") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "mode_raw_query", + "mode_report_import_count", + "mode_charts", + "mode_report", ] @property - def sigma_dataset_column_count(self) -> Optional[int]: + def mode_raw_query(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.mode_raw_query + + @mode_raw_query.setter + def mode_raw_query(self, mode_raw_query: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_raw_query = mode_raw_query + + @property + def mode_report_import_count(self) -> Optional[int]: return ( None if self.attributes is None - else self.attributes.sigma_dataset_column_count + else self.attributes.mode_report_import_count + ) + + @mode_report_import_count.setter + def mode_report_import_count(self, mode_report_import_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_report_import_count = mode_report_import_count + + @property + def mode_charts(self) -> Optional[list[ModeChart]]: + return None if self.attributes is None else self.attributes.mode_charts + + @mode_charts.setter + def mode_charts(self, mode_charts: Optional[list[ModeChart]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_charts = mode_charts + + @property + def mode_report(self) -> Optional[ModeReport]: + return None if self.attributes is None else self.attributes.mode_report + + @mode_report.setter + def mode_report(self, mode_report: Optional[ModeReport]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_report = mode_report + + class Attributes(Mode.Attributes): + mode_raw_query: Optional[str] = Field( + None, description="", alias="modeRawQuery" + ) + mode_report_import_count: Optional[int] = Field( + None, description="", alias="modeReportImportCount" + ) + mode_charts: Optional[list[ModeChart]] = Field( + None, description="", alias="modeCharts" + ) # relationship + mode_report: Optional[ModeReport] = Field( + None, description="", alias="modeReport" + ) # relationship + + attributes: "ModeQuery.Attributes" = Field( + default_factory=lambda: ModeQuery.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class ModeChart(Mode): + """Description""" + + type_name: str = Field("ModeChart", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ModeChart": + raise ValueError("must be ModeChart") + return v + + def __setattr__(self, name, value): + if name in ModeChart._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODE_CHART_TYPE: ClassVar[KeywordField] = KeywordField( + "modeChartType", "modeChartType" + ) + """ + TBC + """ + + MODE_QUERY: ClassVar[RelationField] = RelationField("modeQuery") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "mode_chart_type", + "mode_query", + ] + + @property + def mode_chart_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.mode_chart_type + + @mode_chart_type.setter + def mode_chart_type(self, mode_chart_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_chart_type = mode_chart_type + + @property + def mode_query(self) -> Optional[ModeQuery]: + return None if self.attributes is None else self.attributes.mode_query + + @mode_query.setter + def mode_query(self, mode_query: Optional[ModeQuery]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_query = mode_query + + class Attributes(Mode.Attributes): + mode_chart_type: Optional[str] = Field( + None, description="", alias="modeChartType" + ) + mode_query: Optional[ModeQuery] = Field( + None, description="", alias="modeQuery" + ) # relationship + + attributes: "ModeChart.Attributes" = Field( + default_factory=lambda: ModeChart.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class ModeWorkspace(Mode): + """Description""" + + type_name: str = Field("ModeWorkspace", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ModeWorkspace": + raise ValueError("must be ModeWorkspace") + return v + + def __setattr__(self, name, value): + if name in ModeWorkspace._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODE_COLLECTION_COUNT: ClassVar[NumericField] = NumericField( + "modeCollectionCount", "modeCollectionCount" + ) + """ + TBC + """ + + MODE_COLLECTIONS: ClassVar[RelationField] = RelationField("modeCollections") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "mode_collection_count", + "mode_collections", + ] + + @property + def mode_collection_count(self) -> Optional[int]: + return ( + None if self.attributes is None else self.attributes.mode_collection_count + ) + + @mode_collection_count.setter + def mode_collection_count(self, mode_collection_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_collection_count = mode_collection_count + + @property + def mode_collections(self) -> Optional[list[ModeCollection]]: + return None if self.attributes is None else self.attributes.mode_collections + + @mode_collections.setter + def mode_collections(self, mode_collections: Optional[list[ModeCollection]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_collections = mode_collections + + class Attributes(Mode.Attributes): + mode_collection_count: Optional[int] = Field( + None, description="", alias="modeCollectionCount" ) + mode_collections: Optional[list[ModeCollection]] = Field( + None, description="", alias="modeCollections" + ) # relationship + + attributes: "ModeWorkspace.Attributes" = Field( + default_factory=lambda: ModeWorkspace.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class ModeCollection(Mode): + """Description""" + + type_name: str = Field("ModeCollection", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ModeCollection": + raise ValueError("must be ModeCollection") + return v + + def __setattr__(self, name, value): + if name in ModeCollection._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODE_COLLECTION_TYPE: ClassVar[KeywordField] = KeywordField( + "modeCollectionType", "modeCollectionType" + ) + """ + TBC + """ + MODE_COLLECTION_STATE: ClassVar[KeywordField] = KeywordField( + "modeCollectionState", "modeCollectionState" + ) + """ + TBC + """ + + MODE_WORKSPACE: ClassVar[RelationField] = RelationField("modeWorkspace") + """ + TBC + """ + MODE_REPORTS: ClassVar[RelationField] = RelationField("modeReports") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "mode_collection_type", + "mode_collection_state", + "mode_workspace", + "mode_reports", + ] + + @property + def mode_collection_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.mode_collection_type - @sigma_dataset_column_count.setter - def sigma_dataset_column_count(self, sigma_dataset_column_count: Optional[int]): + @mode_collection_type.setter + def mode_collection_type(self, mode_collection_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_dataset_column_count = sigma_dataset_column_count + self.attributes.mode_collection_type = mode_collection_type @property - def sigma_dataset_columns(self) -> Optional[list[SigmaDatasetColumn]]: + def mode_collection_state(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.sigma_dataset_columns + None if self.attributes is None else self.attributes.mode_collection_state ) - @sigma_dataset_columns.setter - def sigma_dataset_columns( - self, sigma_dataset_columns: Optional[list[SigmaDatasetColumn]] - ): + @mode_collection_state.setter + def mode_collection_state(self, mode_collection_state: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_collection_state = mode_collection_state + + @property + def mode_workspace(self) -> Optional[ModeWorkspace]: + return None if self.attributes is None else self.attributes.mode_workspace + + @mode_workspace.setter + def mode_workspace(self, mode_workspace: Optional[ModeWorkspace]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.mode_workspace = mode_workspace + + @property + def mode_reports(self) -> Optional[list[ModeReport]]: + return None if self.attributes is None else self.attributes.mode_reports + + @mode_reports.setter + def mode_reports(self, mode_reports: Optional[list[ModeReport]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_dataset_columns = sigma_dataset_columns + self.attributes.mode_reports = mode_reports - class Attributes(Sigma.Attributes): - sigma_dataset_column_count: Optional[int] = Field( - None, description="", alias="sigmaDatasetColumnCount" + class Attributes(Mode.Attributes): + mode_collection_type: Optional[str] = Field( + None, description="", alias="modeCollectionType" ) - sigma_dataset_columns: Optional[list[SigmaDatasetColumn]] = Field( - None, description="", alias="sigmaDatasetColumns" + mode_collection_state: Optional[str] = Field( + None, description="", alias="modeCollectionState" + ) + mode_workspace: Optional[ModeWorkspace] = Field( + None, description="", alias="modeWorkspace" + ) # relationship + mode_reports: Optional[list[ModeReport]] = Field( + None, description="", alias="modeReports" ) # relationship - attributes: "SigmaDataset.Attributes" = Field( - default_factory=lambda: SigmaDataset.Attributes(), + attributes: "ModeCollection.Attributes" = Field( + default_factory=lambda: ModeCollection.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -SigmaDatasetColumn.Attributes.update_forward_refs() +ModeReport.Attributes.update_forward_refs() + + +ModeQuery.Attributes.update_forward_refs() + + +ModeChart.Attributes.update_forward_refs() + + +ModeWorkspace.Attributes.update_forward_refs() -SigmaDataset.Attributes.update_forward_refs() +ModeCollection.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset60.py b/pyatlan/model/assets/asset60.py index 4781173e5..10b5ffc31 100644 --- a/pyatlan/model/assets/asset60.py +++ b/pyatlan/model/assets/asset60.py @@ -8,350 +8,188 @@ from pydantic import Field, validator -from .asset37 import Sigma +from pyatlan.model.fields.atlan_fields import ( + KeywordTextField, + NumericField, + RelationField, +) +from .asset38 import Sigma -class SigmaWorkbook(Sigma): - """Description""" - - type_name: str = Field("SigmaWorkbook", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "SigmaWorkbook": - raise ValueError("must be SigmaWorkbook") - return v - def __setattr__(self, name, value): - if name in SigmaWorkbook._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "sigma_page_count", - "sigma_pages", - ] - - @property - def sigma_page_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.sigma_page_count - - @sigma_page_count.setter - def sigma_page_count(self, sigma_page_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sigma_page_count = sigma_page_count - - @property - def sigma_pages(self) -> Optional[list[SigmaPage]]: - return None if self.attributes is None else self.attributes.sigma_pages - - @sigma_pages.setter - def sigma_pages(self, sigma_pages: Optional[list[SigmaPage]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sigma_pages = sigma_pages - - class Attributes(Sigma.Attributes): - sigma_page_count: Optional[int] = Field( - None, description="", alias="sigmaPageCount" - ) - sigma_pages: Optional[list[SigmaPage]] = Field( - None, description="", alias="sigmaPages" - ) # relationship - - attributes: "SigmaWorkbook.Attributes" = Field( - default_factory=lambda: SigmaWorkbook.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class SigmaDataElementField(Sigma): +class SigmaDatasetColumn(Sigma): """Description""" - type_name: str = Field("SigmaDataElementField", allow_mutation=False) + type_name: str = Field("SigmaDatasetColumn", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SigmaDataElementField": - raise ValueError("must be SigmaDataElementField") + if v != "SigmaDatasetColumn": + raise ValueError("must be SigmaDatasetColumn") return v def __setattr__(self, name, value): - if name in SigmaDataElementField._convience_properties: + if name in SigmaDatasetColumn._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "sigma_data_element_field_is_hidden", - "sigma_data_element_field_formula", - "sigma_data_element", + SIGMA_DATASET_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "sigmaDatasetQualifiedName", + "sigmaDatasetQualifiedName", + "sigmaDatasetQualifiedName.text", + ) + """ + TBC + """ + SIGMA_DATASET_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "sigmaDatasetName", "sigmaDatasetName.keyword", "sigmaDatasetName" + ) + """ + TBC + """ + + SIGMA_DATASET: ClassVar[RelationField] = RelationField("sigmaDataset") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "sigma_dataset_qualified_name", + "sigma_dataset_name", + "sigma_dataset", ] @property - def sigma_data_element_field_is_hidden(self) -> Optional[bool]: + def sigma_dataset_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.sigma_data_element_field_is_hidden + else self.attributes.sigma_dataset_qualified_name ) - @sigma_data_element_field_is_hidden.setter - def sigma_data_element_field_is_hidden( - self, sigma_data_element_field_is_hidden: Optional[bool] - ): + @sigma_dataset_qualified_name.setter + def sigma_dataset_qualified_name(self, sigma_dataset_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_data_element_field_is_hidden = ( - sigma_data_element_field_is_hidden - ) + self.attributes.sigma_dataset_qualified_name = sigma_dataset_qualified_name @property - def sigma_data_element_field_formula(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.sigma_data_element_field_formula - ) + def sigma_dataset_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.sigma_dataset_name - @sigma_data_element_field_formula.setter - def sigma_data_element_field_formula( - self, sigma_data_element_field_formula: Optional[str] - ): + @sigma_dataset_name.setter + def sigma_dataset_name(self, sigma_dataset_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_data_element_field_formula = ( - sigma_data_element_field_formula - ) + self.attributes.sigma_dataset_name = sigma_dataset_name @property - def sigma_data_element(self) -> Optional[SigmaDataElement]: - return None if self.attributes is None else self.attributes.sigma_data_element + def sigma_dataset(self) -> Optional[SigmaDataset]: + return None if self.attributes is None else self.attributes.sigma_dataset - @sigma_data_element.setter - def sigma_data_element(self, sigma_data_element: Optional[SigmaDataElement]): + @sigma_dataset.setter + def sigma_dataset(self, sigma_dataset: Optional[SigmaDataset]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_data_element = sigma_data_element + self.attributes.sigma_dataset = sigma_dataset class Attributes(Sigma.Attributes): - sigma_data_element_field_is_hidden: Optional[bool] = Field( - None, description="", alias="sigmaDataElementFieldIsHidden" + sigma_dataset_qualified_name: Optional[str] = Field( + None, description="", alias="sigmaDatasetQualifiedName" ) - sigma_data_element_field_formula: Optional[str] = Field( - None, description="", alias="sigmaDataElementFieldFormula" + sigma_dataset_name: Optional[str] = Field( + None, description="", alias="sigmaDatasetName" ) - sigma_data_element: Optional[SigmaDataElement] = Field( - None, description="", alias="sigmaDataElement" + sigma_dataset: Optional[SigmaDataset] = Field( + None, description="", alias="sigmaDataset" ) # relationship - attributes: "SigmaDataElementField.Attributes" = Field( - default_factory=lambda: SigmaDataElementField.Attributes(), + attributes: "SigmaDatasetColumn.Attributes" = Field( + default_factory=lambda: SigmaDatasetColumn.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class SigmaPage(Sigma): +class SigmaDataset(Sigma): """Description""" - type_name: str = Field("SigmaPage", allow_mutation=False) + type_name: str = Field("SigmaDataset", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SigmaPage": - raise ValueError("must be SigmaPage") + if v != "SigmaDataset": + raise ValueError("must be SigmaDataset") return v def __setattr__(self, name, value): - if name in SigmaPage._convience_properties: + if name in SigmaDataset._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "sigma_data_element_count", - "sigma_data_elements", - "sigma_workbook", - ] - - @property - def sigma_data_element_count(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.sigma_data_element_count - ) - - @sigma_data_element_count.setter - def sigma_data_element_count(self, sigma_data_element_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sigma_data_element_count = sigma_data_element_count - - @property - def sigma_data_elements(self) -> Optional[list[SigmaDataElement]]: - return None if self.attributes is None else self.attributes.sigma_data_elements - - @sigma_data_elements.setter - def sigma_data_elements( - self, sigma_data_elements: Optional[list[SigmaDataElement]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sigma_data_elements = sigma_data_elements - - @property - def sigma_workbook(self) -> Optional[SigmaWorkbook]: - return None if self.attributes is None else self.attributes.sigma_workbook - - @sigma_workbook.setter - def sigma_workbook(self, sigma_workbook: Optional[SigmaWorkbook]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sigma_workbook = sigma_workbook - - class Attributes(Sigma.Attributes): - sigma_data_element_count: Optional[int] = Field( - None, description="", alias="sigmaDataElementCount" - ) - sigma_data_elements: Optional[list[SigmaDataElement]] = Field( - None, description="", alias="sigmaDataElements" - ) # relationship - sigma_workbook: Optional[SigmaWorkbook] = Field( - None, description="", alias="sigmaWorkbook" - ) # relationship - - attributes: "SigmaPage.Attributes" = Field( - default_factory=lambda: SigmaPage.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", + SIGMA_DATASET_COLUMN_COUNT: ClassVar[NumericField] = NumericField( + "sigmaDatasetColumnCount", "sigmaDatasetColumnCount" ) + """ + TBC + """ + SIGMA_DATASET_COLUMNS: ClassVar[RelationField] = RelationField( + "sigmaDatasetColumns" + ) + """ + TBC + """ -class SigmaDataElement(Sigma): - """Description""" - - type_name: str = Field("SigmaDataElement", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "SigmaDataElement": - raise ValueError("must be SigmaDataElement") - return v - - def __setattr__(self, name, value): - if name in SigmaDataElement._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "sigma_data_element_query", - "sigma_data_element_type", - "sigma_data_element_field_count", - "sigma_page", - "sigma_data_element_fields", + _convenience_properties: ClassVar[list[str]] = [ + "sigma_dataset_column_count", + "sigma_dataset_columns", ] @property - def sigma_data_element_query(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.sigma_data_element_query - ) - - @sigma_data_element_query.setter - def sigma_data_element_query(self, sigma_data_element_query: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sigma_data_element_query = sigma_data_element_query - - @property - def sigma_data_element_type(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.sigma_data_element_type - ) - - @sigma_data_element_type.setter - def sigma_data_element_type(self, sigma_data_element_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sigma_data_element_type = sigma_data_element_type - - @property - def sigma_data_element_field_count(self) -> Optional[int]: + def sigma_dataset_column_count(self) -> Optional[int]: return ( None if self.attributes is None - else self.attributes.sigma_data_element_field_count + else self.attributes.sigma_dataset_column_count ) - @sigma_data_element_field_count.setter - def sigma_data_element_field_count( - self, sigma_data_element_field_count: Optional[int] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sigma_data_element_field_count = sigma_data_element_field_count - - @property - def sigma_page(self) -> Optional[SigmaPage]: - return None if self.attributes is None else self.attributes.sigma_page - - @sigma_page.setter - def sigma_page(self, sigma_page: Optional[SigmaPage]): + @sigma_dataset_column_count.setter + def sigma_dataset_column_count(self, sigma_dataset_column_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_page = sigma_page + self.attributes.sigma_dataset_column_count = sigma_dataset_column_count @property - def sigma_data_element_fields(self) -> Optional[list[SigmaDataElementField]]: + def sigma_dataset_columns(self) -> Optional[list[SigmaDatasetColumn]]: return ( - None - if self.attributes is None - else self.attributes.sigma_data_element_fields + None if self.attributes is None else self.attributes.sigma_dataset_columns ) - @sigma_data_element_fields.setter - def sigma_data_element_fields( - self, sigma_data_element_fields: Optional[list[SigmaDataElementField]] + @sigma_dataset_columns.setter + def sigma_dataset_columns( + self, sigma_dataset_columns: Optional[list[SigmaDatasetColumn]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.sigma_data_element_fields = sigma_data_element_fields + self.attributes.sigma_dataset_columns = sigma_dataset_columns class Attributes(Sigma.Attributes): - sigma_data_element_query: Optional[str] = Field( - None, description="", alias="sigmaDataElementQuery" + sigma_dataset_column_count: Optional[int] = Field( + None, description="", alias="sigmaDatasetColumnCount" ) - sigma_data_element_type: Optional[str] = Field( - None, description="", alias="sigmaDataElementType" - ) - sigma_data_element_field_count: Optional[int] = Field( - None, description="", alias="sigmaDataElementFieldCount" - ) - sigma_page: Optional[SigmaPage] = Field( - None, description="", alias="sigmaPage" - ) # relationship - sigma_data_element_fields: Optional[list[SigmaDataElementField]] = Field( - None, description="", alias="sigmaDataElementFields" + sigma_dataset_columns: Optional[list[SigmaDatasetColumn]] = Field( + None, description="", alias="sigmaDatasetColumns" ) # relationship - attributes: "SigmaDataElement.Attributes" = Field( - default_factory=lambda: SigmaDataElement.Attributes(), + attributes: "SigmaDataset.Attributes" = Field( + default_factory=lambda: SigmaDataset.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -SigmaWorkbook.Attributes.update_forward_refs() - - -SigmaDataElementField.Attributes.update_forward_refs() - - -SigmaPage.Attributes.update_forward_refs() +SigmaDatasetColumn.Attributes.update_forward_refs() -SigmaDataElement.Attributes.update_forward_refs() +SigmaDataset.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset61.py b/pyatlan/model/assets/asset61.py index c0978fc47..fe04c338f 100644 --- a/pyatlan/model/assets/asset61.py +++ b/pyatlan/model/assets/asset61.py @@ -8,1691 +8,434 @@ from pydantic import Field, validator -from .asset38 import Tableau +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, + TextField, +) +from .asset38 import Sigma -class TableauWorkbook(Tableau): - """Description""" - - type_name: str = Field("TableauWorkbook", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "TableauWorkbook": - raise ValueError("must be TableauWorkbook") - return v - - def __setattr__(self, name, value): - if name in TableauWorkbook._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "site_qualified_name", - "project_qualified_name", - "top_level_project_name", - "top_level_project_qualified_name", - "project_hierarchy", - "project", - "dashboards", - "worksheets", - "datasources", - ] - - @property - def site_qualified_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.site_qualified_name - - @site_qualified_name.setter - def site_qualified_name(self, site_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.site_qualified_name = site_qualified_name - - @property - def project_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.project_qualified_name - ) - - @project_qualified_name.setter - def project_qualified_name(self, project_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_qualified_name = project_qualified_name - - @property - def top_level_project_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.top_level_project_name - ) - - @top_level_project_name.setter - def top_level_project_name(self, top_level_project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.top_level_project_name = top_level_project_name - - @property - def top_level_project_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.top_level_project_qualified_name - ) - - @top_level_project_qualified_name.setter - def top_level_project_qualified_name( - self, top_level_project_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.top_level_project_qualified_name = ( - top_level_project_qualified_name - ) - - @property - def project_hierarchy(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.project_hierarchy - - @project_hierarchy.setter - def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_hierarchy = project_hierarchy - - @property - def project(self) -> Optional[TableauProject]: - return None if self.attributes is None else self.attributes.project - - @project.setter - def project(self, project: Optional[TableauProject]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project = project - - @property - def dashboards(self) -> Optional[list[TableauDashboard]]: - return None if self.attributes is None else self.attributes.dashboards - - @dashboards.setter - def dashboards(self, dashboards: Optional[list[TableauDashboard]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboards = dashboards - - @property - def worksheets(self) -> Optional[list[TableauWorksheet]]: - return None if self.attributes is None else self.attributes.worksheets - - @worksheets.setter - def worksheets(self, worksheets: Optional[list[TableauWorksheet]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.worksheets = worksheets - - @property - def datasources(self) -> Optional[list[TableauDatasource]]: - return None if self.attributes is None else self.attributes.datasources - - @datasources.setter - def datasources(self, datasources: Optional[list[TableauDatasource]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasources = datasources - - class Attributes(Tableau.Attributes): - site_qualified_name: Optional[str] = Field( - None, description="", alias="siteQualifiedName" - ) - project_qualified_name: Optional[str] = Field( - None, description="", alias="projectQualifiedName" - ) - top_level_project_name: Optional[str] = Field( - None, description="", alias="topLevelProjectName" - ) - top_level_project_qualified_name: Optional[str] = Field( - None, description="", alias="topLevelProjectQualifiedName" - ) - project_hierarchy: Optional[list[dict[str, str]]] = Field( - None, description="", alias="projectHierarchy" - ) - project: Optional[TableauProject] = Field( - None, description="", alias="project" - ) # relationship - dashboards: Optional[list[TableauDashboard]] = Field( - None, description="", alias="dashboards" - ) # relationship - worksheets: Optional[list[TableauWorksheet]] = Field( - None, description="", alias="worksheets" - ) # relationship - datasources: Optional[list[TableauDatasource]] = Field( - None, description="", alias="datasources" - ) # relationship - - attributes: "TableauWorkbook.Attributes" = Field( - default_factory=lambda: TableauWorkbook.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class TableauDatasourceField(Tableau): - """Description""" - - type_name: str = Field("TableauDatasourceField", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "TableauDatasourceField": - raise ValueError("must be TableauDatasourceField") - return v - - def __setattr__(self, name, value): - if name in TableauDatasourceField._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "site_qualified_name", - "project_qualified_name", - "top_level_project_qualified_name", - "workbook_qualified_name", - "datasource_qualified_name", - "project_hierarchy", - "fully_qualified_name", - "tableau_datasource_field_data_category", - "tableau_datasource_field_role", - "tableau_datasource_field_data_type", - "upstream_tables", - "tableau_datasource_field_formula", - "tableau_datasource_field_bin_size", - "upstream_columns", - "upstream_fields", - "datasource_field_type", - "worksheets", - "datasource", - ] - - @property - def site_qualified_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.site_qualified_name - - @site_qualified_name.setter - def site_qualified_name(self, site_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.site_qualified_name = site_qualified_name - - @property - def project_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.project_qualified_name - ) - - @project_qualified_name.setter - def project_qualified_name(self, project_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_qualified_name = project_qualified_name - - @property - def top_level_project_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.top_level_project_qualified_name - ) - - @top_level_project_qualified_name.setter - def top_level_project_qualified_name( - self, top_level_project_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.top_level_project_qualified_name = ( - top_level_project_qualified_name - ) - - @property - def workbook_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.workbook_qualified_name - ) - - @workbook_qualified_name.setter - def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbook_qualified_name = workbook_qualified_name - - @property - def datasource_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.datasource_qualified_name - ) - - @datasource_qualified_name.setter - def datasource_qualified_name(self, datasource_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasource_qualified_name = datasource_qualified_name - - @property - def project_hierarchy(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.project_hierarchy - - @project_hierarchy.setter - def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_hierarchy = project_hierarchy - - @property - def fully_qualified_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.fully_qualified_name - - @fully_qualified_name.setter - def fully_qualified_name(self, fully_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.fully_qualified_name = fully_qualified_name - - @property - def tableau_datasource_field_data_category(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.tableau_datasource_field_data_category - ) - - @tableau_datasource_field_data_category.setter - def tableau_datasource_field_data_category( - self, tableau_datasource_field_data_category: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tableau_datasource_field_data_category = ( - tableau_datasource_field_data_category - ) - - @property - def tableau_datasource_field_role(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.tableau_datasource_field_role - ) - - @tableau_datasource_field_role.setter - def tableau_datasource_field_role( - self, tableau_datasource_field_role: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tableau_datasource_field_role = tableau_datasource_field_role - - @property - def tableau_datasource_field_data_type(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.tableau_datasource_field_data_type - ) - - @tableau_datasource_field_data_type.setter - def tableau_datasource_field_data_type( - self, tableau_datasource_field_data_type: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tableau_datasource_field_data_type = ( - tableau_datasource_field_data_type - ) - - @property - def upstream_tables(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.upstream_tables - - @upstream_tables.setter - def upstream_tables(self, upstream_tables: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.upstream_tables = upstream_tables - - @property - def tableau_datasource_field_formula(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.tableau_datasource_field_formula - ) - - @tableau_datasource_field_formula.setter - def tableau_datasource_field_formula( - self, tableau_datasource_field_formula: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tableau_datasource_field_formula = ( - tableau_datasource_field_formula - ) - - @property - def tableau_datasource_field_bin_size(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.tableau_datasource_field_bin_size - ) - - @tableau_datasource_field_bin_size.setter - def tableau_datasource_field_bin_size( - self, tableau_datasource_field_bin_size: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tableau_datasource_field_bin_size = ( - tableau_datasource_field_bin_size - ) - - @property - def upstream_columns(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.upstream_columns - - @upstream_columns.setter - def upstream_columns(self, upstream_columns: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.upstream_columns = upstream_columns - - @property - def upstream_fields(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.upstream_fields - - @upstream_fields.setter - def upstream_fields(self, upstream_fields: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.upstream_fields = upstream_fields - - @property - def datasource_field_type(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.datasource_field_type - ) - - @datasource_field_type.setter - def datasource_field_type(self, datasource_field_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasource_field_type = datasource_field_type - - @property - def worksheets(self) -> Optional[list[TableauWorksheet]]: - return None if self.attributes is None else self.attributes.worksheets - - @worksheets.setter - def worksheets(self, worksheets: Optional[list[TableauWorksheet]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.worksheets = worksheets - - @property - def datasource(self) -> Optional[TableauDatasource]: - return None if self.attributes is None else self.attributes.datasource - - @datasource.setter - def datasource(self, datasource: Optional[TableauDatasource]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasource = datasource - - class Attributes(Tableau.Attributes): - site_qualified_name: Optional[str] = Field( - None, description="", alias="siteQualifiedName" - ) - project_qualified_name: Optional[str] = Field( - None, description="", alias="projectQualifiedName" - ) - top_level_project_qualified_name: Optional[str] = Field( - None, description="", alias="topLevelProjectQualifiedName" - ) - workbook_qualified_name: Optional[str] = Field( - None, description="", alias="workbookQualifiedName" - ) - datasource_qualified_name: Optional[str] = Field( - None, description="", alias="datasourceQualifiedName" - ) - project_hierarchy: Optional[list[dict[str, str]]] = Field( - None, description="", alias="projectHierarchy" - ) - fully_qualified_name: Optional[str] = Field( - None, description="", alias="fullyQualifiedName" - ) - tableau_datasource_field_data_category: Optional[str] = Field( - None, description="", alias="tableauDatasourceFieldDataCategory" - ) - tableau_datasource_field_role: Optional[str] = Field( - None, description="", alias="tableauDatasourceFieldRole" - ) - tableau_datasource_field_data_type: Optional[str] = Field( - None, description="", alias="tableauDatasourceFieldDataType" - ) - upstream_tables: Optional[list[dict[str, str]]] = Field( - None, description="", alias="upstreamTables" - ) - tableau_datasource_field_formula: Optional[str] = Field( - None, description="", alias="tableauDatasourceFieldFormula" - ) - tableau_datasource_field_bin_size: Optional[str] = Field( - None, description="", alias="tableauDatasourceFieldBinSize" - ) - upstream_columns: Optional[list[dict[str, str]]] = Field( - None, description="", alias="upstreamColumns" - ) - upstream_fields: Optional[list[dict[str, str]]] = Field( - None, description="", alias="upstreamFields" - ) - datasource_field_type: Optional[str] = Field( - None, description="", alias="datasourceFieldType" - ) - worksheets: Optional[list[TableauWorksheet]] = Field( - None, description="", alias="worksheets" - ) # relationship - datasource: Optional[TableauDatasource] = Field( - None, description="", alias="datasource" - ) # relationship - - attributes: "TableauDatasourceField.Attributes" = Field( - default_factory=lambda: TableauDatasourceField.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class TableauCalculatedField(Tableau): - """Description""" - - type_name: str = Field("TableauCalculatedField", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "TableauCalculatedField": - raise ValueError("must be TableauCalculatedField") - return v - - def __setattr__(self, name, value): - if name in TableauCalculatedField._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "site_qualified_name", - "project_qualified_name", - "top_level_project_qualified_name", - "workbook_qualified_name", - "datasource_qualified_name", - "project_hierarchy", - "data_category", - "role", - "tableau_data_type", - "formula", - "upstream_fields", - "worksheets", - "datasource", - ] - - @property - def site_qualified_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.site_qualified_name - - @site_qualified_name.setter - def site_qualified_name(self, site_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.site_qualified_name = site_qualified_name - - @property - def project_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.project_qualified_name - ) - - @project_qualified_name.setter - def project_qualified_name(self, project_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_qualified_name = project_qualified_name - - @property - def top_level_project_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.top_level_project_qualified_name - ) - - @top_level_project_qualified_name.setter - def top_level_project_qualified_name( - self, top_level_project_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.top_level_project_qualified_name = ( - top_level_project_qualified_name - ) - - @property - def workbook_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.workbook_qualified_name - ) - - @workbook_qualified_name.setter - def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbook_qualified_name = workbook_qualified_name - - @property - def datasource_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.datasource_qualified_name - ) - - @datasource_qualified_name.setter - def datasource_qualified_name(self, datasource_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasource_qualified_name = datasource_qualified_name - - @property - def project_hierarchy(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.project_hierarchy - - @project_hierarchy.setter - def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_hierarchy = project_hierarchy - - @property - def data_category(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.data_category - - @data_category.setter - def data_category(self, data_category: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.data_category = data_category - - @property - def role(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.role - - @role.setter - def role(self, role: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.role = role - - @property - def tableau_data_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.tableau_data_type - - @tableau_data_type.setter - def tableau_data_type(self, tableau_data_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tableau_data_type = tableau_data_type - - @property - def formula(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.formula - - @formula.setter - def formula(self, formula: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.formula = formula - - @property - def upstream_fields(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.upstream_fields - - @upstream_fields.setter - def upstream_fields(self, upstream_fields: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.upstream_fields = upstream_fields - - @property - def worksheets(self) -> Optional[list[TableauWorksheet]]: - return None if self.attributes is None else self.attributes.worksheets - - @worksheets.setter - def worksheets(self, worksheets: Optional[list[TableauWorksheet]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.worksheets = worksheets - - @property - def datasource(self) -> Optional[TableauDatasource]: - return None if self.attributes is None else self.attributes.datasource - - @datasource.setter - def datasource(self, datasource: Optional[TableauDatasource]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasource = datasource - - class Attributes(Tableau.Attributes): - site_qualified_name: Optional[str] = Field( - None, description="", alias="siteQualifiedName" - ) - project_qualified_name: Optional[str] = Field( - None, description="", alias="projectQualifiedName" - ) - top_level_project_qualified_name: Optional[str] = Field( - None, description="", alias="topLevelProjectQualifiedName" - ) - workbook_qualified_name: Optional[str] = Field( - None, description="", alias="workbookQualifiedName" - ) - datasource_qualified_name: Optional[str] = Field( - None, description="", alias="datasourceQualifiedName" - ) - project_hierarchy: Optional[list[dict[str, str]]] = Field( - None, description="", alias="projectHierarchy" - ) - data_category: Optional[str] = Field(None, description="", alias="dataCategory") - role: Optional[str] = Field(None, description="", alias="role") - tableau_data_type: Optional[str] = Field( - None, description="", alias="tableauDataType" - ) - formula: Optional[str] = Field(None, description="", alias="formula") - upstream_fields: Optional[list[dict[str, str]]] = Field( - None, description="", alias="upstreamFields" - ) - worksheets: Optional[list[TableauWorksheet]] = Field( - None, description="", alias="worksheets" - ) # relationship - datasource: Optional[TableauDatasource] = Field( - None, description="", alias="datasource" - ) # relationship - - attributes: "TableauCalculatedField.Attributes" = Field( - default_factory=lambda: TableauCalculatedField.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class TableauProject(Tableau): - """Description""" - - type_name: str = Field("TableauProject", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "TableauProject": - raise ValueError("must be TableauProject") - return v - - def __setattr__(self, name, value): - if name in TableauProject._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "site_qualified_name", - "top_level_project_qualified_name", - "is_top_level_project", - "project_hierarchy", - "parent_project", - "workbooks", - "site", - "datasources", - "flows", - "child_projects", - ] - - @property - def site_qualified_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.site_qualified_name - - @site_qualified_name.setter - def site_qualified_name(self, site_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.site_qualified_name = site_qualified_name - - @property - def top_level_project_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.top_level_project_qualified_name - ) - - @top_level_project_qualified_name.setter - def top_level_project_qualified_name( - self, top_level_project_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.top_level_project_qualified_name = ( - top_level_project_qualified_name - ) - - @property - def is_top_level_project(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_top_level_project - - @is_top_level_project.setter - def is_top_level_project(self, is_top_level_project: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.is_top_level_project = is_top_level_project - - @property - def project_hierarchy(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.project_hierarchy - - @project_hierarchy.setter - def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_hierarchy = project_hierarchy - - @property - def parent_project(self) -> Optional[TableauProject]: - return None if self.attributes is None else self.attributes.parent_project - - @parent_project.setter - def parent_project(self, parent_project: Optional[TableauProject]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.parent_project = parent_project - - @property - def workbooks(self) -> Optional[list[TableauWorkbook]]: - return None if self.attributes is None else self.attributes.workbooks - - @workbooks.setter - def workbooks(self, workbooks: Optional[list[TableauWorkbook]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbooks = workbooks - - @property - def site(self) -> Optional[TableauSite]: - return None if self.attributes is None else self.attributes.site - - @site.setter - def site(self, site: Optional[TableauSite]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.site = site - - @property - def datasources(self) -> Optional[list[TableauDatasource]]: - return None if self.attributes is None else self.attributes.datasources - - @datasources.setter - def datasources(self, datasources: Optional[list[TableauDatasource]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasources = datasources - - @property - def flows(self) -> Optional[list[TableauFlow]]: - return None if self.attributes is None else self.attributes.flows - @flows.setter - def flows(self, flows: Optional[list[TableauFlow]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.flows = flows - - @property - def child_projects(self) -> Optional[list[TableauProject]]: - return None if self.attributes is None else self.attributes.child_projects - - @child_projects.setter - def child_projects(self, child_projects: Optional[list[TableauProject]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.child_projects = child_projects - - class Attributes(Tableau.Attributes): - site_qualified_name: Optional[str] = Field( - None, description="", alias="siteQualifiedName" - ) - top_level_project_qualified_name: Optional[str] = Field( - None, description="", alias="topLevelProjectQualifiedName" - ) - is_top_level_project: Optional[bool] = Field( - None, description="", alias="isTopLevelProject" - ) - project_hierarchy: Optional[list[dict[str, str]]] = Field( - None, description="", alias="projectHierarchy" - ) - parent_project: Optional[TableauProject] = Field( - None, description="", alias="parentProject" - ) # relationship - workbooks: Optional[list[TableauWorkbook]] = Field( - None, description="", alias="workbooks" - ) # relationship - site: Optional[TableauSite] = Field( - None, description="", alias="site" - ) # relationship - datasources: Optional[list[TableauDatasource]] = Field( - None, description="", alias="datasources" - ) # relationship - flows: Optional[list[TableauFlow]] = Field( - None, description="", alias="flows" - ) # relationship - child_projects: Optional[list[TableauProject]] = Field( - None, description="", alias="childProjects" - ) # relationship - - attributes: "TableauProject.Attributes" = Field( - default_factory=lambda: TableauProject.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class TableauSite(Tableau): +class SigmaWorkbook(Sigma): """Description""" - type_name: str = Field("TableauSite", allow_mutation=False) + type_name: str = Field("SigmaWorkbook", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "TableauSite": - raise ValueError("must be TableauSite") + if v != "SigmaWorkbook": + raise ValueError("must be SigmaWorkbook") return v def __setattr__(self, name, value): - if name in TableauSite._convience_properties: + if name in SigmaWorkbook._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "projects", - ] - - @property - def projects(self) -> Optional[list[TableauProject]]: - return None if self.attributes is None else self.attributes.projects - - @projects.setter - def projects(self, projects: Optional[list[TableauProject]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.projects = projects - - class Attributes(Tableau.Attributes): - projects: Optional[list[TableauProject]] = Field( - None, description="", alias="projects" - ) # relationship - - attributes: "TableauSite.Attributes" = Field( - default_factory=lambda: TableauSite.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", + SIGMA_PAGE_COUNT: ClassVar[NumericField] = NumericField( + "sigmaPageCount", "sigmaPageCount" ) - - -class TableauDatasource(Tableau): - """Description""" - - type_name: str = Field("TableauDatasource", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "TableauDatasource": - raise ValueError("must be TableauDatasource") - return v - - def __setattr__(self, name, value): - if name in TableauDatasource._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "site_qualified_name", - "project_qualified_name", - "top_level_project_qualified_name", - "workbook_qualified_name", - "project_hierarchy", - "is_published", - "has_extracts", - "is_certified", - "certifier", - "certification_note", - "certifier_display_name", - "upstream_tables", - "upstream_datasources", - "workbook", - "project", - "fields", + """ + TBC + """ + + SIGMA_PAGES: ClassVar[RelationField] = RelationField("sigmaPages") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "sigma_page_count", + "sigma_pages", ] @property - def site_qualified_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.site_qualified_name - - @site_qualified_name.setter - def site_qualified_name(self, site_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.site_qualified_name = site_qualified_name - - @property - def project_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.project_qualified_name - ) - - @project_qualified_name.setter - def project_qualified_name(self, project_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_qualified_name = project_qualified_name - - @property - def top_level_project_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.top_level_project_qualified_name - ) - - @top_level_project_qualified_name.setter - def top_level_project_qualified_name( - self, top_level_project_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.top_level_project_qualified_name = ( - top_level_project_qualified_name - ) - - @property - def workbook_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.workbook_qualified_name - ) - - @workbook_qualified_name.setter - def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbook_qualified_name = workbook_qualified_name - - @property - def project_hierarchy(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.project_hierarchy - - @project_hierarchy.setter - def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_hierarchy = project_hierarchy - - @property - def is_published(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_published - - @is_published.setter - def is_published(self, is_published: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.is_published = is_published - - @property - def has_extracts(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.has_extracts - - @has_extracts.setter - def has_extracts(self, has_extracts: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.has_extracts = has_extracts - - @property - def is_certified(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_certified - - @is_certified.setter - def is_certified(self, is_certified: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.is_certified = is_certified - - @property - def certifier(self) -> Optional[dict[str, str]]: - return None if self.attributes is None else self.attributes.certifier - - @certifier.setter - def certifier(self, certifier: Optional[dict[str, str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.certifier = certifier - - @property - def certification_note(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.certification_note - - @certification_note.setter - def certification_note(self, certification_note: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.certification_note = certification_note - - @property - def certifier_display_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.certifier_display_name - ) - - @certifier_display_name.setter - def certifier_display_name(self, certifier_display_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.certifier_display_name = certifier_display_name - - @property - def upstream_tables(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.upstream_tables - - @upstream_tables.setter - def upstream_tables(self, upstream_tables: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.upstream_tables = upstream_tables - - @property - def upstream_datasources(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.upstream_datasources - - @upstream_datasources.setter - def upstream_datasources( - self, upstream_datasources: Optional[list[dict[str, str]]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.upstream_datasources = upstream_datasources - - @property - def workbook(self) -> Optional[TableauWorkbook]: - return None if self.attributes is None else self.attributes.workbook - - @workbook.setter - def workbook(self, workbook: Optional[TableauWorkbook]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbook = workbook - - @property - def project(self) -> Optional[TableauProject]: - return None if self.attributes is None else self.attributes.project + def sigma_page_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.sigma_page_count - @project.setter - def project(self, project: Optional[TableauProject]): + @sigma_page_count.setter + def sigma_page_count(self, sigma_page_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.project = project + self.attributes.sigma_page_count = sigma_page_count @property - def fields(self) -> Optional[list[TableauDatasourceField]]: - return None if self.attributes is None else self.attributes.fields + def sigma_pages(self) -> Optional[list[SigmaPage]]: + return None if self.attributes is None else self.attributes.sigma_pages - @fields.setter - def fields(self, fields: Optional[list[TableauDatasourceField]]): + @sigma_pages.setter + def sigma_pages(self, sigma_pages: Optional[list[SigmaPage]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.fields = fields + self.attributes.sigma_pages = sigma_pages - class Attributes(Tableau.Attributes): - site_qualified_name: Optional[str] = Field( - None, description="", alias="siteQualifiedName" - ) - project_qualified_name: Optional[str] = Field( - None, description="", alias="projectQualifiedName" - ) - top_level_project_qualified_name: Optional[str] = Field( - None, description="", alias="topLevelProjectQualifiedName" - ) - workbook_qualified_name: Optional[str] = Field( - None, description="", alias="workbookQualifiedName" - ) - project_hierarchy: Optional[list[dict[str, str]]] = Field( - None, description="", alias="projectHierarchy" - ) - is_published: Optional[bool] = Field(None, description="", alias="isPublished") - has_extracts: Optional[bool] = Field(None, description="", alias="hasExtracts") - is_certified: Optional[bool] = Field(None, description="", alias="isCertified") - certifier: Optional[dict[str, str]] = Field( - None, description="", alias="certifier" + class Attributes(Sigma.Attributes): + sigma_page_count: Optional[int] = Field( + None, description="", alias="sigmaPageCount" ) - certification_note: Optional[str] = Field( - None, description="", alias="certificationNote" - ) - certifier_display_name: Optional[str] = Field( - None, description="", alias="certifierDisplayName" - ) - upstream_tables: Optional[list[dict[str, str]]] = Field( - None, description="", alias="upstreamTables" - ) - upstream_datasources: Optional[list[dict[str, str]]] = Field( - None, description="", alias="upstreamDatasources" - ) - workbook: Optional[TableauWorkbook] = Field( - None, description="", alias="workbook" - ) # relationship - project: Optional[TableauProject] = Field( - None, description="", alias="project" - ) # relationship - fields: Optional[list[TableauDatasourceField]] = Field( - None, description="", alias="fields" + sigma_pages: Optional[list[SigmaPage]] = Field( + None, description="", alias="sigmaPages" ) # relationship - attributes: "TableauDatasource.Attributes" = Field( - default_factory=lambda: TableauDatasource.Attributes(), + attributes: "SigmaWorkbook.Attributes" = Field( + default_factory=lambda: SigmaWorkbook.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class TableauDashboard(Tableau): +class SigmaDataElementField(Sigma): """Description""" - type_name: str = Field("TableauDashboard", allow_mutation=False) + type_name: str = Field("SigmaDataElementField", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "TableauDashboard": - raise ValueError("must be TableauDashboard") + if v != "SigmaDataElementField": + raise ValueError("must be SigmaDataElementField") return v def __setattr__(self, name, value): - if name in TableauDashboard._convience_properties: + if name in SigmaDataElementField._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "site_qualified_name", - "project_qualified_name", - "workbook_qualified_name", - "top_level_project_qualified_name", - "project_hierarchy", - "workbook", - "worksheets", + SIGMA_DATA_ELEMENT_FIELD_IS_HIDDEN: ClassVar[BooleanField] = BooleanField( + "sigmaDataElementFieldIsHidden", "sigmaDataElementFieldIsHidden" + ) + """ + TBC + """ + SIGMA_DATA_ELEMENT_FIELD_FORMULA: ClassVar[TextField] = TextField( + "sigmaDataElementFieldFormula", "sigmaDataElementFieldFormula" + ) + """ + TBC + """ + + SIGMA_DATA_ELEMENT: ClassVar[RelationField] = RelationField("sigmaDataElement") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "sigma_data_element_field_is_hidden", + "sigma_data_element_field_formula", + "sigma_data_element", ] @property - def site_qualified_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.site_qualified_name - - @site_qualified_name.setter - def site_qualified_name(self, site_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.site_qualified_name = site_qualified_name - - @property - def project_qualified_name(self) -> Optional[str]: + def sigma_data_element_field_is_hidden(self) -> Optional[bool]: return ( - None if self.attributes is None else self.attributes.project_qualified_name + None + if self.attributes is None + else self.attributes.sigma_data_element_field_is_hidden ) - @project_qualified_name.setter - def project_qualified_name(self, project_qualified_name: Optional[str]): + @sigma_data_element_field_is_hidden.setter + def sigma_data_element_field_is_hidden( + self, sigma_data_element_field_is_hidden: Optional[bool] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.project_qualified_name = project_qualified_name - - @property - def workbook_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.workbook_qualified_name + self.attributes.sigma_data_element_field_is_hidden = ( + sigma_data_element_field_is_hidden ) - @workbook_qualified_name.setter - def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbook_qualified_name = workbook_qualified_name - @property - def top_level_project_qualified_name(self) -> Optional[str]: + def sigma_data_element_field_formula(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.top_level_project_qualified_name + else self.attributes.sigma_data_element_field_formula ) - @top_level_project_qualified_name.setter - def top_level_project_qualified_name( - self, top_level_project_qualified_name: Optional[str] + @sigma_data_element_field_formula.setter + def sigma_data_element_field_formula( + self, sigma_data_element_field_formula: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.top_level_project_qualified_name = ( - top_level_project_qualified_name + self.attributes.sigma_data_element_field_formula = ( + sigma_data_element_field_formula ) @property - def project_hierarchy(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.project_hierarchy - - @project_hierarchy.setter - def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_hierarchy = project_hierarchy - - @property - def workbook(self) -> Optional[TableauWorkbook]: - return None if self.attributes is None else self.attributes.workbook - - @workbook.setter - def workbook(self, workbook: Optional[TableauWorkbook]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbook = workbook - - @property - def worksheets(self) -> Optional[list[TableauWorksheet]]: - return None if self.attributes is None else self.attributes.worksheets + def sigma_data_element(self) -> Optional[SigmaDataElement]: + return None if self.attributes is None else self.attributes.sigma_data_element - @worksheets.setter - def worksheets(self, worksheets: Optional[list[TableauWorksheet]]): + @sigma_data_element.setter + def sigma_data_element(self, sigma_data_element: Optional[SigmaDataElement]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.worksheets = worksheets + self.attributes.sigma_data_element = sigma_data_element - class Attributes(Tableau.Attributes): - site_qualified_name: Optional[str] = Field( - None, description="", alias="siteQualifiedName" + class Attributes(Sigma.Attributes): + sigma_data_element_field_is_hidden: Optional[bool] = Field( + None, description="", alias="sigmaDataElementFieldIsHidden" ) - project_qualified_name: Optional[str] = Field( - None, description="", alias="projectQualifiedName" + sigma_data_element_field_formula: Optional[str] = Field( + None, description="", alias="sigmaDataElementFieldFormula" ) - workbook_qualified_name: Optional[str] = Field( - None, description="", alias="workbookQualifiedName" - ) - top_level_project_qualified_name: Optional[str] = Field( - None, description="", alias="topLevelProjectQualifiedName" - ) - project_hierarchy: Optional[list[dict[str, str]]] = Field( - None, description="", alias="projectHierarchy" - ) - workbook: Optional[TableauWorkbook] = Field( - None, description="", alias="workbook" - ) # relationship - worksheets: Optional[list[TableauWorksheet]] = Field( - None, description="", alias="worksheets" + sigma_data_element: Optional[SigmaDataElement] = Field( + None, description="", alias="sigmaDataElement" ) # relationship - attributes: "TableauDashboard.Attributes" = Field( - default_factory=lambda: TableauDashboard.Attributes(), + attributes: "SigmaDataElementField.Attributes" = Field( + default_factory=lambda: SigmaDataElementField.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class TableauFlow(Tableau): +class SigmaPage(Sigma): """Description""" - type_name: str = Field("TableauFlow", allow_mutation=False) + type_name: str = Field("SigmaPage", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "TableauFlow": - raise ValueError("must be TableauFlow") + if v != "SigmaPage": + raise ValueError("must be SigmaPage") return v def __setattr__(self, name, value): - if name in TableauFlow._convience_properties: + if name in SigmaPage._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "site_qualified_name", - "project_qualified_name", - "top_level_project_qualified_name", - "project_hierarchy", - "input_fields", - "output_fields", - "output_steps", - "project", + SIGMA_DATA_ELEMENT_COUNT: ClassVar[NumericField] = NumericField( + "sigmaDataElementCount", "sigmaDataElementCount" + ) + """ + TBC + """ + + SIGMA_DATA_ELEMENTS: ClassVar[RelationField] = RelationField("sigmaDataElements") + """ + TBC + """ + SIGMA_WORKBOOK: ClassVar[RelationField] = RelationField("sigmaWorkbook") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "sigma_data_element_count", + "sigma_data_elements", + "sigma_workbook", ] @property - def site_qualified_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.site_qualified_name - - @site_qualified_name.setter - def site_qualified_name(self, site_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.site_qualified_name = site_qualified_name - - @property - def project_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.project_qualified_name - ) - - @project_qualified_name.setter - def project_qualified_name(self, project_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_qualified_name = project_qualified_name - - @property - def top_level_project_qualified_name(self) -> Optional[str]: + def sigma_data_element_count(self) -> Optional[int]: return ( None if self.attributes is None - else self.attributes.top_level_project_qualified_name - ) - - @top_level_project_qualified_name.setter - def top_level_project_qualified_name( - self, top_level_project_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.top_level_project_qualified_name = ( - top_level_project_qualified_name + else self.attributes.sigma_data_element_count ) - @property - def project_hierarchy(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.project_hierarchy - - @project_hierarchy.setter - def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): + @sigma_data_element_count.setter + def sigma_data_element_count(self, sigma_data_element_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.project_hierarchy = project_hierarchy + self.attributes.sigma_data_element_count = sigma_data_element_count @property - def input_fields(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.input_fields + def sigma_data_elements(self) -> Optional[list[SigmaDataElement]]: + return None if self.attributes is None else self.attributes.sigma_data_elements - @input_fields.setter - def input_fields(self, input_fields: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.input_fields = input_fields - - @property - def output_fields(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.output_fields - - @output_fields.setter - def output_fields(self, output_fields: Optional[list[dict[str, str]]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.output_fields = output_fields - - @property - def output_steps(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.output_steps - - @output_steps.setter - def output_steps(self, output_steps: Optional[list[dict[str, str]]]): + @sigma_data_elements.setter + def sigma_data_elements( + self, sigma_data_elements: Optional[list[SigmaDataElement]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.output_steps = output_steps + self.attributes.sigma_data_elements = sigma_data_elements @property - def project(self) -> Optional[TableauProject]: - return None if self.attributes is None else self.attributes.project + def sigma_workbook(self) -> Optional[SigmaWorkbook]: + return None if self.attributes is None else self.attributes.sigma_workbook - @project.setter - def project(self, project: Optional[TableauProject]): + @sigma_workbook.setter + def sigma_workbook(self, sigma_workbook: Optional[SigmaWorkbook]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.project = project + self.attributes.sigma_workbook = sigma_workbook - class Attributes(Tableau.Attributes): - site_qualified_name: Optional[str] = Field( - None, description="", alias="siteQualifiedName" - ) - project_qualified_name: Optional[str] = Field( - None, description="", alias="projectQualifiedName" - ) - top_level_project_qualified_name: Optional[str] = Field( - None, description="", alias="topLevelProjectQualifiedName" - ) - project_hierarchy: Optional[list[dict[str, str]]] = Field( - None, description="", alias="projectHierarchy" - ) - input_fields: Optional[list[dict[str, str]]] = Field( - None, description="", alias="inputFields" - ) - output_fields: Optional[list[dict[str, str]]] = Field( - None, description="", alias="outputFields" + class Attributes(Sigma.Attributes): + sigma_data_element_count: Optional[int] = Field( + None, description="", alias="sigmaDataElementCount" ) - output_steps: Optional[list[dict[str, str]]] = Field( - None, description="", alias="outputSteps" - ) - project: Optional[TableauProject] = Field( - None, description="", alias="project" + sigma_data_elements: Optional[list[SigmaDataElement]] = Field( + None, description="", alias="sigmaDataElements" + ) # relationship + sigma_workbook: Optional[SigmaWorkbook] = Field( + None, description="", alias="sigmaWorkbook" ) # relationship - attributes: "TableauFlow.Attributes" = Field( - default_factory=lambda: TableauFlow.Attributes(), + attributes: "SigmaPage.Attributes" = Field( + default_factory=lambda: SigmaPage.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class TableauWorksheet(Tableau): +class SigmaDataElement(Sigma): """Description""" - type_name: str = Field("TableauWorksheet", allow_mutation=False) + type_name: str = Field("SigmaDataElement", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "TableauWorksheet": - raise ValueError("must be TableauWorksheet") + if v != "SigmaDataElement": + raise ValueError("must be SigmaDataElement") return v def __setattr__(self, name, value): - if name in TableauWorksheet._convience_properties: + if name in SigmaDataElement._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "site_qualified_name", - "project_qualified_name", - "top_level_project_qualified_name", - "project_hierarchy", - "workbook_qualified_name", - "workbook", - "datasource_fields", - "calculated_fields", - "dashboards", + SIGMA_DATA_ELEMENT_QUERY: ClassVar[KeywordField] = KeywordField( + "sigmaDataElementQuery", "sigmaDataElementQuery" + ) + """ + TBC + """ + SIGMA_DATA_ELEMENT_TYPE: ClassVar[RelationField] = RelationField( + "sigmaDataElementType" + ) + """ + TBC + """ + SIGMA_DATA_ELEMENT_FIELD_COUNT: ClassVar[NumericField] = NumericField( + "sigmaDataElementFieldCount", "sigmaDataElementFieldCount" + ) + """ + TBC + """ + + SIGMA_PAGE: ClassVar[RelationField] = RelationField("sigmaPage") + """ + TBC + """ + SIGMA_DATA_ELEMENT_FIELDS: ClassVar[RelationField] = RelationField( + "sigmaDataElementFields" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "sigma_data_element_query", + "sigma_data_element_type", + "sigma_data_element_field_count", + "sigma_page", + "sigma_data_element_fields", ] @property - def site_qualified_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.site_qualified_name + def sigma_data_element_query(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.sigma_data_element_query + ) - @site_qualified_name.setter - def site_qualified_name(self, site_qualified_name: Optional[str]): + @sigma_data_element_query.setter + def sigma_data_element_query(self, sigma_data_element_query: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.site_qualified_name = site_qualified_name + self.attributes.sigma_data_element_query = sigma_data_element_query @property - def project_qualified_name(self) -> Optional[str]: + def sigma_data_element_type(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.project_qualified_name + None if self.attributes is None else self.attributes.sigma_data_element_type ) - @project_qualified_name.setter - def project_qualified_name(self, project_qualified_name: Optional[str]): + @sigma_data_element_type.setter + def sigma_data_element_type(self, sigma_data_element_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.project_qualified_name = project_qualified_name + self.attributes.sigma_data_element_type = sigma_data_element_type @property - def top_level_project_qualified_name(self) -> Optional[str]: + def sigma_data_element_field_count(self) -> Optional[int]: return ( None if self.attributes is None - else self.attributes.top_level_project_qualified_name + else self.attributes.sigma_data_element_field_count ) - @top_level_project_qualified_name.setter - def top_level_project_qualified_name( - self, top_level_project_qualified_name: Optional[str] + @sigma_data_element_field_count.setter + def sigma_data_element_field_count( + self, sigma_data_element_field_count: Optional[int] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.top_level_project_qualified_name = ( - top_level_project_qualified_name - ) + self.attributes.sigma_data_element_field_count = sigma_data_element_field_count @property - def project_hierarchy(self) -> Optional[list[dict[str, str]]]: - return None if self.attributes is None else self.attributes.project_hierarchy + def sigma_page(self) -> Optional[SigmaPage]: + return None if self.attributes is None else self.attributes.sigma_page - @project_hierarchy.setter - def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): + @sigma_page.setter + def sigma_page(self, sigma_page: Optional[SigmaPage]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.project_hierarchy = project_hierarchy + self.attributes.sigma_page = sigma_page @property - def workbook_qualified_name(self) -> Optional[str]: + def sigma_data_element_fields(self) -> Optional[list[SigmaDataElementField]]: return ( - None if self.attributes is None else self.attributes.workbook_qualified_name + None + if self.attributes is None + else self.attributes.sigma_data_element_fields ) - @workbook_qualified_name.setter - def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbook_qualified_name = workbook_qualified_name - - @property - def workbook(self) -> Optional[TableauWorkbook]: - return None if self.attributes is None else self.attributes.workbook - - @workbook.setter - def workbook(self, workbook: Optional[TableauWorkbook]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workbook = workbook - - @property - def datasource_fields(self) -> Optional[list[TableauDatasourceField]]: - return None if self.attributes is None else self.attributes.datasource_fields - - @datasource_fields.setter - def datasource_fields( - self, datasource_fields: Optional[list[TableauDatasourceField]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasource_fields = datasource_fields - - @property - def calculated_fields(self) -> Optional[list[TableauCalculatedField]]: - return None if self.attributes is None else self.attributes.calculated_fields - - @calculated_fields.setter - def calculated_fields( - self, calculated_fields: Optional[list[TableauCalculatedField]] + @sigma_data_element_fields.setter + def sigma_data_element_fields( + self, sigma_data_element_fields: Optional[list[SigmaDataElementField]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.calculated_fields = calculated_fields - - @property - def dashboards(self) -> Optional[list[TableauDashboard]]: - return None if self.attributes is None else self.attributes.dashboards - - @dashboards.setter - def dashboards(self, dashboards: Optional[list[TableauDashboard]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboards = dashboards + self.attributes.sigma_data_element_fields = sigma_data_element_fields - class Attributes(Tableau.Attributes): - site_qualified_name: Optional[str] = Field( - None, description="", alias="siteQualifiedName" - ) - project_qualified_name: Optional[str] = Field( - None, description="", alias="projectQualifiedName" - ) - top_level_project_qualified_name: Optional[str] = Field( - None, description="", alias="topLevelProjectQualifiedName" + class Attributes(Sigma.Attributes): + sigma_data_element_query: Optional[str] = Field( + None, description="", alias="sigmaDataElementQuery" ) - project_hierarchy: Optional[list[dict[str, str]]] = Field( - None, description="", alias="projectHierarchy" + sigma_data_element_type: Optional[str] = Field( + None, description="", alias="sigmaDataElementType" ) - workbook_qualified_name: Optional[str] = Field( - None, description="", alias="workbookQualifiedName" + sigma_data_element_field_count: Optional[int] = Field( + None, description="", alias="sigmaDataElementFieldCount" ) - workbook: Optional[TableauWorkbook] = Field( - None, description="", alias="workbook" + sigma_page: Optional[SigmaPage] = Field( + None, description="", alias="sigmaPage" ) # relationship - datasource_fields: Optional[list[TableauDatasourceField]] = Field( - None, description="", alias="datasourceFields" - ) # relationship - calculated_fields: Optional[list[TableauCalculatedField]] = Field( - None, description="", alias="calculatedFields" - ) # relationship - dashboards: Optional[list[TableauDashboard]] = Field( - None, description="", alias="dashboards" + sigma_data_element_fields: Optional[list[SigmaDataElementField]] = Field( + None, description="", alias="sigmaDataElementFields" ) # relationship - attributes: "TableauWorksheet.Attributes" = Field( - default_factory=lambda: TableauWorksheet.Attributes(), + attributes: "SigmaDataElement.Attributes" = Field( + default_factory=lambda: SigmaDataElement.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -TableauWorkbook.Attributes.update_forward_refs() - - -TableauDatasourceField.Attributes.update_forward_refs() - - -TableauCalculatedField.Attributes.update_forward_refs() - - -TableauProject.Attributes.update_forward_refs() - - -TableauSite.Attributes.update_forward_refs() - - -TableauDatasource.Attributes.update_forward_refs() +SigmaWorkbook.Attributes.update_forward_refs() -TableauDashboard.Attributes.update_forward_refs() +SigmaDataElementField.Attributes.update_forward_refs() -TableauFlow.Attributes.update_forward_refs() +SigmaPage.Attributes.update_forward_refs() -TableauWorksheet.Attributes.update_forward_refs() +SigmaDataElement.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset62.py b/pyatlan/model/assets/asset62.py index 97ea5db5c..ec5d43832 100644 --- a/pyatlan/model/assets/asset62.py +++ b/pyatlan/model/assets/asset62.py @@ -8,31 +8,1827 @@ from pydantic import Field, validator -from .asset38 import Tableau -from .asset61 import TableauProject +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + RelationField, +) +from .asset39 import Tableau -class TableauMetric(Tableau): + +class TableauWorkbook(Tableau): + """Description""" + + type_name: str = Field("TableauWorkbook", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "TableauWorkbook": + raise ValueError("must be TableauWorkbook") + return v + + def __setattr__(self, name, value): + if name in TableauWorkbook._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SITE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "siteQualifiedName", "siteQualifiedName" + ) + """ + TBC + """ + PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "projectQualifiedName", "projectQualifiedName" + ) + """ + TBC + """ + TOP_LEVEL_PROJECT_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectName", "topLevelProjectName" + ) + """ + TBC + """ + TOP_LEVEL_PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectQualifiedName", "topLevelProjectQualifiedName" + ) + """ + TBC + """ + PROJECT_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "projectHierarchy", "projectHierarchy" + ) + """ + TBC + """ + + PROJECT: ClassVar[RelationField] = RelationField("project") + """ + TBC + """ + DASHBOARDS: ClassVar[RelationField] = RelationField("dashboards") + """ + TBC + """ + WORKSHEETS: ClassVar[RelationField] = RelationField("worksheets") + """ + TBC + """ + DATASOURCES: ClassVar[RelationField] = RelationField("datasources") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "site_qualified_name", + "project_qualified_name", + "top_level_project_name", + "top_level_project_qualified_name", + "project_hierarchy", + "project", + "dashboards", + "worksheets", + "datasources", + ] + + @property + def site_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.site_qualified_name + + @site_qualified_name.setter + def site_qualified_name(self, site_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.site_qualified_name = site_qualified_name + + @property + def project_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.project_qualified_name + ) + + @project_qualified_name.setter + def project_qualified_name(self, project_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_qualified_name = project_qualified_name + + @property + def top_level_project_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.top_level_project_name + ) + + @top_level_project_name.setter + def top_level_project_name(self, top_level_project_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.top_level_project_name = top_level_project_name + + @property + def top_level_project_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.top_level_project_qualified_name + ) + + @top_level_project_qualified_name.setter + def top_level_project_qualified_name( + self, top_level_project_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.top_level_project_qualified_name = ( + top_level_project_qualified_name + ) + + @property + def project_hierarchy(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.project_hierarchy + + @project_hierarchy.setter + def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_hierarchy = project_hierarchy + + @property + def project(self) -> Optional[TableauProject]: + return None if self.attributes is None else self.attributes.project + + @project.setter + def project(self, project: Optional[TableauProject]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project = project + + @property + def dashboards(self) -> Optional[list[TableauDashboard]]: + return None if self.attributes is None else self.attributes.dashboards + + @dashboards.setter + def dashboards(self, dashboards: Optional[list[TableauDashboard]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboards = dashboards + + @property + def worksheets(self) -> Optional[list[TableauWorksheet]]: + return None if self.attributes is None else self.attributes.worksheets + + @worksheets.setter + def worksheets(self, worksheets: Optional[list[TableauWorksheet]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.worksheets = worksheets + + @property + def datasources(self) -> Optional[list[TableauDatasource]]: + return None if self.attributes is None else self.attributes.datasources + + @datasources.setter + def datasources(self, datasources: Optional[list[TableauDatasource]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasources = datasources + + class Attributes(Tableau.Attributes): + site_qualified_name: Optional[str] = Field( + None, description="", alias="siteQualifiedName" + ) + project_qualified_name: Optional[str] = Field( + None, description="", alias="projectQualifiedName" + ) + top_level_project_name: Optional[str] = Field( + None, description="", alias="topLevelProjectName" + ) + top_level_project_qualified_name: Optional[str] = Field( + None, description="", alias="topLevelProjectQualifiedName" + ) + project_hierarchy: Optional[list[dict[str, str]]] = Field( + None, description="", alias="projectHierarchy" + ) + project: Optional[TableauProject] = Field( + None, description="", alias="project" + ) # relationship + dashboards: Optional[list[TableauDashboard]] = Field( + None, description="", alias="dashboards" + ) # relationship + worksheets: Optional[list[TableauWorksheet]] = Field( + None, description="", alias="worksheets" + ) # relationship + datasources: Optional[list[TableauDatasource]] = Field( + None, description="", alias="datasources" + ) # relationship + + attributes: "TableauWorkbook.Attributes" = Field( + default_factory=lambda: TableauWorkbook.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class TableauDatasourceField(Tableau): + """Description""" + + type_name: str = Field("TableauDatasourceField", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "TableauDatasourceField": + raise ValueError("must be TableauDatasourceField") + return v + + def __setattr__(self, name, value): + if name in TableauDatasourceField._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SITE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "siteQualifiedName", "siteQualifiedName" + ) + """ + TBC + """ + PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "projectQualifiedName", "projectQualifiedName" + ) + """ + TBC + """ + TOP_LEVEL_PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectQualifiedName", "topLevelProjectQualifiedName" + ) + """ + TBC + """ + WORKBOOK_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workbookQualifiedName", "workbookQualifiedName" + ) + """ + TBC + """ + DATASOURCE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "datasourceQualifiedName", "datasourceQualifiedName" + ) + """ + TBC + """ + PROJECT_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "projectHierarchy", "projectHierarchy" + ) + """ + TBC + """ + FULLY_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "fullyQualifiedName", "fullyQualifiedName" + ) + """ + TBC + """ + TABLEAU_DATASOURCE_FIELD_DATA_CATEGORY: ClassVar[KeywordField] = KeywordField( + "tableauDatasourceFieldDataCategory", "tableauDatasourceFieldDataCategory" + ) + """ + TBC + """ + TABLEAU_DATASOURCE_FIELD_ROLE: ClassVar[KeywordField] = KeywordField( + "tableauDatasourceFieldRole", "tableauDatasourceFieldRole" + ) + """ + TBC + """ + TABLEAU_DATASOURCE_FIELD_DATA_TYPE: ClassVar[KeywordTextField] = KeywordTextField( + "tableauDatasourceFieldDataType", + "tableauDatasourceFieldDataType", + "tableauDatasourceFieldDataType.text", + ) + """ + TBC + """ + UPSTREAM_TABLES: ClassVar[KeywordField] = KeywordField( + "upstreamTables", "upstreamTables" + ) + """ + TBC + """ + TABLEAU_DATASOURCE_FIELD_FORMULA: ClassVar[KeywordField] = KeywordField( + "tableauDatasourceFieldFormula", "tableauDatasourceFieldFormula" + ) + """ + TBC + """ + TABLEAU_DATASOURCE_FIELD_BIN_SIZE: ClassVar[KeywordField] = KeywordField( + "tableauDatasourceFieldBinSize", "tableauDatasourceFieldBinSize" + ) + """ + TBC + """ + UPSTREAM_COLUMNS: ClassVar[KeywordField] = KeywordField( + "upstreamColumns", "upstreamColumns" + ) + """ + TBC + """ + UPSTREAM_FIELDS: ClassVar[KeywordField] = KeywordField( + "upstreamFields", "upstreamFields" + ) + """ + TBC + """ + DATASOURCE_FIELD_TYPE: ClassVar[KeywordField] = KeywordField( + "datasourceFieldType", "datasourceFieldType" + ) + """ + TBC + """ + + WORKSHEETS: ClassVar[RelationField] = RelationField("worksheets") + """ + TBC + """ + DATASOURCE: ClassVar[RelationField] = RelationField("datasource") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "site_qualified_name", + "project_qualified_name", + "top_level_project_qualified_name", + "workbook_qualified_name", + "datasource_qualified_name", + "project_hierarchy", + "fully_qualified_name", + "tableau_datasource_field_data_category", + "tableau_datasource_field_role", + "tableau_datasource_field_data_type", + "upstream_tables", + "tableau_datasource_field_formula", + "tableau_datasource_field_bin_size", + "upstream_columns", + "upstream_fields", + "datasource_field_type", + "worksheets", + "datasource", + ] + + @property + def site_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.site_qualified_name + + @site_qualified_name.setter + def site_qualified_name(self, site_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.site_qualified_name = site_qualified_name + + @property + def project_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.project_qualified_name + ) + + @project_qualified_name.setter + def project_qualified_name(self, project_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_qualified_name = project_qualified_name + + @property + def top_level_project_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.top_level_project_qualified_name + ) + + @top_level_project_qualified_name.setter + def top_level_project_qualified_name( + self, top_level_project_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.top_level_project_qualified_name = ( + top_level_project_qualified_name + ) + + @property + def workbook_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.workbook_qualified_name + ) + + @workbook_qualified_name.setter + def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbook_qualified_name = workbook_qualified_name + + @property + def datasource_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.datasource_qualified_name + ) + + @datasource_qualified_name.setter + def datasource_qualified_name(self, datasource_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasource_qualified_name = datasource_qualified_name + + @property + def project_hierarchy(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.project_hierarchy + + @project_hierarchy.setter + def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_hierarchy = project_hierarchy + + @property + def fully_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.fully_qualified_name + + @fully_qualified_name.setter + def fully_qualified_name(self, fully_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.fully_qualified_name = fully_qualified_name + + @property + def tableau_datasource_field_data_category(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.tableau_datasource_field_data_category + ) + + @tableau_datasource_field_data_category.setter + def tableau_datasource_field_data_category( + self, tableau_datasource_field_data_category: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tableau_datasource_field_data_category = ( + tableau_datasource_field_data_category + ) + + @property + def tableau_datasource_field_role(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.tableau_datasource_field_role + ) + + @tableau_datasource_field_role.setter + def tableau_datasource_field_role( + self, tableau_datasource_field_role: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tableau_datasource_field_role = tableau_datasource_field_role + + @property + def tableau_datasource_field_data_type(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.tableau_datasource_field_data_type + ) + + @tableau_datasource_field_data_type.setter + def tableau_datasource_field_data_type( + self, tableau_datasource_field_data_type: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tableau_datasource_field_data_type = ( + tableau_datasource_field_data_type + ) + + @property + def upstream_tables(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.upstream_tables + + @upstream_tables.setter + def upstream_tables(self, upstream_tables: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.upstream_tables = upstream_tables + + @property + def tableau_datasource_field_formula(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.tableau_datasource_field_formula + ) + + @tableau_datasource_field_formula.setter + def tableau_datasource_field_formula( + self, tableau_datasource_field_formula: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tableau_datasource_field_formula = ( + tableau_datasource_field_formula + ) + + @property + def tableau_datasource_field_bin_size(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.tableau_datasource_field_bin_size + ) + + @tableau_datasource_field_bin_size.setter + def tableau_datasource_field_bin_size( + self, tableau_datasource_field_bin_size: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tableau_datasource_field_bin_size = ( + tableau_datasource_field_bin_size + ) + + @property + def upstream_columns(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.upstream_columns + + @upstream_columns.setter + def upstream_columns(self, upstream_columns: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.upstream_columns = upstream_columns + + @property + def upstream_fields(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.upstream_fields + + @upstream_fields.setter + def upstream_fields(self, upstream_fields: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.upstream_fields = upstream_fields + + @property + def datasource_field_type(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.datasource_field_type + ) + + @datasource_field_type.setter + def datasource_field_type(self, datasource_field_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasource_field_type = datasource_field_type + + @property + def worksheets(self) -> Optional[list[TableauWorksheet]]: + return None if self.attributes is None else self.attributes.worksheets + + @worksheets.setter + def worksheets(self, worksheets: Optional[list[TableauWorksheet]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.worksheets = worksheets + + @property + def datasource(self) -> Optional[TableauDatasource]: + return None if self.attributes is None else self.attributes.datasource + + @datasource.setter + def datasource(self, datasource: Optional[TableauDatasource]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasource = datasource + + class Attributes(Tableau.Attributes): + site_qualified_name: Optional[str] = Field( + None, description="", alias="siteQualifiedName" + ) + project_qualified_name: Optional[str] = Field( + None, description="", alias="projectQualifiedName" + ) + top_level_project_qualified_name: Optional[str] = Field( + None, description="", alias="topLevelProjectQualifiedName" + ) + workbook_qualified_name: Optional[str] = Field( + None, description="", alias="workbookQualifiedName" + ) + datasource_qualified_name: Optional[str] = Field( + None, description="", alias="datasourceQualifiedName" + ) + project_hierarchy: Optional[list[dict[str, str]]] = Field( + None, description="", alias="projectHierarchy" + ) + fully_qualified_name: Optional[str] = Field( + None, description="", alias="fullyQualifiedName" + ) + tableau_datasource_field_data_category: Optional[str] = Field( + None, description="", alias="tableauDatasourceFieldDataCategory" + ) + tableau_datasource_field_role: Optional[str] = Field( + None, description="", alias="tableauDatasourceFieldRole" + ) + tableau_datasource_field_data_type: Optional[str] = Field( + None, description="", alias="tableauDatasourceFieldDataType" + ) + upstream_tables: Optional[list[dict[str, str]]] = Field( + None, description="", alias="upstreamTables" + ) + tableau_datasource_field_formula: Optional[str] = Field( + None, description="", alias="tableauDatasourceFieldFormula" + ) + tableau_datasource_field_bin_size: Optional[str] = Field( + None, description="", alias="tableauDatasourceFieldBinSize" + ) + upstream_columns: Optional[list[dict[str, str]]] = Field( + None, description="", alias="upstreamColumns" + ) + upstream_fields: Optional[list[dict[str, str]]] = Field( + None, description="", alias="upstreamFields" + ) + datasource_field_type: Optional[str] = Field( + None, description="", alias="datasourceFieldType" + ) + worksheets: Optional[list[TableauWorksheet]] = Field( + None, description="", alias="worksheets" + ) # relationship + datasource: Optional[TableauDatasource] = Field( + None, description="", alias="datasource" + ) # relationship + + attributes: "TableauDatasourceField.Attributes" = Field( + default_factory=lambda: TableauDatasourceField.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class TableauCalculatedField(Tableau): + """Description""" + + type_name: str = Field("TableauCalculatedField", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "TableauCalculatedField": + raise ValueError("must be TableauCalculatedField") + return v + + def __setattr__(self, name, value): + if name in TableauCalculatedField._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SITE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "siteQualifiedName", "siteQualifiedName" + ) + """ + TBC + """ + PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "projectQualifiedName", "projectQualifiedName" + ) + """ + TBC + """ + TOP_LEVEL_PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectQualifiedName", "topLevelProjectQualifiedName" + ) + """ + TBC + """ + WORKBOOK_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workbookQualifiedName", "workbookQualifiedName" + ) + """ + TBC + """ + DATASOURCE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "datasourceQualifiedName", "datasourceQualifiedName" + ) + """ + TBC + """ + PROJECT_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "projectHierarchy", "projectHierarchy" + ) + """ + TBC + """ + DATA_CATEGORY: ClassVar[KeywordField] = KeywordField("dataCategory", "dataCategory") + """ + TBC + """ + ROLE: ClassVar[KeywordField] = KeywordField("role", "role") + """ + TBC + """ + TABLEAU_DATA_TYPE: ClassVar[KeywordTextField] = KeywordTextField( + "tableauDataType", "tableauDataType", "tableauDataType.text" + ) + """ + TBC + """ + FORMULA: ClassVar[KeywordField] = KeywordField("formula", "formula") + """ + TBC + """ + UPSTREAM_FIELDS: ClassVar[KeywordField] = KeywordField( + "upstreamFields", "upstreamFields" + ) + """ + TBC + """ + + WORKSHEETS: ClassVar[RelationField] = RelationField("worksheets") + """ + TBC + """ + DATASOURCE: ClassVar[RelationField] = RelationField("datasource") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "site_qualified_name", + "project_qualified_name", + "top_level_project_qualified_name", + "workbook_qualified_name", + "datasource_qualified_name", + "project_hierarchy", + "data_category", + "role", + "tableau_data_type", + "formula", + "upstream_fields", + "worksheets", + "datasource", + ] + + @property + def site_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.site_qualified_name + + @site_qualified_name.setter + def site_qualified_name(self, site_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.site_qualified_name = site_qualified_name + + @property + def project_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.project_qualified_name + ) + + @project_qualified_name.setter + def project_qualified_name(self, project_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_qualified_name = project_qualified_name + + @property + def top_level_project_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.top_level_project_qualified_name + ) + + @top_level_project_qualified_name.setter + def top_level_project_qualified_name( + self, top_level_project_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.top_level_project_qualified_name = ( + top_level_project_qualified_name + ) + + @property + def workbook_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.workbook_qualified_name + ) + + @workbook_qualified_name.setter + def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbook_qualified_name = workbook_qualified_name + + @property + def datasource_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.datasource_qualified_name + ) + + @datasource_qualified_name.setter + def datasource_qualified_name(self, datasource_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasource_qualified_name = datasource_qualified_name + + @property + def project_hierarchy(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.project_hierarchy + + @project_hierarchy.setter + def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_hierarchy = project_hierarchy + + @property + def data_category(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.data_category + + @data_category.setter + def data_category(self, data_category: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.data_category = data_category + + @property + def role(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.role + + @role.setter + def role(self, role: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.role = role + + @property + def tableau_data_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.tableau_data_type + + @tableau_data_type.setter + def tableau_data_type(self, tableau_data_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tableau_data_type = tableau_data_type + + @property + def formula(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.formula + + @formula.setter + def formula(self, formula: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.formula = formula + + @property + def upstream_fields(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.upstream_fields + + @upstream_fields.setter + def upstream_fields(self, upstream_fields: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.upstream_fields = upstream_fields + + @property + def worksheets(self) -> Optional[list[TableauWorksheet]]: + return None if self.attributes is None else self.attributes.worksheets + + @worksheets.setter + def worksheets(self, worksheets: Optional[list[TableauWorksheet]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.worksheets = worksheets + + @property + def datasource(self) -> Optional[TableauDatasource]: + return None if self.attributes is None else self.attributes.datasource + + @datasource.setter + def datasource(self, datasource: Optional[TableauDatasource]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasource = datasource + + class Attributes(Tableau.Attributes): + site_qualified_name: Optional[str] = Field( + None, description="", alias="siteQualifiedName" + ) + project_qualified_name: Optional[str] = Field( + None, description="", alias="projectQualifiedName" + ) + top_level_project_qualified_name: Optional[str] = Field( + None, description="", alias="topLevelProjectQualifiedName" + ) + workbook_qualified_name: Optional[str] = Field( + None, description="", alias="workbookQualifiedName" + ) + datasource_qualified_name: Optional[str] = Field( + None, description="", alias="datasourceQualifiedName" + ) + project_hierarchy: Optional[list[dict[str, str]]] = Field( + None, description="", alias="projectHierarchy" + ) + data_category: Optional[str] = Field(None, description="", alias="dataCategory") + role: Optional[str] = Field(None, description="", alias="role") + tableau_data_type: Optional[str] = Field( + None, description="", alias="tableauDataType" + ) + formula: Optional[str] = Field(None, description="", alias="formula") + upstream_fields: Optional[list[dict[str, str]]] = Field( + None, description="", alias="upstreamFields" + ) + worksheets: Optional[list[TableauWorksheet]] = Field( + None, description="", alias="worksheets" + ) # relationship + datasource: Optional[TableauDatasource] = Field( + None, description="", alias="datasource" + ) # relationship + + attributes: "TableauCalculatedField.Attributes" = Field( + default_factory=lambda: TableauCalculatedField.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class TableauProject(Tableau): + """Description""" + + type_name: str = Field("TableauProject", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "TableauProject": + raise ValueError("must be TableauProject") + return v + + def __setattr__(self, name, value): + if name in TableauProject._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SITE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "siteQualifiedName", "siteQualifiedName" + ) + """ + TBC + """ + TOP_LEVEL_PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectQualifiedName", "topLevelProjectQualifiedName" + ) + """ + TBC + """ + IS_TOP_LEVEL_PROJECT: ClassVar[BooleanField] = BooleanField( + "isTopLevelProject", "isTopLevelProject" + ) + """ + TBC + """ + PROJECT_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "projectHierarchy", "projectHierarchy" + ) + """ + TBC + """ + + PARENT_PROJECT: ClassVar[RelationField] = RelationField("parentProject") + """ + TBC + """ + WORKBOOKS: ClassVar[RelationField] = RelationField("workbooks") + """ + TBC + """ + SITE: ClassVar[RelationField] = RelationField("site") + """ + TBC + """ + DATASOURCES: ClassVar[RelationField] = RelationField("datasources") + """ + TBC + """ + FLOWS: ClassVar[RelationField] = RelationField("flows") + """ + TBC + """ + CHILD_PROJECTS: ClassVar[RelationField] = RelationField("childProjects") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "site_qualified_name", + "top_level_project_qualified_name", + "is_top_level_project", + "project_hierarchy", + "parent_project", + "workbooks", + "site", + "datasources", + "flows", + "child_projects", + ] + + @property + def site_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.site_qualified_name + + @site_qualified_name.setter + def site_qualified_name(self, site_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.site_qualified_name = site_qualified_name + + @property + def top_level_project_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.top_level_project_qualified_name + ) + + @top_level_project_qualified_name.setter + def top_level_project_qualified_name( + self, top_level_project_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.top_level_project_qualified_name = ( + top_level_project_qualified_name + ) + + @property + def is_top_level_project(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_top_level_project + + @is_top_level_project.setter + def is_top_level_project(self, is_top_level_project: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.is_top_level_project = is_top_level_project + + @property + def project_hierarchy(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.project_hierarchy + + @project_hierarchy.setter + def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_hierarchy = project_hierarchy + + @property + def parent_project(self) -> Optional[TableauProject]: + return None if self.attributes is None else self.attributes.parent_project + + @parent_project.setter + def parent_project(self, parent_project: Optional[TableauProject]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.parent_project = parent_project + + @property + def workbooks(self) -> Optional[list[TableauWorkbook]]: + return None if self.attributes is None else self.attributes.workbooks + + @workbooks.setter + def workbooks(self, workbooks: Optional[list[TableauWorkbook]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbooks = workbooks + + @property + def site(self) -> Optional[TableauSite]: + return None if self.attributes is None else self.attributes.site + + @site.setter + def site(self, site: Optional[TableauSite]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.site = site + + @property + def datasources(self) -> Optional[list[TableauDatasource]]: + return None if self.attributes is None else self.attributes.datasources + + @datasources.setter + def datasources(self, datasources: Optional[list[TableauDatasource]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasources = datasources + + @property + def flows(self) -> Optional[list[TableauFlow]]: + return None if self.attributes is None else self.attributes.flows + + @flows.setter + def flows(self, flows: Optional[list[TableauFlow]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.flows = flows + + @property + def child_projects(self) -> Optional[list[TableauProject]]: + return None if self.attributes is None else self.attributes.child_projects + + @child_projects.setter + def child_projects(self, child_projects: Optional[list[TableauProject]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.child_projects = child_projects + + class Attributes(Tableau.Attributes): + site_qualified_name: Optional[str] = Field( + None, description="", alias="siteQualifiedName" + ) + top_level_project_qualified_name: Optional[str] = Field( + None, description="", alias="topLevelProjectQualifiedName" + ) + is_top_level_project: Optional[bool] = Field( + None, description="", alias="isTopLevelProject" + ) + project_hierarchy: Optional[list[dict[str, str]]] = Field( + None, description="", alias="projectHierarchy" + ) + parent_project: Optional[TableauProject] = Field( + None, description="", alias="parentProject" + ) # relationship + workbooks: Optional[list[TableauWorkbook]] = Field( + None, description="", alias="workbooks" + ) # relationship + site: Optional[TableauSite] = Field( + None, description="", alias="site" + ) # relationship + datasources: Optional[list[TableauDatasource]] = Field( + None, description="", alias="datasources" + ) # relationship + flows: Optional[list[TableauFlow]] = Field( + None, description="", alias="flows" + ) # relationship + child_projects: Optional[list[TableauProject]] = Field( + None, description="", alias="childProjects" + ) # relationship + + attributes: "TableauProject.Attributes" = Field( + default_factory=lambda: TableauProject.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class TableauSite(Tableau): + """Description""" + + type_name: str = Field("TableauSite", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "TableauSite": + raise ValueError("must be TableauSite") + return v + + def __setattr__(self, name, value): + if name in TableauSite._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + PROJECTS: ClassVar[RelationField] = RelationField("projects") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "projects", + ] + + @property + def projects(self) -> Optional[list[TableauProject]]: + return None if self.attributes is None else self.attributes.projects + + @projects.setter + def projects(self, projects: Optional[list[TableauProject]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.projects = projects + + class Attributes(Tableau.Attributes): + projects: Optional[list[TableauProject]] = Field( + None, description="", alias="projects" + ) # relationship + + attributes: "TableauSite.Attributes" = Field( + default_factory=lambda: TableauSite.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class TableauDatasource(Tableau): + """Description""" + + type_name: str = Field("TableauDatasource", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "TableauDatasource": + raise ValueError("must be TableauDatasource") + return v + + def __setattr__(self, name, value): + if name in TableauDatasource._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SITE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "siteQualifiedName", "siteQualifiedName" + ) + """ + TBC + """ + PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "projectQualifiedName", "projectQualifiedName" + ) + """ + TBC + """ + TOP_LEVEL_PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectQualifiedName", "topLevelProjectQualifiedName" + ) + """ + TBC + """ + WORKBOOK_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workbookQualifiedName", "workbookQualifiedName" + ) + """ + TBC + """ + PROJECT_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "projectHierarchy", "projectHierarchy" + ) + """ + TBC + """ + IS_PUBLISHED: ClassVar[BooleanField] = BooleanField("isPublished", "isPublished") + """ + TBC + """ + HAS_EXTRACTS: ClassVar[BooleanField] = BooleanField("hasExtracts", "hasExtracts") + """ + TBC + """ + IS_CERTIFIED: ClassVar[BooleanField] = BooleanField("isCertified", "isCertified") + """ + TBC + """ + CERTIFIER: ClassVar[KeywordField] = KeywordField("certifier", "certifier") + """ + TBC + """ + CERTIFICATION_NOTE: ClassVar[KeywordField] = KeywordField( + "certificationNote", "certificationNote" + ) + """ + TBC + """ + CERTIFIER_DISPLAY_NAME: ClassVar[KeywordField] = KeywordField( + "certifierDisplayName", "certifierDisplayName" + ) + """ + TBC + """ + UPSTREAM_TABLES: ClassVar[KeywordField] = KeywordField( + "upstreamTables", "upstreamTables" + ) + """ + TBC + """ + UPSTREAM_DATASOURCES: ClassVar[KeywordField] = KeywordField( + "upstreamDatasources", "upstreamDatasources" + ) + """ + TBC + """ + + WORKBOOK: ClassVar[RelationField] = RelationField("workbook") + """ + TBC + """ + PROJECT: ClassVar[RelationField] = RelationField("project") + """ + TBC + """ + FIELDS: ClassVar[RelationField] = RelationField("fields") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "site_qualified_name", + "project_qualified_name", + "top_level_project_qualified_name", + "workbook_qualified_name", + "project_hierarchy", + "is_published", + "has_extracts", + "is_certified", + "certifier", + "certification_note", + "certifier_display_name", + "upstream_tables", + "upstream_datasources", + "workbook", + "project", + "fields", + ] + + @property + def site_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.site_qualified_name + + @site_qualified_name.setter + def site_qualified_name(self, site_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.site_qualified_name = site_qualified_name + + @property + def project_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.project_qualified_name + ) + + @project_qualified_name.setter + def project_qualified_name(self, project_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_qualified_name = project_qualified_name + + @property + def top_level_project_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.top_level_project_qualified_name + ) + + @top_level_project_qualified_name.setter + def top_level_project_qualified_name( + self, top_level_project_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.top_level_project_qualified_name = ( + top_level_project_qualified_name + ) + + @property + def workbook_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.workbook_qualified_name + ) + + @workbook_qualified_name.setter + def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbook_qualified_name = workbook_qualified_name + + @property + def project_hierarchy(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.project_hierarchy + + @project_hierarchy.setter + def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_hierarchy = project_hierarchy + + @property + def is_published(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_published + + @is_published.setter + def is_published(self, is_published: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.is_published = is_published + + @property + def has_extracts(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.has_extracts + + @has_extracts.setter + def has_extracts(self, has_extracts: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.has_extracts = has_extracts + + @property + def is_certified(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_certified + + @is_certified.setter + def is_certified(self, is_certified: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.is_certified = is_certified + + @property + def certifier(self) -> Optional[dict[str, str]]: + return None if self.attributes is None else self.attributes.certifier + + @certifier.setter + def certifier(self, certifier: Optional[dict[str, str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.certifier = certifier + + @property + def certification_note(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.certification_note + + @certification_note.setter + def certification_note(self, certification_note: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.certification_note = certification_note + + @property + def certifier_display_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.certifier_display_name + ) + + @certifier_display_name.setter + def certifier_display_name(self, certifier_display_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.certifier_display_name = certifier_display_name + + @property + def upstream_tables(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.upstream_tables + + @upstream_tables.setter + def upstream_tables(self, upstream_tables: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.upstream_tables = upstream_tables + + @property + def upstream_datasources(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.upstream_datasources + + @upstream_datasources.setter + def upstream_datasources( + self, upstream_datasources: Optional[list[dict[str, str]]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.upstream_datasources = upstream_datasources + + @property + def workbook(self) -> Optional[TableauWorkbook]: + return None if self.attributes is None else self.attributes.workbook + + @workbook.setter + def workbook(self, workbook: Optional[TableauWorkbook]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbook = workbook + + @property + def project(self) -> Optional[TableauProject]: + return None if self.attributes is None else self.attributes.project + + @project.setter + def project(self, project: Optional[TableauProject]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project = project + + @property + def fields(self) -> Optional[list[TableauDatasourceField]]: + return None if self.attributes is None else self.attributes.fields + + @fields.setter + def fields(self, fields: Optional[list[TableauDatasourceField]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.fields = fields + + class Attributes(Tableau.Attributes): + site_qualified_name: Optional[str] = Field( + None, description="", alias="siteQualifiedName" + ) + project_qualified_name: Optional[str] = Field( + None, description="", alias="projectQualifiedName" + ) + top_level_project_qualified_name: Optional[str] = Field( + None, description="", alias="topLevelProjectQualifiedName" + ) + workbook_qualified_name: Optional[str] = Field( + None, description="", alias="workbookQualifiedName" + ) + project_hierarchy: Optional[list[dict[str, str]]] = Field( + None, description="", alias="projectHierarchy" + ) + is_published: Optional[bool] = Field(None, description="", alias="isPublished") + has_extracts: Optional[bool] = Field(None, description="", alias="hasExtracts") + is_certified: Optional[bool] = Field(None, description="", alias="isCertified") + certifier: Optional[dict[str, str]] = Field( + None, description="", alias="certifier" + ) + certification_note: Optional[str] = Field( + None, description="", alias="certificationNote" + ) + certifier_display_name: Optional[str] = Field( + None, description="", alias="certifierDisplayName" + ) + upstream_tables: Optional[list[dict[str, str]]] = Field( + None, description="", alias="upstreamTables" + ) + upstream_datasources: Optional[list[dict[str, str]]] = Field( + None, description="", alias="upstreamDatasources" + ) + workbook: Optional[TableauWorkbook] = Field( + None, description="", alias="workbook" + ) # relationship + project: Optional[TableauProject] = Field( + None, description="", alias="project" + ) # relationship + fields: Optional[list[TableauDatasourceField]] = Field( + None, description="", alias="fields" + ) # relationship + + attributes: "TableauDatasource.Attributes" = Field( + default_factory=lambda: TableauDatasource.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class TableauDashboard(Tableau): + """Description""" + + type_name: str = Field("TableauDashboard", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "TableauDashboard": + raise ValueError("must be TableauDashboard") + return v + + def __setattr__(self, name, value): + if name in TableauDashboard._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SITE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "siteQualifiedName", "siteQualifiedName" + ) + """ + TBC + """ + PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "projectQualifiedName", "projectQualifiedName" + ) + """ + TBC + """ + WORKBOOK_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workbookQualifiedName", "workbookQualifiedName" + ) + """ + TBC + """ + TOP_LEVEL_PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectQualifiedName", "topLevelProjectQualifiedName" + ) + """ + TBC + """ + PROJECT_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "projectHierarchy", "projectHierarchy" + ) + """ + TBC + """ + + WORKBOOK: ClassVar[RelationField] = RelationField("workbook") + """ + TBC + """ + WORKSHEETS: ClassVar[RelationField] = RelationField("worksheets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "site_qualified_name", + "project_qualified_name", + "workbook_qualified_name", + "top_level_project_qualified_name", + "project_hierarchy", + "workbook", + "worksheets", + ] + + @property + def site_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.site_qualified_name + + @site_qualified_name.setter + def site_qualified_name(self, site_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.site_qualified_name = site_qualified_name + + @property + def project_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.project_qualified_name + ) + + @project_qualified_name.setter + def project_qualified_name(self, project_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_qualified_name = project_qualified_name + + @property + def workbook_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.workbook_qualified_name + ) + + @workbook_qualified_name.setter + def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbook_qualified_name = workbook_qualified_name + + @property + def top_level_project_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.top_level_project_qualified_name + ) + + @top_level_project_qualified_name.setter + def top_level_project_qualified_name( + self, top_level_project_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.top_level_project_qualified_name = ( + top_level_project_qualified_name + ) + + @property + def project_hierarchy(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.project_hierarchy + + @project_hierarchy.setter + def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_hierarchy = project_hierarchy + + @property + def workbook(self) -> Optional[TableauWorkbook]: + return None if self.attributes is None else self.attributes.workbook + + @workbook.setter + def workbook(self, workbook: Optional[TableauWorkbook]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbook = workbook + + @property + def worksheets(self) -> Optional[list[TableauWorksheet]]: + return None if self.attributes is None else self.attributes.worksheets + + @worksheets.setter + def worksheets(self, worksheets: Optional[list[TableauWorksheet]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.worksheets = worksheets + + class Attributes(Tableau.Attributes): + site_qualified_name: Optional[str] = Field( + None, description="", alias="siteQualifiedName" + ) + project_qualified_name: Optional[str] = Field( + None, description="", alias="projectQualifiedName" + ) + workbook_qualified_name: Optional[str] = Field( + None, description="", alias="workbookQualifiedName" + ) + top_level_project_qualified_name: Optional[str] = Field( + None, description="", alias="topLevelProjectQualifiedName" + ) + project_hierarchy: Optional[list[dict[str, str]]] = Field( + None, description="", alias="projectHierarchy" + ) + workbook: Optional[TableauWorkbook] = Field( + None, description="", alias="workbook" + ) # relationship + worksheets: Optional[list[TableauWorksheet]] = Field( + None, description="", alias="worksheets" + ) # relationship + + attributes: "TableauDashboard.Attributes" = Field( + default_factory=lambda: TableauDashboard.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class TableauFlow(Tableau): """Description""" - type_name: str = Field("TableauMetric", allow_mutation=False) + type_name: str = Field("TableauFlow", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "TableauMetric": - raise ValueError("must be TableauMetric") + if v != "TableauFlow": + raise ValueError("must be TableauFlow") return v def __setattr__(self, name, value): - if name in TableauMetric._convience_properties: + if name in TableauFlow._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ + SITE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "siteQualifiedName", "siteQualifiedName" + ) + """ + TBC + """ + PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "projectQualifiedName", "projectQualifiedName" + ) + """ + TBC + """ + TOP_LEVEL_PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectQualifiedName", "topLevelProjectQualifiedName" + ) + """ + TBC + """ + PROJECT_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "projectHierarchy", "projectHierarchy" + ) + """ + TBC + """ + INPUT_FIELDS: ClassVar[KeywordField] = KeywordField("inputFields", "inputFields") + """ + TBC + """ + OUTPUT_FIELDS: ClassVar[KeywordField] = KeywordField("outputFields", "outputFields") + """ + TBC + """ + OUTPUT_STEPS: ClassVar[KeywordField] = KeywordField("outputSteps", "outputSteps") + """ + TBC + """ + + PROJECT: ClassVar[RelationField] = RelationField("project") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ "site_qualified_name", "project_qualified_name", "top_level_project_qualified_name", "project_hierarchy", + "input_fields", + "output_fields", + "output_steps", "project", ] @@ -86,6 +1882,36 @@ def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): self.attributes = self.Attributes() self.attributes.project_hierarchy = project_hierarchy + @property + def input_fields(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.input_fields + + @input_fields.setter + def input_fields(self, input_fields: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.input_fields = input_fields + + @property + def output_fields(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.output_fields + + @output_fields.setter + def output_fields(self, output_fields: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.output_fields = output_fields + + @property + def output_steps(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.output_steps + + @output_steps.setter + def output_steps(self, output_steps: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.output_steps = output_steps + @property def project(self) -> Optional[TableauProject]: return None if self.attributes is None else self.attributes.project @@ -109,15 +1935,266 @@ class Attributes(Tableau.Attributes): project_hierarchy: Optional[list[dict[str, str]]] = Field( None, description="", alias="projectHierarchy" ) + input_fields: Optional[list[dict[str, str]]] = Field( + None, description="", alias="inputFields" + ) + output_fields: Optional[list[dict[str, str]]] = Field( + None, description="", alias="outputFields" + ) + output_steps: Optional[list[dict[str, str]]] = Field( + None, description="", alias="outputSteps" + ) project: Optional[TableauProject] = Field( None, description="", alias="project" ) # relationship - attributes: "TableauMetric.Attributes" = Field( - default_factory=lambda: TableauMetric.Attributes(), + attributes: "TableauFlow.Attributes" = Field( + default_factory=lambda: TableauFlow.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class TableauWorksheet(Tableau): + """Description""" + + type_name: str = Field("TableauWorksheet", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "TableauWorksheet": + raise ValueError("must be TableauWorksheet") + return v + + def __setattr__(self, name, value): + if name in TableauWorksheet._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SITE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "siteQualifiedName", "siteQualifiedName" + ) + """ + TBC + """ + PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "projectQualifiedName", "projectQualifiedName" + ) + """ + TBC + """ + TOP_LEVEL_PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectQualifiedName", "topLevelProjectQualifiedName" + ) + """ + TBC + """ + PROJECT_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "projectHierarchy", "projectHierarchy" + ) + """ + TBC + """ + WORKBOOK_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workbookQualifiedName", "workbookQualifiedName" + ) + """ + TBC + """ + + WORKBOOK: ClassVar[RelationField] = RelationField("workbook") + """ + TBC + """ + DATASOURCE_FIELDS: ClassVar[RelationField] = RelationField("datasourceFields") + """ + TBC + """ + CALCULATED_FIELDS: ClassVar[RelationField] = RelationField("calculatedFields") + """ + TBC + """ + DASHBOARDS: ClassVar[RelationField] = RelationField("dashboards") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "site_qualified_name", + "project_qualified_name", + "top_level_project_qualified_name", + "project_hierarchy", + "workbook_qualified_name", + "workbook", + "datasource_fields", + "calculated_fields", + "dashboards", + ] + + @property + def site_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.site_qualified_name + + @site_qualified_name.setter + def site_qualified_name(self, site_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.site_qualified_name = site_qualified_name + + @property + def project_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.project_qualified_name + ) + + @project_qualified_name.setter + def project_qualified_name(self, project_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_qualified_name = project_qualified_name + + @property + def top_level_project_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.top_level_project_qualified_name + ) + + @top_level_project_qualified_name.setter + def top_level_project_qualified_name( + self, top_level_project_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.top_level_project_qualified_name = ( + top_level_project_qualified_name + ) + + @property + def project_hierarchy(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.project_hierarchy + + @project_hierarchy.setter + def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_hierarchy = project_hierarchy + + @property + def workbook_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.workbook_qualified_name + ) + + @workbook_qualified_name.setter + def workbook_qualified_name(self, workbook_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbook_qualified_name = workbook_qualified_name + + @property + def workbook(self) -> Optional[TableauWorkbook]: + return None if self.attributes is None else self.attributes.workbook + + @workbook.setter + def workbook(self, workbook: Optional[TableauWorkbook]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workbook = workbook + + @property + def datasource_fields(self) -> Optional[list[TableauDatasourceField]]: + return None if self.attributes is None else self.attributes.datasource_fields + + @datasource_fields.setter + def datasource_fields( + self, datasource_fields: Optional[list[TableauDatasourceField]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasource_fields = datasource_fields + + @property + def calculated_fields(self) -> Optional[list[TableauCalculatedField]]: + return None if self.attributes is None else self.attributes.calculated_fields + + @calculated_fields.setter + def calculated_fields( + self, calculated_fields: Optional[list[TableauCalculatedField]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.calculated_fields = calculated_fields + + @property + def dashboards(self) -> Optional[list[TableauDashboard]]: + return None if self.attributes is None else self.attributes.dashboards + + @dashboards.setter + def dashboards(self, dashboards: Optional[list[TableauDashboard]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboards = dashboards + + class Attributes(Tableau.Attributes): + site_qualified_name: Optional[str] = Field( + None, description="", alias="siteQualifiedName" + ) + project_qualified_name: Optional[str] = Field( + None, description="", alias="projectQualifiedName" + ) + top_level_project_qualified_name: Optional[str] = Field( + None, description="", alias="topLevelProjectQualifiedName" + ) + project_hierarchy: Optional[list[dict[str, str]]] = Field( + None, description="", alias="projectHierarchy" + ) + workbook_qualified_name: Optional[str] = Field( + None, description="", alias="workbookQualifiedName" + ) + workbook: Optional[TableauWorkbook] = Field( + None, description="", alias="workbook" + ) # relationship + datasource_fields: Optional[list[TableauDatasourceField]] = Field( + None, description="", alias="datasourceFields" + ) # relationship + calculated_fields: Optional[list[TableauCalculatedField]] = Field( + None, description="", alias="calculatedFields" + ) # relationship + dashboards: Optional[list[TableauDashboard]] = Field( + None, description="", alias="dashboards" + ) # relationship + + attributes: "TableauWorksheet.Attributes" = Field( + default_factory=lambda: TableauWorksheet.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -TableauMetric.Attributes.update_forward_refs() +TableauWorkbook.Attributes.update_forward_refs() + + +TableauDatasourceField.Attributes.update_forward_refs() + + +TableauCalculatedField.Attributes.update_forward_refs() + + +TableauProject.Attributes.update_forward_refs() + + +TableauSite.Attributes.update_forward_refs() + + +TableauDatasource.Attributes.update_forward_refs() + + +TableauDashboard.Attributes.update_forward_refs() + + +TableauFlow.Attributes.update_forward_refs() + + +TableauWorksheet.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset63.py b/pyatlan/model/assets/asset63.py index a8e4fea06..275a8dfae 100644 --- a/pyatlan/model/assets/asset63.py +++ b/pyatlan/model/assets/asset63.py @@ -4,1437 +4,152 @@ from __future__ import annotations -from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset39 import Looker +from pyatlan.model.fields.atlan_fields import KeywordField, RelationField +from .asset39 import Tableau +from .asset62 import TableauProject -class LookerLook(Looker): - """Description""" - - type_name: str = Field("LookerLook", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "LookerLook": - raise ValueError("must be LookerLook") - return v - - def __setattr__(self, name, value): - if name in LookerLook._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "folder_name", - "source_user_id", - "source_view_count", - "sourcelast_updater_id", - "source_last_accessed_at", - "source_last_viewed_at", - "source_content_metadata_id", - "source_query_id", - "model_name", - "query", - "folder", - "tile", - "model", - "dashboard", - ] - - @property - def folder_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.folder_name - - @folder_name.setter - def folder_name(self, folder_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.folder_name = folder_name - - @property - def source_user_id(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.source_user_id - - @source_user_id.setter - def source_user_id(self, source_user_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_user_id = source_user_id - - @property - def source_view_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.source_view_count - - @source_view_count.setter - def source_view_count(self, source_view_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_view_count = source_view_count - - @property - def sourcelast_updater_id(self) -> Optional[int]: - return ( - None if self.attributes is None else self.attributes.sourcelast_updater_id - ) - - @sourcelast_updater_id.setter - def sourcelast_updater_id(self, sourcelast_updater_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sourcelast_updater_id = sourcelast_updater_id - - @property - def source_last_accessed_at(self) -> Optional[datetime]: - return ( - None if self.attributes is None else self.attributes.source_last_accessed_at - ) - - @source_last_accessed_at.setter - def source_last_accessed_at(self, source_last_accessed_at: Optional[datetime]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_last_accessed_at = source_last_accessed_at - - @property - def source_last_viewed_at(self) -> Optional[datetime]: - return ( - None if self.attributes is None else self.attributes.source_last_viewed_at - ) - - @source_last_viewed_at.setter - def source_last_viewed_at(self, source_last_viewed_at: Optional[datetime]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_last_viewed_at = source_last_viewed_at - - @property - def source_content_metadata_id(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.source_content_metadata_id - ) - - @source_content_metadata_id.setter - def source_content_metadata_id(self, source_content_metadata_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_content_metadata_id = source_content_metadata_id - - @property - def source_query_id(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.source_query_id - - @source_query_id.setter - def source_query_id(self, source_query_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_query_id = source_query_id - - @property - def model_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.model_name - - @model_name.setter - def model_name(self, model_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.model_name = model_name - - @property - def query(self) -> Optional[LookerQuery]: - return None if self.attributes is None else self.attributes.query - - @query.setter - def query(self, query: Optional[LookerQuery]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.query = query - - @property - def folder(self) -> Optional[LookerFolder]: - return None if self.attributes is None else self.attributes.folder - - @folder.setter - def folder(self, folder: Optional[LookerFolder]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.folder = folder - - @property - def tile(self) -> Optional[LookerTile]: - return None if self.attributes is None else self.attributes.tile - - @tile.setter - def tile(self, tile: Optional[LookerTile]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tile = tile - - @property - def model(self) -> Optional[LookerModel]: - return None if self.attributes is None else self.attributes.model - - @model.setter - def model(self, model: Optional[LookerModel]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.model = model - - @property - def dashboard(self) -> Optional[LookerDashboard]: - return None if self.attributes is None else self.attributes.dashboard - - @dashboard.setter - def dashboard(self, dashboard: Optional[LookerDashboard]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboard = dashboard - - class Attributes(Looker.Attributes): - folder_name: Optional[str] = Field(None, description="", alias="folderName") - source_user_id: Optional[int] = Field( - None, description="", alias="sourceUserId" - ) - source_view_count: Optional[int] = Field( - None, description="", alias="sourceViewCount" - ) - sourcelast_updater_id: Optional[int] = Field( - None, description="", alias="sourcelastUpdaterId" - ) - source_last_accessed_at: Optional[datetime] = Field( - None, description="", alias="sourceLastAccessedAt" - ) - source_last_viewed_at: Optional[datetime] = Field( - None, description="", alias="sourceLastViewedAt" - ) - source_content_metadata_id: Optional[int] = Field( - None, description="", alias="sourceContentMetadataId" - ) - source_query_id: Optional[int] = Field( - None, description="", alias="sourceQueryId" - ) - model_name: Optional[str] = Field(None, description="", alias="modelName") - query: Optional[LookerQuery] = Field( - None, description="", alias="query" - ) # relationship - folder: Optional[LookerFolder] = Field( - None, description="", alias="folder" - ) # relationship - tile: Optional[LookerTile] = Field( - None, description="", alias="tile" - ) # relationship - model: Optional[LookerModel] = Field( - None, description="", alias="model" - ) # relationship - dashboard: Optional[LookerDashboard] = Field( - None, description="", alias="dashboard" - ) # relationship - - attributes: "LookerLook.Attributes" = Field( - default_factory=lambda: LookerLook.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class LookerDashboard(Looker): - """Description""" - - type_name: str = Field("LookerDashboard", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "LookerDashboard": - raise ValueError("must be LookerDashboard") - return v - - def __setattr__(self, name, value): - if name in LookerDashboard._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "folder_name", - "source_user_id", - "source_view_count", - "source_metadata_id", - "sourcelast_updater_id", - "source_last_accessed_at", - "source_last_viewed_at", - "tiles", - "looks", - "folder", - ] - - @property - def folder_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.folder_name - - @folder_name.setter - def folder_name(self, folder_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.folder_name = folder_name - - @property - def source_user_id(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.source_user_id - - @source_user_id.setter - def source_user_id(self, source_user_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_user_id = source_user_id - - @property - def source_view_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.source_view_count - - @source_view_count.setter - def source_view_count(self, source_view_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_view_count = source_view_count - - @property - def source_metadata_id(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.source_metadata_id - - @source_metadata_id.setter - def source_metadata_id(self, source_metadata_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_metadata_id = source_metadata_id - - @property - def sourcelast_updater_id(self) -> Optional[int]: - return ( - None if self.attributes is None else self.attributes.sourcelast_updater_id - ) - - @sourcelast_updater_id.setter - def sourcelast_updater_id(self, sourcelast_updater_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sourcelast_updater_id = sourcelast_updater_id - - @property - def source_last_accessed_at(self) -> Optional[datetime]: - return ( - None if self.attributes is None else self.attributes.source_last_accessed_at - ) - - @source_last_accessed_at.setter - def source_last_accessed_at(self, source_last_accessed_at: Optional[datetime]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_last_accessed_at = source_last_accessed_at - - @property - def source_last_viewed_at(self) -> Optional[datetime]: - return ( - None if self.attributes is None else self.attributes.source_last_viewed_at - ) - - @source_last_viewed_at.setter - def source_last_viewed_at(self, source_last_viewed_at: Optional[datetime]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_last_viewed_at = source_last_viewed_at - - @property - def tiles(self) -> Optional[list[LookerTile]]: - return None if self.attributes is None else self.attributes.tiles - - @tiles.setter - def tiles(self, tiles: Optional[list[LookerTile]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tiles = tiles - - @property - def looks(self) -> Optional[list[LookerLook]]: - return None if self.attributes is None else self.attributes.looks - - @looks.setter - def looks(self, looks: Optional[list[LookerLook]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.looks = looks - - @property - def folder(self) -> Optional[LookerFolder]: - return None if self.attributes is None else self.attributes.folder - - @folder.setter - def folder(self, folder: Optional[LookerFolder]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.folder = folder - - class Attributes(Looker.Attributes): - folder_name: Optional[str] = Field(None, description="", alias="folderName") - source_user_id: Optional[int] = Field( - None, description="", alias="sourceUserId" - ) - source_view_count: Optional[int] = Field( - None, description="", alias="sourceViewCount" - ) - source_metadata_id: Optional[int] = Field( - None, description="", alias="sourceMetadataId" - ) - sourcelast_updater_id: Optional[int] = Field( - None, description="", alias="sourcelastUpdaterId" - ) - source_last_accessed_at: Optional[datetime] = Field( - None, description="", alias="sourceLastAccessedAt" - ) - source_last_viewed_at: Optional[datetime] = Field( - None, description="", alias="sourceLastViewedAt" - ) - tiles: Optional[list[LookerTile]] = Field( - None, description="", alias="tiles" - ) # relationship - looks: Optional[list[LookerLook]] = Field( - None, description="", alias="looks" - ) # relationship - folder: Optional[LookerFolder] = Field( - None, description="", alias="folder" - ) # relationship - - attributes: "LookerDashboard.Attributes" = Field( - default_factory=lambda: LookerDashboard.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class LookerFolder(Looker): - """Description""" - - type_name: str = Field("LookerFolder", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "LookerFolder": - raise ValueError("must be LookerFolder") - return v - - def __setattr__(self, name, value): - if name in LookerFolder._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "source_content_metadata_id", - "source_creator_id", - "source_child_count", - "source_parent_i_d", - "dashboards", - "looks", - ] - - @property - def source_content_metadata_id(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.source_content_metadata_id - ) - - @source_content_metadata_id.setter - def source_content_metadata_id(self, source_content_metadata_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_content_metadata_id = source_content_metadata_id - - @property - def source_creator_id(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.source_creator_id - - @source_creator_id.setter - def source_creator_id(self, source_creator_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_creator_id = source_creator_id - - @property - def source_child_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.source_child_count - - @source_child_count.setter - def source_child_count(self, source_child_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_child_count = source_child_count - - @property - def source_parent_i_d(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.source_parent_i_d - - @source_parent_i_d.setter - def source_parent_i_d(self, source_parent_i_d: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_parent_i_d = source_parent_i_d - - @property - def dashboards(self) -> Optional[list[LookerDashboard]]: - return None if self.attributes is None else self.attributes.dashboards - - @dashboards.setter - def dashboards(self, dashboards: Optional[list[LookerDashboard]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboards = dashboards - - @property - def looks(self) -> Optional[list[LookerLook]]: - return None if self.attributes is None else self.attributes.looks - - @looks.setter - def looks(self, looks: Optional[list[LookerLook]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.looks = looks - - class Attributes(Looker.Attributes): - source_content_metadata_id: Optional[int] = Field( - None, description="", alias="sourceContentMetadataId" - ) - source_creator_id: Optional[int] = Field( - None, description="", alias="sourceCreatorId" - ) - source_child_count: Optional[int] = Field( - None, description="", alias="sourceChildCount" - ) - source_parent_i_d: Optional[int] = Field( - None, description="", alias="sourceParentID" - ) - dashboards: Optional[list[LookerDashboard]] = Field( - None, description="", alias="dashboards" - ) # relationship - looks: Optional[list[LookerLook]] = Field( - None, description="", alias="looks" - ) # relationship - - attributes: "LookerFolder.Attributes" = Field( - default_factory=lambda: LookerFolder.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class LookerTile(Looker): - """Description""" - - type_name: str = Field("LookerTile", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "LookerTile": - raise ValueError("must be LookerTile") - return v - - def __setattr__(self, name, value): - if name in LookerTile._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "lookml_link_id", - "merge_result_id", - "note_text", - "query_i_d", - "result_maker_i_d", - "subtitle_text", - "look_id", - "query", - "look", - "dashboard", - ] - - @property - def lookml_link_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.lookml_link_id - - @lookml_link_id.setter - def lookml_link_id(self, lookml_link_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.lookml_link_id = lookml_link_id - - @property - def merge_result_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.merge_result_id - - @merge_result_id.setter - def merge_result_id(self, merge_result_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.merge_result_id = merge_result_id - - @property - def note_text(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.note_text - - @note_text.setter - def note_text(self, note_text: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.note_text = note_text - - @property - def query_i_d(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.query_i_d - - @query_i_d.setter - def query_i_d(self, query_i_d: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.query_i_d = query_i_d - - @property - def result_maker_i_d(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.result_maker_i_d - - @result_maker_i_d.setter - def result_maker_i_d(self, result_maker_i_d: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.result_maker_i_d = result_maker_i_d - - @property - def subtitle_text(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.subtitle_text - - @subtitle_text.setter - def subtitle_text(self, subtitle_text: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.subtitle_text = subtitle_text - - @property - def look_id(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.look_id - - @look_id.setter - def look_id(self, look_id: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.look_id = look_id - - @property - def query(self) -> Optional[LookerQuery]: - return None if self.attributes is None else self.attributes.query - - @query.setter - def query(self, query: Optional[LookerQuery]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.query = query - - @property - def look(self) -> Optional[LookerLook]: - return None if self.attributes is None else self.attributes.look - - @look.setter - def look(self, look: Optional[LookerLook]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.look = look - - @property - def dashboard(self) -> Optional[LookerDashboard]: - return None if self.attributes is None else self.attributes.dashboard - - @dashboard.setter - def dashboard(self, dashboard: Optional[LookerDashboard]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboard = dashboard - - class Attributes(Looker.Attributes): - lookml_link_id: Optional[str] = Field( - None, description="", alias="lookmlLinkId" - ) - merge_result_id: Optional[str] = Field( - None, description="", alias="mergeResultId" - ) - note_text: Optional[str] = Field(None, description="", alias="noteText") - query_i_d: Optional[int] = Field(None, description="", alias="queryID") - result_maker_i_d: Optional[int] = Field( - None, description="", alias="resultMakerID" - ) - subtitle_text: Optional[str] = Field(None, description="", alias="subtitleText") - look_id: Optional[int] = Field(None, description="", alias="lookId") - query: Optional[LookerQuery] = Field( - None, description="", alias="query" - ) # relationship - look: Optional[LookerLook] = Field( - None, description="", alias="look" - ) # relationship - dashboard: Optional[LookerDashboard] = Field( - None, description="", alias="dashboard" - ) # relationship - - attributes: "LookerTile.Attributes" = Field( - default_factory=lambda: LookerTile.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class LookerModel(Looker): - """Description""" - - type_name: str = Field("LookerModel", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "LookerModel": - raise ValueError("must be LookerModel") - return v - - def __setattr__(self, name, value): - if name in LookerModel._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "project_name", - "explores", - "project", - "look", - "queries", - "fields", - ] - - @property - def project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.project_name - - @project_name.setter - def project_name(self, project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_name = project_name - - @property - def explores(self) -> Optional[list[LookerExplore]]: - return None if self.attributes is None else self.attributes.explores - - @explores.setter - def explores(self, explores: Optional[list[LookerExplore]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.explores = explores - - @property - def project(self) -> Optional[LookerProject]: - return None if self.attributes is None else self.attributes.project - - @project.setter - def project(self, project: Optional[LookerProject]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project = project - - @property - def look(self) -> Optional[LookerLook]: - return None if self.attributes is None else self.attributes.look - - @look.setter - def look(self, look: Optional[LookerLook]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.look = look - - @property - def queries(self) -> Optional[list[LookerQuery]]: - return None if self.attributes is None else self.attributes.queries - - @queries.setter - def queries(self, queries: Optional[list[LookerQuery]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.queries = queries - - @property - def fields(self) -> Optional[list[LookerField]]: - return None if self.attributes is None else self.attributes.fields - - @fields.setter - def fields(self, fields: Optional[list[LookerField]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.fields = fields - - class Attributes(Looker.Attributes): - project_name: Optional[str] = Field(None, description="", alias="projectName") - explores: Optional[list[LookerExplore]] = Field( - None, description="", alias="explores" - ) # relationship - project: Optional[LookerProject] = Field( - None, description="", alias="project" - ) # relationship - look: Optional[LookerLook] = Field( - None, description="", alias="look" - ) # relationship - queries: Optional[list[LookerQuery]] = Field( - None, description="", alias="queries" - ) # relationship - fields: Optional[list[LookerField]] = Field( - None, description="", alias="fields" - ) # relationship - - attributes: "LookerModel.Attributes" = Field( - default_factory=lambda: LookerModel.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class LookerExplore(Looker): - """Description""" - - type_name: str = Field("LookerExplore", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "LookerExplore": - raise ValueError("must be LookerExplore") - return v - - def __setattr__(self, name, value): - if name in LookerExplore._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "project_name", - "model_name", - "source_connection_name", - "view_name", - "sql_table_name", - "project", - "model", - "fields", - ] - - @property - def project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.project_name - - @project_name.setter - def project_name(self, project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_name = project_name - - @property - def model_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.model_name - - @model_name.setter - def model_name(self, model_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.model_name = model_name - @property - def source_connection_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.source_connection_name - ) - - @source_connection_name.setter - def source_connection_name(self, source_connection_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_connection_name = source_connection_name - - @property - def view_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.view_name - - @view_name.setter - def view_name(self, view_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.view_name = view_name - - @property - def sql_table_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.sql_table_name - - @sql_table_name.setter - def sql_table_name(self, sql_table_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.sql_table_name = sql_table_name - - @property - def project(self) -> Optional[LookerProject]: - return None if self.attributes is None else self.attributes.project - - @project.setter - def project(self, project: Optional[LookerProject]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project = project - - @property - def model(self) -> Optional[LookerModel]: - return None if self.attributes is None else self.attributes.model - - @model.setter - def model(self, model: Optional[LookerModel]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.model = model - - @property - def fields(self) -> Optional[list[LookerField]]: - return None if self.attributes is None else self.attributes.fields - - @fields.setter - def fields(self, fields: Optional[list[LookerField]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.fields = fields - - class Attributes(Looker.Attributes): - project_name: Optional[str] = Field(None, description="", alias="projectName") - model_name: Optional[str] = Field(None, description="", alias="modelName") - source_connection_name: Optional[str] = Field( - None, description="", alias="sourceConnectionName" - ) - view_name: Optional[str] = Field(None, description="", alias="viewName") - sql_table_name: Optional[str] = Field( - None, description="", alias="sqlTableName" - ) - project: Optional[LookerProject] = Field( - None, description="", alias="project" - ) # relationship - model: Optional[LookerModel] = Field( - None, description="", alias="model" - ) # relationship - fields: Optional[list[LookerField]] = Field( - None, description="", alias="fields" - ) # relationship - - attributes: "LookerExplore.Attributes" = Field( - default_factory=lambda: LookerExplore.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class LookerProject(Looker): +class TableauMetric(Tableau): """Description""" - type_name: str = Field("LookerProject", allow_mutation=False) + type_name: str = Field("TableauMetric", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "LookerProject": - raise ValueError("must be LookerProject") + if v != "TableauMetric": + raise ValueError("must be TableauMetric") return v def __setattr__(self, name, value): - if name in LookerProject._convience_properties: + if name in TableauMetric._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "models", - "explores", - "fields", - "views", - ] - - @property - def models(self) -> Optional[list[LookerModel]]: - return None if self.attributes is None else self.attributes.models - - @models.setter - def models(self, models: Optional[list[LookerModel]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.models = models - - @property - def explores(self) -> Optional[list[LookerExplore]]: - return None if self.attributes is None else self.attributes.explores - - @explores.setter - def explores(self, explores: Optional[list[LookerExplore]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.explores = explores - - @property - def fields(self) -> Optional[list[LookerField]]: - return None if self.attributes is None else self.attributes.fields - - @fields.setter - def fields(self, fields: Optional[list[LookerField]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.fields = fields - - @property - def views(self) -> Optional[list[LookerView]]: - return None if self.attributes is None else self.attributes.views - - @views.setter - def views(self, views: Optional[list[LookerView]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.views = views - - class Attributes(Looker.Attributes): - models: Optional[list[LookerModel]] = Field( - None, description="", alias="models" - ) # relationship - explores: Optional[list[LookerExplore]] = Field( - None, description="", alias="explores" - ) # relationship - fields: Optional[list[LookerField]] = Field( - None, description="", alias="fields" - ) # relationship - views: Optional[list[LookerView]] = Field( - None, description="", alias="views" - ) # relationship - - attributes: "LookerProject.Attributes" = Field( - default_factory=lambda: LookerProject.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", + SITE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "siteQualifiedName", "siteQualifiedName" ) - - -class LookerQuery(Looker): - """Description""" - - type_name: str = Field("LookerQuery", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "LookerQuery": - raise ValueError("must be LookerQuery") - return v - - def __setattr__(self, name, value): - if name in LookerQuery._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "source_definition", - "source_definition_database", - "source_definition_schema", - "fields", - "tiles", - "looks", - "model", - ] - - @property - def source_definition(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.source_definition - - @source_definition.setter - def source_definition(self, source_definition: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_definition = source_definition - - @property - def source_definition_database(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.source_definition_database - ) - - @source_definition_database.setter - def source_definition_database(self, source_definition_database: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_definition_database = source_definition_database - - @property - def source_definition_schema(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.source_definition_schema - ) - - @source_definition_schema.setter - def source_definition_schema(self, source_definition_schema: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_definition_schema = source_definition_schema - - @property - def fields(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.fields - - @fields.setter - def fields(self, fields: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.fields = fields - - @property - def tiles(self) -> Optional[list[LookerTile]]: - return None if self.attributes is None else self.attributes.tiles - - @tiles.setter - def tiles(self, tiles: Optional[list[LookerTile]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tiles = tiles - - @property - def looks(self) -> Optional[list[LookerLook]]: - return None if self.attributes is None else self.attributes.looks - - @looks.setter - def looks(self, looks: Optional[list[LookerLook]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.looks = looks - - @property - def model(self) -> Optional[LookerModel]: - return None if self.attributes is None else self.attributes.model - - @model.setter - def model(self, model: Optional[LookerModel]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.model = model - - class Attributes(Looker.Attributes): - source_definition: Optional[str] = Field( - None, description="", alias="sourceDefinition" - ) - source_definition_database: Optional[str] = Field( - None, description="", alias="sourceDefinitionDatabase" - ) - source_definition_schema: Optional[str] = Field( - None, description="", alias="sourceDefinitionSchema" - ) - fields: Optional[set[str]] = Field(None, description="", alias="fields") - tiles: Optional[list[LookerTile]] = Field( - None, description="", alias="tiles" - ) # relationship - looks: Optional[list[LookerLook]] = Field( - None, description="", alias="looks" - ) # relationship - model: Optional[LookerModel] = Field( - None, description="", alias="model" - ) # relationship - - attributes: "LookerQuery.Attributes" = Field( - default_factory=lambda: LookerQuery.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", + """ + TBC + """ + PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "projectQualifiedName", "projectQualifiedName" ) - - -class LookerField(Looker): - """Description""" - - type_name: str = Field("LookerField", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "LookerField": - raise ValueError("must be LookerField") - return v - - def __setattr__(self, name, value): - if name in LookerField._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "project_name", - "looker_explore_qualified_name", - "looker_view_qualified_name", - "model_name", - "source_definition", - "looker_field_data_type", - "looker_times_used", - "explore", + """ + TBC + """ + TOP_LEVEL_PROJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "topLevelProjectQualifiedName", "topLevelProjectQualifiedName" + ) + """ + TBC + """ + PROJECT_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "projectHierarchy", "projectHierarchy" + ) + """ + TBC + """ + + PROJECT: ClassVar[RelationField] = RelationField("project") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "site_qualified_name", + "project_qualified_name", + "top_level_project_qualified_name", + "project_hierarchy", "project", - "view", - "model", ] @property - def project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.project_name + def site_qualified_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.site_qualified_name - @project_name.setter - def project_name(self, project_name: Optional[str]): + @site_qualified_name.setter + def site_qualified_name(self, site_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.project_name = project_name + self.attributes.site_qualified_name = site_qualified_name @property - def looker_explore_qualified_name(self) -> Optional[str]: + def project_qualified_name(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.looker_explore_qualified_name + None if self.attributes is None else self.attributes.project_qualified_name ) - @looker_explore_qualified_name.setter - def looker_explore_qualified_name( - self, looker_explore_qualified_name: Optional[str] - ): + @project_qualified_name.setter + def project_qualified_name(self, project_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.looker_explore_qualified_name = looker_explore_qualified_name + self.attributes.project_qualified_name = project_qualified_name @property - def looker_view_qualified_name(self) -> Optional[str]: + def top_level_project_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.looker_view_qualified_name + else self.attributes.top_level_project_qualified_name ) - @looker_view_qualified_name.setter - def looker_view_qualified_name(self, looker_view_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.looker_view_qualified_name = looker_view_qualified_name - - @property - def model_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.model_name - - @model_name.setter - def model_name(self, model_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.model_name = model_name - - @property - def source_definition(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.source_definition - - @source_definition.setter - def source_definition(self, source_definition: Optional[str]): + @top_level_project_qualified_name.setter + def top_level_project_qualified_name( + self, top_level_project_qualified_name: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.source_definition = source_definition - - @property - def looker_field_data_type(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.looker_field_data_type + self.attributes.top_level_project_qualified_name = ( + top_level_project_qualified_name ) - @looker_field_data_type.setter - def looker_field_data_type(self, looker_field_data_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.looker_field_data_type = looker_field_data_type - - @property - def looker_times_used(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.looker_times_used - - @looker_times_used.setter - def looker_times_used(self, looker_times_used: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.looker_times_used = looker_times_used - @property - def explore(self) -> Optional[LookerExplore]: - return None if self.attributes is None else self.attributes.explore + def project_hierarchy(self) -> Optional[list[dict[str, str]]]: + return None if self.attributes is None else self.attributes.project_hierarchy - @explore.setter - def explore(self, explore: Optional[LookerExplore]): + @project_hierarchy.setter + def project_hierarchy(self, project_hierarchy: Optional[list[dict[str, str]]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.explore = explore + self.attributes.project_hierarchy = project_hierarchy @property - def project(self) -> Optional[LookerProject]: + def project(self) -> Optional[TableauProject]: return None if self.attributes is None else self.attributes.project @project.setter - def project(self, project: Optional[LookerProject]): + def project(self, project: Optional[TableauProject]): if self.attributes is None: self.attributes = self.Attributes() self.attributes.project = project - @property - def view(self) -> Optional[LookerView]: - return None if self.attributes is None else self.attributes.view - - @view.setter - def view(self, view: Optional[LookerView]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.view = view - - @property - def model(self) -> Optional[LookerModel]: - return None if self.attributes is None else self.attributes.model - - @model.setter - def model(self, model: Optional[LookerModel]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.model = model - - class Attributes(Looker.Attributes): - project_name: Optional[str] = Field(None, description="", alias="projectName") - looker_explore_qualified_name: Optional[str] = Field( - None, description="", alias="lookerExploreQualifiedName" - ) - looker_view_qualified_name: Optional[str] = Field( - None, description="", alias="lookerViewQualifiedName" + class Attributes(Tableau.Attributes): + site_qualified_name: Optional[str] = Field( + None, description="", alias="siteQualifiedName" ) - model_name: Optional[str] = Field(None, description="", alias="modelName") - source_definition: Optional[str] = Field( - None, description="", alias="sourceDefinition" + project_qualified_name: Optional[str] = Field( + None, description="", alias="projectQualifiedName" ) - looker_field_data_type: Optional[str] = Field( - None, description="", alias="lookerFieldDataType" + top_level_project_qualified_name: Optional[str] = Field( + None, description="", alias="topLevelProjectQualifiedName" ) - looker_times_used: Optional[int] = Field( - None, description="", alias="lookerTimesUsed" + project_hierarchy: Optional[list[dict[str, str]]] = Field( + None, description="", alias="projectHierarchy" ) - explore: Optional[LookerExplore] = Field( - None, description="", alias="explore" - ) # relationship - project: Optional[LookerProject] = Field( - None, description="", alias="project" - ) # relationship - view: Optional[LookerView] = Field( - None, description="", alias="view" - ) # relationship - model: Optional[LookerModel] = Field( - None, description="", alias="model" - ) # relationship - - attributes: "LookerField.Attributes" = Field( - default_factory=lambda: LookerField.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class LookerView(Looker): - """Description""" - - type_name: str = Field("LookerView", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "LookerView": - raise ValueError("must be LookerView") - return v - - def __setattr__(self, name, value): - if name in LookerView._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "project_name", - "project", - "fields", - ] - - @property - def project_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.project_name - - @project_name.setter - def project_name(self, project_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project_name = project_name - - @property - def project(self) -> Optional[LookerProject]: - return None if self.attributes is None else self.attributes.project - - @project.setter - def project(self, project: Optional[LookerProject]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.project = project - - @property - def fields(self) -> Optional[list[LookerField]]: - return None if self.attributes is None else self.attributes.fields - - @fields.setter - def fields(self, fields: Optional[list[LookerField]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.fields = fields - - class Attributes(Looker.Attributes): - project_name: Optional[str] = Field(None, description="", alias="projectName") - project: Optional[LookerProject] = Field( + project: Optional[TableauProject] = Field( None, description="", alias="project" ) # relationship - fields: Optional[list[LookerField]] = Field( - None, description="", alias="fields" - ) # relationship - attributes: "LookerView.Attributes" = Field( - default_factory=lambda: LookerView.Attributes(), + attributes: "TableauMetric.Attributes" = Field( + default_factory=lambda: TableauMetric.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -LookerLook.Attributes.update_forward_refs() - - -LookerDashboard.Attributes.update_forward_refs() - - -LookerFolder.Attributes.update_forward_refs() - - -LookerTile.Attributes.update_forward_refs() - - -LookerModel.Attributes.update_forward_refs() - - -LookerExplore.Attributes.update_forward_refs() - - -LookerProject.Attributes.update_forward_refs() - - -LookerQuery.Attributes.update_forward_refs() - - -LookerField.Attributes.update_forward_refs() - - -LookerView.Attributes.update_forward_refs() +TableauMetric.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset64.py b/pyatlan/model/assets/asset64.py index d7739600c..6f40fb951 100644 --- a/pyatlan/model/assets/asset64.py +++ b/pyatlan/model/assets/asset64.py @@ -4,59 +4,1887 @@ from __future__ import annotations +from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset40 import Redash +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, + RelationField, +) +from .asset40 import Looker -class RedashDashboard(Redash): + +class LookerLook(Looker): + """Description""" + + type_name: str = Field("LookerLook", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "LookerLook": + raise ValueError("must be LookerLook") + return v + + def __setattr__(self, name, value): + if name in LookerLook._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + FOLDER_NAME: ClassVar[KeywordField] = KeywordField("folderName", "folderName") + """ + TBC + """ + SOURCE_USER_ID: ClassVar[NumericField] = NumericField( + "sourceUserId", "sourceUserId" + ) + """ + TBC + """ + SOURCE_VIEW_COUNT: ClassVar[NumericField] = NumericField( + "sourceViewCount", "sourceViewCount" + ) + """ + TBC + """ + SOURCELAST_UPDATER_ID: ClassVar[NumericField] = NumericField( + "sourcelastUpdaterId", "sourcelastUpdaterId" + ) + """ + TBC + """ + SOURCE_LAST_ACCESSED_AT: ClassVar[NumericField] = NumericField( + "sourceLastAccessedAt", "sourceLastAccessedAt" + ) + """ + TBC + """ + SOURCE_LAST_VIEWED_AT: ClassVar[NumericField] = NumericField( + "sourceLastViewedAt", "sourceLastViewedAt" + ) + """ + TBC + """ + SOURCE_CONTENT_METADATA_ID: ClassVar[NumericField] = NumericField( + "sourceContentMetadataId", "sourceContentMetadataId" + ) + """ + TBC + """ + SOURCE_QUERY_ID: ClassVar[NumericField] = NumericField( + "sourceQueryId", "sourceQueryId" + ) + """ + TBC + """ + MODEL_NAME: ClassVar[KeywordField] = KeywordField("modelName", "modelName") + """ + TBC + """ + + QUERY: ClassVar[RelationField] = RelationField("query") + """ + TBC + """ + FOLDER: ClassVar[RelationField] = RelationField("folder") + """ + TBC + """ + TILE: ClassVar[RelationField] = RelationField("tile") + """ + TBC + """ + MODEL: ClassVar[RelationField] = RelationField("model") + """ + TBC + """ + DASHBOARD: ClassVar[RelationField] = RelationField("dashboard") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "folder_name", + "source_user_id", + "source_view_count", + "sourcelast_updater_id", + "source_last_accessed_at", + "source_last_viewed_at", + "source_content_metadata_id", + "source_query_id", + "model_name", + "query", + "folder", + "tile", + "model", + "dashboard", + ] + + @property + def folder_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.folder_name + + @folder_name.setter + def folder_name(self, folder_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.folder_name = folder_name + + @property + def source_user_id(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.source_user_id + + @source_user_id.setter + def source_user_id(self, source_user_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_user_id = source_user_id + + @property + def source_view_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.source_view_count + + @source_view_count.setter + def source_view_count(self, source_view_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_view_count = source_view_count + + @property + def sourcelast_updater_id(self) -> Optional[int]: + return ( + None if self.attributes is None else self.attributes.sourcelast_updater_id + ) + + @sourcelast_updater_id.setter + def sourcelast_updater_id(self, sourcelast_updater_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sourcelast_updater_id = sourcelast_updater_id + + @property + def source_last_accessed_at(self) -> Optional[datetime]: + return ( + None if self.attributes is None else self.attributes.source_last_accessed_at + ) + + @source_last_accessed_at.setter + def source_last_accessed_at(self, source_last_accessed_at: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_last_accessed_at = source_last_accessed_at + + @property + def source_last_viewed_at(self) -> Optional[datetime]: + return ( + None if self.attributes is None else self.attributes.source_last_viewed_at + ) + + @source_last_viewed_at.setter + def source_last_viewed_at(self, source_last_viewed_at: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_last_viewed_at = source_last_viewed_at + + @property + def source_content_metadata_id(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.source_content_metadata_id + ) + + @source_content_metadata_id.setter + def source_content_metadata_id(self, source_content_metadata_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_content_metadata_id = source_content_metadata_id + + @property + def source_query_id(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.source_query_id + + @source_query_id.setter + def source_query_id(self, source_query_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_query_id = source_query_id + + @property + def model_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_name + + @model_name.setter + def model_name(self, model_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_name = model_name + + @property + def query(self) -> Optional[LookerQuery]: + return None if self.attributes is None else self.attributes.query + + @query.setter + def query(self, query: Optional[LookerQuery]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.query = query + + @property + def folder(self) -> Optional[LookerFolder]: + return None if self.attributes is None else self.attributes.folder + + @folder.setter + def folder(self, folder: Optional[LookerFolder]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.folder = folder + + @property + def tile(self) -> Optional[LookerTile]: + return None if self.attributes is None else self.attributes.tile + + @tile.setter + def tile(self, tile: Optional[LookerTile]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tile = tile + + @property + def model(self) -> Optional[LookerModel]: + return None if self.attributes is None else self.attributes.model + + @model.setter + def model(self, model: Optional[LookerModel]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model = model + + @property + def dashboard(self) -> Optional[LookerDashboard]: + return None if self.attributes is None else self.attributes.dashboard + + @dashboard.setter + def dashboard(self, dashboard: Optional[LookerDashboard]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboard = dashboard + + class Attributes(Looker.Attributes): + folder_name: Optional[str] = Field(None, description="", alias="folderName") + source_user_id: Optional[int] = Field( + None, description="", alias="sourceUserId" + ) + source_view_count: Optional[int] = Field( + None, description="", alias="sourceViewCount" + ) + sourcelast_updater_id: Optional[int] = Field( + None, description="", alias="sourcelastUpdaterId" + ) + source_last_accessed_at: Optional[datetime] = Field( + None, description="", alias="sourceLastAccessedAt" + ) + source_last_viewed_at: Optional[datetime] = Field( + None, description="", alias="sourceLastViewedAt" + ) + source_content_metadata_id: Optional[int] = Field( + None, description="", alias="sourceContentMetadataId" + ) + source_query_id: Optional[int] = Field( + None, description="", alias="sourceQueryId" + ) + model_name: Optional[str] = Field(None, description="", alias="modelName") + query: Optional[LookerQuery] = Field( + None, description="", alias="query" + ) # relationship + folder: Optional[LookerFolder] = Field( + None, description="", alias="folder" + ) # relationship + tile: Optional[LookerTile] = Field( + None, description="", alias="tile" + ) # relationship + model: Optional[LookerModel] = Field( + None, description="", alias="model" + ) # relationship + dashboard: Optional[LookerDashboard] = Field( + None, description="", alias="dashboard" + ) # relationship + + attributes: "LookerLook.Attributes" = Field( + default_factory=lambda: LookerLook.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class LookerDashboard(Looker): + """Description""" + + type_name: str = Field("LookerDashboard", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "LookerDashboard": + raise ValueError("must be LookerDashboard") + return v + + def __setattr__(self, name, value): + if name in LookerDashboard._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + FOLDER_NAME: ClassVar[KeywordField] = KeywordField("folderName", "folderName") + """ + TBC + """ + SOURCE_USER_ID: ClassVar[NumericField] = NumericField( + "sourceUserId", "sourceUserId" + ) + """ + TBC + """ + SOURCE_VIEW_COUNT: ClassVar[NumericField] = NumericField( + "sourceViewCount", "sourceViewCount" + ) + """ + TBC + """ + SOURCE_METADATA_ID: ClassVar[NumericField] = NumericField( + "sourceMetadataId", "sourceMetadataId" + ) + """ + TBC + """ + SOURCELAST_UPDATER_ID: ClassVar[NumericField] = NumericField( + "sourcelastUpdaterId", "sourcelastUpdaterId" + ) + """ + TBC + """ + SOURCE_LAST_ACCESSED_AT: ClassVar[NumericField] = NumericField( + "sourceLastAccessedAt", "sourceLastAccessedAt" + ) + """ + TBC + """ + SOURCE_LAST_VIEWED_AT: ClassVar[NumericField] = NumericField( + "sourceLastViewedAt", "sourceLastViewedAt" + ) + """ + TBC + """ + + TILES: ClassVar[RelationField] = RelationField("tiles") + """ + TBC + """ + LOOKS: ClassVar[RelationField] = RelationField("looks") + """ + TBC + """ + FOLDER: ClassVar[RelationField] = RelationField("folder") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "folder_name", + "source_user_id", + "source_view_count", + "source_metadata_id", + "sourcelast_updater_id", + "source_last_accessed_at", + "source_last_viewed_at", + "tiles", + "looks", + "folder", + ] + + @property + def folder_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.folder_name + + @folder_name.setter + def folder_name(self, folder_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.folder_name = folder_name + + @property + def source_user_id(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.source_user_id + + @source_user_id.setter + def source_user_id(self, source_user_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_user_id = source_user_id + + @property + def source_view_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.source_view_count + + @source_view_count.setter + def source_view_count(self, source_view_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_view_count = source_view_count + + @property + def source_metadata_id(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.source_metadata_id + + @source_metadata_id.setter + def source_metadata_id(self, source_metadata_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_metadata_id = source_metadata_id + + @property + def sourcelast_updater_id(self) -> Optional[int]: + return ( + None if self.attributes is None else self.attributes.sourcelast_updater_id + ) + + @sourcelast_updater_id.setter + def sourcelast_updater_id(self, sourcelast_updater_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sourcelast_updater_id = sourcelast_updater_id + + @property + def source_last_accessed_at(self) -> Optional[datetime]: + return ( + None if self.attributes is None else self.attributes.source_last_accessed_at + ) + + @source_last_accessed_at.setter + def source_last_accessed_at(self, source_last_accessed_at: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_last_accessed_at = source_last_accessed_at + + @property + def source_last_viewed_at(self) -> Optional[datetime]: + return ( + None if self.attributes is None else self.attributes.source_last_viewed_at + ) + + @source_last_viewed_at.setter + def source_last_viewed_at(self, source_last_viewed_at: Optional[datetime]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_last_viewed_at = source_last_viewed_at + + @property + def tiles(self) -> Optional[list[LookerTile]]: + return None if self.attributes is None else self.attributes.tiles + + @tiles.setter + def tiles(self, tiles: Optional[list[LookerTile]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tiles = tiles + + @property + def looks(self) -> Optional[list[LookerLook]]: + return None if self.attributes is None else self.attributes.looks + + @looks.setter + def looks(self, looks: Optional[list[LookerLook]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.looks = looks + + @property + def folder(self) -> Optional[LookerFolder]: + return None if self.attributes is None else self.attributes.folder + + @folder.setter + def folder(self, folder: Optional[LookerFolder]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.folder = folder + + class Attributes(Looker.Attributes): + folder_name: Optional[str] = Field(None, description="", alias="folderName") + source_user_id: Optional[int] = Field( + None, description="", alias="sourceUserId" + ) + source_view_count: Optional[int] = Field( + None, description="", alias="sourceViewCount" + ) + source_metadata_id: Optional[int] = Field( + None, description="", alias="sourceMetadataId" + ) + sourcelast_updater_id: Optional[int] = Field( + None, description="", alias="sourcelastUpdaterId" + ) + source_last_accessed_at: Optional[datetime] = Field( + None, description="", alias="sourceLastAccessedAt" + ) + source_last_viewed_at: Optional[datetime] = Field( + None, description="", alias="sourceLastViewedAt" + ) + tiles: Optional[list[LookerTile]] = Field( + None, description="", alias="tiles" + ) # relationship + looks: Optional[list[LookerLook]] = Field( + None, description="", alias="looks" + ) # relationship + folder: Optional[LookerFolder] = Field( + None, description="", alias="folder" + ) # relationship + + attributes: "LookerDashboard.Attributes" = Field( + default_factory=lambda: LookerDashboard.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class LookerFolder(Looker): + """Description""" + + type_name: str = Field("LookerFolder", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "LookerFolder": + raise ValueError("must be LookerFolder") + return v + + def __setattr__(self, name, value): + if name in LookerFolder._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SOURCE_CONTENT_METADATA_ID: ClassVar[NumericField] = NumericField( + "sourceContentMetadataId", "sourceContentMetadataId" + ) + """ + TBC + """ + SOURCE_CREATOR_ID: ClassVar[NumericField] = NumericField( + "sourceCreatorId", "sourceCreatorId" + ) + """ + TBC + """ + SOURCE_CHILD_COUNT: ClassVar[NumericField] = NumericField( + "sourceChildCount", "sourceChildCount" + ) + """ + TBC + """ + SOURCE_PARENT_ID: ClassVar[NumericField] = NumericField( + "sourceParentID", "sourceParentID" + ) + """ + TBC + """ + + DASHBOARDS: ClassVar[RelationField] = RelationField("dashboards") + """ + TBC + """ + LOOKS: ClassVar[RelationField] = RelationField("looks") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "source_content_metadata_id", + "source_creator_id", + "source_child_count", + "source_parent_i_d", + "dashboards", + "looks", + ] + + @property + def source_content_metadata_id(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.source_content_metadata_id + ) + + @source_content_metadata_id.setter + def source_content_metadata_id(self, source_content_metadata_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_content_metadata_id = source_content_metadata_id + + @property + def source_creator_id(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.source_creator_id + + @source_creator_id.setter + def source_creator_id(self, source_creator_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_creator_id = source_creator_id + + @property + def source_child_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.source_child_count + + @source_child_count.setter + def source_child_count(self, source_child_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_child_count = source_child_count + + @property + def source_parent_i_d(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.source_parent_i_d + + @source_parent_i_d.setter + def source_parent_i_d(self, source_parent_i_d: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_parent_i_d = source_parent_i_d + + @property + def dashboards(self) -> Optional[list[LookerDashboard]]: + return None if self.attributes is None else self.attributes.dashboards + + @dashboards.setter + def dashboards(self, dashboards: Optional[list[LookerDashboard]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboards = dashboards + + @property + def looks(self) -> Optional[list[LookerLook]]: + return None if self.attributes is None else self.attributes.looks + + @looks.setter + def looks(self, looks: Optional[list[LookerLook]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.looks = looks + + class Attributes(Looker.Attributes): + source_content_metadata_id: Optional[int] = Field( + None, description="", alias="sourceContentMetadataId" + ) + source_creator_id: Optional[int] = Field( + None, description="", alias="sourceCreatorId" + ) + source_child_count: Optional[int] = Field( + None, description="", alias="sourceChildCount" + ) + source_parent_i_d: Optional[int] = Field( + None, description="", alias="sourceParentID" + ) + dashboards: Optional[list[LookerDashboard]] = Field( + None, description="", alias="dashboards" + ) # relationship + looks: Optional[list[LookerLook]] = Field( + None, description="", alias="looks" + ) # relationship + + attributes: "LookerFolder.Attributes" = Field( + default_factory=lambda: LookerFolder.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class LookerTile(Looker): + """Description""" + + type_name: str = Field("LookerTile", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "LookerTile": + raise ValueError("must be LookerTile") + return v + + def __setattr__(self, name, value): + if name in LookerTile._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + LOOKML_LINK_ID: ClassVar[KeywordField] = KeywordField( + "lookmlLinkId", "lookmlLinkId" + ) + """ + TBC + """ + MERGE_RESULT_ID: ClassVar[KeywordField] = KeywordField( + "mergeResultId", "mergeResultId" + ) + """ + TBC + """ + NOTE_TEXT: ClassVar[KeywordField] = KeywordField("noteText", "noteText") + """ + TBC + """ + QUERY_ID: ClassVar[NumericField] = NumericField("queryID", "queryID") + """ + TBC + """ + RESULT_MAKER_ID: ClassVar[NumericField] = NumericField( + "resultMakerID", "resultMakerID" + ) + """ + TBC + """ + SUBTITLE_TEXT: ClassVar[KeywordField] = KeywordField("subtitleText", "subtitleText") + """ + TBC + """ + LOOK_ID: ClassVar[NumericField] = NumericField("lookId", "lookId") + """ + TBC + """ + + QUERY: ClassVar[RelationField] = RelationField("query") + """ + TBC + """ + LOOK: ClassVar[RelationField] = RelationField("look") + """ + TBC + """ + DASHBOARD: ClassVar[RelationField] = RelationField("dashboard") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "lookml_link_id", + "merge_result_id", + "note_text", + "query_i_d", + "result_maker_i_d", + "subtitle_text", + "look_id", + "query", + "look", + "dashboard", + ] + + @property + def lookml_link_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.lookml_link_id + + @lookml_link_id.setter + def lookml_link_id(self, lookml_link_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.lookml_link_id = lookml_link_id + + @property + def merge_result_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.merge_result_id + + @merge_result_id.setter + def merge_result_id(self, merge_result_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.merge_result_id = merge_result_id + + @property + def note_text(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.note_text + + @note_text.setter + def note_text(self, note_text: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.note_text = note_text + + @property + def query_i_d(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.query_i_d + + @query_i_d.setter + def query_i_d(self, query_i_d: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.query_i_d = query_i_d + + @property + def result_maker_i_d(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.result_maker_i_d + + @result_maker_i_d.setter + def result_maker_i_d(self, result_maker_i_d: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.result_maker_i_d = result_maker_i_d + + @property + def subtitle_text(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.subtitle_text + + @subtitle_text.setter + def subtitle_text(self, subtitle_text: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.subtitle_text = subtitle_text + + @property + def look_id(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.look_id + + @look_id.setter + def look_id(self, look_id: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.look_id = look_id + + @property + def query(self) -> Optional[LookerQuery]: + return None if self.attributes is None else self.attributes.query + + @query.setter + def query(self, query: Optional[LookerQuery]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.query = query + + @property + def look(self) -> Optional[LookerLook]: + return None if self.attributes is None else self.attributes.look + + @look.setter + def look(self, look: Optional[LookerLook]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.look = look + + @property + def dashboard(self) -> Optional[LookerDashboard]: + return None if self.attributes is None else self.attributes.dashboard + + @dashboard.setter + def dashboard(self, dashboard: Optional[LookerDashboard]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboard = dashboard + + class Attributes(Looker.Attributes): + lookml_link_id: Optional[str] = Field( + None, description="", alias="lookmlLinkId" + ) + merge_result_id: Optional[str] = Field( + None, description="", alias="mergeResultId" + ) + note_text: Optional[str] = Field(None, description="", alias="noteText") + query_i_d: Optional[int] = Field(None, description="", alias="queryID") + result_maker_i_d: Optional[int] = Field( + None, description="", alias="resultMakerID" + ) + subtitle_text: Optional[str] = Field(None, description="", alias="subtitleText") + look_id: Optional[int] = Field(None, description="", alias="lookId") + query: Optional[LookerQuery] = Field( + None, description="", alias="query" + ) # relationship + look: Optional[LookerLook] = Field( + None, description="", alias="look" + ) # relationship + dashboard: Optional[LookerDashboard] = Field( + None, description="", alias="dashboard" + ) # relationship + + attributes: "LookerTile.Attributes" = Field( + default_factory=lambda: LookerTile.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class LookerModel(Looker): + """Description""" + + type_name: str = Field("LookerModel", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "LookerModel": + raise ValueError("must be LookerModel") + return v + + def __setattr__(self, name, value): + if name in LookerModel._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + PROJECT_NAME: ClassVar[KeywordField] = KeywordField("projectName", "projectName") + """ + TBC + """ + + EXPLORES: ClassVar[RelationField] = RelationField("explores") + """ + TBC + """ + PROJECT: ClassVar[RelationField] = RelationField("project") + """ + TBC + """ + LOOK: ClassVar[RelationField] = RelationField("look") + """ + TBC + """ + QUERIES: ClassVar[RelationField] = RelationField("queries") + """ + TBC + """ + FIELDS: ClassVar[RelationField] = RelationField("fields") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "project_name", + "explores", + "project", + "look", + "queries", + "fields", + ] + + @property + def project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.project_name + + @project_name.setter + def project_name(self, project_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_name = project_name + + @property + def explores(self) -> Optional[list[LookerExplore]]: + return None if self.attributes is None else self.attributes.explores + + @explores.setter + def explores(self, explores: Optional[list[LookerExplore]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.explores = explores + + @property + def project(self) -> Optional[LookerProject]: + return None if self.attributes is None else self.attributes.project + + @project.setter + def project(self, project: Optional[LookerProject]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project = project + + @property + def look(self) -> Optional[LookerLook]: + return None if self.attributes is None else self.attributes.look + + @look.setter + def look(self, look: Optional[LookerLook]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.look = look + + @property + def queries(self) -> Optional[list[LookerQuery]]: + return None if self.attributes is None else self.attributes.queries + + @queries.setter + def queries(self, queries: Optional[list[LookerQuery]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.queries = queries + + @property + def fields(self) -> Optional[list[LookerField]]: + return None if self.attributes is None else self.attributes.fields + + @fields.setter + def fields(self, fields: Optional[list[LookerField]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.fields = fields + + class Attributes(Looker.Attributes): + project_name: Optional[str] = Field(None, description="", alias="projectName") + explores: Optional[list[LookerExplore]] = Field( + None, description="", alias="explores" + ) # relationship + project: Optional[LookerProject] = Field( + None, description="", alias="project" + ) # relationship + look: Optional[LookerLook] = Field( + None, description="", alias="look" + ) # relationship + queries: Optional[list[LookerQuery]] = Field( + None, description="", alias="queries" + ) # relationship + fields: Optional[list[LookerField]] = Field( + None, description="", alias="fields" + ) # relationship + + attributes: "LookerModel.Attributes" = Field( + default_factory=lambda: LookerModel.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class LookerExplore(Looker): + """Description""" + + type_name: str = Field("LookerExplore", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "LookerExplore": + raise ValueError("must be LookerExplore") + return v + + def __setattr__(self, name, value): + if name in LookerExplore._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + PROJECT_NAME: ClassVar[KeywordField] = KeywordField("projectName", "projectName") + """ + TBC + """ + MODEL_NAME: ClassVar[KeywordField] = KeywordField("modelName", "modelName") + """ + TBC + """ + SOURCE_CONNECTION_NAME: ClassVar[KeywordField] = KeywordField( + "sourceConnectionName", "sourceConnectionName" + ) + """ + TBC + """ + VIEW_NAME: ClassVar[KeywordField] = KeywordField("viewName", "viewName") + """ + TBC + """ + SQL_TABLE_NAME: ClassVar[KeywordField] = KeywordField( + "sqlTableName", "sqlTableName" + ) + """ + TBC + """ + + PROJECT: ClassVar[RelationField] = RelationField("project") + """ + TBC + """ + MODEL: ClassVar[RelationField] = RelationField("model") + """ + TBC + """ + FIELDS: ClassVar[RelationField] = RelationField("fields") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "project_name", + "model_name", + "source_connection_name", + "view_name", + "sql_table_name", + "project", + "model", + "fields", + ] + + @property + def project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.project_name + + @project_name.setter + def project_name(self, project_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_name = project_name + + @property + def model_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_name + + @model_name.setter + def model_name(self, model_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_name = model_name + + @property + def source_connection_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.source_connection_name + ) + + @source_connection_name.setter + def source_connection_name(self, source_connection_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_connection_name = source_connection_name + + @property + def view_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.view_name + + @view_name.setter + def view_name(self, view_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.view_name = view_name + + @property + def sql_table_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.sql_table_name + + @sql_table_name.setter + def sql_table_name(self, sql_table_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.sql_table_name = sql_table_name + + @property + def project(self) -> Optional[LookerProject]: + return None if self.attributes is None else self.attributes.project + + @project.setter + def project(self, project: Optional[LookerProject]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project = project + + @property + def model(self) -> Optional[LookerModel]: + return None if self.attributes is None else self.attributes.model + + @model.setter + def model(self, model: Optional[LookerModel]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model = model + + @property + def fields(self) -> Optional[list[LookerField]]: + return None if self.attributes is None else self.attributes.fields + + @fields.setter + def fields(self, fields: Optional[list[LookerField]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.fields = fields + + class Attributes(Looker.Attributes): + project_name: Optional[str] = Field(None, description="", alias="projectName") + model_name: Optional[str] = Field(None, description="", alias="modelName") + source_connection_name: Optional[str] = Field( + None, description="", alias="sourceConnectionName" + ) + view_name: Optional[str] = Field(None, description="", alias="viewName") + sql_table_name: Optional[str] = Field( + None, description="", alias="sqlTableName" + ) + project: Optional[LookerProject] = Field( + None, description="", alias="project" + ) # relationship + model: Optional[LookerModel] = Field( + None, description="", alias="model" + ) # relationship + fields: Optional[list[LookerField]] = Field( + None, description="", alias="fields" + ) # relationship + + attributes: "LookerExplore.Attributes" = Field( + default_factory=lambda: LookerExplore.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class LookerProject(Looker): + """Description""" + + type_name: str = Field("LookerProject", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "LookerProject": + raise ValueError("must be LookerProject") + return v + + def __setattr__(self, name, value): + if name in LookerProject._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MODELS: ClassVar[RelationField] = RelationField("models") + """ + TBC + """ + EXPLORES: ClassVar[RelationField] = RelationField("explores") + """ + TBC + """ + FIELDS: ClassVar[RelationField] = RelationField("fields") + """ + TBC + """ + VIEWS: ClassVar[RelationField] = RelationField("views") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "models", + "explores", + "fields", + "views", + ] + + @property + def models(self) -> Optional[list[LookerModel]]: + return None if self.attributes is None else self.attributes.models + + @models.setter + def models(self, models: Optional[list[LookerModel]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.models = models + + @property + def explores(self) -> Optional[list[LookerExplore]]: + return None if self.attributes is None else self.attributes.explores + + @explores.setter + def explores(self, explores: Optional[list[LookerExplore]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.explores = explores + + @property + def fields(self) -> Optional[list[LookerField]]: + return None if self.attributes is None else self.attributes.fields + + @fields.setter + def fields(self, fields: Optional[list[LookerField]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.fields = fields + + @property + def views(self) -> Optional[list[LookerView]]: + return None if self.attributes is None else self.attributes.views + + @views.setter + def views(self, views: Optional[list[LookerView]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.views = views + + class Attributes(Looker.Attributes): + models: Optional[list[LookerModel]] = Field( + None, description="", alias="models" + ) # relationship + explores: Optional[list[LookerExplore]] = Field( + None, description="", alias="explores" + ) # relationship + fields: Optional[list[LookerField]] = Field( + None, description="", alias="fields" + ) # relationship + views: Optional[list[LookerView]] = Field( + None, description="", alias="views" + ) # relationship + + attributes: "LookerProject.Attributes" = Field( + default_factory=lambda: LookerProject.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class LookerQuery(Looker): + """Description""" + + type_name: str = Field("LookerQuery", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "LookerQuery": + raise ValueError("must be LookerQuery") + return v + + def __setattr__(self, name, value): + if name in LookerQuery._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SOURCE_DEFINITION: ClassVar[KeywordField] = KeywordField( + "sourceDefinition", "sourceDefinition" + ) + """ + TBC + """ + SOURCE_DEFINITION_DATABASE: ClassVar[KeywordField] = KeywordField( + "sourceDefinitionDatabase", "sourceDefinitionDatabase" + ) + """ + TBC + """ + SOURCE_DEFINITION_SCHEMA: ClassVar[KeywordField] = KeywordField( + "sourceDefinitionSchema", "sourceDefinitionSchema" + ) + """ + TBC + """ + FIELDS: ClassVar[KeywordField] = KeywordField("fields", "fields") + """ + TBC + """ + + TILES: ClassVar[RelationField] = RelationField("tiles") + """ + TBC + """ + LOOKS: ClassVar[RelationField] = RelationField("looks") + """ + TBC + """ + MODEL: ClassVar[RelationField] = RelationField("model") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "source_definition", + "source_definition_database", + "source_definition_schema", + "fields", + "tiles", + "looks", + "model", + ] + + @property + def source_definition(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.source_definition + + @source_definition.setter + def source_definition(self, source_definition: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_definition = source_definition + + @property + def source_definition_database(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.source_definition_database + ) + + @source_definition_database.setter + def source_definition_database(self, source_definition_database: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_definition_database = source_definition_database + + @property + def source_definition_schema(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.source_definition_schema + ) + + @source_definition_schema.setter + def source_definition_schema(self, source_definition_schema: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_definition_schema = source_definition_schema + + @property + def fields(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.fields + + @fields.setter + def fields(self, fields: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.fields = fields + + @property + def tiles(self) -> Optional[list[LookerTile]]: + return None if self.attributes is None else self.attributes.tiles + + @tiles.setter + def tiles(self, tiles: Optional[list[LookerTile]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tiles = tiles + + @property + def looks(self) -> Optional[list[LookerLook]]: + return None if self.attributes is None else self.attributes.looks + + @looks.setter + def looks(self, looks: Optional[list[LookerLook]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.looks = looks + + @property + def model(self) -> Optional[LookerModel]: + return None if self.attributes is None else self.attributes.model + + @model.setter + def model(self, model: Optional[LookerModel]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model = model + + class Attributes(Looker.Attributes): + source_definition: Optional[str] = Field( + None, description="", alias="sourceDefinition" + ) + source_definition_database: Optional[str] = Field( + None, description="", alias="sourceDefinitionDatabase" + ) + source_definition_schema: Optional[str] = Field( + None, description="", alias="sourceDefinitionSchema" + ) + fields: Optional[set[str]] = Field(None, description="", alias="fields") + tiles: Optional[list[LookerTile]] = Field( + None, description="", alias="tiles" + ) # relationship + looks: Optional[list[LookerLook]] = Field( + None, description="", alias="looks" + ) # relationship + model: Optional[LookerModel] = Field( + None, description="", alias="model" + ) # relationship + + attributes: "LookerQuery.Attributes" = Field( + default_factory=lambda: LookerQuery.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class LookerField(Looker): """Description""" - type_name: str = Field("RedashDashboard", allow_mutation=False) + type_name: str = Field("LookerField", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "RedashDashboard": - raise ValueError("must be RedashDashboard") + if v != "LookerField": + raise ValueError("must be LookerField") return v def __setattr__(self, name, value): - if name in RedashDashboard._convience_properties: + if name in LookerField._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "redash_dashboard_widget_count", + PROJECT_NAME: ClassVar[KeywordField] = KeywordField("projectName", "projectName") + """ + TBC + """ + LOOKER_EXPLORE_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "lookerExploreQualifiedName", + "lookerExploreQualifiedName", + "lookerExploreQualifiedName.text", + ) + """ + TBC + """ + LOOKER_VIEW_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "lookerViewQualifiedName", + "lookerViewQualifiedName", + "lookerViewQualifiedName.text", + ) + """ + TBC + """ + MODEL_NAME: ClassVar[KeywordField] = KeywordField("modelName", "modelName") + """ + TBC + """ + SOURCE_DEFINITION: ClassVar[KeywordField] = KeywordField( + "sourceDefinition", "sourceDefinition" + ) + """ + TBC + """ + LOOKER_FIELD_DATA_TYPE: ClassVar[KeywordField] = KeywordField( + "lookerFieldDataType", "lookerFieldDataType" + ) + """ + TBC + """ + LOOKER_TIMES_USED: ClassVar[NumericField] = NumericField( + "lookerTimesUsed", "lookerTimesUsed" + ) + """ + TBC + """ + + EXPLORE: ClassVar[RelationField] = RelationField("explore") + """ + TBC + """ + PROJECT: ClassVar[RelationField] = RelationField("project") + """ + TBC + """ + VIEW: ClassVar[RelationField] = RelationField("view") + """ + TBC + """ + MODEL: ClassVar[RelationField] = RelationField("model") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "project_name", + "looker_explore_qualified_name", + "looker_view_qualified_name", + "model_name", + "source_definition", + "looker_field_data_type", + "looker_times_used", + "explore", + "project", + "view", + "model", ] @property - def redash_dashboard_widget_count(self) -> Optional[int]: + def project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.project_name + + @project_name.setter + def project_name(self, project_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_name = project_name + + @property + def looker_explore_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.redash_dashboard_widget_count + else self.attributes.looker_explore_qualified_name ) - @redash_dashboard_widget_count.setter - def redash_dashboard_widget_count( - self, redash_dashboard_widget_count: Optional[int] + @looker_explore_qualified_name.setter + def looker_explore_qualified_name( + self, looker_explore_qualified_name: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.redash_dashboard_widget_count = redash_dashboard_widget_count + self.attributes.looker_explore_qualified_name = looker_explore_qualified_name + + @property + def looker_view_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.looker_view_qualified_name + ) + + @looker_view_qualified_name.setter + def looker_view_qualified_name(self, looker_view_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.looker_view_qualified_name = looker_view_qualified_name + + @property + def model_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.model_name + + @model_name.setter + def model_name(self, model_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model_name = model_name + + @property + def source_definition(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.source_definition + + @source_definition.setter + def source_definition(self, source_definition: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_definition = source_definition + + @property + def looker_field_data_type(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.looker_field_data_type + ) + + @looker_field_data_type.setter + def looker_field_data_type(self, looker_field_data_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.looker_field_data_type = looker_field_data_type + + @property + def looker_times_used(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.looker_times_used + + @looker_times_used.setter + def looker_times_used(self, looker_times_used: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.looker_times_used = looker_times_used + + @property + def explore(self) -> Optional[LookerExplore]: + return None if self.attributes is None else self.attributes.explore + + @explore.setter + def explore(self, explore: Optional[LookerExplore]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.explore = explore + + @property + def project(self) -> Optional[LookerProject]: + return None if self.attributes is None else self.attributes.project + + @project.setter + def project(self, project: Optional[LookerProject]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project = project + + @property + def view(self) -> Optional[LookerView]: + return None if self.attributes is None else self.attributes.view + + @view.setter + def view(self, view: Optional[LookerView]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.view = view + + @property + def model(self) -> Optional[LookerModel]: + return None if self.attributes is None else self.attributes.model + + @model.setter + def model(self, model: Optional[LookerModel]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.model = model + + class Attributes(Looker.Attributes): + project_name: Optional[str] = Field(None, description="", alias="projectName") + looker_explore_qualified_name: Optional[str] = Field( + None, description="", alias="lookerExploreQualifiedName" + ) + looker_view_qualified_name: Optional[str] = Field( + None, description="", alias="lookerViewQualifiedName" + ) + model_name: Optional[str] = Field(None, description="", alias="modelName") + source_definition: Optional[str] = Field( + None, description="", alias="sourceDefinition" + ) + looker_field_data_type: Optional[str] = Field( + None, description="", alias="lookerFieldDataType" + ) + looker_times_used: Optional[int] = Field( + None, description="", alias="lookerTimesUsed" + ) + explore: Optional[LookerExplore] = Field( + None, description="", alias="explore" + ) # relationship + project: Optional[LookerProject] = Field( + None, description="", alias="project" + ) # relationship + view: Optional[LookerView] = Field( + None, description="", alias="view" + ) # relationship + model: Optional[LookerModel] = Field( + None, description="", alias="model" + ) # relationship + + attributes: "LookerField.Attributes" = Field( + default_factory=lambda: LookerField.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class LookerView(Looker): + """Description""" + + type_name: str = Field("LookerView", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "LookerView": + raise ValueError("must be LookerView") + return v + + def __setattr__(self, name, value): + if name in LookerView._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + PROJECT_NAME: ClassVar[KeywordField] = KeywordField("projectName", "projectName") + """ + TBC + """ + LOOKER_VIEW_FILE_PATH: ClassVar[KeywordField] = KeywordField( + "lookerViewFilePath", "lookerViewFilePath" + ) + """ + File path of the looker view in the project + """ + LOOKER_VIEW_FILE_NAME: ClassVar[KeywordField] = KeywordField( + "lookerViewFileName", "lookerViewFileName" + ) + """ + File name of the looker view in the project + """ + + PROJECT: ClassVar[RelationField] = RelationField("project") + """ + TBC + """ + FIELDS: ClassVar[RelationField] = RelationField("fields") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "project_name", + "looker_view_file_path", + "looker_view_file_name", + "project", + "fields", + ] + + @property + def project_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.project_name + + @project_name.setter + def project_name(self, project_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project_name = project_name + + @property + def looker_view_file_path(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.looker_view_file_path + ) + + @looker_view_file_path.setter + def looker_view_file_path(self, looker_view_file_path: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.looker_view_file_path = looker_view_file_path + + @property + def looker_view_file_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.looker_view_file_name + ) + + @looker_view_file_name.setter + def looker_view_file_name(self, looker_view_file_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.looker_view_file_name = looker_view_file_name + + @property + def project(self) -> Optional[LookerProject]: + return None if self.attributes is None else self.attributes.project + + @project.setter + def project(self, project: Optional[LookerProject]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.project = project - class Attributes(Redash.Attributes): - redash_dashboard_widget_count: Optional[int] = Field( - None, description="", alias="redashDashboardWidgetCount" + @property + def fields(self) -> Optional[list[LookerField]]: + return None if self.attributes is None else self.attributes.fields + + @fields.setter + def fields(self, fields: Optional[list[LookerField]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.fields = fields + + class Attributes(Looker.Attributes): + project_name: Optional[str] = Field(None, description="", alias="projectName") + looker_view_file_path: Optional[str] = Field( + None, description="", alias="lookerViewFilePath" + ) + looker_view_file_name: Optional[str] = Field( + None, description="", alias="lookerViewFileName" ) + project: Optional[LookerProject] = Field( + None, description="", alias="project" + ) # relationship + fields: Optional[list[LookerField]] = Field( + None, description="", alias="fields" + ) # relationship - attributes: "RedashDashboard.Attributes" = Field( - default_factory=lambda: RedashDashboard.Attributes(), + attributes: "LookerView.Attributes" = Field( + default_factory=lambda: LookerView.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -RedashDashboard.Attributes.update_forward_refs() +LookerLook.Attributes.update_forward_refs() + + +LookerDashboard.Attributes.update_forward_refs() + + +LookerFolder.Attributes.update_forward_refs() + + +LookerTile.Attributes.update_forward_refs() + + +LookerModel.Attributes.update_forward_refs() + + +LookerExplore.Attributes.update_forward_refs() + + +LookerProject.Attributes.update_forward_refs() + + +LookerQuery.Attributes.update_forward_refs() + + +LookerField.Attributes.update_forward_refs() + + +LookerView.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset65.py b/pyatlan/model/assets/asset65.py index f0f4a5aa8..51f0e1a91 100644 --- a/pyatlan/model/assets/asset65.py +++ b/pyatlan/model/assets/asset65.py @@ -4,263 +4,68 @@ from __future__ import annotations -from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset40 import Redash +from pyatlan.model.fields.atlan_fields import NumericField +from .asset41 import Redash -class RedashQuery(Redash): + +class RedashDashboard(Redash): """Description""" - type_name: str = Field("RedashQuery", allow_mutation=False) + type_name: str = Field("RedashDashboard", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "RedashQuery": - raise ValueError("must be RedashQuery") + if v != "RedashDashboard": + raise ValueError("must be RedashDashboard") return v def __setattr__(self, name, value): - if name in RedashQuery._convience_properties: + if name in RedashDashboard._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "redash_query_s_q_l", - "redash_query_parameters", - "redash_query_schedule", - "redash_query_last_execution_runtime", - "redash_query_last_executed_at", - "redash_query_schedule_humanized", - "redash_visualizations", - ] - - @property - def redash_query_s_q_l(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.redash_query_s_q_l - - @redash_query_s_q_l.setter - def redash_query_s_q_l(self, redash_query_s_q_l: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_query_s_q_l = redash_query_s_q_l - - @property - def redash_query_parameters(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.redash_query_parameters - ) - - @redash_query_parameters.setter - def redash_query_parameters(self, redash_query_parameters: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_query_parameters = redash_query_parameters - - @property - def redash_query_schedule(self) -> Optional[dict[str, str]]: - return ( - None if self.attributes is None else self.attributes.redash_query_schedule - ) - - @redash_query_schedule.setter - def redash_query_schedule(self, redash_query_schedule: Optional[dict[str, str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_query_schedule = redash_query_schedule - - @property - def redash_query_last_execution_runtime(self) -> Optional[float]: - return ( - None - if self.attributes is None - else self.attributes.redash_query_last_execution_runtime - ) - - @redash_query_last_execution_runtime.setter - def redash_query_last_execution_runtime( - self, redash_query_last_execution_runtime: Optional[float] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_query_last_execution_runtime = ( - redash_query_last_execution_runtime - ) - - @property - def redash_query_last_executed_at(self) -> Optional[datetime]: - return ( - None - if self.attributes is None - else self.attributes.redash_query_last_executed_at - ) - - @redash_query_last_executed_at.setter - def redash_query_last_executed_at( - self, redash_query_last_executed_at: Optional[datetime] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_query_last_executed_at = redash_query_last_executed_at - - @property - def redash_query_schedule_humanized(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.redash_query_schedule_humanized - ) - - @redash_query_schedule_humanized.setter - def redash_query_schedule_humanized( - self, redash_query_schedule_humanized: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_query_schedule_humanized = ( - redash_query_schedule_humanized - ) - - @property - def redash_visualizations(self) -> Optional[list[RedashVisualization]]: - return ( - None if self.attributes is None else self.attributes.redash_visualizations - ) - - @redash_visualizations.setter - def redash_visualizations( - self, redash_visualizations: Optional[list[RedashVisualization]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_visualizations = redash_visualizations - - class Attributes(Redash.Attributes): - redash_query_s_q_l: Optional[str] = Field( - None, description="", alias="redashQuerySQL" - ) - redash_query_parameters: Optional[str] = Field( - None, description="", alias="redashQueryParameters" - ) - redash_query_schedule: Optional[dict[str, str]] = Field( - None, description="", alias="redashQuerySchedule" - ) - redash_query_last_execution_runtime: Optional[float] = Field( - None, description="", alias="redashQueryLastExecutionRuntime" - ) - redash_query_last_executed_at: Optional[datetime] = Field( - None, description="", alias="redashQueryLastExecutedAt" - ) - redash_query_schedule_humanized: Optional[str] = Field( - None, description="", alias="redashQueryScheduleHumanized" - ) - redash_visualizations: Optional[list[RedashVisualization]] = Field( - None, description="", alias="redashVisualizations" - ) # relationship - - attributes: "RedashQuery.Attributes" = Field( - default_factory=lambda: RedashQuery.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", + REDASH_DASHBOARD_WIDGET_COUNT: ClassVar[NumericField] = NumericField( + "redashDashboardWidgetCount", "redashDashboardWidgetCount" ) + """ + Number of widgets in the Redash Dashboard + """ - -class RedashVisualization(Redash): - """Description""" - - type_name: str = Field("RedashVisualization", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "RedashVisualization": - raise ValueError("must be RedashVisualization") - return v - - def __setattr__(self, name, value): - if name in RedashVisualization._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "redash_visualization_type", - "redash_query_name", - "redash_query_qualified_name", - "redash_query", + _convenience_properties: ClassVar[list[str]] = [ + "redash_dashboard_widget_count", ] @property - def redash_visualization_type(self) -> Optional[str]: + def redash_dashboard_widget_count(self) -> Optional[int]: return ( None if self.attributes is None - else self.attributes.redash_visualization_type + else self.attributes.redash_dashboard_widget_count ) - @redash_visualization_type.setter - def redash_visualization_type(self, redash_visualization_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_visualization_type = redash_visualization_type - - @property - def redash_query_name(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.redash_query_name - - @redash_query_name.setter - def redash_query_name(self, redash_query_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_query_name = redash_query_name - - @property - def redash_query_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.redash_query_qualified_name - ) - - @redash_query_qualified_name.setter - def redash_query_qualified_name(self, redash_query_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.redash_query_qualified_name = redash_query_qualified_name - - @property - def redash_query(self) -> Optional[RedashQuery]: - return None if self.attributes is None else self.attributes.redash_query - - @redash_query.setter - def redash_query(self, redash_query: Optional[RedashQuery]): + @redash_dashboard_widget_count.setter + def redash_dashboard_widget_count( + self, redash_dashboard_widget_count: Optional[int] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.redash_query = redash_query + self.attributes.redash_dashboard_widget_count = redash_dashboard_widget_count class Attributes(Redash.Attributes): - redash_visualization_type: Optional[str] = Field( - None, description="", alias="redashVisualizationType" - ) - redash_query_name: Optional[str] = Field( - None, description="", alias="redashQueryName" + redash_dashboard_widget_count: Optional[int] = Field( + None, description="", alias="redashDashboardWidgetCount" ) - redash_query_qualified_name: Optional[str] = Field( - None, description="", alias="redashQueryQualifiedName" - ) - redash_query: Optional[RedashQuery] = Field( - None, description="", alias="redashQuery" - ) # relationship - attributes: "RedashVisualization.Attributes" = Field( - default_factory=lambda: RedashVisualization.Attributes(), + attributes: "RedashDashboard.Attributes" = Field( + default_factory=lambda: RedashDashboard.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -RedashQuery.Attributes.update_forward_refs() - - -RedashVisualization.Attributes.update_forward_refs() +RedashDashboard.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset66.py b/pyatlan/model/assets/asset66.py index bfc19a9a4..b42cd5961 100644 --- a/pyatlan/model/assets/asset66.py +++ b/pyatlan/model/assets/asset66.py @@ -4,313 +4,341 @@ from __future__ import annotations +from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset42 import Metabase +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, + RelationField, + TextField, +) +from .asset41 import Redash -class MetabaseQuestion(Metabase): + +class RedashQuery(Redash): """Description""" - type_name: str = Field("MetabaseQuestion", allow_mutation=False) + type_name: str = Field("RedashQuery", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MetabaseQuestion": - raise ValueError("must be MetabaseQuestion") + if v != "RedashQuery": + raise ValueError("must be RedashQuery") return v def __setattr__(self, name, value): - if name in MetabaseQuestion._convience_properties: + if name in RedashQuery._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "metabase_dashboard_count", - "metabase_query_type", - "metabase_query", - "metabase_dashboards", - "metabase_collection", + REDASH_QUERY_SQL: ClassVar[KeywordField] = KeywordField( + "redashQuerySQL", "redashQuerySQL" + ) + """ + SQL code of Redash Query + """ + REDASH_QUERY_PARAMETERS: ClassVar[KeywordField] = KeywordField( + "redashQueryParameters", "redashQueryParameters" + ) + """ + Parameters of Redash Query + """ + REDASH_QUERY_SCHEDULE: ClassVar[KeywordField] = KeywordField( + "redashQuerySchedule", "redashQuerySchedule" + ) + """ + Schedule of Redash Query + """ + REDASH_QUERY_LAST_EXECUTION_RUNTIME: ClassVar[NumericField] = NumericField( + "redashQueryLastExecutionRuntime", "redashQueryLastExecutionRuntime" + ) + """ + Runtime of Redash Query + """ + REDASH_QUERY_LAST_EXECUTED_AT: ClassVar[NumericField] = NumericField( + "redashQueryLastExecutedAt", "redashQueryLastExecutedAt" + ) + """ + Time when the Redash Query was last executed + """ + REDASH_QUERY_SCHEDULE_HUMANIZED: ClassVar[TextField] = TextField( + "redashQueryScheduleHumanized", "redashQueryScheduleHumanized.text" + ) + """ + Query schedule for overview tab and filtering. + """ + + REDASH_VISUALIZATIONS: ClassVar[RelationField] = RelationField( + "redashVisualizations" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "redash_query_s_q_l", + "redash_query_parameters", + "redash_query_schedule", + "redash_query_last_execution_runtime", + "redash_query_last_executed_at", + "redash_query_schedule_humanized", + "redash_visualizations", ] @property - def metabase_dashboard_count(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.metabase_dashboard_count - ) + def redash_query_s_q_l(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.redash_query_s_q_l - @metabase_dashboard_count.setter - def metabase_dashboard_count(self, metabase_dashboard_count: Optional[int]): + @redash_query_s_q_l.setter + def redash_query_s_q_l(self, redash_query_s_q_l: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_dashboard_count = metabase_dashboard_count + self.attributes.redash_query_s_q_l = redash_query_s_q_l @property - def metabase_query_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.metabase_query_type + def redash_query_parameters(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.redash_query_parameters + ) - @metabase_query_type.setter - def metabase_query_type(self, metabase_query_type: Optional[str]): + @redash_query_parameters.setter + def redash_query_parameters(self, redash_query_parameters: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_query_type = metabase_query_type + self.attributes.redash_query_parameters = redash_query_parameters @property - def metabase_query(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.metabase_query + def redash_query_schedule(self) -> Optional[dict[str, str]]: + return ( + None if self.attributes is None else self.attributes.redash_query_schedule + ) - @metabase_query.setter - def metabase_query(self, metabase_query: Optional[str]): + @redash_query_schedule.setter + def redash_query_schedule(self, redash_query_schedule: Optional[dict[str, str]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_query = metabase_query + self.attributes.redash_query_schedule = redash_query_schedule @property - def metabase_dashboards(self) -> Optional[list[MetabaseDashboard]]: - return None if self.attributes is None else self.attributes.metabase_dashboards + def redash_query_last_execution_runtime(self) -> Optional[float]: + return ( + None + if self.attributes is None + else self.attributes.redash_query_last_execution_runtime + ) - @metabase_dashboards.setter - def metabase_dashboards( - self, metabase_dashboards: Optional[list[MetabaseDashboard]] + @redash_query_last_execution_runtime.setter + def redash_query_last_execution_runtime( + self, redash_query_last_execution_runtime: Optional[float] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_dashboards = metabase_dashboards - - @property - def metabase_collection(self) -> Optional[MetabaseCollection]: - return None if self.attributes is None else self.attributes.metabase_collection - - @metabase_collection.setter - def metabase_collection(self, metabase_collection: Optional[MetabaseCollection]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.metabase_collection = metabase_collection - - class Attributes(Metabase.Attributes): - metabase_dashboard_count: Optional[int] = Field( - None, description="", alias="metabaseDashboardCount" + self.attributes.redash_query_last_execution_runtime = ( + redash_query_last_execution_runtime ) - metabase_query_type: Optional[str] = Field( - None, description="", alias="metabaseQueryType" - ) - metabase_query: Optional[str] = Field( - None, description="", alias="metabaseQuery" - ) - metabase_dashboards: Optional[list[MetabaseDashboard]] = Field( - None, description="", alias="metabaseDashboards" - ) # relationship - metabase_collection: Optional[MetabaseCollection] = Field( - None, description="", alias="metabaseCollection" - ) # relationship - - attributes: "MetabaseQuestion.Attributes" = Field( - default_factory=lambda: MetabaseQuestion.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class MetabaseCollection(Metabase): - """Description""" - - type_name: str = Field("MetabaseCollection", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "MetabaseCollection": - raise ValueError("must be MetabaseCollection") - return v - - def __setattr__(self, name, value): - if name in MetabaseCollection._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "metabase_slug", - "metabase_color", - "metabase_namespace", - "metabase_is_personal_collection", - "metabase_dashboards", - "metabase_questions", - ] - - @property - def metabase_slug(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.metabase_slug - - @metabase_slug.setter - def metabase_slug(self, metabase_slug: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.metabase_slug = metabase_slug - - @property - def metabase_color(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.metabase_color - - @metabase_color.setter - def metabase_color(self, metabase_color: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.metabase_color = metabase_color @property - def metabase_namespace(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.metabase_namespace + def redash_query_last_executed_at(self) -> Optional[datetime]: + return ( + None + if self.attributes is None + else self.attributes.redash_query_last_executed_at + ) - @metabase_namespace.setter - def metabase_namespace(self, metabase_namespace: Optional[str]): + @redash_query_last_executed_at.setter + def redash_query_last_executed_at( + self, redash_query_last_executed_at: Optional[datetime] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_namespace = metabase_namespace + self.attributes.redash_query_last_executed_at = redash_query_last_executed_at @property - def metabase_is_personal_collection(self) -> Optional[bool]: + def redash_query_schedule_humanized(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.metabase_is_personal_collection + else self.attributes.redash_query_schedule_humanized ) - @metabase_is_personal_collection.setter - def metabase_is_personal_collection( - self, metabase_is_personal_collection: Optional[bool] + @redash_query_schedule_humanized.setter + def redash_query_schedule_humanized( + self, redash_query_schedule_humanized: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_is_personal_collection = ( - metabase_is_personal_collection + self.attributes.redash_query_schedule_humanized = ( + redash_query_schedule_humanized ) @property - def metabase_dashboards(self) -> Optional[list[MetabaseDashboard]]: - return None if self.attributes is None else self.attributes.metabase_dashboards + def redash_visualizations(self) -> Optional[list[RedashVisualization]]: + return ( + None if self.attributes is None else self.attributes.redash_visualizations + ) - @metabase_dashboards.setter - def metabase_dashboards( - self, metabase_dashboards: Optional[list[MetabaseDashboard]] + @redash_visualizations.setter + def redash_visualizations( + self, redash_visualizations: Optional[list[RedashVisualization]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_dashboards = metabase_dashboards - - @property - def metabase_questions(self) -> Optional[list[MetabaseQuestion]]: - return None if self.attributes is None else self.attributes.metabase_questions - - @metabase_questions.setter - def metabase_questions(self, metabase_questions: Optional[list[MetabaseQuestion]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.metabase_questions = metabase_questions + self.attributes.redash_visualizations = redash_visualizations - class Attributes(Metabase.Attributes): - metabase_slug: Optional[str] = Field(None, description="", alias="metabaseSlug") - metabase_color: Optional[str] = Field( - None, description="", alias="metabaseColor" + class Attributes(Redash.Attributes): + redash_query_s_q_l: Optional[str] = Field( + None, description="", alias="redashQuerySQL" ) - metabase_namespace: Optional[str] = Field( - None, description="", alias="metabaseNamespace" + redash_query_parameters: Optional[str] = Field( + None, description="", alias="redashQueryParameters" ) - metabase_is_personal_collection: Optional[bool] = Field( - None, description="", alias="metabaseIsPersonalCollection" + redash_query_schedule: Optional[dict[str, str]] = Field( + None, description="", alias="redashQuerySchedule" ) - metabase_dashboards: Optional[list[MetabaseDashboard]] = Field( - None, description="", alias="metabaseDashboards" - ) # relationship - metabase_questions: Optional[list[MetabaseQuestion]] = Field( - None, description="", alias="metabaseQuestions" + redash_query_last_execution_runtime: Optional[float] = Field( + None, description="", alias="redashQueryLastExecutionRuntime" + ) + redash_query_last_executed_at: Optional[datetime] = Field( + None, description="", alias="redashQueryLastExecutedAt" + ) + redash_query_schedule_humanized: Optional[str] = Field( + None, description="", alias="redashQueryScheduleHumanized" + ) + redash_visualizations: Optional[list[RedashVisualization]] = Field( + None, description="", alias="redashVisualizations" ) # relationship - attributes: "MetabaseCollection.Attributes" = Field( - default_factory=lambda: MetabaseCollection.Attributes(), + attributes: "RedashQuery.Attributes" = Field( + default_factory=lambda: RedashQuery.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class MetabaseDashboard(Metabase): +class RedashVisualization(Redash): """Description""" - type_name: str = Field("MetabaseDashboard", allow_mutation=False) + type_name: str = Field("RedashVisualization", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MetabaseDashboard": - raise ValueError("must be MetabaseDashboard") + if v != "RedashVisualization": + raise ValueError("must be RedashVisualization") return v def __setattr__(self, name, value): - if name in MetabaseDashboard._convience_properties: + if name in RedashVisualization._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "metabase_question_count", - "metabase_questions", - "metabase_collection", + REDASH_VISUALIZATION_TYPE: ClassVar[RelationField] = RelationField( + "redashVisualizationType" + ) + """ + Redash Visualization Type + """ + REDASH_QUERY_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "redashQueryName", "redashQueryName.keyword", "redashQueryName" + ) + """ + Redash Query from which visualization is created + """ + REDASH_QUERY_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "redashQueryQualifiedName", + "redashQueryQualifiedName", + "redashQueryQualifiedName.text", + ) + """ + Qualified name of the Redash Query from which visualization is created + """ + + REDASH_QUERY: ClassVar[RelationField] = RelationField("redashQuery") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "redash_visualization_type", + "redash_query_name", + "redash_query_qualified_name", + "redash_query", ] @property - def metabase_question_count(self) -> Optional[int]: + def redash_visualization_type(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.metabase_question_count + None + if self.attributes is None + else self.attributes.redash_visualization_type ) - @metabase_question_count.setter - def metabase_question_count(self, metabase_question_count: Optional[int]): + @redash_visualization_type.setter + def redash_visualization_type(self, redash_visualization_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_question_count = metabase_question_count + self.attributes.redash_visualization_type = redash_visualization_type @property - def metabase_questions(self) -> Optional[list[MetabaseQuestion]]: - return None if self.attributes is None else self.attributes.metabase_questions + def redash_query_name(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.redash_query_name - @metabase_questions.setter - def metabase_questions(self, metabase_questions: Optional[list[MetabaseQuestion]]): + @redash_query_name.setter + def redash_query_name(self, redash_query_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_questions = metabase_questions + self.attributes.redash_query_name = redash_query_name @property - def metabase_collection(self) -> Optional[MetabaseCollection]: - return None if self.attributes is None else self.attributes.metabase_collection + def redash_query_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.redash_query_qualified_name + ) + + @redash_query_qualified_name.setter + def redash_query_qualified_name(self, redash_query_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.redash_query_qualified_name = redash_query_qualified_name + + @property + def redash_query(self) -> Optional[RedashQuery]: + return None if self.attributes is None else self.attributes.redash_query - @metabase_collection.setter - def metabase_collection(self, metabase_collection: Optional[MetabaseCollection]): + @redash_query.setter + def redash_query(self, redash_query: Optional[RedashQuery]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.metabase_collection = metabase_collection + self.attributes.redash_query = redash_query - class Attributes(Metabase.Attributes): - metabase_question_count: Optional[int] = Field( - None, description="", alias="metabaseQuestionCount" + class Attributes(Redash.Attributes): + redash_visualization_type: Optional[str] = Field( + None, description="", alias="redashVisualizationType" ) - metabase_questions: Optional[list[MetabaseQuestion]] = Field( - None, description="", alias="metabaseQuestions" - ) # relationship - metabase_collection: Optional[MetabaseCollection] = Field( - None, description="", alias="metabaseCollection" + redash_query_name: Optional[str] = Field( + None, description="", alias="redashQueryName" + ) + redash_query_qualified_name: Optional[str] = Field( + None, description="", alias="redashQueryQualifiedName" + ) + redash_query: Optional[RedashQuery] = Field( + None, description="", alias="redashQuery" ) # relationship - attributes: "MetabaseDashboard.Attributes" = Field( - default_factory=lambda: MetabaseDashboard.Attributes(), + attributes: "RedashVisualization.Attributes" = Field( + default_factory=lambda: RedashVisualization.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -MetabaseQuestion.Attributes.update_forward_refs() - - -MetabaseCollection.Attributes.update_forward_refs() +RedashQuery.Attributes.update_forward_refs() -MetabaseDashboard.Attributes.update_forward_refs() +RedashVisualization.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset67.py b/pyatlan/model/assets/asset67.py index 0c12e6ad1..21661c760 100644 --- a/pyatlan/model/assets/asset67.py +++ b/pyatlan/model/assets/asset67.py @@ -4,751 +4,398 @@ from __future__ import annotations -from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from pyatlan.model.enums import ( - QuickSightAnalysisStatus, - QuickSightDatasetFieldType, - QuickSightDatasetImportMode, - QuickSightFolderType, +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + NumericField, + RelationField, + TextField, ) -from .asset43 import QuickSight +from .asset43 import Metabase -class QuickSightFolder(QuickSight): +class MetabaseQuestion(Metabase): """Description""" - type_name: str = Field("QuickSightFolder", allow_mutation=False) + type_name: str = Field("MetabaseQuestion", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QuickSightFolder": - raise ValueError("must be QuickSightFolder") + if v != "MetabaseQuestion": + raise ValueError("must be MetabaseQuestion") return v def __setattr__(self, name, value): - if name in QuickSightFolder._convience_properties: + if name in MetabaseQuestion._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "quick_sight_folder_type", - "quick_sight_folder_hierarchy", - "quick_sight_dashboards", - "quick_sight_datasets", - "quick_sight_analyses", - ] - - @property - def quick_sight_folder_type(self) -> Optional[QuickSightFolderType]: - return ( - None if self.attributes is None else self.attributes.quick_sight_folder_type - ) - - @quick_sight_folder_type.setter - def quick_sight_folder_type( - self, quick_sight_folder_type: Optional[QuickSightFolderType] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_folder_type = quick_sight_folder_type - - @property - def quick_sight_folder_hierarchy(self) -> Optional[list[dict[str, str]]]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_folder_hierarchy - ) - - @quick_sight_folder_hierarchy.setter - def quick_sight_folder_hierarchy( - self, quick_sight_folder_hierarchy: Optional[list[dict[str, str]]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_folder_hierarchy = quick_sight_folder_hierarchy - - @property - def quick_sight_dashboards(self) -> Optional[list[QuickSightDashboard]]: - return ( - None if self.attributes is None else self.attributes.quick_sight_dashboards - ) - - @quick_sight_dashboards.setter - def quick_sight_dashboards( - self, quick_sight_dashboards: Optional[list[QuickSightDashboard]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_dashboards = quick_sight_dashboards - - @property - def quick_sight_datasets(self) -> Optional[list[QuickSightDataset]]: - return None if self.attributes is None else self.attributes.quick_sight_datasets - - @quick_sight_datasets.setter - def quick_sight_datasets( - self, quick_sight_datasets: Optional[list[QuickSightDataset]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_datasets = quick_sight_datasets - - @property - def quick_sight_analyses(self) -> Optional[list[QuickSightAnalysis]]: - return None if self.attributes is None else self.attributes.quick_sight_analyses - - @quick_sight_analyses.setter - def quick_sight_analyses( - self, quick_sight_analyses: Optional[list[QuickSightAnalysis]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_analyses = quick_sight_analyses - - class Attributes(QuickSight.Attributes): - quick_sight_folder_type: Optional[QuickSightFolderType] = Field( - None, description="", alias="quickSightFolderType" - ) - quick_sight_folder_hierarchy: Optional[list[dict[str, str]]] = Field( - None, description="", alias="quickSightFolderHierarchy" - ) - quick_sight_dashboards: Optional[list[QuickSightDashboard]] = Field( - None, description="", alias="quickSightDashboards" - ) # relationship - quick_sight_datasets: Optional[list[QuickSightDataset]] = Field( - None, description="", alias="quickSightDatasets" - ) # relationship - quick_sight_analyses: Optional[list[QuickSightAnalysis]] = Field( - None, description="", alias="quickSightAnalyses" - ) # relationship - - attributes: "QuickSightFolder.Attributes" = Field( - default_factory=lambda: QuickSightFolder.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", + METABASE_DASHBOARD_COUNT: ClassVar[NumericField] = NumericField( + "metabaseDashboardCount", "metabaseDashboardCount" ) - - -class QuickSightDashboardVisual(QuickSight): - """Description""" - - type_name: str = Field("QuickSightDashboardVisual", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "QuickSightDashboardVisual": - raise ValueError("must be QuickSightDashboardVisual") - return v - - def __setattr__(self, name, value): - if name in QuickSightDashboardVisual._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "quick_sight_dashboard_qualified_name", - "quick_sight_dashboard", - ] - - @property - def quick_sight_dashboard_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dashboard_qualified_name - ) - - @quick_sight_dashboard_qualified_name.setter - def quick_sight_dashboard_qualified_name( - self, quick_sight_dashboard_qualified_name: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_dashboard_qualified_name = ( - quick_sight_dashboard_qualified_name - ) - - @property - def quick_sight_dashboard(self) -> Optional[QuickSightDashboard]: - return ( - None if self.attributes is None else self.attributes.quick_sight_dashboard - ) - - @quick_sight_dashboard.setter - def quick_sight_dashboard( - self, quick_sight_dashboard: Optional[QuickSightDashboard] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_dashboard = quick_sight_dashboard - - class Attributes(QuickSight.Attributes): - quick_sight_dashboard_qualified_name: Optional[str] = Field( - None, description="", alias="quickSightDashboardQualifiedName" - ) - quick_sight_dashboard: Optional[QuickSightDashboard] = Field( - None, description="", alias="quickSightDashboard" - ) # relationship - - attributes: "QuickSightDashboardVisual.Attributes" = Field( - default_factory=lambda: QuickSightDashboardVisual.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", + """ + TBC + """ + METABASE_QUERY_TYPE: ClassVar[TextField] = TextField( + "metabaseQueryType", "metabaseQueryType.text" ) - - -class QuickSightAnalysisVisual(QuickSight): - """Description""" - - type_name: str = Field("QuickSightAnalysisVisual", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "QuickSightAnalysisVisual": - raise ValueError("must be QuickSightAnalysisVisual") - return v - - def __setattr__(self, name, value): - if name in QuickSightAnalysisVisual._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "quick_sight_analysis_qualified_name", - "quick_sight_analysis", + """ + TBC + """ + METABASE_QUERY: ClassVar[KeywordTextField] = KeywordTextField( + "metabaseQuery", "metabaseQuery.keyword", "metabaseQuery" + ) + """ + TBC + """ + + METABASE_DASHBOARDS: ClassVar[RelationField] = RelationField("metabaseDashboards") + """ + TBC + """ + METABASE_COLLECTION: ClassVar[RelationField] = RelationField("metabaseCollection") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "metabase_dashboard_count", + "metabase_query_type", + "metabase_query", + "metabase_dashboards", + "metabase_collection", ] @property - def quick_sight_analysis_qualified_name(self) -> Optional[str]: + def metabase_dashboard_count(self) -> Optional[int]: return ( None if self.attributes is None - else self.attributes.quick_sight_analysis_qualified_name + else self.attributes.metabase_dashboard_count ) - @quick_sight_analysis_qualified_name.setter - def quick_sight_analysis_qualified_name( - self, quick_sight_analysis_qualified_name: Optional[str] - ): + @metabase_dashboard_count.setter + def metabase_dashboard_count(self, metabase_dashboard_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_analysis_qualified_name = ( - quick_sight_analysis_qualified_name - ) + self.attributes.metabase_dashboard_count = metabase_dashboard_count @property - def quick_sight_analysis(self) -> Optional[QuickSightAnalysis]: - return None if self.attributes is None else self.attributes.quick_sight_analysis + def metabase_query_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.metabase_query_type - @quick_sight_analysis.setter - def quick_sight_analysis(self, quick_sight_analysis: Optional[QuickSightAnalysis]): + @metabase_query_type.setter + def metabase_query_type(self, metabase_query_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_analysis = quick_sight_analysis - - class Attributes(QuickSight.Attributes): - quick_sight_analysis_qualified_name: Optional[str] = Field( - None, description="", alias="quickSightAnalysisQualifiedName" - ) - quick_sight_analysis: Optional[QuickSightAnalysis] = Field( - None, description="", alias="quickSightAnalysis" - ) # relationship - - attributes: "QuickSightAnalysisVisual.Attributes" = Field( - default_factory=lambda: QuickSightAnalysisVisual.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class QuickSightDatasetField(QuickSight): - """Description""" - - type_name: str = Field("QuickSightDatasetField", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "QuickSightDatasetField": - raise ValueError("must be QuickSightDatasetField") - return v - - def __setattr__(self, name, value): - if name in QuickSightDatasetField._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "quick_sight_dataset_field_type", - "quick_sight_dataset_qualified_name", - "quick_sight_dataset", - ] + self.attributes.metabase_query_type = metabase_query_type @property - def quick_sight_dataset_field_type(self) -> Optional[QuickSightDatasetFieldType]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dataset_field_type - ) + def metabase_query(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.metabase_query - @quick_sight_dataset_field_type.setter - def quick_sight_dataset_field_type( - self, quick_sight_dataset_field_type: Optional[QuickSightDatasetFieldType] - ): + @metabase_query.setter + def metabase_query(self, metabase_query: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_dataset_field_type = quick_sight_dataset_field_type + self.attributes.metabase_query = metabase_query @property - def quick_sight_dataset_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dataset_qualified_name - ) + def metabase_dashboards(self) -> Optional[list[MetabaseDashboard]]: + return None if self.attributes is None else self.attributes.metabase_dashboards - @quick_sight_dataset_qualified_name.setter - def quick_sight_dataset_qualified_name( - self, quick_sight_dataset_qualified_name: Optional[str] + @metabase_dashboards.setter + def metabase_dashboards( + self, metabase_dashboards: Optional[list[MetabaseDashboard]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_dataset_qualified_name = ( - quick_sight_dataset_qualified_name - ) + self.attributes.metabase_dashboards = metabase_dashboards @property - def quick_sight_dataset(self) -> Optional[QuickSightDataset]: - return None if self.attributes is None else self.attributes.quick_sight_dataset + def metabase_collection(self) -> Optional[MetabaseCollection]: + return None if self.attributes is None else self.attributes.metabase_collection - @quick_sight_dataset.setter - def quick_sight_dataset(self, quick_sight_dataset: Optional[QuickSightDataset]): + @metabase_collection.setter + def metabase_collection(self, metabase_collection: Optional[MetabaseCollection]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_dataset = quick_sight_dataset + self.attributes.metabase_collection = metabase_collection - class Attributes(QuickSight.Attributes): - quick_sight_dataset_field_type: Optional[QuickSightDatasetFieldType] = Field( - None, description="", alias="quickSightDatasetFieldType" + class Attributes(Metabase.Attributes): + metabase_dashboard_count: Optional[int] = Field( + None, description="", alias="metabaseDashboardCount" + ) + metabase_query_type: Optional[str] = Field( + None, description="", alias="metabaseQueryType" ) - quick_sight_dataset_qualified_name: Optional[str] = Field( - None, description="", alias="quickSightDatasetQualifiedName" + metabase_query: Optional[str] = Field( + None, description="", alias="metabaseQuery" ) - quick_sight_dataset: Optional[QuickSightDataset] = Field( - None, description="", alias="quickSightDataset" + metabase_dashboards: Optional[list[MetabaseDashboard]] = Field( + None, description="", alias="metabaseDashboards" + ) # relationship + metabase_collection: Optional[MetabaseCollection] = Field( + None, description="", alias="metabaseCollection" ) # relationship - attributes: "QuickSightDatasetField.Attributes" = Field( - default_factory=lambda: QuickSightDatasetField.Attributes(), + attributes: "MetabaseQuestion.Attributes" = Field( + default_factory=lambda: MetabaseQuestion.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class QuickSightAnalysis(QuickSight): +class MetabaseCollection(Metabase): """Description""" - type_name: str = Field("QuickSightAnalysis", allow_mutation=False) + type_name: str = Field("MetabaseCollection", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QuickSightAnalysis": - raise ValueError("must be QuickSightAnalysis") + if v != "MetabaseCollection": + raise ValueError("must be MetabaseCollection") return v def __setattr__(self, name, value): - if name in QuickSightAnalysis._convience_properties: + if name in MetabaseCollection._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "quick_sight_analysis_status", - "quick_sight_analysis_calculated_fields", - "quick_sight_analysis_parameter_declarations", - "quick_sight_analysis_filter_groups", - "quick_sight_analysis_visuals", - "quick_sight_analysis_folders", + METABASE_SLUG: ClassVar[TextField] = TextField("metabaseSlug", "metabaseSlug.text") + """ + TBC + """ + METABASE_COLOR: ClassVar[KeywordField] = KeywordField( + "metabaseColor", "metabaseColor" + ) + """ + TBC + """ + METABASE_NAMESPACE: ClassVar[TextField] = TextField( + "metabaseNamespace", "metabaseNamespace.text" + ) + """ + TBC + """ + METABASE_IS_PERSONAL_COLLECTION: ClassVar[BooleanField] = BooleanField( + "metabaseIsPersonalCollection", "metabaseIsPersonalCollection" + ) + """ + TBC + """ + + METABASE_DASHBOARDS: ClassVar[RelationField] = RelationField("metabaseDashboards") + """ + TBC + """ + METABASE_QUESTIONS: ClassVar[RelationField] = RelationField("metabaseQuestions") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "metabase_slug", + "metabase_color", + "metabase_namespace", + "metabase_is_personal_collection", + "metabase_dashboards", + "metabase_questions", ] @property - def quick_sight_analysis_status(self) -> Optional[QuickSightAnalysisStatus]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_analysis_status - ) + def metabase_slug(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.metabase_slug - @quick_sight_analysis_status.setter - def quick_sight_analysis_status( - self, quick_sight_analysis_status: Optional[QuickSightAnalysisStatus] - ): + @metabase_slug.setter + def metabase_slug(self, metabase_slug: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_analysis_status = quick_sight_analysis_status + self.attributes.metabase_slug = metabase_slug @property - def quick_sight_analysis_calculated_fields(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_analysis_calculated_fields - ) + def metabase_color(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.metabase_color - @quick_sight_analysis_calculated_fields.setter - def quick_sight_analysis_calculated_fields( - self, quick_sight_analysis_calculated_fields: Optional[set[str]] - ): + @metabase_color.setter + def metabase_color(self, metabase_color: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_analysis_calculated_fields = ( - quick_sight_analysis_calculated_fields - ) + self.attributes.metabase_color = metabase_color @property - def quick_sight_analysis_parameter_declarations(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_analysis_parameter_declarations - ) + def metabase_namespace(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.metabase_namespace - @quick_sight_analysis_parameter_declarations.setter - def quick_sight_analysis_parameter_declarations( - self, quick_sight_analysis_parameter_declarations: Optional[set[str]] - ): + @metabase_namespace.setter + def metabase_namespace(self, metabase_namespace: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_analysis_parameter_declarations = ( - quick_sight_analysis_parameter_declarations - ) + self.attributes.metabase_namespace = metabase_namespace @property - def quick_sight_analysis_filter_groups(self) -> Optional[set[str]]: + def metabase_is_personal_collection(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.quick_sight_analysis_filter_groups + else self.attributes.metabase_is_personal_collection ) - @quick_sight_analysis_filter_groups.setter - def quick_sight_analysis_filter_groups( - self, quick_sight_analysis_filter_groups: Optional[set[str]] + @metabase_is_personal_collection.setter + def metabase_is_personal_collection( + self, metabase_is_personal_collection: Optional[bool] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_analysis_filter_groups = ( - quick_sight_analysis_filter_groups + self.attributes.metabase_is_personal_collection = ( + metabase_is_personal_collection ) @property - def quick_sight_analysis_visuals(self) -> Optional[list[QuickSightAnalysisVisual]]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_analysis_visuals - ) + def metabase_dashboards(self) -> Optional[list[MetabaseDashboard]]: + return None if self.attributes is None else self.attributes.metabase_dashboards - @quick_sight_analysis_visuals.setter - def quick_sight_analysis_visuals( - self, quick_sight_analysis_visuals: Optional[list[QuickSightAnalysisVisual]] + @metabase_dashboards.setter + def metabase_dashboards( + self, metabase_dashboards: Optional[list[MetabaseDashboard]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_analysis_visuals = quick_sight_analysis_visuals + self.attributes.metabase_dashboards = metabase_dashboards @property - def quick_sight_analysis_folders(self) -> Optional[list[QuickSightFolder]]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_analysis_folders - ) + def metabase_questions(self) -> Optional[list[MetabaseQuestion]]: + return None if self.attributes is None else self.attributes.metabase_questions - @quick_sight_analysis_folders.setter - def quick_sight_analysis_folders( - self, quick_sight_analysis_folders: Optional[list[QuickSightFolder]] - ): + @metabase_questions.setter + def metabase_questions(self, metabase_questions: Optional[list[MetabaseQuestion]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_analysis_folders = quick_sight_analysis_folders + self.attributes.metabase_questions = metabase_questions - class Attributes(QuickSight.Attributes): - quick_sight_analysis_status: Optional[QuickSightAnalysisStatus] = Field( - None, description="", alias="quickSightAnalysisStatus" + class Attributes(Metabase.Attributes): + metabase_slug: Optional[str] = Field(None, description="", alias="metabaseSlug") + metabase_color: Optional[str] = Field( + None, description="", alias="metabaseColor" ) - quick_sight_analysis_calculated_fields: Optional[set[str]] = Field( - None, description="", alias="quickSightAnalysisCalculatedFields" + metabase_namespace: Optional[str] = Field( + None, description="", alias="metabaseNamespace" ) - quick_sight_analysis_parameter_declarations: Optional[set[str]] = Field( - None, description="", alias="quickSightAnalysisParameterDeclarations" + metabase_is_personal_collection: Optional[bool] = Field( + None, description="", alias="metabaseIsPersonalCollection" ) - quick_sight_analysis_filter_groups: Optional[set[str]] = Field( - None, description="", alias="quickSightAnalysisFilterGroups" - ) - quick_sight_analysis_visuals: Optional[list[QuickSightAnalysisVisual]] = Field( - None, description="", alias="quickSightAnalysisVisuals" + metabase_dashboards: Optional[list[MetabaseDashboard]] = Field( + None, description="", alias="metabaseDashboards" ) # relationship - quick_sight_analysis_folders: Optional[list[QuickSightFolder]] = Field( - None, description="", alias="quickSightAnalysisFolders" + metabase_questions: Optional[list[MetabaseQuestion]] = Field( + None, description="", alias="metabaseQuestions" ) # relationship - attributes: "QuickSightAnalysis.Attributes" = Field( - default_factory=lambda: QuickSightAnalysis.Attributes(), + attributes: "MetabaseCollection.Attributes" = Field( + default_factory=lambda: MetabaseCollection.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class QuickSightDashboard(QuickSight): +class MetabaseDashboard(Metabase): """Description""" - type_name: str = Field("QuickSightDashboard", allow_mutation=False) + type_name: str = Field("MetabaseDashboard", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QuickSightDashboard": - raise ValueError("must be QuickSightDashboard") + if v != "MetabaseDashboard": + raise ValueError("must be MetabaseDashboard") return v def __setattr__(self, name, value): - if name in QuickSightDashboard._convience_properties: + if name in MetabaseDashboard._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "quick_sight_dashboard_published_version_number", - "quick_sight_dashboard_last_published_time", - "quick_sight_dashboard_folders", - "quick_sight_dashboard_visuals", - ] - - @property - def quick_sight_dashboard_published_version_number(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dashboard_published_version_number - ) - - @quick_sight_dashboard_published_version_number.setter - def quick_sight_dashboard_published_version_number( - self, quick_sight_dashboard_published_version_number: Optional[int] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_dashboard_published_version_number = ( - quick_sight_dashboard_published_version_number - ) - - @property - def quick_sight_dashboard_last_published_time(self) -> Optional[datetime]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dashboard_last_published_time - ) - - @quick_sight_dashboard_last_published_time.setter - def quick_sight_dashboard_last_published_time( - self, quick_sight_dashboard_last_published_time: Optional[datetime] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_dashboard_last_published_time = ( - quick_sight_dashboard_last_published_time - ) - - @property - def quick_sight_dashboard_folders(self) -> Optional[list[QuickSightFolder]]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dashboard_folders - ) - - @quick_sight_dashboard_folders.setter - def quick_sight_dashboard_folders( - self, quick_sight_dashboard_folders: Optional[list[QuickSightFolder]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_dashboard_folders = quick_sight_dashboard_folders - - @property - def quick_sight_dashboard_visuals( - self, - ) -> Optional[list[QuickSightDashboardVisual]]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dashboard_visuals - ) - - @quick_sight_dashboard_visuals.setter - def quick_sight_dashboard_visuals( - self, quick_sight_dashboard_visuals: Optional[list[QuickSightDashboardVisual]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_dashboard_visuals = quick_sight_dashboard_visuals - - class Attributes(QuickSight.Attributes): - quick_sight_dashboard_published_version_number: Optional[int] = Field( - None, description="", alias="quickSightDashboardPublishedVersionNumber" - ) - quick_sight_dashboard_last_published_time: Optional[datetime] = Field( - None, description="", alias="quickSightDashboardLastPublishedTime" - ) - quick_sight_dashboard_folders: Optional[list[QuickSightFolder]] = Field( - None, description="", alias="quickSightDashboardFolders" - ) # relationship - quick_sight_dashboard_visuals: Optional[ - list[QuickSightDashboardVisual] - ] = Field( - None, description="", alias="quickSightDashboardVisuals" - ) # relationship - - attributes: "QuickSightDashboard.Attributes" = Field( - default_factory=lambda: QuickSightDashboard.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", + METABASE_QUESTION_COUNT: ClassVar[NumericField] = NumericField( + "metabaseQuestionCount", "metabaseQuestionCount" ) - - -class QuickSightDataset(QuickSight): - """Description""" - - type_name: str = Field("QuickSightDataset", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "QuickSightDataset": - raise ValueError("must be QuickSightDataset") - return v - - def __setattr__(self, name, value): - if name in QuickSightDataset._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "quick_sight_dataset_import_mode", - "quick_sight_dataset_column_count", - "quick_sight_dataset_folders", - "quick_sight_dataset_fields", + """ + TBC + """ + + METABASE_QUESTIONS: ClassVar[RelationField] = RelationField("metabaseQuestions") + """ + TBC + """ + METABASE_COLLECTION: ClassVar[RelationField] = RelationField("metabaseCollection") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "metabase_question_count", + "metabase_questions", + "metabase_collection", ] @property - def quick_sight_dataset_import_mode(self) -> Optional[QuickSightDatasetImportMode]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dataset_import_mode - ) - - @quick_sight_dataset_import_mode.setter - def quick_sight_dataset_import_mode( - self, quick_sight_dataset_import_mode: Optional[QuickSightDatasetImportMode] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.quick_sight_dataset_import_mode = ( - quick_sight_dataset_import_mode - ) - - @property - def quick_sight_dataset_column_count(self) -> Optional[int]: + def metabase_question_count(self) -> Optional[int]: return ( - None - if self.attributes is None - else self.attributes.quick_sight_dataset_column_count + None if self.attributes is None else self.attributes.metabase_question_count ) - @quick_sight_dataset_column_count.setter - def quick_sight_dataset_column_count( - self, quick_sight_dataset_column_count: Optional[int] - ): + @metabase_question_count.setter + def metabase_question_count(self, metabase_question_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_dataset_column_count = ( - quick_sight_dataset_column_count - ) + self.attributes.metabase_question_count = metabase_question_count @property - def quick_sight_dataset_folders(self) -> Optional[list[QuickSightFolder]]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dataset_folders - ) + def metabase_questions(self) -> Optional[list[MetabaseQuestion]]: + return None if self.attributes is None else self.attributes.metabase_questions - @quick_sight_dataset_folders.setter - def quick_sight_dataset_folders( - self, quick_sight_dataset_folders: Optional[list[QuickSightFolder]] - ): + @metabase_questions.setter + def metabase_questions(self, metabase_questions: Optional[list[MetabaseQuestion]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_dataset_folders = quick_sight_dataset_folders + self.attributes.metabase_questions = metabase_questions @property - def quick_sight_dataset_fields(self) -> Optional[list[QuickSightDatasetField]]: - return ( - None - if self.attributes is None - else self.attributes.quick_sight_dataset_fields - ) + def metabase_collection(self) -> Optional[MetabaseCollection]: + return None if self.attributes is None else self.attributes.metabase_collection - @quick_sight_dataset_fields.setter - def quick_sight_dataset_fields( - self, quick_sight_dataset_fields: Optional[list[QuickSightDatasetField]] - ): + @metabase_collection.setter + def metabase_collection(self, metabase_collection: Optional[MetabaseCollection]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.quick_sight_dataset_fields = quick_sight_dataset_fields + self.attributes.metabase_collection = metabase_collection - class Attributes(QuickSight.Attributes): - quick_sight_dataset_import_mode: Optional[QuickSightDatasetImportMode] = Field( - None, description="", alias="quickSightDatasetImportMode" - ) - quick_sight_dataset_column_count: Optional[int] = Field( - None, description="", alias="quickSightDatasetColumnCount" + class Attributes(Metabase.Attributes): + metabase_question_count: Optional[int] = Field( + None, description="", alias="metabaseQuestionCount" ) - quick_sight_dataset_folders: Optional[list[QuickSightFolder]] = Field( - None, description="", alias="quickSightDatasetFolders" + metabase_questions: Optional[list[MetabaseQuestion]] = Field( + None, description="", alias="metabaseQuestions" ) # relationship - quick_sight_dataset_fields: Optional[list[QuickSightDatasetField]] = Field( - None, description="", alias="quickSightDatasetFields" + metabase_collection: Optional[MetabaseCollection] = Field( + None, description="", alias="metabaseCollection" ) # relationship - attributes: "QuickSightDataset.Attributes" = Field( - default_factory=lambda: QuickSightDataset.Attributes(), + attributes: "MetabaseDashboard.Attributes" = Field( + default_factory=lambda: MetabaseDashboard.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -QuickSightFolder.Attributes.update_forward_refs() - - -QuickSightDashboardVisual.Attributes.update_forward_refs() - - -QuickSightAnalysisVisual.Attributes.update_forward_refs() - - -QuickSightDatasetField.Attributes.update_forward_refs() - - -QuickSightAnalysis.Attributes.update_forward_refs() +MetabaseQuestion.Attributes.update_forward_refs() -QuickSightDashboard.Attributes.update_forward_refs() +MetabaseCollection.Attributes.update_forward_refs() -QuickSightDataset.Attributes.update_forward_refs() +MetabaseDashboard.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset68.py b/pyatlan/model/assets/asset68.py index 6ca901081..955b2a3fb 100644 --- a/pyatlan/model/assets/asset68.py +++ b/pyatlan/model/assets/asset68.py @@ -4,144 +4,929 @@ from __future__ import annotations +from datetime import datetime from typing import ClassVar, Optional from pydantic import Field, validator -from .asset44 import Thoughtspot +from pyatlan.model.enums import ( + QuickSightAnalysisStatus, + QuickSightDatasetFieldType, + QuickSightDatasetImportMode, + QuickSightFolderType, +) +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + NumericField, + RelationField, +) +from .asset44 import QuickSight -class ThoughtspotLiveboard(Thoughtspot): + +class QuickSightFolder(QuickSight): + """Description""" + + type_name: str = Field("QuickSightFolder", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "QuickSightFolder": + raise ValueError("must be QuickSightFolder") + return v + + def __setattr__(self, name, value): + if name in QuickSightFolder._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + QUICK_SIGHT_FOLDER_TYPE: ClassVar[KeywordField] = KeywordField( + "quickSightFolderType", "quickSightFolderType" + ) + """ + Shared or private type of folder + """ + QUICK_SIGHT_FOLDER_HIERARCHY: ClassVar[KeywordField] = KeywordField( + "quickSightFolderHierarchy", "quickSightFolderHierarchy" + ) + """ + Detailed path of the folder + """ + + QUICK_SIGHT_DASHBOARDS: ClassVar[RelationField] = RelationField( + "quickSightDashboards" + ) + """ + TBC + """ + QUICK_SIGHT_DATASETS: ClassVar[RelationField] = RelationField("quickSightDatasets") + """ + TBC + """ + QUICK_SIGHT_ANALYSES: ClassVar[RelationField] = RelationField("quickSightAnalyses") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "quick_sight_folder_type", + "quick_sight_folder_hierarchy", + "quick_sight_dashboards", + "quick_sight_datasets", + "quick_sight_analyses", + ] + + @property + def quick_sight_folder_type(self) -> Optional[QuickSightFolderType]: + return ( + None if self.attributes is None else self.attributes.quick_sight_folder_type + ) + + @quick_sight_folder_type.setter + def quick_sight_folder_type( + self, quick_sight_folder_type: Optional[QuickSightFolderType] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_folder_type = quick_sight_folder_type + + @property + def quick_sight_folder_hierarchy(self) -> Optional[list[dict[str, str]]]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_folder_hierarchy + ) + + @quick_sight_folder_hierarchy.setter + def quick_sight_folder_hierarchy( + self, quick_sight_folder_hierarchy: Optional[list[dict[str, str]]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_folder_hierarchy = quick_sight_folder_hierarchy + + @property + def quick_sight_dashboards(self) -> Optional[list[QuickSightDashboard]]: + return ( + None if self.attributes is None else self.attributes.quick_sight_dashboards + ) + + @quick_sight_dashboards.setter + def quick_sight_dashboards( + self, quick_sight_dashboards: Optional[list[QuickSightDashboard]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dashboards = quick_sight_dashboards + + @property + def quick_sight_datasets(self) -> Optional[list[QuickSightDataset]]: + return None if self.attributes is None else self.attributes.quick_sight_datasets + + @quick_sight_datasets.setter + def quick_sight_datasets( + self, quick_sight_datasets: Optional[list[QuickSightDataset]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_datasets = quick_sight_datasets + + @property + def quick_sight_analyses(self) -> Optional[list[QuickSightAnalysis]]: + return None if self.attributes is None else self.attributes.quick_sight_analyses + + @quick_sight_analyses.setter + def quick_sight_analyses( + self, quick_sight_analyses: Optional[list[QuickSightAnalysis]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analyses = quick_sight_analyses + + class Attributes(QuickSight.Attributes): + quick_sight_folder_type: Optional[QuickSightFolderType] = Field( + None, description="", alias="quickSightFolderType" + ) + quick_sight_folder_hierarchy: Optional[list[dict[str, str]]] = Field( + None, description="", alias="quickSightFolderHierarchy" + ) + quick_sight_dashboards: Optional[list[QuickSightDashboard]] = Field( + None, description="", alias="quickSightDashboards" + ) # relationship + quick_sight_datasets: Optional[list[QuickSightDataset]] = Field( + None, description="", alias="quickSightDatasets" + ) # relationship + quick_sight_analyses: Optional[list[QuickSightAnalysis]] = Field( + None, description="", alias="quickSightAnalyses" + ) # relationship + + attributes: "QuickSightFolder.Attributes" = Field( + default_factory=lambda: QuickSightFolder.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class QuickSightDashboardVisual(QuickSight): + """Description""" + + type_name: str = Field("QuickSightDashboardVisual", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "QuickSightDashboardVisual": + raise ValueError("must be QuickSightDashboardVisual") + return v + + def __setattr__(self, name, value): + if name in QuickSightDashboardVisual._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + QUICK_SIGHT_DASHBOARD_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "quickSightDashboardQualifiedName", + "quickSightDashboardQualifiedName", + "quickSightDashboardQualifiedName.text", + ) + """ + TBC + """ + + QUICK_SIGHT_DASHBOARD: ClassVar[RelationField] = RelationField( + "quickSightDashboard" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "quick_sight_dashboard_qualified_name", + "quick_sight_dashboard", + ] + + @property + def quick_sight_dashboard_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_dashboard_qualified_name + ) + + @quick_sight_dashboard_qualified_name.setter + def quick_sight_dashboard_qualified_name( + self, quick_sight_dashboard_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dashboard_qualified_name = ( + quick_sight_dashboard_qualified_name + ) + + @property + def quick_sight_dashboard(self) -> Optional[QuickSightDashboard]: + return ( + None if self.attributes is None else self.attributes.quick_sight_dashboard + ) + + @quick_sight_dashboard.setter + def quick_sight_dashboard( + self, quick_sight_dashboard: Optional[QuickSightDashboard] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dashboard = quick_sight_dashboard + + class Attributes(QuickSight.Attributes): + quick_sight_dashboard_qualified_name: Optional[str] = Field( + None, description="", alias="quickSightDashboardQualifiedName" + ) + quick_sight_dashboard: Optional[QuickSightDashboard] = Field( + None, description="", alias="quickSightDashboard" + ) # relationship + + attributes: "QuickSightDashboardVisual.Attributes" = Field( + default_factory=lambda: QuickSightDashboardVisual.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class QuickSightAnalysisVisual(QuickSight): + """Description""" + + type_name: str = Field("QuickSightAnalysisVisual", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "QuickSightAnalysisVisual": + raise ValueError("must be QuickSightAnalysisVisual") + return v + + def __setattr__(self, name, value): + if name in QuickSightAnalysisVisual._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + QUICK_SIGHT_ANALYSIS_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "quickSightAnalysisQualifiedName", + "quickSightAnalysisQualifiedName", + "quickSightAnalysisQualifiedName.text", + ) + """ + Qualified name of the QuickSight Analysis + """ + + QUICK_SIGHT_ANALYSIS: ClassVar[RelationField] = RelationField("quickSightAnalysis") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "quick_sight_analysis_qualified_name", + "quick_sight_analysis", + ] + + @property + def quick_sight_analysis_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_analysis_qualified_name + ) + + @quick_sight_analysis_qualified_name.setter + def quick_sight_analysis_qualified_name( + self, quick_sight_analysis_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analysis_qualified_name = ( + quick_sight_analysis_qualified_name + ) + + @property + def quick_sight_analysis(self) -> Optional[QuickSightAnalysis]: + return None if self.attributes is None else self.attributes.quick_sight_analysis + + @quick_sight_analysis.setter + def quick_sight_analysis(self, quick_sight_analysis: Optional[QuickSightAnalysis]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analysis = quick_sight_analysis + + class Attributes(QuickSight.Attributes): + quick_sight_analysis_qualified_name: Optional[str] = Field( + None, description="", alias="quickSightAnalysisQualifiedName" + ) + quick_sight_analysis: Optional[QuickSightAnalysis] = Field( + None, description="", alias="quickSightAnalysis" + ) # relationship + + attributes: "QuickSightAnalysisVisual.Attributes" = Field( + default_factory=lambda: QuickSightAnalysisVisual.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class QuickSightDatasetField(QuickSight): + """Description""" + + type_name: str = Field("QuickSightDatasetField", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "QuickSightDatasetField": + raise ValueError("must be QuickSightDatasetField") + return v + + def __setattr__(self, name, value): + if name in QuickSightDatasetField._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + QUICK_SIGHT_DATASET_FIELD_TYPE: ClassVar[KeywordField] = KeywordField( + "quickSightDatasetFieldType", "quickSightDatasetFieldType" + ) + """ + Datatype of column in the dataset + """ + QUICK_SIGHT_DATASET_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "quickSightDatasetQualifiedName", + "quickSightDatasetQualifiedName", + "quickSightDatasetQualifiedName.text", + ) + """ + Qualified name of the parent dataset + """ + + QUICK_SIGHT_DATASET: ClassVar[RelationField] = RelationField("quickSightDataset") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "quick_sight_dataset_field_type", + "quick_sight_dataset_qualified_name", + "quick_sight_dataset", + ] + + @property + def quick_sight_dataset_field_type(self) -> Optional[QuickSightDatasetFieldType]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_dataset_field_type + ) + + @quick_sight_dataset_field_type.setter + def quick_sight_dataset_field_type( + self, quick_sight_dataset_field_type: Optional[QuickSightDatasetFieldType] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dataset_field_type = quick_sight_dataset_field_type + + @property + def quick_sight_dataset_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_dataset_qualified_name + ) + + @quick_sight_dataset_qualified_name.setter + def quick_sight_dataset_qualified_name( + self, quick_sight_dataset_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dataset_qualified_name = ( + quick_sight_dataset_qualified_name + ) + + @property + def quick_sight_dataset(self) -> Optional[QuickSightDataset]: + return None if self.attributes is None else self.attributes.quick_sight_dataset + + @quick_sight_dataset.setter + def quick_sight_dataset(self, quick_sight_dataset: Optional[QuickSightDataset]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dataset = quick_sight_dataset + + class Attributes(QuickSight.Attributes): + quick_sight_dataset_field_type: Optional[QuickSightDatasetFieldType] = Field( + None, description="", alias="quickSightDatasetFieldType" + ) + quick_sight_dataset_qualified_name: Optional[str] = Field( + None, description="", alias="quickSightDatasetQualifiedName" + ) + quick_sight_dataset: Optional[QuickSightDataset] = Field( + None, description="", alias="quickSightDataset" + ) # relationship + + attributes: "QuickSightDatasetField.Attributes" = Field( + default_factory=lambda: QuickSightDatasetField.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class QuickSightAnalysis(QuickSight): + """Description""" + + type_name: str = Field("QuickSightAnalysis", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "QuickSightAnalysis": + raise ValueError("must be QuickSightAnalysis") + return v + + def __setattr__(self, name, value): + if name in QuickSightAnalysis._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + QUICK_SIGHT_ANALYSIS_STATUS: ClassVar[KeywordField] = KeywordField( + "quickSightAnalysisStatus", "quickSightAnalysisStatus" + ) + """ + Status of quicksight analysis + """ + QUICK_SIGHT_ANALYSIS_CALCULATED_FIELDS: ClassVar[KeywordField] = KeywordField( + "quickSightAnalysisCalculatedFields", "quickSightAnalysisCalculatedFields" + ) + """ + Calculated fields of quicksight analysis + """ + QUICK_SIGHT_ANALYSIS_PARAMETER_DECLARATIONS: ClassVar[KeywordField] = KeywordField( + "quickSightAnalysisParameterDeclarations", + "quickSightAnalysisParameterDeclarations", + ) + """ + parameters used for quicksight analysis + """ + QUICK_SIGHT_ANALYSIS_FILTER_GROUPS: ClassVar[KeywordField] = KeywordField( + "quickSightAnalysisFilterGroups", "quickSightAnalysisFilterGroups" + ) + """ + Filter groups used for quicksight analysis + """ + + QUICK_SIGHT_ANALYSIS_VISUALS: ClassVar[RelationField] = RelationField( + "quickSightAnalysisVisuals" + ) + """ + TBC + """ + QUICK_SIGHT_ANALYSIS_FOLDERS: ClassVar[RelationField] = RelationField( + "quickSightAnalysisFolders" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "quick_sight_analysis_status", + "quick_sight_analysis_calculated_fields", + "quick_sight_analysis_parameter_declarations", + "quick_sight_analysis_filter_groups", + "quick_sight_analysis_visuals", + "quick_sight_analysis_folders", + ] + + @property + def quick_sight_analysis_status(self) -> Optional[QuickSightAnalysisStatus]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_analysis_status + ) + + @quick_sight_analysis_status.setter + def quick_sight_analysis_status( + self, quick_sight_analysis_status: Optional[QuickSightAnalysisStatus] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analysis_status = quick_sight_analysis_status + + @property + def quick_sight_analysis_calculated_fields(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_analysis_calculated_fields + ) + + @quick_sight_analysis_calculated_fields.setter + def quick_sight_analysis_calculated_fields( + self, quick_sight_analysis_calculated_fields: Optional[set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analysis_calculated_fields = ( + quick_sight_analysis_calculated_fields + ) + + @property + def quick_sight_analysis_parameter_declarations(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_analysis_parameter_declarations + ) + + @quick_sight_analysis_parameter_declarations.setter + def quick_sight_analysis_parameter_declarations( + self, quick_sight_analysis_parameter_declarations: Optional[set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analysis_parameter_declarations = ( + quick_sight_analysis_parameter_declarations + ) + + @property + def quick_sight_analysis_filter_groups(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_analysis_filter_groups + ) + + @quick_sight_analysis_filter_groups.setter + def quick_sight_analysis_filter_groups( + self, quick_sight_analysis_filter_groups: Optional[set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analysis_filter_groups = ( + quick_sight_analysis_filter_groups + ) + + @property + def quick_sight_analysis_visuals(self) -> Optional[list[QuickSightAnalysisVisual]]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_analysis_visuals + ) + + @quick_sight_analysis_visuals.setter + def quick_sight_analysis_visuals( + self, quick_sight_analysis_visuals: Optional[list[QuickSightAnalysisVisual]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analysis_visuals = quick_sight_analysis_visuals + + @property + def quick_sight_analysis_folders(self) -> Optional[list[QuickSightFolder]]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_analysis_folders + ) + + @quick_sight_analysis_folders.setter + def quick_sight_analysis_folders( + self, quick_sight_analysis_folders: Optional[list[QuickSightFolder]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_analysis_folders = quick_sight_analysis_folders + + class Attributes(QuickSight.Attributes): + quick_sight_analysis_status: Optional[QuickSightAnalysisStatus] = Field( + None, description="", alias="quickSightAnalysisStatus" + ) + quick_sight_analysis_calculated_fields: Optional[set[str]] = Field( + None, description="", alias="quickSightAnalysisCalculatedFields" + ) + quick_sight_analysis_parameter_declarations: Optional[set[str]] = Field( + None, description="", alias="quickSightAnalysisParameterDeclarations" + ) + quick_sight_analysis_filter_groups: Optional[set[str]] = Field( + None, description="", alias="quickSightAnalysisFilterGroups" + ) + quick_sight_analysis_visuals: Optional[list[QuickSightAnalysisVisual]] = Field( + None, description="", alias="quickSightAnalysisVisuals" + ) # relationship + quick_sight_analysis_folders: Optional[list[QuickSightFolder]] = Field( + None, description="", alias="quickSightAnalysisFolders" + ) # relationship + + attributes: "QuickSightAnalysis.Attributes" = Field( + default_factory=lambda: QuickSightAnalysis.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class QuickSightDashboard(QuickSight): """Description""" - type_name: str = Field("ThoughtspotLiveboard", allow_mutation=False) + type_name: str = Field("QuickSightDashboard", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ThoughtspotLiveboard": - raise ValueError("must be ThoughtspotLiveboard") + if v != "QuickSightDashboard": + raise ValueError("must be QuickSightDashboard") return v def __setattr__(self, name, value): - if name in ThoughtspotLiveboard._convience_properties: + if name in QuickSightDashboard._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "thoughtspot_dashlets", + QUICK_SIGHT_DASHBOARD_PUBLISHED_VERSION_NUMBER: ClassVar[ + NumericField + ] = NumericField( + "quickSightDashboardPublishedVersionNumber", + "quickSightDashboardPublishedVersionNumber", + ) + """ + Version number of the dashboard published + """ + QUICK_SIGHT_DASHBOARD_LAST_PUBLISHED_TIME: ClassVar[NumericField] = NumericField( + "quickSightDashboardLastPublishedTime", "quickSightDashboardLastPublishedTime" + ) + """ + Last published time of dashboard + """ + + QUICK_SIGHT_DASHBOARD_FOLDERS: ClassVar[RelationField] = RelationField( + "quickSightDashboardFolders" + ) + """ + TBC + """ + QUICK_SIGHT_DASHBOARD_VISUALS: ClassVar[RelationField] = RelationField( + "quickSightDashboardVisuals" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "quick_sight_dashboard_published_version_number", + "quick_sight_dashboard_last_published_time", + "quick_sight_dashboard_folders", + "quick_sight_dashboard_visuals", ] @property - def thoughtspot_dashlets(self) -> Optional[list[ThoughtspotDashlet]]: - return None if self.attributes is None else self.attributes.thoughtspot_dashlets + def quick_sight_dashboard_published_version_number(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_dashboard_published_version_number + ) + + @quick_sight_dashboard_published_version_number.setter + def quick_sight_dashboard_published_version_number( + self, quick_sight_dashboard_published_version_number: Optional[int] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dashboard_published_version_number = ( + quick_sight_dashboard_published_version_number + ) + + @property + def quick_sight_dashboard_last_published_time(self) -> Optional[datetime]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_dashboard_last_published_time + ) + + @quick_sight_dashboard_last_published_time.setter + def quick_sight_dashboard_last_published_time( + self, quick_sight_dashboard_last_published_time: Optional[datetime] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dashboard_last_published_time = ( + quick_sight_dashboard_last_published_time + ) + + @property + def quick_sight_dashboard_folders(self) -> Optional[list[QuickSightFolder]]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_dashboard_folders + ) + + @quick_sight_dashboard_folders.setter + def quick_sight_dashboard_folders( + self, quick_sight_dashboard_folders: Optional[list[QuickSightFolder]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dashboard_folders = quick_sight_dashboard_folders + + @property + def quick_sight_dashboard_visuals( + self, + ) -> Optional[list[QuickSightDashboardVisual]]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_dashboard_visuals + ) - @thoughtspot_dashlets.setter - def thoughtspot_dashlets( - self, thoughtspot_dashlets: Optional[list[ThoughtspotDashlet]] + @quick_sight_dashboard_visuals.setter + def quick_sight_dashboard_visuals( + self, quick_sight_dashboard_visuals: Optional[list[QuickSightDashboardVisual]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.thoughtspot_dashlets = thoughtspot_dashlets + self.attributes.quick_sight_dashboard_visuals = quick_sight_dashboard_visuals - class Attributes(Thoughtspot.Attributes): - thoughtspot_dashlets: Optional[list[ThoughtspotDashlet]] = Field( - None, description="", alias="thoughtspotDashlets" + class Attributes(QuickSight.Attributes): + quick_sight_dashboard_published_version_number: Optional[int] = Field( + None, description="", alias="quickSightDashboardPublishedVersionNumber" + ) + quick_sight_dashboard_last_published_time: Optional[datetime] = Field( + None, description="", alias="quickSightDashboardLastPublishedTime" + ) + quick_sight_dashboard_folders: Optional[list[QuickSightFolder]] = Field( + None, description="", alias="quickSightDashboardFolders" + ) # relationship + quick_sight_dashboard_visuals: Optional[ + list[QuickSightDashboardVisual] + ] = Field( + None, description="", alias="quickSightDashboardVisuals" ) # relationship - attributes: "ThoughtspotLiveboard.Attributes" = Field( - default_factory=lambda: ThoughtspotLiveboard.Attributes(), + attributes: "QuickSightDashboard.Attributes" = Field( + default_factory=lambda: QuickSightDashboard.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class ThoughtspotDashlet(Thoughtspot): +class QuickSightDataset(QuickSight): """Description""" - type_name: str = Field("ThoughtspotDashlet", allow_mutation=False) + type_name: str = Field("QuickSightDataset", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ThoughtspotDashlet": - raise ValueError("must be ThoughtspotDashlet") + if v != "QuickSightDataset": + raise ValueError("must be QuickSightDataset") return v def __setattr__(self, name, value): - if name in ThoughtspotDashlet._convience_properties: + if name in QuickSightDataset._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "thoughtspot_liveboard_name", - "thoughtspot_liveboard_qualified_name", - "thoughtspot_liveboard", + QUICK_SIGHT_DATASET_IMPORT_MODE: ClassVar[KeywordField] = KeywordField( + "quickSightDatasetImportMode", "quickSightDatasetImportMode" + ) + """ + Quicksight dataset importMode indicates a value that indicates whether you want to import the data into SPICE + """ + QUICK_SIGHT_DATASET_COLUMN_COUNT: ClassVar[NumericField] = NumericField( + "quickSightDatasetColumnCount", "quickSightDatasetColumnCount" + ) + """ + Quicksight dataset column count indicates number of columns present in the dataset + """ + + QUICK_SIGHT_DATASET_FOLDERS: ClassVar[RelationField] = RelationField( + "quickSightDatasetFolders" + ) + """ + TBC + """ + QUICK_SIGHT_DATASET_FIELDS: ClassVar[RelationField] = RelationField( + "quickSightDatasetFields" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "quick_sight_dataset_import_mode", + "quick_sight_dataset_column_count", + "quick_sight_dataset_folders", + "quick_sight_dataset_fields", ] @property - def thoughtspot_liveboard_name(self) -> Optional[str]: + def quick_sight_dataset_import_mode(self) -> Optional[QuickSightDatasetImportMode]: return ( None if self.attributes is None - else self.attributes.thoughtspot_liveboard_name + else self.attributes.quick_sight_dataset_import_mode ) - @thoughtspot_liveboard_name.setter - def thoughtspot_liveboard_name(self, thoughtspot_liveboard_name: Optional[str]): + @quick_sight_dataset_import_mode.setter + def quick_sight_dataset_import_mode( + self, quick_sight_dataset_import_mode: Optional[QuickSightDatasetImportMode] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.thoughtspot_liveboard_name = thoughtspot_liveboard_name + self.attributes.quick_sight_dataset_import_mode = ( + quick_sight_dataset_import_mode + ) @property - def thoughtspot_liveboard_qualified_name(self) -> Optional[str]: + def quick_sight_dataset_column_count(self) -> Optional[int]: return ( None if self.attributes is None - else self.attributes.thoughtspot_liveboard_qualified_name + else self.attributes.quick_sight_dataset_column_count ) - @thoughtspot_liveboard_qualified_name.setter - def thoughtspot_liveboard_qualified_name( - self, thoughtspot_liveboard_qualified_name: Optional[str] + @quick_sight_dataset_column_count.setter + def quick_sight_dataset_column_count( + self, quick_sight_dataset_column_count: Optional[int] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.thoughtspot_liveboard_qualified_name = ( - thoughtspot_liveboard_qualified_name + self.attributes.quick_sight_dataset_column_count = ( + quick_sight_dataset_column_count ) @property - def thoughtspot_liveboard(self) -> Optional[ThoughtspotLiveboard]: + def quick_sight_dataset_folders(self) -> Optional[list[QuickSightFolder]]: return ( - None if self.attributes is None else self.attributes.thoughtspot_liveboard + None + if self.attributes is None + else self.attributes.quick_sight_dataset_folders + ) + + @quick_sight_dataset_folders.setter + def quick_sight_dataset_folders( + self, quick_sight_dataset_folders: Optional[list[QuickSightFolder]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.quick_sight_dataset_folders = quick_sight_dataset_folders + + @property + def quick_sight_dataset_fields(self) -> Optional[list[QuickSightDatasetField]]: + return ( + None + if self.attributes is None + else self.attributes.quick_sight_dataset_fields ) - @thoughtspot_liveboard.setter - def thoughtspot_liveboard( - self, thoughtspot_liveboard: Optional[ThoughtspotLiveboard] + @quick_sight_dataset_fields.setter + def quick_sight_dataset_fields( + self, quick_sight_dataset_fields: Optional[list[QuickSightDatasetField]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.thoughtspot_liveboard = thoughtspot_liveboard + self.attributes.quick_sight_dataset_fields = quick_sight_dataset_fields - class Attributes(Thoughtspot.Attributes): - thoughtspot_liveboard_name: Optional[str] = Field( - None, description="", alias="thoughtspotLiveboardName" + class Attributes(QuickSight.Attributes): + quick_sight_dataset_import_mode: Optional[QuickSightDatasetImportMode] = Field( + None, description="", alias="quickSightDatasetImportMode" ) - thoughtspot_liveboard_qualified_name: Optional[str] = Field( - None, description="", alias="thoughtspotLiveboardQualifiedName" + quick_sight_dataset_column_count: Optional[int] = Field( + None, description="", alias="quickSightDatasetColumnCount" ) - thoughtspot_liveboard: Optional[ThoughtspotLiveboard] = Field( - None, description="", alias="thoughtspotLiveboard" + quick_sight_dataset_folders: Optional[list[QuickSightFolder]] = Field( + None, description="", alias="quickSightDatasetFolders" + ) # relationship + quick_sight_dataset_fields: Optional[list[QuickSightDatasetField]] = Field( + None, description="", alias="quickSightDatasetFields" ) # relationship - attributes: "ThoughtspotDashlet.Attributes" = Field( - default_factory=lambda: ThoughtspotDashlet.Attributes(), + attributes: "QuickSightDataset.Attributes" = Field( + default_factory=lambda: QuickSightDataset.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -ThoughtspotLiveboard.Attributes.update_forward_refs() +QuickSightFolder.Attributes.update_forward_refs() + + +QuickSightDashboardVisual.Attributes.update_forward_refs() + + +QuickSightAnalysisVisual.Attributes.update_forward_refs() + + +QuickSightDatasetField.Attributes.update_forward_refs() + + +QuickSightAnalysis.Attributes.update_forward_refs() + + +QuickSightDashboard.Attributes.update_forward_refs() -ThoughtspotDashlet.Attributes.update_forward_refs() +QuickSightDataset.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset69.py b/pyatlan/model/assets/asset69.py index 992629e4f..654bb186d 100644 --- a/pyatlan/model/assets/asset69.py +++ b/pyatlan/model/assets/asset69.py @@ -4,30 +4,175 @@ from __future__ import annotations -from typing import ClassVar +from typing import ClassVar, Optional from pydantic import Field, validator -from .asset44 import Thoughtspot +from pyatlan.model.fields.atlan_fields import KeywordTextField, RelationField +from .asset45 import Thoughtspot -class ThoughtspotAnswer(Thoughtspot): + +class ThoughtspotLiveboard(Thoughtspot): """Description""" - type_name: str = Field("ThoughtspotAnswer", allow_mutation=False) + type_name: str = Field("ThoughtspotLiveboard", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "ThoughtspotAnswer": - raise ValueError("must be ThoughtspotAnswer") + if v != "ThoughtspotLiveboard": + raise ValueError("must be ThoughtspotLiveboard") return v def __setattr__(self, name, value): - if name in ThoughtspotAnswer._convience_properties: + if name in ThoughtspotLiveboard._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + THOUGHTSPOT_DASHLETS: ClassVar[RelationField] = RelationField("thoughtspotDashlets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "thoughtspot_dashlets", + ] + + @property + def thoughtspot_dashlets(self) -> Optional[list[ThoughtspotDashlet]]: + return None if self.attributes is None else self.attributes.thoughtspot_dashlets + + @thoughtspot_dashlets.setter + def thoughtspot_dashlets( + self, thoughtspot_dashlets: Optional[list[ThoughtspotDashlet]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.thoughtspot_dashlets = thoughtspot_dashlets + + class Attributes(Thoughtspot.Attributes): + thoughtspot_dashlets: Optional[list[ThoughtspotDashlet]] = Field( + None, description="", alias="thoughtspotDashlets" + ) # relationship + + attributes: "ThoughtspotLiveboard.Attributes" = Field( + default_factory=lambda: ThoughtspotLiveboard.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class ThoughtspotDashlet(Thoughtspot): + """Description""" + + type_name: str = Field("ThoughtspotDashlet", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "ThoughtspotDashlet": + raise ValueError("must be ThoughtspotDashlet") + return v + + def __setattr__(self, name, value): + if name in ThoughtspotDashlet._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + THOUGHTSPOT_LIVEBOARD_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "thoughtspotLiveboardName", + "thoughtspotLiveboardName.keyword", + "thoughtspotLiveboardName", + ) + """ + TBC + """ + THOUGHTSPOT_LIVEBOARD_QUALIFIED_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "thoughtspotLiveboardQualifiedName", + "thoughtspotLiveboardQualifiedName", + "thoughtspotLiveboardQualifiedName.text", + ) + """ + TBC + """ + + THOUGHTSPOT_LIVEBOARD: ClassVar[RelationField] = RelationField( + "thoughtspotLiveboard" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "thoughtspot_liveboard_name", + "thoughtspot_liveboard_qualified_name", + "thoughtspot_liveboard", + ] + + @property + def thoughtspot_liveboard_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.thoughtspot_liveboard_name + ) + + @thoughtspot_liveboard_name.setter + def thoughtspot_liveboard_name(self, thoughtspot_liveboard_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.thoughtspot_liveboard_name = thoughtspot_liveboard_name + + @property + def thoughtspot_liveboard_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.thoughtspot_liveboard_qualified_name + ) + + @thoughtspot_liveboard_qualified_name.setter + def thoughtspot_liveboard_qualified_name( + self, thoughtspot_liveboard_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.thoughtspot_liveboard_qualified_name = ( + thoughtspot_liveboard_qualified_name + ) + + @property + def thoughtspot_liveboard(self) -> Optional[ThoughtspotLiveboard]: + return ( + None if self.attributes is None else self.attributes.thoughtspot_liveboard + ) + + @thoughtspot_liveboard.setter + def thoughtspot_liveboard( + self, thoughtspot_liveboard: Optional[ThoughtspotLiveboard] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.thoughtspot_liveboard = thoughtspot_liveboard + + class Attributes(Thoughtspot.Attributes): + thoughtspot_liveboard_name: Optional[str] = Field( + None, description="", alias="thoughtspotLiveboardName" + ) + thoughtspot_liveboard_qualified_name: Optional[str] = Field( + None, description="", alias="thoughtspotLiveboardQualifiedName" + ) + thoughtspot_liveboard: Optional[ThoughtspotLiveboard] = Field( + None, description="", alias="thoughtspotLiveboard" + ) # relationship + + attributes: "ThoughtspotDashlet.Attributes" = Field( + default_factory=lambda: ThoughtspotDashlet.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +ThoughtspotLiveboard.Attributes.update_forward_refs() -ThoughtspotAnswer.Attributes.update_forward_refs() +ThoughtspotDashlet.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset70.py b/pyatlan/model/assets/asset70.py index c19a23059..9987127e2 100644 --- a/pyatlan/model/assets/asset70.py +++ b/pyatlan/model/assets/asset70.py @@ -4,1325 +4,30 @@ from __future__ import annotations -from typing import ClassVar, Optional +from typing import ClassVar from pydantic import Field, validator -from .asset45 import PowerBI +from .asset45 import Thoughtspot -class PowerBIReport(PowerBI): +class ThoughtspotAnswer(Thoughtspot): """Description""" - type_name: str = Field("PowerBIReport", allow_mutation=False) + type_name: str = Field("ThoughtspotAnswer", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "PowerBIReport": - raise ValueError("must be PowerBIReport") + if v != "ThoughtspotAnswer": + raise ValueError("must be ThoughtspotAnswer") return v def __setattr__(self, name, value): - if name in PowerBIReport._convience_properties: + if name in ThoughtspotAnswer._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "workspace_qualified_name", - "dataset_qualified_name", - "web_url", - "page_count", - "workspace", - "tiles", - "pages", - "dataset", - ] + _convenience_properties: ClassVar[list[str]] = [] - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def dataset_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.dataset_qualified_name - ) - - @dataset_qualified_name.setter - def dataset_qualified_name(self, dataset_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataset_qualified_name = dataset_qualified_name - - @property - def web_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.web_url - - @web_url.setter - def web_url(self, web_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.web_url = web_url - - @property - def page_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.page_count - - @page_count.setter - def page_count(self, page_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.page_count = page_count - - @property - def workspace(self) -> Optional[PowerBIWorkspace]: - return None if self.attributes is None else self.attributes.workspace - - @workspace.setter - def workspace(self, workspace: Optional[PowerBIWorkspace]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace = workspace - - @property - def tiles(self) -> Optional[list[PowerBITile]]: - return None if self.attributes is None else self.attributes.tiles - - @tiles.setter - def tiles(self, tiles: Optional[list[PowerBITile]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tiles = tiles - - @property - def pages(self) -> Optional[list[PowerBIPage]]: - return None if self.attributes is None else self.attributes.pages - - @pages.setter - def pages(self, pages: Optional[list[PowerBIPage]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.pages = pages - - @property - def dataset(self) -> Optional[PowerBIDataset]: - return None if self.attributes is None else self.attributes.dataset - - @dataset.setter - def dataset(self, dataset: Optional[PowerBIDataset]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataset = dataset - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field( - None, description="", alias="workspaceQualifiedName" - ) - dataset_qualified_name: Optional[str] = Field( - None, description="", alias="datasetQualifiedName" - ) - web_url: Optional[str] = Field(None, description="", alias="webUrl") - page_count: Optional[int] = Field(None, description="", alias="pageCount") - workspace: Optional[PowerBIWorkspace] = Field( - None, description="", alias="workspace" - ) # relationship - tiles: Optional[list[PowerBITile]] = Field( - None, description="", alias="tiles" - ) # relationship - pages: Optional[list[PowerBIPage]] = Field( - None, description="", alias="pages" - ) # relationship - dataset: Optional[PowerBIDataset] = Field( - None, description="", alias="dataset" - ) # relationship - - attributes: "PowerBIReport.Attributes" = Field( - default_factory=lambda: PowerBIReport.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBIMeasure(PowerBI): - """Description""" - - type_name: str = Field("PowerBIMeasure", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBIMeasure": - raise ValueError("must be PowerBIMeasure") - return v - - def __setattr__(self, name, value): - if name in PowerBIMeasure._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "workspace_qualified_name", - "dataset_qualified_name", - "power_b_i_measure_expression", - "power_b_i_is_external_measure", - "table", - ] - - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def dataset_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.dataset_qualified_name - ) - - @dataset_qualified_name.setter - def dataset_qualified_name(self, dataset_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataset_qualified_name = dataset_qualified_name - - @property - def power_b_i_measure_expression(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_measure_expression - ) - - @power_b_i_measure_expression.setter - def power_b_i_measure_expression(self, power_b_i_measure_expression: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_measure_expression = power_b_i_measure_expression - - @property - def power_b_i_is_external_measure(self) -> Optional[bool]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_is_external_measure - ) - - @power_b_i_is_external_measure.setter - def power_b_i_is_external_measure( - self, power_b_i_is_external_measure: Optional[bool] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_is_external_measure = power_b_i_is_external_measure - - @property - def table(self) -> Optional[PowerBITable]: - return None if self.attributes is None else self.attributes.table - - @table.setter - def table(self, table: Optional[PowerBITable]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.table = table - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field( - None, description="", alias="workspaceQualifiedName" - ) - dataset_qualified_name: Optional[str] = Field( - None, description="", alias="datasetQualifiedName" - ) - power_b_i_measure_expression: Optional[str] = Field( - None, description="", alias="powerBIMeasureExpression" - ) - power_b_i_is_external_measure: Optional[bool] = Field( - None, description="", alias="powerBIIsExternalMeasure" - ) - table: Optional[PowerBITable] = Field( - None, description="", alias="table" - ) # relationship - - attributes: "PowerBIMeasure.Attributes" = Field( - default_factory=lambda: PowerBIMeasure.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBIColumn(PowerBI): - """Description""" - - type_name: str = Field("PowerBIColumn", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBIColumn": - raise ValueError("must be PowerBIColumn") - return v - - def __setattr__(self, name, value): - if name in PowerBIColumn._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "workspace_qualified_name", - "dataset_qualified_name", - "power_b_i_column_data_category", - "power_b_i_column_data_type", - "power_b_i_sort_by_column", - "power_b_i_column_summarize_by", - "table", - ] - - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def dataset_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.dataset_qualified_name - ) - - @dataset_qualified_name.setter - def dataset_qualified_name(self, dataset_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataset_qualified_name = dataset_qualified_name - - @property - def power_b_i_column_data_category(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_column_data_category - ) - - @power_b_i_column_data_category.setter - def power_b_i_column_data_category( - self, power_b_i_column_data_category: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_column_data_category = power_b_i_column_data_category - - @property - def power_b_i_column_data_type(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_column_data_type - ) - - @power_b_i_column_data_type.setter - def power_b_i_column_data_type(self, power_b_i_column_data_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_column_data_type = power_b_i_column_data_type - - @property - def power_b_i_sort_by_column(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_sort_by_column - ) - - @power_b_i_sort_by_column.setter - def power_b_i_sort_by_column(self, power_b_i_sort_by_column: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_sort_by_column = power_b_i_sort_by_column - - @property - def power_b_i_column_summarize_by(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_column_summarize_by - ) - - @power_b_i_column_summarize_by.setter - def power_b_i_column_summarize_by( - self, power_b_i_column_summarize_by: Optional[str] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_column_summarize_by = power_b_i_column_summarize_by - - @property - def table(self) -> Optional[PowerBITable]: - return None if self.attributes is None else self.attributes.table - - @table.setter - def table(self, table: Optional[PowerBITable]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.table = table - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field( - None, description="", alias="workspaceQualifiedName" - ) - dataset_qualified_name: Optional[str] = Field( - None, description="", alias="datasetQualifiedName" - ) - power_b_i_column_data_category: Optional[str] = Field( - None, description="", alias="powerBIColumnDataCategory" - ) - power_b_i_column_data_type: Optional[str] = Field( - None, description="", alias="powerBIColumnDataType" - ) - power_b_i_sort_by_column: Optional[str] = Field( - None, description="", alias="powerBISortByColumn" - ) - power_b_i_column_summarize_by: Optional[str] = Field( - None, description="", alias="powerBIColumnSummarizeBy" - ) - table: Optional[PowerBITable] = Field( - None, description="", alias="table" - ) # relationship - - attributes: "PowerBIColumn.Attributes" = Field( - default_factory=lambda: PowerBIColumn.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBITable(PowerBI): - """Description""" - - type_name: str = Field("PowerBITable", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBITable": - raise ValueError("must be PowerBITable") - return v - - def __setattr__(self, name, value): - if name in PowerBITable._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "workspace_qualified_name", - "dataset_qualified_name", - "power_b_i_table_source_expressions", - "power_b_i_table_column_count", - "power_b_i_table_measure_count", - "columns", - "measures", - "dataset", - ] - - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def dataset_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.dataset_qualified_name - ) - - @dataset_qualified_name.setter - def dataset_qualified_name(self, dataset_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataset_qualified_name = dataset_qualified_name - - @property - def power_b_i_table_source_expressions(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_table_source_expressions - ) - - @power_b_i_table_source_expressions.setter - def power_b_i_table_source_expressions( - self, power_b_i_table_source_expressions: Optional[set[str]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_table_source_expressions = ( - power_b_i_table_source_expressions - ) - - @property - def power_b_i_table_column_count(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_table_column_count - ) - - @power_b_i_table_column_count.setter - def power_b_i_table_column_count(self, power_b_i_table_column_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_table_column_count = power_b_i_table_column_count - - @property - def power_b_i_table_measure_count(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.power_b_i_table_measure_count - ) - - @power_b_i_table_measure_count.setter - def power_b_i_table_measure_count( - self, power_b_i_table_measure_count: Optional[int] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.power_b_i_table_measure_count = power_b_i_table_measure_count - - @property - def columns(self) -> Optional[list[PowerBIColumn]]: - return None if self.attributes is None else self.attributes.columns - - @columns.setter - def columns(self, columns: Optional[list[PowerBIColumn]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.columns = columns - - @property - def measures(self) -> Optional[list[PowerBIMeasure]]: - return None if self.attributes is None else self.attributes.measures - - @measures.setter - def measures(self, measures: Optional[list[PowerBIMeasure]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.measures = measures - - @property - def dataset(self) -> Optional[PowerBIDataset]: - return None if self.attributes is None else self.attributes.dataset - - @dataset.setter - def dataset(self, dataset: Optional[PowerBIDataset]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataset = dataset - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field( - None, description="", alias="workspaceQualifiedName" - ) - dataset_qualified_name: Optional[str] = Field( - None, description="", alias="datasetQualifiedName" - ) - power_b_i_table_source_expressions: Optional[set[str]] = Field( - None, description="", alias="powerBITableSourceExpressions" - ) - power_b_i_table_column_count: Optional[int] = Field( - None, description="", alias="powerBITableColumnCount" - ) - power_b_i_table_measure_count: Optional[int] = Field( - None, description="", alias="powerBITableMeasureCount" - ) - columns: Optional[list[PowerBIColumn]] = Field( - None, description="", alias="columns" - ) # relationship - measures: Optional[list[PowerBIMeasure]] = Field( - None, description="", alias="measures" - ) # relationship - dataset: Optional[PowerBIDataset] = Field( - None, description="", alias="dataset" - ) # relationship - - attributes: "PowerBITable.Attributes" = Field( - default_factory=lambda: PowerBITable.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBITile(PowerBI): - """Description""" - - type_name: str = Field("PowerBITile", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBITile": - raise ValueError("must be PowerBITile") - return v - - def __setattr__(self, name, value): - if name in PowerBITile._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "workspace_qualified_name", - "dashboard_qualified_name", - "report", - "dataset", - "dashboard", - ] - - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def dashboard_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.dashboard_qualified_name - ) - - @dashboard_qualified_name.setter - def dashboard_qualified_name(self, dashboard_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboard_qualified_name = dashboard_qualified_name - - @property - def report(self) -> Optional[PowerBIReport]: - return None if self.attributes is None else self.attributes.report - - @report.setter - def report(self, report: Optional[PowerBIReport]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.report = report - - @property - def dataset(self) -> Optional[PowerBIDataset]: - return None if self.attributes is None else self.attributes.dataset - - @dataset.setter - def dataset(self, dataset: Optional[PowerBIDataset]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataset = dataset - - @property - def dashboard(self) -> Optional[PowerBIDashboard]: - return None if self.attributes is None else self.attributes.dashboard - - @dashboard.setter - def dashboard(self, dashboard: Optional[PowerBIDashboard]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboard = dashboard - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field( - None, description="", alias="workspaceQualifiedName" - ) - dashboard_qualified_name: Optional[str] = Field( - None, description="", alias="dashboardQualifiedName" - ) - report: Optional[PowerBIReport] = Field( - None, description="", alias="report" - ) # relationship - dataset: Optional[PowerBIDataset] = Field( - None, description="", alias="dataset" - ) # relationship - dashboard: Optional[PowerBIDashboard] = Field( - None, description="", alias="dashboard" - ) # relationship - - attributes: "PowerBITile.Attributes" = Field( - default_factory=lambda: PowerBITile.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBIDatasource(PowerBI): - """Description""" - - type_name: str = Field("PowerBIDatasource", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBIDatasource": - raise ValueError("must be PowerBIDatasource") - return v - - def __setattr__(self, name, value): - if name in PowerBIDatasource._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "connection_details", - "datasets", - ] - - @property - def connection_details(self) -> Optional[dict[str, str]]: - return None if self.attributes is None else self.attributes.connection_details - - @connection_details.setter - def connection_details(self, connection_details: Optional[dict[str, str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.connection_details = connection_details - - @property - def datasets(self) -> Optional[list[PowerBIDataset]]: - return None if self.attributes is None else self.attributes.datasets - - @datasets.setter - def datasets(self, datasets: Optional[list[PowerBIDataset]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasets = datasets - - class Attributes(PowerBI.Attributes): - connection_details: Optional[dict[str, str]] = Field( - None, description="", alias="connectionDetails" - ) - datasets: Optional[list[PowerBIDataset]] = Field( - None, description="", alias="datasets" - ) # relationship - - attributes: "PowerBIDatasource.Attributes" = Field( - default_factory=lambda: PowerBIDatasource.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBIWorkspace(PowerBI): - """Description""" - - type_name: str = Field("PowerBIWorkspace", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBIWorkspace": - raise ValueError("must be PowerBIWorkspace") - return v - - def __setattr__(self, name, value): - if name in PowerBIWorkspace._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "web_url", - "report_count", - "dashboard_count", - "dataset_count", - "dataflow_count", - "reports", - "datasets", - "dashboards", - "dataflows", - ] - - @property - def web_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.web_url - - @web_url.setter - def web_url(self, web_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.web_url = web_url - - @property - def report_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.report_count - - @report_count.setter - def report_count(self, report_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.report_count = report_count - - @property - def dashboard_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.dashboard_count - - @dashboard_count.setter - def dashboard_count(self, dashboard_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboard_count = dashboard_count - - @property - def dataset_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.dataset_count - - @dataset_count.setter - def dataset_count(self, dataset_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataset_count = dataset_count - - @property - def dataflow_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.dataflow_count - - @dataflow_count.setter - def dataflow_count(self, dataflow_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataflow_count = dataflow_count - - @property - def reports(self) -> Optional[list[PowerBIReport]]: - return None if self.attributes is None else self.attributes.reports - - @reports.setter - def reports(self, reports: Optional[list[PowerBIReport]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.reports = reports - - @property - def datasets(self) -> Optional[list[PowerBIDataset]]: - return None if self.attributes is None else self.attributes.datasets - - @datasets.setter - def datasets(self, datasets: Optional[list[PowerBIDataset]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasets = datasets - - @property - def dashboards(self) -> Optional[list[PowerBIDashboard]]: - return None if self.attributes is None else self.attributes.dashboards - - @dashboards.setter - def dashboards(self, dashboards: Optional[list[PowerBIDashboard]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboards = dashboards - - @property - def dataflows(self) -> Optional[list[PowerBIDataflow]]: - return None if self.attributes is None else self.attributes.dataflows - - @dataflows.setter - def dataflows(self, dataflows: Optional[list[PowerBIDataflow]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataflows = dataflows - - class Attributes(PowerBI.Attributes): - web_url: Optional[str] = Field(None, description="", alias="webUrl") - report_count: Optional[int] = Field(None, description="", alias="reportCount") - dashboard_count: Optional[int] = Field( - None, description="", alias="dashboardCount" - ) - dataset_count: Optional[int] = Field(None, description="", alias="datasetCount") - dataflow_count: Optional[int] = Field( - None, description="", alias="dataflowCount" - ) - reports: Optional[list[PowerBIReport]] = Field( - None, description="", alias="reports" - ) # relationship - datasets: Optional[list[PowerBIDataset]] = Field( - None, description="", alias="datasets" - ) # relationship - dashboards: Optional[list[PowerBIDashboard]] = Field( - None, description="", alias="dashboards" - ) # relationship - dataflows: Optional[list[PowerBIDataflow]] = Field( - None, description="", alias="dataflows" - ) # relationship - - attributes: "PowerBIWorkspace.Attributes" = Field( - default_factory=lambda: PowerBIWorkspace.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBIDataset(PowerBI): - """Description""" - - type_name: str = Field("PowerBIDataset", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBIDataset": - raise ValueError("must be PowerBIDataset") - return v - - def __setattr__(self, name, value): - if name in PowerBIDataset._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "workspace_qualified_name", - "web_url", - "reports", - "workspace", - "dataflows", - "tiles", - "tables", - "datasources", - ] - - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def web_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.web_url - - @web_url.setter - def web_url(self, web_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.web_url = web_url - - @property - def reports(self) -> Optional[list[PowerBIReport]]: - return None if self.attributes is None else self.attributes.reports - - @reports.setter - def reports(self, reports: Optional[list[PowerBIReport]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.reports = reports - - @property - def workspace(self) -> Optional[PowerBIWorkspace]: - return None if self.attributes is None else self.attributes.workspace - - @workspace.setter - def workspace(self, workspace: Optional[PowerBIWorkspace]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace = workspace - - @property - def dataflows(self) -> Optional[list[PowerBIDataflow]]: - return None if self.attributes is None else self.attributes.dataflows - - @dataflows.setter - def dataflows(self, dataflows: Optional[list[PowerBIDataflow]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dataflows = dataflows - - @property - def tiles(self) -> Optional[list[PowerBITile]]: - return None if self.attributes is None else self.attributes.tiles - - @tiles.setter - def tiles(self, tiles: Optional[list[PowerBITile]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tiles = tiles - - @property - def tables(self) -> Optional[list[PowerBITable]]: - return None if self.attributes is None else self.attributes.tables - - @tables.setter - def tables(self, tables: Optional[list[PowerBITable]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tables = tables - - @property - def datasources(self) -> Optional[list[PowerBIDatasource]]: - return None if self.attributes is None else self.attributes.datasources - - @datasources.setter - def datasources(self, datasources: Optional[list[PowerBIDatasource]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasources = datasources - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field( - None, description="", alias="workspaceQualifiedName" - ) - web_url: Optional[str] = Field(None, description="", alias="webUrl") - reports: Optional[list[PowerBIReport]] = Field( - None, description="", alias="reports" - ) # relationship - workspace: Optional[PowerBIWorkspace] = Field( - None, description="", alias="workspace" - ) # relationship - dataflows: Optional[list[PowerBIDataflow]] = Field( - None, description="", alias="dataflows" - ) # relationship - tiles: Optional[list[PowerBITile]] = Field( - None, description="", alias="tiles" - ) # relationship - tables: Optional[list[PowerBITable]] = Field( - None, description="", alias="tables" - ) # relationship - datasources: Optional[list[PowerBIDatasource]] = Field( - None, description="", alias="datasources" - ) # relationship - - attributes: "PowerBIDataset.Attributes" = Field( - default_factory=lambda: PowerBIDataset.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBIDashboard(PowerBI): - """Description""" - - type_name: str = Field("PowerBIDashboard", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBIDashboard": - raise ValueError("must be PowerBIDashboard") - return v - - def __setattr__(self, name, value): - if name in PowerBIDashboard._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "workspace_qualified_name", - "web_url", - "tile_count", - "workspace", - "tiles", - ] - - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def web_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.web_url - - @web_url.setter - def web_url(self, web_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.web_url = web_url - - @property - def tile_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.tile_count - - @tile_count.setter - def tile_count(self, tile_count: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tile_count = tile_count - - @property - def workspace(self) -> Optional[PowerBIWorkspace]: - return None if self.attributes is None else self.attributes.workspace - - @workspace.setter - def workspace(self, workspace: Optional[PowerBIWorkspace]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace = workspace - - @property - def tiles(self) -> Optional[list[PowerBITile]]: - return None if self.attributes is None else self.attributes.tiles - - @tiles.setter - def tiles(self, tiles: Optional[list[PowerBITile]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.tiles = tiles - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field( - None, description="", alias="workspaceQualifiedName" - ) - web_url: Optional[str] = Field(None, description="", alias="webUrl") - tile_count: Optional[int] = Field(None, description="", alias="tileCount") - workspace: Optional[PowerBIWorkspace] = Field( - None, description="", alias="workspace" - ) # relationship - tiles: Optional[list[PowerBITile]] = Field( - None, description="", alias="tiles" - ) # relationship - - attributes: "PowerBIDashboard.Attributes" = Field( - default_factory=lambda: PowerBIDashboard.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBIDataflow(PowerBI): - """Description""" - - type_name: str = Field("PowerBIDataflow", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBIDataflow": - raise ValueError("must be PowerBIDataflow") - return v - - def __setattr__(self, name, value): - if name in PowerBIDataflow._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "workspace_qualified_name", - "web_url", - "workspace", - "datasets", - ] - - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def web_url(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.web_url - - @web_url.setter - def web_url(self, web_url: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.web_url = web_url - - @property - def workspace(self) -> Optional[PowerBIWorkspace]: - return None if self.attributes is None else self.attributes.workspace - - @workspace.setter - def workspace(self, workspace: Optional[PowerBIWorkspace]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace = workspace - - @property - def datasets(self) -> Optional[list[PowerBIDataset]]: - return None if self.attributes is None else self.attributes.datasets - - @datasets.setter - def datasets(self, datasets: Optional[list[PowerBIDataset]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.datasets = datasets - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field( - None, description="", alias="workspaceQualifiedName" - ) - web_url: Optional[str] = Field(None, description="", alias="webUrl") - workspace: Optional[PowerBIWorkspace] = Field( - None, description="", alias="workspace" - ) # relationship - datasets: Optional[list[PowerBIDataset]] = Field( - None, description="", alias="datasets" - ) # relationship - - attributes: "PowerBIDataflow.Attributes" = Field( - default_factory=lambda: PowerBIDataflow.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -class PowerBIPage(PowerBI): - """Description""" - - type_name: str = Field("PowerBIPage", allow_mutation=False) - - @validator("type_name") - def validate_type_name(cls, v): - if v != "PowerBIPage": - raise ValueError("must be PowerBIPage") - return v - - def __setattr__(self, name, value): - if name in PowerBIPage._convience_properties: - return object.__setattr__(self, name, value) - super().__setattr__(name, value) - - _convience_properties: ClassVar[list[str]] = [ - "workspace_qualified_name", - "report_qualified_name", - "report", - ] - - @property - def workspace_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.workspace_qualified_name - ) - - @workspace_qualified_name.setter - def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.workspace_qualified_name = workspace_qualified_name - - @property - def report_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.report_qualified_name - ) - - @report_qualified_name.setter - def report_qualified_name(self, report_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.report_qualified_name = report_qualified_name - - @property - def report(self) -> Optional[PowerBIReport]: - return None if self.attributes is None else self.attributes.report - - @report.setter - def report(self, report: Optional[PowerBIReport]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.report = report - - class Attributes(PowerBI.Attributes): - workspace_qualified_name: Optional[str] = Field( - None, description="", alias="workspaceQualifiedName" - ) - report_qualified_name: Optional[str] = Field( - None, description="", alias="reportQualifiedName" - ) - report: Optional[PowerBIReport] = Field( - None, description="", alias="report" - ) # relationship - - attributes: "PowerBIPage.Attributes" = Field( - default_factory=lambda: PowerBIPage.Attributes(), - description="Map of attributes in the instance and their values. The specific keys of this map will vary by " - "type, so are described in the sub-types of this schema.\n", - ) - - -PowerBIReport.Attributes.update_forward_refs() - - -PowerBIMeasure.Attributes.update_forward_refs() - - -PowerBIColumn.Attributes.update_forward_refs() - - -PowerBITable.Attributes.update_forward_refs() - - -PowerBITile.Attributes.update_forward_refs() - - -PowerBIDatasource.Attributes.update_forward_refs() - - -PowerBIWorkspace.Attributes.update_forward_refs() - - -PowerBIDataset.Attributes.update_forward_refs() - - -PowerBIDashboard.Attributes.update_forward_refs() - - -PowerBIDataflow.Attributes.update_forward_refs() - - -PowerBIPage.Attributes.update_forward_refs() +ThoughtspotAnswer.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset71.py b/pyatlan/model/assets/asset71.py index 470d1897c..075e7724a 100644 --- a/pyatlan/model/assets/asset71.py +++ b/pyatlan/model/assets/asset71.py @@ -8,1203 +8,1661 @@ from pydantic import Field, validator -from .asset46 import MicroStrategy +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, + TextField, +) +from .asset46 import PowerBI -class MicroStrategyReport(MicroStrategy): + +class PowerBIReport(PowerBI): """Description""" - type_name: str = Field("MicroStrategyReport", allow_mutation=False) + type_name: str = Field("PowerBIReport", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategyReport": - raise ValueError("must be MicroStrategyReport") + if v != "PowerBIReport": + raise ValueError("must be PowerBIReport") return v def __setattr__(self, name, value): - if name in MicroStrategyReport._convience_properties: + if name in PowerBIReport._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_report_type", - "micro_strategy_metrics", - "micro_strategy_project", - "micro_strategy_attributes", + WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + TBC + """ + DATASET_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "datasetQualifiedName", "datasetQualifiedName" + ) + """ + TBC + """ + WEB_URL: ClassVar[KeywordField] = KeywordField("webUrl", "webUrl") + """ + TBC + """ + PAGE_COUNT: ClassVar[NumericField] = NumericField("pageCount", "pageCount") + """ + TBC + """ + + WORKSPACE: ClassVar[RelationField] = RelationField("workspace") + """ + TBC + """ + TILES: ClassVar[RelationField] = RelationField("tiles") + """ + TBC + """ + PAGES: ClassVar[RelationField] = RelationField("pages") + """ + TBC + """ + DATASET: ClassVar[RelationField] = RelationField("dataset") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "workspace_qualified_name", + "dataset_qualified_name", + "web_url", + "page_count", + "workspace", + "tiles", + "pages", + "dataset", ] @property - def micro_strategy_report_type(self) -> Optional[str]: + def workspace_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_report_type + else self.attributes.workspace_qualified_name ) - @micro_strategy_report_type.setter - def micro_strategy_report_type(self, micro_strategy_report_type: Optional[str]): + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_report_type = micro_strategy_report_type + self.attributes.workspace_qualified_name = workspace_qualified_name @property - def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: + def dataset_qualified_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.micro_strategy_metrics + None if self.attributes is None else self.attributes.dataset_qualified_name ) - @micro_strategy_metrics.setter - def micro_strategy_metrics( - self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] - ): + @dataset_qualified_name.setter + def dataset_qualified_name(self, dataset_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metrics = micro_strategy_metrics + self.attributes.dataset_qualified_name = dataset_qualified_name @property - def micro_strategy_project(self) -> Optional[MicroStrategyProject]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_project - ) + def web_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.web_url - @micro_strategy_project.setter - def micro_strategy_project( - self, micro_strategy_project: Optional[MicroStrategyProject] - ): + @web_url.setter + def web_url(self, web_url: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_project = micro_strategy_project + self.attributes.web_url = web_url @property - def micro_strategy_attributes(self) -> Optional[list[MicroStrategyAttribute]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_attributes - ) + def page_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.page_count - @micro_strategy_attributes.setter - def micro_strategy_attributes( - self, micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] - ): + @page_count.setter + def page_count(self, page_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.page_count = page_count + + @property + def workspace(self) -> Optional[PowerBIWorkspace]: + return None if self.attributes is None else self.attributes.workspace + + @workspace.setter + def workspace(self, workspace: Optional[PowerBIWorkspace]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workspace = workspace + + @property + def tiles(self) -> Optional[list[PowerBITile]]: + return None if self.attributes is None else self.attributes.tiles + + @tiles.setter + def tiles(self, tiles: Optional[list[PowerBITile]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_attributes = micro_strategy_attributes + self.attributes.tiles = tiles - class Attributes(MicroStrategy.Attributes): - micro_strategy_report_type: Optional[str] = Field( - None, description="", alias="microStrategyReportType" + @property + def pages(self) -> Optional[list[PowerBIPage]]: + return None if self.attributes is None else self.attributes.pages + + @pages.setter + def pages(self, pages: Optional[list[PowerBIPage]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.pages = pages + + @property + def dataset(self) -> Optional[PowerBIDataset]: + return None if self.attributes is None else self.attributes.dataset + + @dataset.setter + def dataset(self, dataset: Optional[PowerBIDataset]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dataset = dataset + + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field( + None, description="", alias="workspaceQualifiedName" + ) + dataset_qualified_name: Optional[str] = Field( + None, description="", alias="datasetQualifiedName" ) - micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( - None, description="", alias="microStrategyMetrics" + web_url: Optional[str] = Field(None, description="", alias="webUrl") + page_count: Optional[int] = Field(None, description="", alias="pageCount") + workspace: Optional[PowerBIWorkspace] = Field( + None, description="", alias="workspace" ) # relationship - micro_strategy_project: Optional[MicroStrategyProject] = Field( - None, description="", alias="microStrategyProject" + tiles: Optional[list[PowerBITile]] = Field( + None, description="", alias="tiles" ) # relationship - micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] = Field( - None, description="", alias="microStrategyAttributes" + pages: Optional[list[PowerBIPage]] = Field( + None, description="", alias="pages" + ) # relationship + dataset: Optional[PowerBIDataset] = Field( + None, description="", alias="dataset" ) # relationship - attributes: "MicroStrategyReport.Attributes" = Field( - default_factory=lambda: MicroStrategyReport.Attributes(), + attributes: "PowerBIReport.Attributes" = Field( + default_factory=lambda: PowerBIReport.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class MicroStrategyProject(MicroStrategy): +class PowerBIMeasure(PowerBI): """Description""" - type_name: str = Field("MicroStrategyProject", allow_mutation=False) + type_name: str = Field("PowerBIMeasure", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategyProject": - raise ValueError("must be MicroStrategyProject") + if v != "PowerBIMeasure": + raise ValueError("must be PowerBIMeasure") return v def __setattr__(self, name, value): - if name in MicroStrategyProject._convience_properties: + if name in PowerBIMeasure._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_reports", - "micro_strategy_facts", - "micro_strategy_metrics", - "micro_strategy_visualizations", - "micro_strategy_documents", - "micro_strategy_cubes", - "micro_strategy_dossiers", - "micro_strategy_attributes", + WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + TBC + """ + DATASET_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "datasetQualifiedName", "datasetQualifiedName" + ) + """ + TBC + """ + POWER_BI_MEASURE_EXPRESSION: ClassVar[TextField] = TextField( + "powerBIMeasureExpression", "powerBIMeasureExpression" + ) + """ + TBC + """ + POWER_BI_IS_EXTERNAL_MEASURE: ClassVar[BooleanField] = BooleanField( + "powerBIIsExternalMeasure", "powerBIIsExternalMeasure" + ) + """ + TBC + """ + + TABLE: ClassVar[RelationField] = RelationField("table") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "workspace_qualified_name", + "dataset_qualified_name", + "power_b_i_measure_expression", + "power_b_i_is_external_measure", + "table", ] @property - def micro_strategy_reports(self) -> Optional[list[MicroStrategyReport]]: + def workspace_qualified_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.micro_strategy_reports + None + if self.attributes is None + else self.attributes.workspace_qualified_name ) - @micro_strategy_reports.setter - def micro_strategy_reports( - self, micro_strategy_reports: Optional[list[MicroStrategyReport]] - ): + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_reports = micro_strategy_reports + self.attributes.workspace_qualified_name = workspace_qualified_name @property - def micro_strategy_facts(self) -> Optional[list[MicroStrategyFact]]: - return None if self.attributes is None else self.attributes.micro_strategy_facts - - @micro_strategy_facts.setter - def micro_strategy_facts( - self, micro_strategy_facts: Optional[list[MicroStrategyFact]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_facts = micro_strategy_facts - - @property - def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: + def dataset_qualified_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.micro_strategy_metrics + None if self.attributes is None else self.attributes.dataset_qualified_name ) - @micro_strategy_metrics.setter - def micro_strategy_metrics( - self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] - ): + @dataset_qualified_name.setter + def dataset_qualified_name(self, dataset_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metrics = micro_strategy_metrics + self.attributes.dataset_qualified_name = dataset_qualified_name @property - def micro_strategy_visualizations( - self, - ) -> Optional[list[MicroStrategyVisualization]]: + def power_b_i_measure_expression(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_visualizations + else self.attributes.power_b_i_measure_expression ) - @micro_strategy_visualizations.setter - def micro_strategy_visualizations( - self, micro_strategy_visualizations: Optional[list[MicroStrategyVisualization]] - ): + @power_b_i_measure_expression.setter + def power_b_i_measure_expression(self, power_b_i_measure_expression: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_visualizations = micro_strategy_visualizations + self.attributes.power_b_i_measure_expression = power_b_i_measure_expression @property - def micro_strategy_documents(self) -> Optional[list[MicroStrategyDocument]]: + def power_b_i_is_external_measure(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.micro_strategy_documents + else self.attributes.power_b_i_is_external_measure ) - @micro_strategy_documents.setter - def micro_strategy_documents( - self, micro_strategy_documents: Optional[list[MicroStrategyDocument]] + @power_b_i_is_external_measure.setter + def power_b_i_is_external_measure( + self, power_b_i_is_external_measure: Optional[bool] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_documents = micro_strategy_documents + self.attributes.power_b_i_is_external_measure = power_b_i_is_external_measure @property - def micro_strategy_cubes(self) -> Optional[list[MicroStrategyCube]]: - return None if self.attributes is None else self.attributes.micro_strategy_cubes + def table(self) -> Optional[PowerBITable]: + return None if self.attributes is None else self.attributes.table - @micro_strategy_cubes.setter - def micro_strategy_cubes( - self, micro_strategy_cubes: Optional[list[MicroStrategyCube]] - ): + @table.setter + def table(self, table: Optional[PowerBITable]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_cubes = micro_strategy_cubes + self.attributes.table = table - @property - def micro_strategy_dossiers(self) -> Optional[list[MicroStrategyDossier]]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_dossiers + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field( + None, description="", alias="workspaceQualifiedName" ) - - @micro_strategy_dossiers.setter - def micro_strategy_dossiers( - self, micro_strategy_dossiers: Optional[list[MicroStrategyDossier]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_dossiers = micro_strategy_dossiers - - @property - def micro_strategy_attributes(self) -> Optional[list[MicroStrategyAttribute]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_attributes + dataset_qualified_name: Optional[str] = Field( + None, description="", alias="datasetQualifiedName" ) - - @micro_strategy_attributes.setter - def micro_strategy_attributes( - self, micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_attributes = micro_strategy_attributes - - class Attributes(MicroStrategy.Attributes): - micro_strategy_reports: Optional[list[MicroStrategyReport]] = Field( - None, description="", alias="microStrategyReports" - ) # relationship - micro_strategy_facts: Optional[list[MicroStrategyFact]] = Field( - None, description="", alias="microStrategyFacts" - ) # relationship - micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( - None, description="", alias="microStrategyMetrics" - ) # relationship - micro_strategy_visualizations: Optional[ - list[MicroStrategyVisualization] - ] = Field( - None, description="", alias="microStrategyVisualizations" - ) # relationship - micro_strategy_documents: Optional[list[MicroStrategyDocument]] = Field( - None, description="", alias="microStrategyDocuments" - ) # relationship - micro_strategy_cubes: Optional[list[MicroStrategyCube]] = Field( - None, description="", alias="microStrategyCubes" - ) # relationship - micro_strategy_dossiers: Optional[list[MicroStrategyDossier]] = Field( - None, description="", alias="microStrategyDossiers" - ) # relationship - micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] = Field( - None, description="", alias="microStrategyAttributes" + power_b_i_measure_expression: Optional[str] = Field( + None, description="", alias="powerBIMeasureExpression" + ) + power_b_i_is_external_measure: Optional[bool] = Field( + None, description="", alias="powerBIIsExternalMeasure" + ) + table: Optional[PowerBITable] = Field( + None, description="", alias="table" ) # relationship - attributes: "MicroStrategyProject.Attributes" = Field( - default_factory=lambda: MicroStrategyProject.Attributes(), + attributes: "PowerBIMeasure.Attributes" = Field( + default_factory=lambda: PowerBIMeasure.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class MicroStrategyMetric(MicroStrategy): +class PowerBIColumn(PowerBI): """Description""" - type_name: str = Field("MicroStrategyMetric", allow_mutation=False) + type_name: str = Field("PowerBIColumn", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategyMetric": - raise ValueError("must be MicroStrategyMetric") + if v != "PowerBIColumn": + raise ValueError("must be PowerBIColumn") return v def __setattr__(self, name, value): - if name in MicroStrategyMetric._convience_properties: + if name in PowerBIColumn._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_metric_expression", - "micro_strategy_attribute_qualified_names", - "micro_strategy_attribute_names", - "micro_strategy_fact_qualified_names", - "micro_strategy_fact_names", - "micro_strategy_metric_parent_qualified_names", - "micro_strategy_metric_parent_names", - "micro_strategy_metric_parents", - "micro_strategy_facts", - "micro_strategy_reports", - "micro_strategy_cubes", - "micro_strategy_metric_children", - "micro_strategy_project", - "micro_strategy_attributes", + WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + TBC + """ + DATASET_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "datasetQualifiedName", "datasetQualifiedName" + ) + """ + TBC + """ + POWER_BI_COLUMN_DATA_CATEGORY: ClassVar[KeywordField] = KeywordField( + "powerBIColumnDataCategory", "powerBIColumnDataCategory" + ) + """ + TBC + """ + POWER_BI_COLUMN_DATA_TYPE: ClassVar[KeywordField] = KeywordField( + "powerBIColumnDataType", "powerBIColumnDataType" + ) + """ + TBC + """ + POWER_BI_SORT_BY_COLUMN: ClassVar[KeywordField] = KeywordField( + "powerBISortByColumn", "powerBISortByColumn" + ) + """ + TBC + """ + POWER_BI_COLUMN_SUMMARIZE_BY: ClassVar[KeywordField] = KeywordField( + "powerBIColumnSummarizeBy", "powerBIColumnSummarizeBy" + ) + """ + TBC + """ + + TABLE: ClassVar[RelationField] = RelationField("table") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "workspace_qualified_name", + "dataset_qualified_name", + "power_b_i_column_data_category", + "power_b_i_column_data_type", + "power_b_i_sort_by_column", + "power_b_i_column_summarize_by", + "table", ] @property - def micro_strategy_metric_expression(self) -> Optional[str]: + def workspace_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_metric_expression + else self.attributes.workspace_qualified_name ) - @micro_strategy_metric_expression.setter - def micro_strategy_metric_expression( - self, micro_strategy_metric_expression: Optional[str] - ): + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metric_expression = ( - micro_strategy_metric_expression - ) + self.attributes.workspace_qualified_name = workspace_qualified_name @property - def micro_strategy_attribute_qualified_names(self) -> Optional[set[str]]: + def dataset_qualified_name(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.micro_strategy_attribute_qualified_names + None if self.attributes is None else self.attributes.dataset_qualified_name ) - @micro_strategy_attribute_qualified_names.setter - def micro_strategy_attribute_qualified_names( - self, micro_strategy_attribute_qualified_names: Optional[set[str]] - ): + @dataset_qualified_name.setter + def dataset_qualified_name(self, dataset_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_attribute_qualified_names = ( - micro_strategy_attribute_qualified_names - ) + self.attributes.dataset_qualified_name = dataset_qualified_name @property - def micro_strategy_attribute_names(self) -> Optional[set[str]]: + def power_b_i_column_data_category(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_attribute_names + else self.attributes.power_b_i_column_data_category ) - @micro_strategy_attribute_names.setter - def micro_strategy_attribute_names( - self, micro_strategy_attribute_names: Optional[set[str]] + @power_b_i_column_data_category.setter + def power_b_i_column_data_category( + self, power_b_i_column_data_category: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_attribute_names = micro_strategy_attribute_names + self.attributes.power_b_i_column_data_category = power_b_i_column_data_category @property - def micro_strategy_fact_qualified_names(self) -> Optional[set[str]]: + def power_b_i_column_data_type(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_fact_qualified_names + else self.attributes.power_b_i_column_data_type ) - @micro_strategy_fact_qualified_names.setter - def micro_strategy_fact_qualified_names( - self, micro_strategy_fact_qualified_names: Optional[set[str]] - ): + @power_b_i_column_data_type.setter + def power_b_i_column_data_type(self, power_b_i_column_data_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_fact_qualified_names = ( - micro_strategy_fact_qualified_names - ) + self.attributes.power_b_i_column_data_type = power_b_i_column_data_type @property - def micro_strategy_fact_names(self) -> Optional[set[str]]: + def power_b_i_sort_by_column(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_fact_names + else self.attributes.power_b_i_sort_by_column ) - @micro_strategy_fact_names.setter - def micro_strategy_fact_names(self, micro_strategy_fact_names: Optional[set[str]]): + @power_b_i_sort_by_column.setter + def power_b_i_sort_by_column(self, power_b_i_sort_by_column: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_fact_names = micro_strategy_fact_names + self.attributes.power_b_i_sort_by_column = power_b_i_sort_by_column @property - def micro_strategy_metric_parent_qualified_names(self) -> Optional[set[str]]: + def power_b_i_column_summarize_by(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_metric_parent_qualified_names + else self.attributes.power_b_i_column_summarize_by ) - @micro_strategy_metric_parent_qualified_names.setter - def micro_strategy_metric_parent_qualified_names( - self, micro_strategy_metric_parent_qualified_names: Optional[set[str]] + @power_b_i_column_summarize_by.setter + def power_b_i_column_summarize_by( + self, power_b_i_column_summarize_by: Optional[str] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metric_parent_qualified_names = ( - micro_strategy_metric_parent_qualified_names - ) + self.attributes.power_b_i_column_summarize_by = power_b_i_column_summarize_by @property - def micro_strategy_metric_parent_names(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_metric_parent_names - ) + def table(self) -> Optional[PowerBITable]: + return None if self.attributes is None else self.attributes.table - @micro_strategy_metric_parent_names.setter - def micro_strategy_metric_parent_names( - self, micro_strategy_metric_parent_names: Optional[set[str]] - ): + @table.setter + def table(self, table: Optional[PowerBITable]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metric_parent_names = ( - micro_strategy_metric_parent_names + self.attributes.table = table + + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field( + None, description="", alias="workspaceQualifiedName" + ) + dataset_qualified_name: Optional[str] = Field( + None, description="", alias="datasetQualifiedName" + ) + power_b_i_column_data_category: Optional[str] = Field( + None, description="", alias="powerBIColumnDataCategory" ) + power_b_i_column_data_type: Optional[str] = Field( + None, description="", alias="powerBIColumnDataType" + ) + power_b_i_sort_by_column: Optional[str] = Field( + None, description="", alias="powerBISortByColumn" + ) + power_b_i_column_summarize_by: Optional[str] = Field( + None, description="", alias="powerBIColumnSummarizeBy" + ) + table: Optional[PowerBITable] = Field( + None, description="", alias="table" + ) # relationship + + attributes: "PowerBIColumn.Attributes" = Field( + default_factory=lambda: PowerBIColumn.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class PowerBITable(PowerBI): + """Description""" + + type_name: str = Field("PowerBITable", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "PowerBITable": + raise ValueError("must be PowerBITable") + return v + + def __setattr__(self, name, value): + if name in PowerBITable._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + TBC + """ + DATASET_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "datasetQualifiedName", "datasetQualifiedName" + ) + """ + TBC + """ + POWER_BI_TABLE_SOURCE_EXPRESSIONS: ClassVar[KeywordField] = KeywordField( + "powerBITableSourceExpressions", "powerBITableSourceExpressions" + ) + """ + TBC + """ + POWER_BI_TABLE_COLUMN_COUNT: ClassVar[NumericField] = NumericField( + "powerBITableColumnCount", "powerBITableColumnCount" + ) + """ + TBC + """ + POWER_BI_TABLE_MEASURE_COUNT: ClassVar[NumericField] = NumericField( + "powerBITableMeasureCount", "powerBITableMeasureCount" + ) + """ + TBC + """ + + COLUMNS: ClassVar[RelationField] = RelationField("columns") + """ + TBC + """ + MEASURES: ClassVar[RelationField] = RelationField("measures") + """ + TBC + """ + DATASET: ClassVar[RelationField] = RelationField("dataset") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "workspace_qualified_name", + "dataset_qualified_name", + "power_b_i_table_source_expressions", + "power_b_i_table_column_count", + "power_b_i_table_measure_count", + "columns", + "measures", + "dataset", + ] @property - def micro_strategy_metric_parents(self) -> Optional[list[MicroStrategyMetric]]: + def workspace_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_metric_parents + else self.attributes.workspace_qualified_name ) - @micro_strategy_metric_parents.setter - def micro_strategy_metric_parents( - self, micro_strategy_metric_parents: Optional[list[MicroStrategyMetric]] - ): + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metric_parents = micro_strategy_metric_parents + self.attributes.workspace_qualified_name = workspace_qualified_name @property - def micro_strategy_facts(self) -> Optional[list[MicroStrategyFact]]: - return None if self.attributes is None else self.attributes.micro_strategy_facts + def dataset_qualified_name(self) -> Optional[str]: + return ( + None if self.attributes is None else self.attributes.dataset_qualified_name + ) - @micro_strategy_facts.setter - def micro_strategy_facts( - self, micro_strategy_facts: Optional[list[MicroStrategyFact]] - ): + @dataset_qualified_name.setter + def dataset_qualified_name(self, dataset_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_facts = micro_strategy_facts + self.attributes.dataset_qualified_name = dataset_qualified_name @property - def micro_strategy_reports(self) -> Optional[list[MicroStrategyReport]]: + def power_b_i_table_source_expressions(self) -> Optional[set[str]]: return ( - None if self.attributes is None else self.attributes.micro_strategy_reports + None + if self.attributes is None + else self.attributes.power_b_i_table_source_expressions ) - @micro_strategy_reports.setter - def micro_strategy_reports( - self, micro_strategy_reports: Optional[list[MicroStrategyReport]] + @power_b_i_table_source_expressions.setter + def power_b_i_table_source_expressions( + self, power_b_i_table_source_expressions: Optional[set[str]] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_reports = micro_strategy_reports + self.attributes.power_b_i_table_source_expressions = ( + power_b_i_table_source_expressions + ) @property - def micro_strategy_cubes(self) -> Optional[list[MicroStrategyCube]]: - return None if self.attributes is None else self.attributes.micro_strategy_cubes + def power_b_i_table_column_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.power_b_i_table_column_count + ) - @micro_strategy_cubes.setter - def micro_strategy_cubes( - self, micro_strategy_cubes: Optional[list[MicroStrategyCube]] - ): + @power_b_i_table_column_count.setter + def power_b_i_table_column_count(self, power_b_i_table_column_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_cubes = micro_strategy_cubes + self.attributes.power_b_i_table_column_count = power_b_i_table_column_count @property - def micro_strategy_metric_children(self) -> Optional[list[MicroStrategyMetric]]: + def power_b_i_table_measure_count(self) -> Optional[int]: return ( None if self.attributes is None - else self.attributes.micro_strategy_metric_children + else self.attributes.power_b_i_table_measure_count ) - @micro_strategy_metric_children.setter - def micro_strategy_metric_children( - self, micro_strategy_metric_children: Optional[list[MicroStrategyMetric]] + @power_b_i_table_measure_count.setter + def power_b_i_table_measure_count( + self, power_b_i_table_measure_count: Optional[int] ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metric_children = micro_strategy_metric_children + self.attributes.power_b_i_table_measure_count = power_b_i_table_measure_count @property - def micro_strategy_project(self) -> Optional[MicroStrategyProject]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_project - ) + def columns(self) -> Optional[list[PowerBIColumn]]: + return None if self.attributes is None else self.attributes.columns - @micro_strategy_project.setter - def micro_strategy_project( - self, micro_strategy_project: Optional[MicroStrategyProject] - ): + @columns.setter + def columns(self, columns: Optional[list[PowerBIColumn]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_project = micro_strategy_project + self.attributes.columns = columns @property - def micro_strategy_attributes(self) -> Optional[list[MicroStrategyAttribute]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_attributes - ) + def measures(self) -> Optional[list[PowerBIMeasure]]: + return None if self.attributes is None else self.attributes.measures - @micro_strategy_attributes.setter - def micro_strategy_attributes( - self, micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] - ): + @measures.setter + def measures(self, measures: Optional[list[PowerBIMeasure]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_attributes = micro_strategy_attributes + self.attributes.measures = measures - class Attributes(MicroStrategy.Attributes): - micro_strategy_metric_expression: Optional[str] = Field( - None, description="", alias="microStrategyMetricExpression" - ) - micro_strategy_attribute_qualified_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyAttributeQualifiedNames" - ) - micro_strategy_attribute_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyAttributeNames" + @property + def dataset(self) -> Optional[PowerBIDataset]: + return None if self.attributes is None else self.attributes.dataset + + @dataset.setter + def dataset(self, dataset: Optional[PowerBIDataset]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dataset = dataset + + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field( + None, description="", alias="workspaceQualifiedName" ) - micro_strategy_fact_qualified_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyFactQualifiedNames" + dataset_qualified_name: Optional[str] = Field( + None, description="", alias="datasetQualifiedName" ) - micro_strategy_fact_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyFactNames" + power_b_i_table_source_expressions: Optional[set[str]] = Field( + None, description="", alias="powerBITableSourceExpressions" ) - micro_strategy_metric_parent_qualified_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyMetricParentQualifiedNames" + power_b_i_table_column_count: Optional[int] = Field( + None, description="", alias="powerBITableColumnCount" ) - micro_strategy_metric_parent_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyMetricParentNames" + power_b_i_table_measure_count: Optional[int] = Field( + None, description="", alias="powerBITableMeasureCount" ) - micro_strategy_metric_parents: Optional[list[MicroStrategyMetric]] = Field( - None, description="", alias="microStrategyMetricParents" - ) # relationship - micro_strategy_facts: Optional[list[MicroStrategyFact]] = Field( - None, description="", alias="microStrategyFacts" + columns: Optional[list[PowerBIColumn]] = Field( + None, description="", alias="columns" ) # relationship - micro_strategy_reports: Optional[list[MicroStrategyReport]] = Field( - None, description="", alias="microStrategyReports" + measures: Optional[list[PowerBIMeasure]] = Field( + None, description="", alias="measures" ) # relationship - micro_strategy_cubes: Optional[list[MicroStrategyCube]] = Field( - None, description="", alias="microStrategyCubes" - ) # relationship - micro_strategy_metric_children: Optional[list[MicroStrategyMetric]] = Field( - None, description="", alias="microStrategyMetricChildren" - ) # relationship - micro_strategy_project: Optional[MicroStrategyProject] = Field( - None, description="", alias="microStrategyProject" - ) # relationship - micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] = Field( - None, description="", alias="microStrategyAttributes" + dataset: Optional[PowerBIDataset] = Field( + None, description="", alias="dataset" ) # relationship - attributes: "MicroStrategyMetric.Attributes" = Field( - default_factory=lambda: MicroStrategyMetric.Attributes(), + attributes: "PowerBITable.Attributes" = Field( + default_factory=lambda: PowerBITable.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class MicroStrategyCube(MicroStrategy): +class PowerBITile(PowerBI): """Description""" - type_name: str = Field("MicroStrategyCube", allow_mutation=False) + type_name: str = Field("PowerBITile", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategyCube": - raise ValueError("must be MicroStrategyCube") + if v != "PowerBITile": + raise ValueError("must be PowerBITile") return v def __setattr__(self, name, value): - if name in MicroStrategyCube._convience_properties: + if name in PowerBITile._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_cube_type", - "micro_strategy_cube_query", - "micro_strategy_metrics", - "micro_strategy_project", - "micro_strategy_attributes", + WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + TBC + """ + DASHBOARD_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "dashboardQualifiedName", "dashboardQualifiedName" + ) + """ + TBC + """ + + REPORT: ClassVar[RelationField] = RelationField("report") + """ + TBC + """ + DATASET: ClassVar[RelationField] = RelationField("dataset") + """ + TBC + """ + DASHBOARD: ClassVar[RelationField] = RelationField("dashboard") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "workspace_qualified_name", + "dashboard_qualified_name", + "report", + "dataset", + "dashboard", ] @property - def micro_strategy_cube_type(self) -> Optional[str]: + def workspace_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_cube_type + else self.attributes.workspace_qualified_name ) - @micro_strategy_cube_type.setter - def micro_strategy_cube_type(self, micro_strategy_cube_type: Optional[str]): + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_cube_type = micro_strategy_cube_type + self.attributes.workspace_qualified_name = workspace_qualified_name @property - def micro_strategy_cube_query(self) -> Optional[str]: + def dashboard_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_cube_query + else self.attributes.dashboard_qualified_name ) - @micro_strategy_cube_query.setter - def micro_strategy_cube_query(self, micro_strategy_cube_query: Optional[str]): + @dashboard_qualified_name.setter + def dashboard_qualified_name(self, dashboard_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_cube_query = micro_strategy_cube_query + self.attributes.dashboard_qualified_name = dashboard_qualified_name @property - def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_metrics - ) + def report(self) -> Optional[PowerBIReport]: + return None if self.attributes is None else self.attributes.report - @micro_strategy_metrics.setter - def micro_strategy_metrics( - self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] - ): + @report.setter + def report(self, report: Optional[PowerBIReport]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metrics = micro_strategy_metrics + self.attributes.report = report @property - def micro_strategy_project(self) -> Optional[MicroStrategyProject]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_project - ) + def dataset(self) -> Optional[PowerBIDataset]: + return None if self.attributes is None else self.attributes.dataset - @micro_strategy_project.setter - def micro_strategy_project( - self, micro_strategy_project: Optional[MicroStrategyProject] - ): + @dataset.setter + def dataset(self, dataset: Optional[PowerBIDataset]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_project = micro_strategy_project + self.attributes.dataset = dataset @property - def micro_strategy_attributes(self) -> Optional[list[MicroStrategyAttribute]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_attributes - ) + def dashboard(self) -> Optional[PowerBIDashboard]: + return None if self.attributes is None else self.attributes.dashboard - @micro_strategy_attributes.setter - def micro_strategy_attributes( - self, micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] - ): + @dashboard.setter + def dashboard(self, dashboard: Optional[PowerBIDashboard]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_attributes = micro_strategy_attributes + self.attributes.dashboard = dashboard - class Attributes(MicroStrategy.Attributes): - micro_strategy_cube_type: Optional[str] = Field( - None, description="", alias="microStrategyCubeType" + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field( + None, description="", alias="workspaceQualifiedName" ) - micro_strategy_cube_query: Optional[str] = Field( - None, description="", alias="microStrategyCubeQuery" + dashboard_qualified_name: Optional[str] = Field( + None, description="", alias="dashboardQualifiedName" ) - micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( - None, description="", alias="microStrategyMetrics" + report: Optional[PowerBIReport] = Field( + None, description="", alias="report" ) # relationship - micro_strategy_project: Optional[MicroStrategyProject] = Field( - None, description="", alias="microStrategyProject" + dataset: Optional[PowerBIDataset] = Field( + None, description="", alias="dataset" ) # relationship - micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] = Field( - None, description="", alias="microStrategyAttributes" + dashboard: Optional[PowerBIDashboard] = Field( + None, description="", alias="dashboard" ) # relationship - attributes: "MicroStrategyCube.Attributes" = Field( - default_factory=lambda: MicroStrategyCube.Attributes(), + attributes: "PowerBITile.Attributes" = Field( + default_factory=lambda: PowerBITile.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class MicroStrategyDossier(MicroStrategy): +class PowerBIDatasource(PowerBI): """Description""" - type_name: str = Field("MicroStrategyDossier", allow_mutation=False) + type_name: str = Field("PowerBIDatasource", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategyDossier": - raise ValueError("must be MicroStrategyDossier") + if v != "PowerBIDatasource": + raise ValueError("must be PowerBIDatasource") return v def __setattr__(self, name, value): - if name in MicroStrategyDossier._convience_properties: + if name in PowerBIDatasource._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_dossier_chapter_names", - "micro_strategy_visualizations", - "micro_strategy_project", + CONNECTION_DETAILS: ClassVar[KeywordField] = KeywordField( + "connectionDetails", "connectionDetails" + ) + """ + TBC + """ + + DATASETS: ClassVar[RelationField] = RelationField("datasets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "connection_details", + "datasets", ] @property - def micro_strategy_dossier_chapter_names(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_dossier_chapter_names - ) + def connection_details(self) -> Optional[dict[str, str]]: + return None if self.attributes is None else self.attributes.connection_details - @micro_strategy_dossier_chapter_names.setter - def micro_strategy_dossier_chapter_names( - self, micro_strategy_dossier_chapter_names: Optional[set[str]] - ): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.micro_strategy_dossier_chapter_names = ( - micro_strategy_dossier_chapter_names - ) - - @property - def micro_strategy_visualizations( - self, - ) -> Optional[list[MicroStrategyVisualization]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_visualizations - ) - - @micro_strategy_visualizations.setter - def micro_strategy_visualizations( - self, micro_strategy_visualizations: Optional[list[MicroStrategyVisualization]] - ): + @connection_details.setter + def connection_details(self, connection_details: Optional[dict[str, str]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_visualizations = micro_strategy_visualizations + self.attributes.connection_details = connection_details @property - def micro_strategy_project(self) -> Optional[MicroStrategyProject]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_project - ) + def datasets(self) -> Optional[list[PowerBIDataset]]: + return None if self.attributes is None else self.attributes.datasets - @micro_strategy_project.setter - def micro_strategy_project( - self, micro_strategy_project: Optional[MicroStrategyProject] - ): + @datasets.setter + def datasets(self, datasets: Optional[list[PowerBIDataset]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_project = micro_strategy_project + self.attributes.datasets = datasets - class Attributes(MicroStrategy.Attributes): - micro_strategy_dossier_chapter_names: Optional[set[str]] = Field( - None, description="", alias="microStrategyDossierChapterNames" + class Attributes(PowerBI.Attributes): + connection_details: Optional[dict[str, str]] = Field( + None, description="", alias="connectionDetails" ) - micro_strategy_visualizations: Optional[ - list[MicroStrategyVisualization] - ] = Field( - None, description="", alias="microStrategyVisualizations" - ) # relationship - micro_strategy_project: Optional[MicroStrategyProject] = Field( - None, description="", alias="microStrategyProject" + datasets: Optional[list[PowerBIDataset]] = Field( + None, description="", alias="datasets" ) # relationship - attributes: "MicroStrategyDossier.Attributes" = Field( - default_factory=lambda: MicroStrategyDossier.Attributes(), + attributes: "PowerBIDatasource.Attributes" = Field( + default_factory=lambda: PowerBIDatasource.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class MicroStrategyFact(MicroStrategy): +class PowerBIWorkspace(PowerBI): """Description""" - type_name: str = Field("MicroStrategyFact", allow_mutation=False) + type_name: str = Field("PowerBIWorkspace", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategyFact": - raise ValueError("must be MicroStrategyFact") + if v != "PowerBIWorkspace": + raise ValueError("must be PowerBIWorkspace") return v def __setattr__(self, name, value): - if name in MicroStrategyFact._convience_properties: + if name in PowerBIWorkspace._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_fact_expressions", - "micro_strategy_metrics", - "micro_strategy_project", + WEB_URL: ClassVar[KeywordField] = KeywordField("webUrl", "webUrl") + """ + TBC + """ + REPORT_COUNT: ClassVar[NumericField] = NumericField("reportCount", "reportCount") + """ + TBC + """ + DASHBOARD_COUNT: ClassVar[NumericField] = NumericField( + "dashboardCount", "dashboardCount" + ) + """ + TBC + """ + DATASET_COUNT: ClassVar[NumericField] = NumericField("datasetCount", "datasetCount") + """ + TBC + """ + DATAFLOW_COUNT: ClassVar[NumericField] = NumericField( + "dataflowCount", "dataflowCount" + ) + """ + TBC + """ + + REPORTS: ClassVar[RelationField] = RelationField("reports") + """ + TBC + """ + DATASETS: ClassVar[RelationField] = RelationField("datasets") + """ + TBC + """ + DASHBOARDS: ClassVar[RelationField] = RelationField("dashboards") + """ + TBC + """ + DATAFLOWS: ClassVar[RelationField] = RelationField("dataflows") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "web_url", + "report_count", + "dashboard_count", + "dataset_count", + "dataflow_count", + "reports", + "datasets", + "dashboards", + "dataflows", ] @property - def micro_strategy_fact_expressions(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_fact_expressions - ) + def web_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.web_url - @micro_strategy_fact_expressions.setter - def micro_strategy_fact_expressions( - self, micro_strategy_fact_expressions: Optional[set[str]] - ): + @web_url.setter + def web_url(self, web_url: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_fact_expressions = ( - micro_strategy_fact_expressions - ) + self.attributes.web_url = web_url @property - def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_metrics - ) + def report_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.report_count - @micro_strategy_metrics.setter - def micro_strategy_metrics( - self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] - ): + @report_count.setter + def report_count(self, report_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metrics = micro_strategy_metrics + self.attributes.report_count = report_count @property - def micro_strategy_project(self) -> Optional[MicroStrategyProject]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_project - ) + def dashboard_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.dashboard_count - @micro_strategy_project.setter - def micro_strategy_project( - self, micro_strategy_project: Optional[MicroStrategyProject] - ): + @dashboard_count.setter + def dashboard_count(self, dashboard_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboard_count = dashboard_count + + @property + def dataset_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.dataset_count + + @dataset_count.setter + def dataset_count(self, dataset_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_project = micro_strategy_project + self.attributes.dataset_count = dataset_count + + @property + def dataflow_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.dataflow_count - class Attributes(MicroStrategy.Attributes): - micro_strategy_fact_expressions: Optional[set[str]] = Field( - None, description="", alias="microStrategyFactExpressions" + @dataflow_count.setter + def dataflow_count(self, dataflow_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dataflow_count = dataflow_count + + @property + def reports(self) -> Optional[list[PowerBIReport]]: + return None if self.attributes is None else self.attributes.reports + + @reports.setter + def reports(self, reports: Optional[list[PowerBIReport]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.reports = reports + + @property + def datasets(self) -> Optional[list[PowerBIDataset]]: + return None if self.attributes is None else self.attributes.datasets + + @datasets.setter + def datasets(self, datasets: Optional[list[PowerBIDataset]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasets = datasets + + @property + def dashboards(self) -> Optional[list[PowerBIDashboard]]: + return None if self.attributes is None else self.attributes.dashboards + + @dashboards.setter + def dashboards(self, dashboards: Optional[list[PowerBIDashboard]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboards = dashboards + + @property + def dataflows(self) -> Optional[list[PowerBIDataflow]]: + return None if self.attributes is None else self.attributes.dataflows + + @dataflows.setter + def dataflows(self, dataflows: Optional[list[PowerBIDataflow]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dataflows = dataflows + + class Attributes(PowerBI.Attributes): + web_url: Optional[str] = Field(None, description="", alias="webUrl") + report_count: Optional[int] = Field(None, description="", alias="reportCount") + dashboard_count: Optional[int] = Field( + None, description="", alias="dashboardCount" + ) + dataset_count: Optional[int] = Field(None, description="", alias="datasetCount") + dataflow_count: Optional[int] = Field( + None, description="", alias="dataflowCount" ) - micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( - None, description="", alias="microStrategyMetrics" + reports: Optional[list[PowerBIReport]] = Field( + None, description="", alias="reports" ) # relationship - micro_strategy_project: Optional[MicroStrategyProject] = Field( - None, description="", alias="microStrategyProject" + datasets: Optional[list[PowerBIDataset]] = Field( + None, description="", alias="datasets" + ) # relationship + dashboards: Optional[list[PowerBIDashboard]] = Field( + None, description="", alias="dashboards" + ) # relationship + dataflows: Optional[list[PowerBIDataflow]] = Field( + None, description="", alias="dataflows" ) # relationship - attributes: "MicroStrategyFact.Attributes" = Field( - default_factory=lambda: MicroStrategyFact.Attributes(), + attributes: "PowerBIWorkspace.Attributes" = Field( + default_factory=lambda: PowerBIWorkspace.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class MicroStrategyDocument(MicroStrategy): +class PowerBIDataset(PowerBI): """Description""" - type_name: str = Field("MicroStrategyDocument", allow_mutation=False) + type_name: str = Field("PowerBIDataset", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategyDocument": - raise ValueError("must be MicroStrategyDocument") + if v != "PowerBIDataset": + raise ValueError("must be PowerBIDataset") return v def __setattr__(self, name, value): - if name in MicroStrategyDocument._convience_properties: + if name in PowerBIDataset._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_project", + WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + TBC + """ + WEB_URL: ClassVar[KeywordField] = KeywordField("webUrl", "webUrl") + """ + TBC + """ + + REPORTS: ClassVar[RelationField] = RelationField("reports") + """ + TBC + """ + WORKSPACE: ClassVar[RelationField] = RelationField("workspace") + """ + TBC + """ + DATAFLOWS: ClassVar[RelationField] = RelationField("dataflows") + """ + TBC + """ + TILES: ClassVar[RelationField] = RelationField("tiles") + """ + TBC + """ + TABLES: ClassVar[RelationField] = RelationField("tables") + """ + TBC + """ + DATASOURCES: ClassVar[RelationField] = RelationField("datasources") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "workspace_qualified_name", + "web_url", + "reports", + "workspace", + "dataflows", + "tiles", + "tables", + "datasources", ] @property - def micro_strategy_project(self) -> Optional[MicroStrategyProject]: + def workspace_qualified_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.micro_strategy_project + None + if self.attributes is None + else self.attributes.workspace_qualified_name ) - @micro_strategy_project.setter - def micro_strategy_project( - self, micro_strategy_project: Optional[MicroStrategyProject] - ): + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workspace_qualified_name = workspace_qualified_name + + @property + def web_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.web_url + + @web_url.setter + def web_url(self, web_url: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.web_url = web_url + + @property + def reports(self) -> Optional[list[PowerBIReport]]: + return None if self.attributes is None else self.attributes.reports + + @reports.setter + def reports(self, reports: Optional[list[PowerBIReport]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.reports = reports + + @property + def workspace(self) -> Optional[PowerBIWorkspace]: + return None if self.attributes is None else self.attributes.workspace + + @workspace.setter + def workspace(self, workspace: Optional[PowerBIWorkspace]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workspace = workspace + + @property + def dataflows(self) -> Optional[list[PowerBIDataflow]]: + return None if self.attributes is None else self.attributes.dataflows + + @dataflows.setter + def dataflows(self, dataflows: Optional[list[PowerBIDataflow]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_project = micro_strategy_project + self.attributes.dataflows = dataflows - class Attributes(MicroStrategy.Attributes): - micro_strategy_project: Optional[MicroStrategyProject] = Field( - None, description="", alias="microStrategyProject" + @property + def tiles(self) -> Optional[list[PowerBITile]]: + return None if self.attributes is None else self.attributes.tiles + + @tiles.setter + def tiles(self, tiles: Optional[list[PowerBITile]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tiles = tiles + + @property + def tables(self) -> Optional[list[PowerBITable]]: + return None if self.attributes is None else self.attributes.tables + + @tables.setter + def tables(self, tables: Optional[list[PowerBITable]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.tables = tables + + @property + def datasources(self) -> Optional[list[PowerBIDatasource]]: + return None if self.attributes is None else self.attributes.datasources + + @datasources.setter + def datasources(self, datasources: Optional[list[PowerBIDatasource]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasources = datasources + + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field( + None, description="", alias="workspaceQualifiedName" + ) + web_url: Optional[str] = Field(None, description="", alias="webUrl") + reports: Optional[list[PowerBIReport]] = Field( + None, description="", alias="reports" + ) # relationship + workspace: Optional[PowerBIWorkspace] = Field( + None, description="", alias="workspace" + ) # relationship + dataflows: Optional[list[PowerBIDataflow]] = Field( + None, description="", alias="dataflows" + ) # relationship + tiles: Optional[list[PowerBITile]] = Field( + None, description="", alias="tiles" + ) # relationship + tables: Optional[list[PowerBITable]] = Field( + None, description="", alias="tables" + ) # relationship + datasources: Optional[list[PowerBIDatasource]] = Field( + None, description="", alias="datasources" ) # relationship - attributes: "MicroStrategyDocument.Attributes" = Field( - default_factory=lambda: MicroStrategyDocument.Attributes(), + attributes: "PowerBIDataset.Attributes" = Field( + default_factory=lambda: PowerBIDataset.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class MicroStrategyAttribute(MicroStrategy): +class PowerBIDashboard(PowerBI): """Description""" - type_name: str = Field("MicroStrategyAttribute", allow_mutation=False) + type_name: str = Field("PowerBIDashboard", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategyAttribute": - raise ValueError("must be MicroStrategyAttribute") + if v != "PowerBIDashboard": + raise ValueError("must be PowerBIDashboard") return v def __setattr__(self, name, value): - if name in MicroStrategyAttribute._convience_properties: + if name in PowerBIDashboard._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_attribute_forms", - "micro_strategy_reports", - "micro_strategy_metrics", - "micro_strategy_cubes", - "micro_strategy_project", + WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + TBC + """ + WEB_URL: ClassVar[KeywordField] = KeywordField("webUrl", "webUrl") + """ + TBC + """ + TILE_COUNT: ClassVar[NumericField] = NumericField("tileCount", "tileCount") + """ + TBC + """ + + WORKSPACE: ClassVar[RelationField] = RelationField("workspace") + """ + TBC + """ + TILES: ClassVar[RelationField] = RelationField("tiles") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "workspace_qualified_name", + "web_url", + "tile_count", + "workspace", + "tiles", ] @property - def micro_strategy_attribute_forms(self) -> Optional[str]: + def workspace_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_attribute_forms + else self.attributes.workspace_qualified_name ) - @micro_strategy_attribute_forms.setter - def micro_strategy_attribute_forms( - self, micro_strategy_attribute_forms: Optional[str] - ): + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_attribute_forms = micro_strategy_attribute_forms + self.attributes.workspace_qualified_name = workspace_qualified_name @property - def micro_strategy_reports(self) -> Optional[list[MicroStrategyReport]]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_reports - ) + def web_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.web_url - @micro_strategy_reports.setter - def micro_strategy_reports( - self, micro_strategy_reports: Optional[list[MicroStrategyReport]] - ): + @web_url.setter + def web_url(self, web_url: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_reports = micro_strategy_reports + self.attributes.web_url = web_url @property - def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_metrics - ) + def tile_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.tile_count - @micro_strategy_metrics.setter - def micro_strategy_metrics( - self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] - ): + @tile_count.setter + def tile_count(self, tile_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_metrics = micro_strategy_metrics + self.attributes.tile_count = tile_count @property - def micro_strategy_cubes(self) -> Optional[list[MicroStrategyCube]]: - return None if self.attributes is None else self.attributes.micro_strategy_cubes + def workspace(self) -> Optional[PowerBIWorkspace]: + return None if self.attributes is None else self.attributes.workspace - @micro_strategy_cubes.setter - def micro_strategy_cubes( - self, micro_strategy_cubes: Optional[list[MicroStrategyCube]] - ): + @workspace.setter + def workspace(self, workspace: Optional[PowerBIWorkspace]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_cubes = micro_strategy_cubes + self.attributes.workspace = workspace @property - def micro_strategy_project(self) -> Optional[MicroStrategyProject]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_project - ) + def tiles(self) -> Optional[list[PowerBITile]]: + return None if self.attributes is None else self.attributes.tiles - @micro_strategy_project.setter - def micro_strategy_project( - self, micro_strategy_project: Optional[MicroStrategyProject] - ): + @tiles.setter + def tiles(self, tiles: Optional[list[PowerBITile]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_project = micro_strategy_project + self.attributes.tiles = tiles - class Attributes(MicroStrategy.Attributes): - micro_strategy_attribute_forms: Optional[str] = Field( - None, description="", alias="microStrategyAttributeForms" + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field( + None, description="", alias="workspaceQualifiedName" ) - micro_strategy_reports: Optional[list[MicroStrategyReport]] = Field( - None, description="", alias="microStrategyReports" + web_url: Optional[str] = Field(None, description="", alias="webUrl") + tile_count: Optional[int] = Field(None, description="", alias="tileCount") + workspace: Optional[PowerBIWorkspace] = Field( + None, description="", alias="workspace" ) # relationship - micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( - None, description="", alias="microStrategyMetrics" - ) # relationship - micro_strategy_cubes: Optional[list[MicroStrategyCube]] = Field( - None, description="", alias="microStrategyCubes" - ) # relationship - micro_strategy_project: Optional[MicroStrategyProject] = Field( - None, description="", alias="microStrategyProject" + tiles: Optional[list[PowerBITile]] = Field( + None, description="", alias="tiles" ) # relationship - attributes: "MicroStrategyAttribute.Attributes" = Field( - default_factory=lambda: MicroStrategyAttribute.Attributes(), + attributes: "PowerBIDashboard.Attributes" = Field( + default_factory=lambda: PowerBIDashboard.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class MicroStrategyVisualization(MicroStrategy): +class PowerBIDataflow(PowerBI): """Description""" - type_name: str = Field("MicroStrategyVisualization", allow_mutation=False) + type_name: str = Field("PowerBIDataflow", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "MicroStrategyVisualization": - raise ValueError("must be MicroStrategyVisualization") + if v != "PowerBIDataflow": + raise ValueError("must be PowerBIDataflow") return v def __setattr__(self, name, value): - if name in MicroStrategyVisualization._convience_properties: + if name in PowerBIDataflow._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "micro_strategy_visualization_type", - "micro_strategy_dossier_qualified_name", - "micro_strategy_dossier_name", - "micro_strategy_dossier", - "micro_strategy_project", + WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + TBC + """ + WEB_URL: ClassVar[KeywordField] = KeywordField("webUrl", "webUrl") + """ + TBC + """ + + WORKSPACE: ClassVar[RelationField] = RelationField("workspace") + """ + TBC + """ + DATASETS: ClassVar[RelationField] = RelationField("datasets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "workspace_qualified_name", + "web_url", + "workspace", + "datasets", ] @property - def micro_strategy_visualization_type(self) -> Optional[str]: + def workspace_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_visualization_type + else self.attributes.workspace_qualified_name ) - @micro_strategy_visualization_type.setter - def micro_strategy_visualization_type( - self, micro_strategy_visualization_type: Optional[str] - ): + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_visualization_type = ( - micro_strategy_visualization_type - ) + self.attributes.workspace_qualified_name = workspace_qualified_name @property - def micro_strategy_dossier_qualified_name(self) -> Optional[str]: - return ( - None - if self.attributes is None - else self.attributes.micro_strategy_dossier_qualified_name - ) + def web_url(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.web_url - @micro_strategy_dossier_qualified_name.setter - def micro_strategy_dossier_qualified_name( - self, micro_strategy_dossier_qualified_name: Optional[str] - ): + @web_url.setter + def web_url(self, web_url: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_dossier_qualified_name = ( - micro_strategy_dossier_qualified_name + self.attributes.web_url = web_url + + @property + def workspace(self) -> Optional[PowerBIWorkspace]: + return None if self.attributes is None else self.attributes.workspace + + @workspace.setter + def workspace(self, workspace: Optional[PowerBIWorkspace]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.workspace = workspace + + @property + def datasets(self) -> Optional[list[PowerBIDataset]]: + return None if self.attributes is None else self.attributes.datasets + + @datasets.setter + def datasets(self, datasets: Optional[list[PowerBIDataset]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.datasets = datasets + + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field( + None, description="", alias="workspaceQualifiedName" ) + web_url: Optional[str] = Field(None, description="", alias="webUrl") + workspace: Optional[PowerBIWorkspace] = Field( + None, description="", alias="workspace" + ) # relationship + datasets: Optional[list[PowerBIDataset]] = Field( + None, description="", alias="datasets" + ) # relationship + + attributes: "PowerBIDataflow.Attributes" = Field( + default_factory=lambda: PowerBIDataflow.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class PowerBIPage(PowerBI): + """Description""" + + type_name: str = Field("PowerBIPage", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "PowerBIPage": + raise ValueError("must be PowerBIPage") + return v + + def __setattr__(self, name, value): + if name in PowerBIPage._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + WORKSPACE_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "workspaceQualifiedName", "workspaceQualifiedName" + ) + """ + TBC + """ + REPORT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "reportQualifiedName", "reportQualifiedName" + ) + """ + TBC + """ + + REPORT: ClassVar[RelationField] = RelationField("report") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "workspace_qualified_name", + "report_qualified_name", + "report", + ] @property - def micro_strategy_dossier_name(self) -> Optional[str]: + def workspace_qualified_name(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.micro_strategy_dossier_name + else self.attributes.workspace_qualified_name ) - @micro_strategy_dossier_name.setter - def micro_strategy_dossier_name(self, micro_strategy_dossier_name: Optional[str]): + @workspace_qualified_name.setter + def workspace_qualified_name(self, workspace_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_dossier_name = micro_strategy_dossier_name + self.attributes.workspace_qualified_name = workspace_qualified_name @property - def micro_strategy_dossier(self) -> Optional[MicroStrategyDossier]: + def report_qualified_name(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.micro_strategy_dossier + None if self.attributes is None else self.attributes.report_qualified_name ) - @micro_strategy_dossier.setter - def micro_strategy_dossier( - self, micro_strategy_dossier: Optional[MicroStrategyDossier] - ): + @report_qualified_name.setter + def report_qualified_name(self, report_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_dossier = micro_strategy_dossier + self.attributes.report_qualified_name = report_qualified_name @property - def micro_strategy_project(self) -> Optional[MicroStrategyProject]: - return ( - None if self.attributes is None else self.attributes.micro_strategy_project - ) + def report(self) -> Optional[PowerBIReport]: + return None if self.attributes is None else self.attributes.report - @micro_strategy_project.setter - def micro_strategy_project( - self, micro_strategy_project: Optional[MicroStrategyProject] - ): + @report.setter + def report(self, report: Optional[PowerBIReport]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.micro_strategy_project = micro_strategy_project + self.attributes.report = report - class Attributes(MicroStrategy.Attributes): - micro_strategy_visualization_type: Optional[str] = Field( - None, description="", alias="microStrategyVisualizationType" - ) - micro_strategy_dossier_qualified_name: Optional[str] = Field( - None, description="", alias="microStrategyDossierQualifiedName" + class Attributes(PowerBI.Attributes): + workspace_qualified_name: Optional[str] = Field( + None, description="", alias="workspaceQualifiedName" ) - micro_strategy_dossier_name: Optional[str] = Field( - None, description="", alias="microStrategyDossierName" + report_qualified_name: Optional[str] = Field( + None, description="", alias="reportQualifiedName" ) - micro_strategy_dossier: Optional[MicroStrategyDossier] = Field( - None, description="", alias="microStrategyDossier" - ) # relationship - micro_strategy_project: Optional[MicroStrategyProject] = Field( - None, description="", alias="microStrategyProject" + report: Optional[PowerBIReport] = Field( + None, description="", alias="report" ) # relationship - attributes: "MicroStrategyVisualization.Attributes" = Field( - default_factory=lambda: MicroStrategyVisualization.Attributes(), + attributes: "PowerBIPage.Attributes" = Field( + default_factory=lambda: PowerBIPage.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -MicroStrategyReport.Attributes.update_forward_refs() +PowerBIReport.Attributes.update_forward_refs() + + +PowerBIMeasure.Attributes.update_forward_refs() + + +PowerBIColumn.Attributes.update_forward_refs() -MicroStrategyProject.Attributes.update_forward_refs() +PowerBITable.Attributes.update_forward_refs() -MicroStrategyMetric.Attributes.update_forward_refs() +PowerBITile.Attributes.update_forward_refs() -MicroStrategyCube.Attributes.update_forward_refs() +PowerBIDatasource.Attributes.update_forward_refs() -MicroStrategyDossier.Attributes.update_forward_refs() +PowerBIWorkspace.Attributes.update_forward_refs() -MicroStrategyFact.Attributes.update_forward_refs() +PowerBIDataset.Attributes.update_forward_refs() -MicroStrategyDocument.Attributes.update_forward_refs() +PowerBIDashboard.Attributes.update_forward_refs() -MicroStrategyAttribute.Attributes.update_forward_refs() +PowerBIDataflow.Attributes.update_forward_refs() -MicroStrategyVisualization.Attributes.update_forward_refs() +PowerBIPage.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset72.py b/pyatlan/model/assets/asset72.py index 7e3a7751d..75eba7671 100644 --- a/pyatlan/model/assets/asset72.py +++ b/pyatlan/model/assets/asset72.py @@ -8,499 +8,1525 @@ from pydantic import Field, validator -from .asset47 import Qlik +from pyatlan.model.fields.atlan_fields import ( + KeywordField, + KeywordTextField, + RelationField, +) +from .asset47 import MicroStrategy -class QlikApp(Qlik): + +class MicroStrategyReport(MicroStrategy): """Description""" - type_name: str = Field("QlikApp", allow_mutation=False) + type_name: str = Field("MicroStrategyReport", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QlikApp": - raise ValueError("must be QlikApp") + if v != "MicroStrategyReport": + raise ValueError("must be MicroStrategyReport") return v def __setattr__(self, name, value): - if name in QlikApp._convience_properties: + if name in MicroStrategyReport._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "qlik_has_section_access", - "qlik_origin_app_id", - "qlik_is_encrypted", - "qlik_is_direct_query_mode", - "qlik_app_static_byte_size", - "qlik_space", - "qlik_sheets", + MICRO_STRATEGY_REPORT_TYPE: ClassVar[RelationField] = RelationField( + "microStrategyReportType" + ) + """ + Whether the report is a Grid or Chart report + """ + + MICRO_STRATEGY_METRICS: ClassVar[RelationField] = RelationField( + "microStrategyMetrics" + ) + """ + TBC + """ + MICRO_STRATEGY_PROJECT: ClassVar[RelationField] = RelationField( + "microStrategyProject" + ) + """ + TBC + """ + MICRO_STRATEGY_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "microStrategyAttributes" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_report_type", + "micro_strategy_metrics", + "micro_strategy_project", + "micro_strategy_attributes", ] @property - def qlik_has_section_access(self) -> Optional[bool]: + def micro_strategy_report_type(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.qlik_has_section_access + None + if self.attributes is None + else self.attributes.micro_strategy_report_type ) - @qlik_has_section_access.setter - def qlik_has_section_access(self, qlik_has_section_access: Optional[bool]): + @micro_strategy_report_type.setter + def micro_strategy_report_type(self, micro_strategy_report_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_has_section_access = qlik_has_section_access + self.attributes.micro_strategy_report_type = micro_strategy_report_type @property - def qlik_origin_app_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_origin_app_id + def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_metrics + ) - @qlik_origin_app_id.setter - def qlik_origin_app_id(self, qlik_origin_app_id: Optional[str]): + @micro_strategy_metrics.setter + def micro_strategy_metrics( + self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_origin_app_id = qlik_origin_app_id + self.attributes.micro_strategy_metrics = micro_strategy_metrics @property - def qlik_is_encrypted(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.qlik_is_encrypted + def micro_strategy_project(self) -> Optional[MicroStrategyProject]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_project + ) - @qlik_is_encrypted.setter - def qlik_is_encrypted(self, qlik_is_encrypted: Optional[bool]): + @micro_strategy_project.setter + def micro_strategy_project( + self, micro_strategy_project: Optional[MicroStrategyProject] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_is_encrypted = qlik_is_encrypted + self.attributes.micro_strategy_project = micro_strategy_project @property - def qlik_is_direct_query_mode(self) -> Optional[bool]: + def micro_strategy_attributes(self) -> Optional[list[MicroStrategyAttribute]]: return ( None if self.attributes is None - else self.attributes.qlik_is_direct_query_mode + else self.attributes.micro_strategy_attributes ) - @qlik_is_direct_query_mode.setter - def qlik_is_direct_query_mode(self, qlik_is_direct_query_mode: Optional[bool]): + @micro_strategy_attributes.setter + def micro_strategy_attributes( + self, micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_is_direct_query_mode = qlik_is_direct_query_mode + self.attributes.micro_strategy_attributes = micro_strategy_attributes + + class Attributes(MicroStrategy.Attributes): + micro_strategy_report_type: Optional[str] = Field( + None, description="", alias="microStrategyReportType" + ) + micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( + None, description="", alias="microStrategyMetrics" + ) # relationship + micro_strategy_project: Optional[MicroStrategyProject] = Field( + None, description="", alias="microStrategyProject" + ) # relationship + micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] = Field( + None, description="", alias="microStrategyAttributes" + ) # relationship + + attributes: "MicroStrategyReport.Attributes" = Field( + default_factory=lambda: MicroStrategyReport.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class MicroStrategyProject(MicroStrategy): + """Description""" + + type_name: str = Field("MicroStrategyProject", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "MicroStrategyProject": + raise ValueError("must be MicroStrategyProject") + return v + + def __setattr__(self, name, value): + if name in MicroStrategyProject._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MICRO_STRATEGY_REPORTS: ClassVar[RelationField] = RelationField( + "microStrategyReports" + ) + """ + TBC + """ + MICRO_STRATEGY_FACTS: ClassVar[RelationField] = RelationField("microStrategyFacts") + """ + TBC + """ + MICRO_STRATEGY_METRICS: ClassVar[RelationField] = RelationField( + "microStrategyMetrics" + ) + """ + TBC + """ + MICRO_STRATEGY_VISUALIZATIONS: ClassVar[RelationField] = RelationField( + "microStrategyVisualizations" + ) + """ + TBC + """ + MICRO_STRATEGY_DOCUMENTS: ClassVar[RelationField] = RelationField( + "microStrategyDocuments" + ) + """ + TBC + """ + MICRO_STRATEGY_CUBES: ClassVar[RelationField] = RelationField("microStrategyCubes") + """ + TBC + """ + MICRO_STRATEGY_DOSSIERS: ClassVar[RelationField] = RelationField( + "microStrategyDossiers" + ) + """ + TBC + """ + MICRO_STRATEGY_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "microStrategyAttributes" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_reports", + "micro_strategy_facts", + "micro_strategy_metrics", + "micro_strategy_visualizations", + "micro_strategy_documents", + "micro_strategy_cubes", + "micro_strategy_dossiers", + "micro_strategy_attributes", + ] @property - def qlik_app_static_byte_size(self) -> Optional[int]: + def micro_strategy_reports(self) -> Optional[list[MicroStrategyReport]]: return ( - None - if self.attributes is None - else self.attributes.qlik_app_static_byte_size + None if self.attributes is None else self.attributes.micro_strategy_reports ) - @qlik_app_static_byte_size.setter - def qlik_app_static_byte_size(self, qlik_app_static_byte_size: Optional[int]): + @micro_strategy_reports.setter + def micro_strategy_reports( + self, micro_strategy_reports: Optional[list[MicroStrategyReport]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_app_static_byte_size = qlik_app_static_byte_size + self.attributes.micro_strategy_reports = micro_strategy_reports @property - def qlik_space(self) -> Optional[QlikSpace]: - return None if self.attributes is None else self.attributes.qlik_space + def micro_strategy_facts(self) -> Optional[list[MicroStrategyFact]]: + return None if self.attributes is None else self.attributes.micro_strategy_facts - @qlik_space.setter - def qlik_space(self, qlik_space: Optional[QlikSpace]): + @micro_strategy_facts.setter + def micro_strategy_facts( + self, micro_strategy_facts: Optional[list[MicroStrategyFact]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_space = qlik_space + self.attributes.micro_strategy_facts = micro_strategy_facts @property - def qlik_sheets(self) -> Optional[list[QlikSheet]]: - return None if self.attributes is None else self.attributes.qlik_sheets + def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_metrics + ) - @qlik_sheets.setter - def qlik_sheets(self, qlik_sheets: Optional[list[QlikSheet]]): + @micro_strategy_metrics.setter + def micro_strategy_metrics( + self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_sheets = qlik_sheets + self.attributes.micro_strategy_metrics = micro_strategy_metrics - class Attributes(Qlik.Attributes): - qlik_has_section_access: Optional[bool] = Field( - None, description="", alias="qlikHasSectionAccess" - ) - qlik_origin_app_id: Optional[str] = Field( - None, description="", alias="qlikOriginAppId" + @property + def micro_strategy_visualizations( + self, + ) -> Optional[list[MicroStrategyVisualization]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_visualizations ) - qlik_is_encrypted: Optional[bool] = Field( - None, description="", alias="qlikIsEncrypted" + + @micro_strategy_visualizations.setter + def micro_strategy_visualizations( + self, micro_strategy_visualizations: Optional[list[MicroStrategyVisualization]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_visualizations = micro_strategy_visualizations + + @property + def micro_strategy_documents(self) -> Optional[list[MicroStrategyDocument]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_documents ) - qlik_is_direct_query_mode: Optional[bool] = Field( - None, description="", alias="qlikIsDirectQueryMode" + + @micro_strategy_documents.setter + def micro_strategy_documents( + self, micro_strategy_documents: Optional[list[MicroStrategyDocument]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_documents = micro_strategy_documents + + @property + def micro_strategy_cubes(self) -> Optional[list[MicroStrategyCube]]: + return None if self.attributes is None else self.attributes.micro_strategy_cubes + + @micro_strategy_cubes.setter + def micro_strategy_cubes( + self, micro_strategy_cubes: Optional[list[MicroStrategyCube]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_cubes = micro_strategy_cubes + + @property + def micro_strategy_dossiers(self) -> Optional[list[MicroStrategyDossier]]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_dossiers ) - qlik_app_static_byte_size: Optional[int] = Field( - None, description="", alias="qlikAppStaticByteSize" + + @micro_strategy_dossiers.setter + def micro_strategy_dossiers( + self, micro_strategy_dossiers: Optional[list[MicroStrategyDossier]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_dossiers = micro_strategy_dossiers + + @property + def micro_strategy_attributes(self) -> Optional[list[MicroStrategyAttribute]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_attributes ) - qlik_space: Optional[QlikSpace] = Field( - None, description="", alias="qlikSpace" + + @micro_strategy_attributes.setter + def micro_strategy_attributes( + self, micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_attributes = micro_strategy_attributes + + class Attributes(MicroStrategy.Attributes): + micro_strategy_reports: Optional[list[MicroStrategyReport]] = Field( + None, description="", alias="microStrategyReports" + ) # relationship + micro_strategy_facts: Optional[list[MicroStrategyFact]] = Field( + None, description="", alias="microStrategyFacts" + ) # relationship + micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( + None, description="", alias="microStrategyMetrics" + ) # relationship + micro_strategy_visualizations: Optional[ + list[MicroStrategyVisualization] + ] = Field( + None, description="", alias="microStrategyVisualizations" + ) # relationship + micro_strategy_documents: Optional[list[MicroStrategyDocument]] = Field( + None, description="", alias="microStrategyDocuments" + ) # relationship + micro_strategy_cubes: Optional[list[MicroStrategyCube]] = Field( + None, description="", alias="microStrategyCubes" ) # relationship - qlik_sheets: Optional[list[QlikSheet]] = Field( - None, description="", alias="qlikSheets" + micro_strategy_dossiers: Optional[list[MicroStrategyDossier]] = Field( + None, description="", alias="microStrategyDossiers" + ) # relationship + micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] = Field( + None, description="", alias="microStrategyAttributes" ) # relationship - attributes: "QlikApp.Attributes" = Field( - default_factory=lambda: QlikApp.Attributes(), + attributes: "MicroStrategyProject.Attributes" = Field( + default_factory=lambda: MicroStrategyProject.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class QlikChart(Qlik): +class MicroStrategyMetric(MicroStrategy): """Description""" - type_name: str = Field("QlikChart", allow_mutation=False) + type_name: str = Field("MicroStrategyMetric", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QlikChart": - raise ValueError("must be QlikChart") + if v != "MicroStrategyMetric": + raise ValueError("must be MicroStrategyMetric") return v def __setattr__(self, name, value): - if name in QlikChart._convience_properties: + if name in MicroStrategyMetric._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "qlik_chart_subtitle", - "qlik_chart_footnote", - "qlik_chart_orientation", - "qlik_chart_type", - "qlik_sheet", + MICRO_STRATEGY_METRIC_EXPRESSION: ClassVar[KeywordField] = KeywordField( + "microStrategyMetricExpression", "microStrategyMetricExpression" + ) + """ + Metric expression text + """ + MICRO_STRATEGY_ATTRIBUTE_QUALIFIED_NAMES: ClassVar[ + KeywordTextField + ] = KeywordTextField( + "microStrategyAttributeQualifiedNames", + "microStrategyAttributeQualifiedNames", + "microStrategyAttributeQualifiedNames.text", + ) + """ + Related attribute qualified name list + """ + MICRO_STRATEGY_ATTRIBUTE_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "microStrategyAttributeNames", + "microStrategyAttributeNames.keyword", + "microStrategyAttributeNames", + ) + """ + Related attribute name list + """ + MICRO_STRATEGY_FACT_QUALIFIED_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "microStrategyFactQualifiedNames", + "microStrategyFactQualifiedNames", + "microStrategyFactQualifiedNames.text", + ) + """ + Related fact qualified name list + """ + MICRO_STRATEGY_FACT_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "microStrategyFactNames", + "microStrategyFactNames.keyword", + "microStrategyFactNames", + ) + """ + Related fact name list + """ + MICRO_STRATEGY_METRIC_PARENT_QUALIFIED_NAMES: ClassVar[ + KeywordTextField + ] = KeywordTextField( + "microStrategyMetricParentQualifiedNames", + "microStrategyMetricParentQualifiedNames", + "microStrategyMetricParentQualifiedNames.text", + ) + """ + Related parent metric qualified name list + """ + MICRO_STRATEGY_METRIC_PARENT_NAMES: ClassVar[KeywordTextField] = KeywordTextField( + "microStrategyMetricParentNames", + "microStrategyMetricParentNames.keyword", + "microStrategyMetricParentNames", + ) + """ + Related parent metric name list + """ + + MICRO_STRATEGY_METRIC_PARENTS: ClassVar[RelationField] = RelationField( + "microStrategyMetricParents" + ) + """ + TBC + """ + MICRO_STRATEGY_FACTS: ClassVar[RelationField] = RelationField("microStrategyFacts") + """ + TBC + """ + MICRO_STRATEGY_REPORTS: ClassVar[RelationField] = RelationField( + "microStrategyReports" + ) + """ + TBC + """ + MICRO_STRATEGY_CUBES: ClassVar[RelationField] = RelationField("microStrategyCubes") + """ + TBC + """ + MICRO_STRATEGY_METRIC_CHILDREN: ClassVar[RelationField] = RelationField( + "microStrategyMetricChildren" + ) + """ + TBC + """ + MICRO_STRATEGY_PROJECT: ClassVar[RelationField] = RelationField( + "microStrategyProject" + ) + """ + TBC + """ + MICRO_STRATEGY_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "microStrategyAttributes" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_metric_expression", + "micro_strategy_attribute_qualified_names", + "micro_strategy_attribute_names", + "micro_strategy_fact_qualified_names", + "micro_strategy_fact_names", + "micro_strategy_metric_parent_qualified_names", + "micro_strategy_metric_parent_names", + "micro_strategy_metric_parents", + "micro_strategy_facts", + "micro_strategy_reports", + "micro_strategy_cubes", + "micro_strategy_metric_children", + "micro_strategy_project", + "micro_strategy_attributes", ] @property - def qlik_chart_subtitle(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_chart_subtitle + def micro_strategy_metric_expression(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_metric_expression + ) + + @micro_strategy_metric_expression.setter + def micro_strategy_metric_expression( + self, micro_strategy_metric_expression: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_metric_expression = ( + micro_strategy_metric_expression + ) + + @property + def micro_strategy_attribute_qualified_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_attribute_qualified_names + ) - @qlik_chart_subtitle.setter - def qlik_chart_subtitle(self, qlik_chart_subtitle: Optional[str]): + @micro_strategy_attribute_qualified_names.setter + def micro_strategy_attribute_qualified_names( + self, micro_strategy_attribute_qualified_names: Optional[set[str]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_chart_subtitle = qlik_chart_subtitle + self.attributes.micro_strategy_attribute_qualified_names = ( + micro_strategy_attribute_qualified_names + ) @property - def qlik_chart_footnote(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_chart_footnote + def micro_strategy_attribute_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_attribute_names + ) - @qlik_chart_footnote.setter - def qlik_chart_footnote(self, qlik_chart_footnote: Optional[str]): + @micro_strategy_attribute_names.setter + def micro_strategy_attribute_names( + self, micro_strategy_attribute_names: Optional[set[str]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_chart_footnote = qlik_chart_footnote + self.attributes.micro_strategy_attribute_names = micro_strategy_attribute_names @property - def qlik_chart_orientation(self) -> Optional[str]: + def micro_strategy_fact_qualified_names(self) -> Optional[set[str]]: return ( - None if self.attributes is None else self.attributes.qlik_chart_orientation + None + if self.attributes is None + else self.attributes.micro_strategy_fact_qualified_names ) - @qlik_chart_orientation.setter - def qlik_chart_orientation(self, qlik_chart_orientation: Optional[str]): + @micro_strategy_fact_qualified_names.setter + def micro_strategy_fact_qualified_names( + self, micro_strategy_fact_qualified_names: Optional[set[str]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_chart_orientation = qlik_chart_orientation + self.attributes.micro_strategy_fact_qualified_names = ( + micro_strategy_fact_qualified_names + ) @property - def qlik_chart_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_chart_type + def micro_strategy_fact_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_fact_names + ) - @qlik_chart_type.setter - def qlik_chart_type(self, qlik_chart_type: Optional[str]): + @micro_strategy_fact_names.setter + def micro_strategy_fact_names(self, micro_strategy_fact_names: Optional[set[str]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_chart_type = qlik_chart_type + self.attributes.micro_strategy_fact_names = micro_strategy_fact_names @property - def qlik_sheet(self) -> Optional[QlikSheet]: - return None if self.attributes is None else self.attributes.qlik_sheet + def micro_strategy_metric_parent_qualified_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_metric_parent_qualified_names + ) - @qlik_sheet.setter - def qlik_sheet(self, qlik_sheet: Optional[QlikSheet]): + @micro_strategy_metric_parent_qualified_names.setter + def micro_strategy_metric_parent_qualified_names( + self, micro_strategy_metric_parent_qualified_names: Optional[set[str]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_sheet = qlik_sheet + self.attributes.micro_strategy_metric_parent_qualified_names = ( + micro_strategy_metric_parent_qualified_names + ) - class Attributes(Qlik.Attributes): - qlik_chart_subtitle: Optional[str] = Field( - None, description="", alias="qlikChartSubtitle" + @property + def micro_strategy_metric_parent_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_metric_parent_names ) - qlik_chart_footnote: Optional[str] = Field( - None, description="", alias="qlikChartFootnote" + + @micro_strategy_metric_parent_names.setter + def micro_strategy_metric_parent_names( + self, micro_strategy_metric_parent_names: Optional[set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_metric_parent_names = ( + micro_strategy_metric_parent_names ) - qlik_chart_orientation: Optional[str] = Field( - None, description="", alias="qlikChartOrientation" + + @property + def micro_strategy_metric_parents(self) -> Optional[list[MicroStrategyMetric]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_metric_parents ) - qlik_chart_type: Optional[str] = Field( - None, description="", alias="qlikChartType" + + @micro_strategy_metric_parents.setter + def micro_strategy_metric_parents( + self, micro_strategy_metric_parents: Optional[list[MicroStrategyMetric]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_metric_parents = micro_strategy_metric_parents + + @property + def micro_strategy_facts(self) -> Optional[list[MicroStrategyFact]]: + return None if self.attributes is None else self.attributes.micro_strategy_facts + + @micro_strategy_facts.setter + def micro_strategy_facts( + self, micro_strategy_facts: Optional[list[MicroStrategyFact]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_facts = micro_strategy_facts + + @property + def micro_strategy_reports(self) -> Optional[list[MicroStrategyReport]]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_reports ) - qlik_sheet: Optional[QlikSheet] = Field( - None, description="", alias="qlikSheet" + + @micro_strategy_reports.setter + def micro_strategy_reports( + self, micro_strategy_reports: Optional[list[MicroStrategyReport]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_reports = micro_strategy_reports + + @property + def micro_strategy_cubes(self) -> Optional[list[MicroStrategyCube]]: + return None if self.attributes is None else self.attributes.micro_strategy_cubes + + @micro_strategy_cubes.setter + def micro_strategy_cubes( + self, micro_strategy_cubes: Optional[list[MicroStrategyCube]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_cubes = micro_strategy_cubes + + @property + def micro_strategy_metric_children(self) -> Optional[list[MicroStrategyMetric]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_metric_children + ) + + @micro_strategy_metric_children.setter + def micro_strategy_metric_children( + self, micro_strategy_metric_children: Optional[list[MicroStrategyMetric]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_metric_children = micro_strategy_metric_children + + @property + def micro_strategy_project(self) -> Optional[MicroStrategyProject]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_project + ) + + @micro_strategy_project.setter + def micro_strategy_project( + self, micro_strategy_project: Optional[MicroStrategyProject] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_project = micro_strategy_project + + @property + def micro_strategy_attributes(self) -> Optional[list[MicroStrategyAttribute]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_attributes + ) + + @micro_strategy_attributes.setter + def micro_strategy_attributes( + self, micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_attributes = micro_strategy_attributes + + class Attributes(MicroStrategy.Attributes): + micro_strategy_metric_expression: Optional[str] = Field( + None, description="", alias="microStrategyMetricExpression" + ) + micro_strategy_attribute_qualified_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyAttributeQualifiedNames" + ) + micro_strategy_attribute_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyAttributeNames" + ) + micro_strategy_fact_qualified_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyFactQualifiedNames" + ) + micro_strategy_fact_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyFactNames" + ) + micro_strategy_metric_parent_qualified_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyMetricParentQualifiedNames" + ) + micro_strategy_metric_parent_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyMetricParentNames" + ) + micro_strategy_metric_parents: Optional[list[MicroStrategyMetric]] = Field( + None, description="", alias="microStrategyMetricParents" + ) # relationship + micro_strategy_facts: Optional[list[MicroStrategyFact]] = Field( + None, description="", alias="microStrategyFacts" + ) # relationship + micro_strategy_reports: Optional[list[MicroStrategyReport]] = Field( + None, description="", alias="microStrategyReports" + ) # relationship + micro_strategy_cubes: Optional[list[MicroStrategyCube]] = Field( + None, description="", alias="microStrategyCubes" + ) # relationship + micro_strategy_metric_children: Optional[list[MicroStrategyMetric]] = Field( + None, description="", alias="microStrategyMetricChildren" + ) # relationship + micro_strategy_project: Optional[MicroStrategyProject] = Field( + None, description="", alias="microStrategyProject" + ) # relationship + micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] = Field( + None, description="", alias="microStrategyAttributes" ) # relationship - attributes: "QlikChart.Attributes" = Field( - default_factory=lambda: QlikChart.Attributes(), + attributes: "MicroStrategyMetric.Attributes" = Field( + default_factory=lambda: MicroStrategyMetric.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class QlikDataset(Qlik): +class MicroStrategyCube(MicroStrategy): """Description""" - type_name: str = Field("QlikDataset", allow_mutation=False) + type_name: str = Field("MicroStrategyCube", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QlikDataset": - raise ValueError("must be QlikDataset") + if v != "MicroStrategyCube": + raise ValueError("must be MicroStrategyCube") return v def __setattr__(self, name, value): - if name in QlikDataset._convience_properties: + if name in MicroStrategyCube._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "qlik_dataset_technical_name", - "qlik_dataset_type", - "qlik_dataset_uri", - "qlik_dataset_subtype", - "qlik_space", + MICRO_STRATEGY_CUBE_TYPE: ClassVar[RelationField] = RelationField( + "microStrategyCubeType" + ) + """ + Whether the cube is an OLAP or MTDI cube + """ + MICRO_STRATEGY_CUBE_QUERY: ClassVar[KeywordField] = KeywordField( + "microStrategyCubeQuery", "microStrategyCubeQuery" + ) + """ + The query used to create the cube + """ + + MICRO_STRATEGY_METRICS: ClassVar[RelationField] = RelationField( + "microStrategyMetrics" + ) + """ + TBC + """ + MICRO_STRATEGY_PROJECT: ClassVar[RelationField] = RelationField( + "microStrategyProject" + ) + """ + TBC + """ + MICRO_STRATEGY_ATTRIBUTES: ClassVar[RelationField] = RelationField( + "microStrategyAttributes" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_cube_type", + "micro_strategy_cube_query", + "micro_strategy_metrics", + "micro_strategy_project", + "micro_strategy_attributes", ] @property - def qlik_dataset_technical_name(self) -> Optional[str]: + def micro_strategy_cube_type(self) -> Optional[str]: return ( None if self.attributes is None - else self.attributes.qlik_dataset_technical_name + else self.attributes.micro_strategy_cube_type ) - @qlik_dataset_technical_name.setter - def qlik_dataset_technical_name(self, qlik_dataset_technical_name: Optional[str]): + @micro_strategy_cube_type.setter + def micro_strategy_cube_type(self, micro_strategy_cube_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_dataset_technical_name = qlik_dataset_technical_name + self.attributes.micro_strategy_cube_type = micro_strategy_cube_type @property - def qlik_dataset_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_dataset_type + def micro_strategy_cube_query(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_cube_query + ) - @qlik_dataset_type.setter - def qlik_dataset_type(self, qlik_dataset_type: Optional[str]): + @micro_strategy_cube_query.setter + def micro_strategy_cube_query(self, micro_strategy_cube_query: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_dataset_type = qlik_dataset_type + self.attributes.micro_strategy_cube_query = micro_strategy_cube_query @property - def qlik_dataset_uri(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_dataset_uri + def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_metrics + ) - @qlik_dataset_uri.setter - def qlik_dataset_uri(self, qlik_dataset_uri: Optional[str]): + @micro_strategy_metrics.setter + def micro_strategy_metrics( + self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_dataset_uri = qlik_dataset_uri + self.attributes.micro_strategy_metrics = micro_strategy_metrics @property - def qlik_dataset_subtype(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_dataset_subtype + def micro_strategy_project(self) -> Optional[MicroStrategyProject]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_project + ) - @qlik_dataset_subtype.setter - def qlik_dataset_subtype(self, qlik_dataset_subtype: Optional[str]): + @micro_strategy_project.setter + def micro_strategy_project( + self, micro_strategy_project: Optional[MicroStrategyProject] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_dataset_subtype = qlik_dataset_subtype + self.attributes.micro_strategy_project = micro_strategy_project @property - def qlik_space(self) -> Optional[QlikSpace]: - return None if self.attributes is None else self.attributes.qlik_space + def micro_strategy_attributes(self) -> Optional[list[MicroStrategyAttribute]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_attributes + ) - @qlik_space.setter - def qlik_space(self, qlik_space: Optional[QlikSpace]): + @micro_strategy_attributes.setter + def micro_strategy_attributes( + self, micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_space = qlik_space + self.attributes.micro_strategy_attributes = micro_strategy_attributes - class Attributes(Qlik.Attributes): - qlik_dataset_technical_name: Optional[str] = Field( - None, description="", alias="qlikDatasetTechnicalName" + class Attributes(MicroStrategy.Attributes): + micro_strategy_cube_type: Optional[str] = Field( + None, description="", alias="microStrategyCubeType" ) - qlik_dataset_type: Optional[str] = Field( - None, description="", alias="qlikDatasetType" + micro_strategy_cube_query: Optional[str] = Field( + None, description="", alias="microStrategyCubeQuery" ) - qlik_dataset_uri: Optional[str] = Field( - None, description="", alias="qlikDatasetUri" + micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( + None, description="", alias="microStrategyMetrics" + ) # relationship + micro_strategy_project: Optional[MicroStrategyProject] = Field( + None, description="", alias="microStrategyProject" + ) # relationship + micro_strategy_attributes: Optional[list[MicroStrategyAttribute]] = Field( + None, description="", alias="microStrategyAttributes" + ) # relationship + + attributes: "MicroStrategyCube.Attributes" = Field( + default_factory=lambda: MicroStrategyCube.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class MicroStrategyDossier(MicroStrategy): + """Description""" + + type_name: str = Field("MicroStrategyDossier", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "MicroStrategyDossier": + raise ValueError("must be MicroStrategyDossier") + return v + + def __setattr__(self, name, value): + if name in MicroStrategyDossier._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MICRO_STRATEGY_DOSSIER_CHAPTER_NAMES: ClassVar[KeywordField] = KeywordField( + "microStrategyDossierChapterNames", "microStrategyDossierChapterNames" + ) + """ + Dossier chapter name list + """ + + MICRO_STRATEGY_VISUALIZATIONS: ClassVar[RelationField] = RelationField( + "microStrategyVisualizations" + ) + """ + TBC + """ + MICRO_STRATEGY_PROJECT: ClassVar[RelationField] = RelationField( + "microStrategyProject" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_dossier_chapter_names", + "micro_strategy_visualizations", + "micro_strategy_project", + ] + + @property + def micro_strategy_dossier_chapter_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_dossier_chapter_names + ) + + @micro_strategy_dossier_chapter_names.setter + def micro_strategy_dossier_chapter_names( + self, micro_strategy_dossier_chapter_names: Optional[set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_dossier_chapter_names = ( + micro_strategy_dossier_chapter_names ) - qlik_dataset_subtype: Optional[str] = Field( - None, description="", alias="qlikDatasetSubtype" + + @property + def micro_strategy_visualizations( + self, + ) -> Optional[list[MicroStrategyVisualization]]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_visualizations ) - qlik_space: Optional[QlikSpace] = Field( - None, description="", alias="qlikSpace" + + @micro_strategy_visualizations.setter + def micro_strategy_visualizations( + self, micro_strategy_visualizations: Optional[list[MicroStrategyVisualization]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_visualizations = micro_strategy_visualizations + + @property + def micro_strategy_project(self) -> Optional[MicroStrategyProject]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_project + ) + + @micro_strategy_project.setter + def micro_strategy_project( + self, micro_strategy_project: Optional[MicroStrategyProject] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_project = micro_strategy_project + + class Attributes(MicroStrategy.Attributes): + micro_strategy_dossier_chapter_names: Optional[set[str]] = Field( + None, description="", alias="microStrategyDossierChapterNames" + ) + micro_strategy_visualizations: Optional[ + list[MicroStrategyVisualization] + ] = Field( + None, description="", alias="microStrategyVisualizations" + ) # relationship + micro_strategy_project: Optional[MicroStrategyProject] = Field( + None, description="", alias="microStrategyProject" ) # relationship - attributes: "QlikDataset.Attributes" = Field( - default_factory=lambda: QlikDataset.Attributes(), + attributes: "MicroStrategyDossier.Attributes" = Field( + default_factory=lambda: MicroStrategyDossier.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class QlikSheet(Qlik): +class MicroStrategyFact(MicroStrategy): """Description""" - type_name: str = Field("QlikSheet", allow_mutation=False) + type_name: str = Field("MicroStrategyFact", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QlikSheet": - raise ValueError("must be QlikSheet") + if v != "MicroStrategyFact": + raise ValueError("must be MicroStrategyFact") return v def __setattr__(self, name, value): - if name in QlikSheet._convience_properties: + if name in MicroStrategyFact._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "qlik_sheet_is_approved", - "qlik_app", - "qlik_charts", + MICRO_STRATEGY_FACT_EXPRESSIONS: ClassVar[KeywordField] = KeywordField( + "microStrategyFactExpressions", "microStrategyFactExpressions" + ) + """ + Fact expression list + """ + + MICRO_STRATEGY_METRICS: ClassVar[RelationField] = RelationField( + "microStrategyMetrics" + ) + """ + TBC + """ + MICRO_STRATEGY_PROJECT: ClassVar[RelationField] = RelationField( + "microStrategyProject" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_fact_expressions", + "micro_strategy_metrics", + "micro_strategy_project", ] @property - def qlik_sheet_is_approved(self) -> Optional[bool]: + def micro_strategy_fact_expressions(self) -> Optional[set[str]]: return ( - None if self.attributes is None else self.attributes.qlik_sheet_is_approved + None + if self.attributes is None + else self.attributes.micro_strategy_fact_expressions ) - @qlik_sheet_is_approved.setter - def qlik_sheet_is_approved(self, qlik_sheet_is_approved: Optional[bool]): + @micro_strategy_fact_expressions.setter + def micro_strategy_fact_expressions( + self, micro_strategy_fact_expressions: Optional[set[str]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_sheet_is_approved = qlik_sheet_is_approved + self.attributes.micro_strategy_fact_expressions = ( + micro_strategy_fact_expressions + ) @property - def qlik_app(self) -> Optional[QlikApp]: - return None if self.attributes is None else self.attributes.qlik_app + def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_metrics + ) - @qlik_app.setter - def qlik_app(self, qlik_app: Optional[QlikApp]): + @micro_strategy_metrics.setter + def micro_strategy_metrics( + self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_app = qlik_app + self.attributes.micro_strategy_metrics = micro_strategy_metrics @property - def qlik_charts(self) -> Optional[list[QlikChart]]: - return None if self.attributes is None else self.attributes.qlik_charts + def micro_strategy_project(self) -> Optional[MicroStrategyProject]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_project + ) - @qlik_charts.setter - def qlik_charts(self, qlik_charts: Optional[list[QlikChart]]): + @micro_strategy_project.setter + def micro_strategy_project( + self, micro_strategy_project: Optional[MicroStrategyProject] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_charts = qlik_charts + self.attributes.micro_strategy_project = micro_strategy_project - class Attributes(Qlik.Attributes): - qlik_sheet_is_approved: Optional[bool] = Field( - None, description="", alias="qlikSheetIsApproved" + class Attributes(MicroStrategy.Attributes): + micro_strategy_fact_expressions: Optional[set[str]] = Field( + None, description="", alias="microStrategyFactExpressions" ) - qlik_app: Optional[QlikApp] = Field( - None, description="", alias="qlikApp" + micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( + None, description="", alias="microStrategyMetrics" ) # relationship - qlik_charts: Optional[list[QlikChart]] = Field( - None, description="", alias="qlikCharts" + micro_strategy_project: Optional[MicroStrategyProject] = Field( + None, description="", alias="microStrategyProject" ) # relationship - attributes: "QlikSheet.Attributes" = Field( - default_factory=lambda: QlikSheet.Attributes(), + attributes: "MicroStrategyFact.Attributes" = Field( + default_factory=lambda: MicroStrategyFact.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class QlikSpace(Qlik): +class MicroStrategyDocument(MicroStrategy): """Description""" - type_name: str = Field("QlikSpace", allow_mutation=False) + type_name: str = Field("MicroStrategyDocument", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QlikSpace": - raise ValueError("must be QlikSpace") + if v != "MicroStrategyDocument": + raise ValueError("must be MicroStrategyDocument") return v def __setattr__(self, name, value): - if name in QlikSpace._convience_properties: + if name in MicroStrategyDocument._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "qlik_space_type", - "qlik_datasets", - "qlik_apps", + MICRO_STRATEGY_PROJECT: ClassVar[RelationField] = RelationField( + "microStrategyProject" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_project", ] @property - def qlik_space_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.qlik_space_type + def micro_strategy_project(self) -> Optional[MicroStrategyProject]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_project + ) - @qlik_space_type.setter - def qlik_space_type(self, qlik_space_type: Optional[str]): + @micro_strategy_project.setter + def micro_strategy_project( + self, micro_strategy_project: Optional[MicroStrategyProject] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_space_type = qlik_space_type + self.attributes.micro_strategy_project = micro_strategy_project + + class Attributes(MicroStrategy.Attributes): + micro_strategy_project: Optional[MicroStrategyProject] = Field( + None, description="", alias="microStrategyProject" + ) # relationship + + attributes: "MicroStrategyDocument.Attributes" = Field( + default_factory=lambda: MicroStrategyDocument.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class MicroStrategyAttribute(MicroStrategy): + """Description""" + + type_name: str = Field("MicroStrategyAttribute", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "MicroStrategyAttribute": + raise ValueError("must be MicroStrategyAttribute") + return v + + def __setattr__(self, name, value): + if name in MicroStrategyAttribute._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MICRO_STRATEGY_ATTRIBUTE_FORMS: ClassVar[KeywordField] = KeywordField( + "microStrategyAttributeForms", "microStrategyAttributeForms" + ) + """ + Attribute form name, description, displayFormat and expression as JSON string + """ + + MICRO_STRATEGY_REPORTS: ClassVar[RelationField] = RelationField( + "microStrategyReports" + ) + """ + TBC + """ + MICRO_STRATEGY_METRICS: ClassVar[RelationField] = RelationField( + "microStrategyMetrics" + ) + """ + TBC + """ + MICRO_STRATEGY_CUBES: ClassVar[RelationField] = RelationField("microStrategyCubes") + """ + TBC + """ + MICRO_STRATEGY_PROJECT: ClassVar[RelationField] = RelationField( + "microStrategyProject" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_attribute_forms", + "micro_strategy_reports", + "micro_strategy_metrics", + "micro_strategy_cubes", + "micro_strategy_project", + ] @property - def qlik_datasets(self) -> Optional[list[QlikDataset]]: - return None if self.attributes is None else self.attributes.qlik_datasets + def micro_strategy_attribute_forms(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_attribute_forms + ) - @qlik_datasets.setter - def qlik_datasets(self, qlik_datasets: Optional[list[QlikDataset]]): + @micro_strategy_attribute_forms.setter + def micro_strategy_attribute_forms( + self, micro_strategy_attribute_forms: Optional[str] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_datasets = qlik_datasets + self.attributes.micro_strategy_attribute_forms = micro_strategy_attribute_forms @property - def qlik_apps(self) -> Optional[list[QlikApp]]: - return None if self.attributes is None else self.attributes.qlik_apps + def micro_strategy_reports(self) -> Optional[list[MicroStrategyReport]]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_reports + ) + + @micro_strategy_reports.setter + def micro_strategy_reports( + self, micro_strategy_reports: Optional[list[MicroStrategyReport]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_reports = micro_strategy_reports + + @property + def micro_strategy_metrics(self) -> Optional[list[MicroStrategyMetric]]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_metrics + ) + + @micro_strategy_metrics.setter + def micro_strategy_metrics( + self, micro_strategy_metrics: Optional[list[MicroStrategyMetric]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_metrics = micro_strategy_metrics + + @property + def micro_strategy_cubes(self) -> Optional[list[MicroStrategyCube]]: + return None if self.attributes is None else self.attributes.micro_strategy_cubes + + @micro_strategy_cubes.setter + def micro_strategy_cubes( + self, micro_strategy_cubes: Optional[list[MicroStrategyCube]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_cubes = micro_strategy_cubes + + @property + def micro_strategy_project(self) -> Optional[MicroStrategyProject]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_project + ) + + @micro_strategy_project.setter + def micro_strategy_project( + self, micro_strategy_project: Optional[MicroStrategyProject] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_project = micro_strategy_project + + class Attributes(MicroStrategy.Attributes): + micro_strategy_attribute_forms: Optional[str] = Field( + None, description="", alias="microStrategyAttributeForms" + ) + micro_strategy_reports: Optional[list[MicroStrategyReport]] = Field( + None, description="", alias="microStrategyReports" + ) # relationship + micro_strategy_metrics: Optional[list[MicroStrategyMetric]] = Field( + None, description="", alias="microStrategyMetrics" + ) # relationship + micro_strategy_cubes: Optional[list[MicroStrategyCube]] = Field( + None, description="", alias="microStrategyCubes" + ) # relationship + micro_strategy_project: Optional[MicroStrategyProject] = Field( + None, description="", alias="microStrategyProject" + ) # relationship + + attributes: "MicroStrategyAttribute.Attributes" = Field( + default_factory=lambda: MicroStrategyAttribute.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class MicroStrategyVisualization(MicroStrategy): + """Description""" + + type_name: str = Field("MicroStrategyVisualization", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "MicroStrategyVisualization": + raise ValueError("must be MicroStrategyVisualization") + return v + + def __setattr__(self, name, value): + if name in MicroStrategyVisualization._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + MICRO_STRATEGY_VISUALIZATION_TYPE: ClassVar[RelationField] = RelationField( + "microStrategyVisualizationType" + ) + """ + Visualization type name + """ + MICRO_STRATEGY_DOSSIER_QUALIFIED_NAME: ClassVar[ + KeywordTextField + ] = KeywordTextField( + "microStrategyDossierQualifiedName", + "microStrategyDossierQualifiedName", + "microStrategyDossierQualifiedName.text", + ) + """ + Parent dossier qualified name + """ + MICRO_STRATEGY_DOSSIER_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "microStrategyDossierName", + "microStrategyDossierName.keyword", + "microStrategyDossierName", + ) + """ + Parent dossier name + """ + + MICRO_STRATEGY_DOSSIER: ClassVar[RelationField] = RelationField( + "microStrategyDossier" + ) + """ + TBC + """ + MICRO_STRATEGY_PROJECT: ClassVar[RelationField] = RelationField( + "microStrategyProject" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "micro_strategy_visualization_type", + "micro_strategy_dossier_qualified_name", + "micro_strategy_dossier_name", + "micro_strategy_dossier", + "micro_strategy_project", + ] + + @property + def micro_strategy_visualization_type(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_visualization_type + ) + + @micro_strategy_visualization_type.setter + def micro_strategy_visualization_type( + self, micro_strategy_visualization_type: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_visualization_type = ( + micro_strategy_visualization_type + ) + + @property + def micro_strategy_dossier_qualified_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_dossier_qualified_name + ) + + @micro_strategy_dossier_qualified_name.setter + def micro_strategy_dossier_qualified_name( + self, micro_strategy_dossier_qualified_name: Optional[str] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_dossier_qualified_name = ( + micro_strategy_dossier_qualified_name + ) + + @property + def micro_strategy_dossier_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.micro_strategy_dossier_name + ) + + @micro_strategy_dossier_name.setter + def micro_strategy_dossier_name(self, micro_strategy_dossier_name: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_dossier_name = micro_strategy_dossier_name + + @property + def micro_strategy_dossier(self) -> Optional[MicroStrategyDossier]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_dossier + ) + + @micro_strategy_dossier.setter + def micro_strategy_dossier( + self, micro_strategy_dossier: Optional[MicroStrategyDossier] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.micro_strategy_dossier = micro_strategy_dossier + + @property + def micro_strategy_project(self) -> Optional[MicroStrategyProject]: + return ( + None if self.attributes is None else self.attributes.micro_strategy_project + ) - @qlik_apps.setter - def qlik_apps(self, qlik_apps: Optional[list[QlikApp]]): + @micro_strategy_project.setter + def micro_strategy_project( + self, micro_strategy_project: Optional[MicroStrategyProject] + ): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.qlik_apps = qlik_apps + self.attributes.micro_strategy_project = micro_strategy_project - class Attributes(Qlik.Attributes): - qlik_space_type: Optional[str] = Field( - None, description="", alias="qlikSpaceType" + class Attributes(MicroStrategy.Attributes): + micro_strategy_visualization_type: Optional[str] = Field( + None, description="", alias="microStrategyVisualizationType" + ) + micro_strategy_dossier_qualified_name: Optional[str] = Field( + None, description="", alias="microStrategyDossierQualifiedName" ) - qlik_datasets: Optional[list[QlikDataset]] = Field( - None, description="", alias="qlikDatasets" + micro_strategy_dossier_name: Optional[str] = Field( + None, description="", alias="microStrategyDossierName" + ) + micro_strategy_dossier: Optional[MicroStrategyDossier] = Field( + None, description="", alias="microStrategyDossier" ) # relationship - qlik_apps: Optional[list[QlikApp]] = Field( - None, description="", alias="qlikApps" + micro_strategy_project: Optional[MicroStrategyProject] = Field( + None, description="", alias="microStrategyProject" ) # relationship - attributes: "QlikSpace.Attributes" = Field( - default_factory=lambda: QlikSpace.Attributes(), + attributes: "MicroStrategyVisualization.Attributes" = Field( + default_factory=lambda: MicroStrategyVisualization.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -QlikApp.Attributes.update_forward_refs() +MicroStrategyReport.Attributes.update_forward_refs() + + +MicroStrategyProject.Attributes.update_forward_refs() + + +MicroStrategyMetric.Attributes.update_forward_refs() + + +MicroStrategyCube.Attributes.update_forward_refs() + + +MicroStrategyDossier.Attributes.update_forward_refs() -QlikChart.Attributes.update_forward_refs() +MicroStrategyFact.Attributes.update_forward_refs() -QlikDataset.Attributes.update_forward_refs() +MicroStrategyDocument.Attributes.update_forward_refs() -QlikSheet.Attributes.update_forward_refs() +MicroStrategyAttribute.Attributes.update_forward_refs() -QlikSpace.Attributes.update_forward_refs() +MicroStrategyVisualization.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset73.py b/pyatlan/model/assets/asset73.py index c764e3710..5b13abd56 100644 --- a/pyatlan/model/assets/asset73.py +++ b/pyatlan/model/assets/asset73.py @@ -8,681 +8,642 @@ from pydantic import Field, validator -from .asset48 import Salesforce +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + KeywordTextField, + NumericField, + RelationField, + TextField, +) +from .asset48 import Qlik -class SalesforceObject(Salesforce): + +class QlikApp(Qlik): """Description""" - type_name: str = Field("SalesforceObject", allow_mutation=False) + type_name: str = Field("QlikApp", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SalesforceObject": - raise ValueError("must be SalesforceObject") + if v != "QlikApp": + raise ValueError("must be QlikApp") return v def __setattr__(self, name, value): - if name in SalesforceObject._convience_properties: + if name in QlikApp._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "is_custom", - "is_mergable", - "is_queryable", - "field_count", - "lookup_fields", - "organization", - "fields", + QLIK_HAS_SECTION_ACCESS: ClassVar[BooleanField] = BooleanField( + "qlikHasSectionAccess", "qlikHasSectionAccess" + ) + """ + Whether section access/data masking is enabled on source + """ + QLIK_ORIGIN_APP_ID: ClassVar[KeywordField] = KeywordField( + "qlikOriginAppId", "qlikOriginAppId" + ) + """ + originAppId value for a qlik app + """ + QLIK_IS_ENCRYPTED: ClassVar[BooleanField] = BooleanField( + "qlikIsEncrypted", "qlikIsEncrypted" + ) + """ + Whether a qlik app is encrypted + """ + QLIK_IS_DIRECT_QUERY_MODE: ClassVar[BooleanField] = BooleanField( + "qlikIsDirectQueryMode", "qlikIsDirectQueryMode" + ) + """ + Whether a qlik app is in direct query mode + """ + QLIK_APP_STATIC_BYTE_SIZE: ClassVar[NumericField] = NumericField( + "qlikAppStaticByteSize", "qlikAppStaticByteSize" + ) + """ + Static space taken by a qlik app + """ + + QLIK_SPACE: ClassVar[RelationField] = RelationField("qlikSpace") + """ + TBC + """ + QLIK_SHEETS: ClassVar[RelationField] = RelationField("qlikSheets") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "qlik_has_section_access", + "qlik_origin_app_id", + "qlik_is_encrypted", + "qlik_is_direct_query_mode", + "qlik_app_static_byte_size", + "qlik_space", + "qlik_sheets", ] @property - def is_custom(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_custom + def qlik_has_section_access(self) -> Optional[bool]: + return ( + None if self.attributes is None else self.attributes.qlik_has_section_access + ) - @is_custom.setter - def is_custom(self, is_custom: Optional[bool]): + @qlik_has_section_access.setter + def qlik_has_section_access(self, qlik_has_section_access: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.is_custom = is_custom + self.attributes.qlik_has_section_access = qlik_has_section_access @property - def is_mergable(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_mergable + def qlik_origin_app_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_origin_app_id - @is_mergable.setter - def is_mergable(self, is_mergable: Optional[bool]): + @qlik_origin_app_id.setter + def qlik_origin_app_id(self, qlik_origin_app_id: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.is_mergable = is_mergable + self.attributes.qlik_origin_app_id = qlik_origin_app_id @property - def is_queryable(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_queryable + def qlik_is_encrypted(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.qlik_is_encrypted - @is_queryable.setter - def is_queryable(self, is_queryable: Optional[bool]): + @qlik_is_encrypted.setter + def qlik_is_encrypted(self, qlik_is_encrypted: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.is_queryable = is_queryable + self.attributes.qlik_is_encrypted = qlik_is_encrypted @property - def field_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.field_count + def qlik_is_direct_query_mode(self) -> Optional[bool]: + return ( + None + if self.attributes is None + else self.attributes.qlik_is_direct_query_mode + ) - @field_count.setter - def field_count(self, field_count: Optional[int]): + @qlik_is_direct_query_mode.setter + def qlik_is_direct_query_mode(self, qlik_is_direct_query_mode: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.field_count = field_count + self.attributes.qlik_is_direct_query_mode = qlik_is_direct_query_mode @property - def lookup_fields(self) -> Optional[list[SalesforceField]]: - return None if self.attributes is None else self.attributes.lookup_fields + def qlik_app_static_byte_size(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.qlik_app_static_byte_size + ) - @lookup_fields.setter - def lookup_fields(self, lookup_fields: Optional[list[SalesforceField]]): + @qlik_app_static_byte_size.setter + def qlik_app_static_byte_size(self, qlik_app_static_byte_size: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.lookup_fields = lookup_fields + self.attributes.qlik_app_static_byte_size = qlik_app_static_byte_size @property - def organization(self) -> Optional[SalesforceOrganization]: - return None if self.attributes is None else self.attributes.organization + def qlik_space(self) -> Optional[QlikSpace]: + return None if self.attributes is None else self.attributes.qlik_space - @organization.setter - def organization(self, organization: Optional[SalesforceOrganization]): + @qlik_space.setter + def qlik_space(self, qlik_space: Optional[QlikSpace]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.organization = organization + self.attributes.qlik_space = qlik_space @property - def fields(self) -> Optional[list[SalesforceField]]: - return None if self.attributes is None else self.attributes.fields + def qlik_sheets(self) -> Optional[list[QlikSheet]]: + return None if self.attributes is None else self.attributes.qlik_sheets - @fields.setter - def fields(self, fields: Optional[list[SalesforceField]]): + @qlik_sheets.setter + def qlik_sheets(self, qlik_sheets: Optional[list[QlikSheet]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.fields = fields - - class Attributes(Salesforce.Attributes): - is_custom: Optional[bool] = Field(None, description="", alias="isCustom") - is_mergable: Optional[bool] = Field(None, description="", alias="isMergable") - is_queryable: Optional[bool] = Field(None, description="", alias="isQueryable") - field_count: Optional[int] = Field(None, description="", alias="fieldCount") - lookup_fields: Optional[list[SalesforceField]] = Field( - None, description="", alias="lookupFields" - ) # relationship - organization: Optional[SalesforceOrganization] = Field( - None, description="", alias="organization" + self.attributes.qlik_sheets = qlik_sheets + + class Attributes(Qlik.Attributes): + qlik_has_section_access: Optional[bool] = Field( + None, description="", alias="qlikHasSectionAccess" + ) + qlik_origin_app_id: Optional[str] = Field( + None, description="", alias="qlikOriginAppId" + ) + qlik_is_encrypted: Optional[bool] = Field( + None, description="", alias="qlikIsEncrypted" + ) + qlik_is_direct_query_mode: Optional[bool] = Field( + None, description="", alias="qlikIsDirectQueryMode" + ) + qlik_app_static_byte_size: Optional[int] = Field( + None, description="", alias="qlikAppStaticByteSize" + ) + qlik_space: Optional[QlikSpace] = Field( + None, description="", alias="qlikSpace" ) # relationship - fields: Optional[list[SalesforceField]] = Field( - None, description="", alias="fields" + qlik_sheets: Optional[list[QlikSheet]] = Field( + None, description="", alias="qlikSheets" ) # relationship - attributes: "SalesforceObject.Attributes" = Field( - default_factory=lambda: SalesforceObject.Attributes(), + attributes: "QlikApp.Attributes" = Field( + default_factory=lambda: QlikApp.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class SalesforceField(Salesforce): +class QlikChart(Qlik): """Description""" - type_name: str = Field("SalesforceField", allow_mutation=False) + type_name: str = Field("QlikChart", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SalesforceField": - raise ValueError("must be SalesforceField") + if v != "QlikChart": + raise ValueError("must be QlikChart") return v def __setattr__(self, name, value): - if name in SalesforceField._convience_properties: + if name in QlikChart._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "data_type", - "object_qualified_name", - "order", - "inline_help_text", - "is_calculated", - "formula", - "is_case_sensitive", - "is_encrypted", - "max_length", - "is_nullable", - "precision", - "numeric_scale", - "is_unique", - "picklist_values", - "is_polymorphic_foreign_key", - "default_value_formula", - "lookup_objects", - "object", + QLIK_CHART_SUBTITLE: ClassVar[TextField] = TextField( + "qlikChartSubtitle", "qlikChartSubtitle" + ) + """ + Subtitle of a qlik chart + """ + QLIK_CHART_FOOTNOTE: ClassVar[TextField] = TextField( + "qlikChartFootnote", "qlikChartFootnote" + ) + """ + Footnote of a qlik chart + """ + QLIK_CHART_ORIENTATION: ClassVar[KeywordField] = KeywordField( + "qlikChartOrientation", "qlikChartOrientation" + ) + """ + Orientation of a qlik chart + """ + QLIK_CHART_TYPE: ClassVar[KeywordField] = KeywordField( + "qlikChartType", "qlikChartType" + ) + """ + Subtype of an qlik chart. E.g. bar, graph, pie etc + """ + + QLIK_SHEET: ClassVar[RelationField] = RelationField("qlikSheet") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "qlik_chart_subtitle", + "qlik_chart_footnote", + "qlik_chart_orientation", + "qlik_chart_type", + "qlik_sheet", ] @property - def data_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.data_type - - @data_type.setter - def data_type(self, data_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.data_type = data_type - - @property - def object_qualified_name(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.object_qualified_name - ) - - @object_qualified_name.setter - def object_qualified_name(self, object_qualified_name: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.object_qualified_name = object_qualified_name - - @property - def order(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.order - - @order.setter - def order(self, order: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.order = order - - @property - def inline_help_text(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.inline_help_text - - @inline_help_text.setter - def inline_help_text(self, inline_help_text: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.inline_help_text = inline_help_text - - @property - def is_calculated(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_calculated - - @is_calculated.setter - def is_calculated(self, is_calculated: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.is_calculated = is_calculated - - @property - def formula(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.formula - - @formula.setter - def formula(self, formula: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.formula = formula - - @property - def is_case_sensitive(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_case_sensitive - - @is_case_sensitive.setter - def is_case_sensitive(self, is_case_sensitive: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.is_case_sensitive = is_case_sensitive - - @property - def is_encrypted(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_encrypted - - @is_encrypted.setter - def is_encrypted(self, is_encrypted: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.is_encrypted = is_encrypted - - @property - def max_length(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.max_length - - @max_length.setter - def max_length(self, max_length: Optional[int]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.max_length = max_length - - @property - def is_nullable(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_nullable + def qlik_chart_subtitle(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_chart_subtitle - @is_nullable.setter - def is_nullable(self, is_nullable: Optional[bool]): + @qlik_chart_subtitle.setter + def qlik_chart_subtitle(self, qlik_chart_subtitle: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.is_nullable = is_nullable + self.attributes.qlik_chart_subtitle = qlik_chart_subtitle @property - def precision(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.precision + def qlik_chart_footnote(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_chart_footnote - @precision.setter - def precision(self, precision: Optional[int]): + @qlik_chart_footnote.setter + def qlik_chart_footnote(self, qlik_chart_footnote: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.precision = precision + self.attributes.qlik_chart_footnote = qlik_chart_footnote @property - def numeric_scale(self) -> Optional[float]: - return None if self.attributes is None else self.attributes.numeric_scale - - @numeric_scale.setter - def numeric_scale(self, numeric_scale: Optional[float]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.numeric_scale = numeric_scale - - @property - def is_unique(self) -> Optional[bool]: - return None if self.attributes is None else self.attributes.is_unique - - @is_unique.setter - def is_unique(self, is_unique: Optional[bool]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.is_unique = is_unique - - @property - def picklist_values(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.picklist_values - - @picklist_values.setter - def picklist_values(self, picklist_values: Optional[set[str]]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.picklist_values = picklist_values - - @property - def is_polymorphic_foreign_key(self) -> Optional[bool]: + def qlik_chart_orientation(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.is_polymorphic_foreign_key + None if self.attributes is None else self.attributes.qlik_chart_orientation ) - @is_polymorphic_foreign_key.setter - def is_polymorphic_foreign_key(self, is_polymorphic_foreign_key: Optional[bool]): + @qlik_chart_orientation.setter + def qlik_chart_orientation(self, qlik_chart_orientation: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.is_polymorphic_foreign_key = is_polymorphic_foreign_key + self.attributes.qlik_chart_orientation = qlik_chart_orientation @property - def default_value_formula(self) -> Optional[str]: - return ( - None if self.attributes is None else self.attributes.default_value_formula - ) + def qlik_chart_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_chart_type - @default_value_formula.setter - def default_value_formula(self, default_value_formula: Optional[str]): + @qlik_chart_type.setter + def qlik_chart_type(self, qlik_chart_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.default_value_formula = default_value_formula + self.attributes.qlik_chart_type = qlik_chart_type @property - def lookup_objects(self) -> Optional[list[SalesforceObject]]: - return None if self.attributes is None else self.attributes.lookup_objects + def qlik_sheet(self) -> Optional[QlikSheet]: + return None if self.attributes is None else self.attributes.qlik_sheet - @lookup_objects.setter - def lookup_objects(self, lookup_objects: Optional[list[SalesforceObject]]): + @qlik_sheet.setter + def qlik_sheet(self, qlik_sheet: Optional[QlikSheet]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.lookup_objects = lookup_objects + self.attributes.qlik_sheet = qlik_sheet - @property - def object(self) -> Optional[SalesforceObject]: - return None if self.attributes is None else self.attributes.object - - @object.setter - def object(self, object: Optional[SalesforceObject]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.object = object - - class Attributes(Salesforce.Attributes): - data_type: Optional[str] = Field(None, description="", alias="dataType") - object_qualified_name: Optional[str] = Field( - None, description="", alias="objectQualifiedName" - ) - order: Optional[int] = Field(None, description="", alias="order") - inline_help_text: Optional[str] = Field( - None, description="", alias="inlineHelpText" - ) - is_calculated: Optional[bool] = Field( - None, description="", alias="isCalculated" - ) - formula: Optional[str] = Field(None, description="", alias="formula") - is_case_sensitive: Optional[bool] = Field( - None, description="", alias="isCaseSensitive" - ) - is_encrypted: Optional[bool] = Field(None, description="", alias="isEncrypted") - max_length: Optional[int] = Field(None, description="", alias="maxLength") - is_nullable: Optional[bool] = Field(None, description="", alias="isNullable") - precision: Optional[int] = Field(None, description="", alias="precision") - numeric_scale: Optional[float] = Field( - None, description="", alias="numericScale" + class Attributes(Qlik.Attributes): + qlik_chart_subtitle: Optional[str] = Field( + None, description="", alias="qlikChartSubtitle" ) - is_unique: Optional[bool] = Field(None, description="", alias="isUnique") - picklist_values: Optional[set[str]] = Field( - None, description="", alias="picklistValues" + qlik_chart_footnote: Optional[str] = Field( + None, description="", alias="qlikChartFootnote" ) - is_polymorphic_foreign_key: Optional[bool] = Field( - None, description="", alias="isPolymorphicForeignKey" + qlik_chart_orientation: Optional[str] = Field( + None, description="", alias="qlikChartOrientation" ) - default_value_formula: Optional[str] = Field( - None, description="", alias="defaultValueFormula" + qlik_chart_type: Optional[str] = Field( + None, description="", alias="qlikChartType" ) - lookup_objects: Optional[list[SalesforceObject]] = Field( - None, description="", alias="lookupObjects" - ) # relationship - object: Optional[SalesforceObject] = Field( - None, description="", alias="object" + qlik_sheet: Optional[QlikSheet] = Field( + None, description="", alias="qlikSheet" ) # relationship - attributes: "SalesforceField.Attributes" = Field( - default_factory=lambda: SalesforceField.Attributes(), + attributes: "QlikChart.Attributes" = Field( + default_factory=lambda: QlikChart.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class SalesforceOrganization(Salesforce): +class QlikDataset(Qlik): """Description""" - type_name: str = Field("SalesforceOrganization", allow_mutation=False) + type_name: str = Field("QlikDataset", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SalesforceOrganization": - raise ValueError("must be SalesforceOrganization") + if v != "QlikDataset": + raise ValueError("must be QlikDataset") return v def __setattr__(self, name, value): - if name in SalesforceOrganization._convience_properties: + if name in QlikDataset._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "source_id", - "reports", - "objects", - "dashboards", + QLIK_DATASET_TECHNICAL_NAME: ClassVar[KeywordTextField] = KeywordTextField( + "qlikDatasetTechnicalName", + "qlikDatasetTechnicalName.keyword", + "qlikDatasetTechnicalName", + ) + """ + Technical name of a qlik data asset + """ + QLIK_DATASET_TYPE: ClassVar[KeywordField] = KeywordField( + "qlikDatasetType", "qlikDatasetType" + ) + """ + Type of an qlik data asset. E.g. qix-df, snowflake etc + """ + QLIK_DATASET_URI: ClassVar[KeywordTextField] = KeywordTextField( + "qlikDatasetUri", "qlikDatasetUri", "qlikDatasetUri.text" + ) + """ + URI of a qlik dataset + """ + QLIK_DATASET_SUBTYPE: ClassVar[KeywordField] = KeywordField( + "qlikDatasetSubtype", "qlikDatasetSubtype" + ) + """ + Subtype of an qlik dataset asset + """ + + QLIK_SPACE: ClassVar[RelationField] = RelationField("qlikSpace") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "qlik_dataset_technical_name", + "qlik_dataset_type", + "qlik_dataset_uri", + "qlik_dataset_subtype", + "qlik_space", ] @property - def source_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.source_id + def qlik_dataset_technical_name(self) -> Optional[str]: + return ( + None + if self.attributes is None + else self.attributes.qlik_dataset_technical_name + ) - @source_id.setter - def source_id(self, source_id: Optional[str]): + @qlik_dataset_technical_name.setter + def qlik_dataset_technical_name(self, qlik_dataset_technical_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.source_id = source_id + self.attributes.qlik_dataset_technical_name = qlik_dataset_technical_name @property - def reports(self) -> Optional[list[SalesforceReport]]: - return None if self.attributes is None else self.attributes.reports + def qlik_dataset_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_dataset_type - @reports.setter - def reports(self, reports: Optional[list[SalesforceReport]]): + @qlik_dataset_type.setter + def qlik_dataset_type(self, qlik_dataset_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.reports = reports + self.attributes.qlik_dataset_type = qlik_dataset_type @property - def objects(self) -> Optional[list[SalesforceObject]]: - return None if self.attributes is None else self.attributes.objects + def qlik_dataset_uri(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_dataset_uri - @objects.setter - def objects(self, objects: Optional[list[SalesforceObject]]): + @qlik_dataset_uri.setter + def qlik_dataset_uri(self, qlik_dataset_uri: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.objects = objects + self.attributes.qlik_dataset_uri = qlik_dataset_uri @property - def dashboards(self) -> Optional[list[SalesforceDashboard]]: - return None if self.attributes is None else self.attributes.dashboards + def qlik_dataset_subtype(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_dataset_subtype - @dashboards.setter - def dashboards(self, dashboards: Optional[list[SalesforceDashboard]]): + @qlik_dataset_subtype.setter + def qlik_dataset_subtype(self, qlik_dataset_subtype: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dashboards = dashboards + self.attributes.qlik_dataset_subtype = qlik_dataset_subtype - class Attributes(Salesforce.Attributes): - source_id: Optional[str] = Field(None, description="", alias="sourceId") - reports: Optional[list[SalesforceReport]] = Field( - None, description="", alias="reports" - ) # relationship - objects: Optional[list[SalesforceObject]] = Field( - None, description="", alias="objects" - ) # relationship - dashboards: Optional[list[SalesforceDashboard]] = Field( - None, description="", alias="dashboards" + @property + def qlik_space(self) -> Optional[QlikSpace]: + return None if self.attributes is None else self.attributes.qlik_space + + @qlik_space.setter + def qlik_space(self, qlik_space: Optional[QlikSpace]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.qlik_space = qlik_space + + class Attributes(Qlik.Attributes): + qlik_dataset_technical_name: Optional[str] = Field( + None, description="", alias="qlikDatasetTechnicalName" + ) + qlik_dataset_type: Optional[str] = Field( + None, description="", alias="qlikDatasetType" + ) + qlik_dataset_uri: Optional[str] = Field( + None, description="", alias="qlikDatasetUri" + ) + qlik_dataset_subtype: Optional[str] = Field( + None, description="", alias="qlikDatasetSubtype" + ) + qlik_space: Optional[QlikSpace] = Field( + None, description="", alias="qlikSpace" ) # relationship - attributes: "SalesforceOrganization.Attributes" = Field( - default_factory=lambda: SalesforceOrganization.Attributes(), + attributes: "QlikDataset.Attributes" = Field( + default_factory=lambda: QlikDataset.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class SalesforceDashboard(Salesforce): +class QlikSheet(Qlik): """Description""" - type_name: str = Field("SalesforceDashboard", allow_mutation=False) + type_name: str = Field("QlikSheet", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SalesforceDashboard": - raise ValueError("must be SalesforceDashboard") + if v != "QlikSheet": + raise ValueError("must be QlikSheet") return v def __setattr__(self, name, value): - if name in SalesforceDashboard._convience_properties: + if name in QlikSheet._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "source_id", - "dashboard_type", - "report_count", - "reports", - "organization", + QLIK_SHEET_IS_APPROVED: ClassVar[BooleanField] = BooleanField( + "qlikSheetIsApproved", "qlikSheetIsApproved" + ) + """ + Whether a qlik sheet is approved + """ + + QLIK_APP: ClassVar[RelationField] = RelationField("qlikApp") + """ + TBC + """ + QLIK_CHARTS: ClassVar[RelationField] = RelationField("qlikCharts") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "qlik_sheet_is_approved", + "qlik_app", + "qlik_charts", ] @property - def source_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.source_id - - @source_id.setter - def source_id(self, source_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_id = source_id - - @property - def dashboard_type(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.dashboard_type - - @dashboard_type.setter - def dashboard_type(self, dashboard_type: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.dashboard_type = dashboard_type - - @property - def report_count(self) -> Optional[int]: - return None if self.attributes is None else self.attributes.report_count + def qlik_sheet_is_approved(self) -> Optional[bool]: + return ( + None if self.attributes is None else self.attributes.qlik_sheet_is_approved + ) - @report_count.setter - def report_count(self, report_count: Optional[int]): + @qlik_sheet_is_approved.setter + def qlik_sheet_is_approved(self, qlik_sheet_is_approved: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.report_count = report_count + self.attributes.qlik_sheet_is_approved = qlik_sheet_is_approved @property - def reports(self) -> Optional[list[SalesforceReport]]: - return None if self.attributes is None else self.attributes.reports + def qlik_app(self) -> Optional[QlikApp]: + return None if self.attributes is None else self.attributes.qlik_app - @reports.setter - def reports(self, reports: Optional[list[SalesforceReport]]): + @qlik_app.setter + def qlik_app(self, qlik_app: Optional[QlikApp]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.reports = reports + self.attributes.qlik_app = qlik_app @property - def organization(self) -> Optional[SalesforceOrganization]: - return None if self.attributes is None else self.attributes.organization + def qlik_charts(self) -> Optional[list[QlikChart]]: + return None if self.attributes is None else self.attributes.qlik_charts - @organization.setter - def organization(self, organization: Optional[SalesforceOrganization]): + @qlik_charts.setter + def qlik_charts(self, qlik_charts: Optional[list[QlikChart]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.organization = organization + self.attributes.qlik_charts = qlik_charts - class Attributes(Salesforce.Attributes): - source_id: Optional[str] = Field(None, description="", alias="sourceId") - dashboard_type: Optional[str] = Field( - None, description="", alias="dashboardType" + class Attributes(Qlik.Attributes): + qlik_sheet_is_approved: Optional[bool] = Field( + None, description="", alias="qlikSheetIsApproved" ) - report_count: Optional[int] = Field(None, description="", alias="reportCount") - reports: Optional[list[SalesforceReport]] = Field( - None, description="", alias="reports" + qlik_app: Optional[QlikApp] = Field( + None, description="", alias="qlikApp" ) # relationship - organization: Optional[SalesforceOrganization] = Field( - None, description="", alias="organization" + qlik_charts: Optional[list[QlikChart]] = Field( + None, description="", alias="qlikCharts" ) # relationship - attributes: "SalesforceDashboard.Attributes" = Field( - default_factory=lambda: SalesforceDashboard.Attributes(), + attributes: "QlikSheet.Attributes" = Field( + default_factory=lambda: QlikSheet.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class SalesforceReport(Salesforce): +class QlikSpace(Qlik): """Description""" - type_name: str = Field("SalesforceReport", allow_mutation=False) + type_name: str = Field("QlikSpace", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "SalesforceReport": - raise ValueError("must be SalesforceReport") + if v != "QlikSpace": + raise ValueError("must be QlikSpace") return v def __setattr__(self, name, value): - if name in SalesforceReport._convience_properties: + if name in QlikSpace._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "source_id", - "report_type", - "detail_columns", - "dashboards", - "organization", + QLIK_SPACE_TYPE: ClassVar[KeywordField] = KeywordField( + "qlikSpaceType", "qlikSpaceType" + ) + """ + Type of a qlik space. E.g. Private, Shared etc + """ + + QLIK_DATASETS: ClassVar[RelationField] = RelationField("qlikDatasets") + """ + TBC + """ + QLIK_APPS: ClassVar[RelationField] = RelationField("qlikApps") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "qlik_space_type", + "qlik_datasets", + "qlik_apps", ] @property - def source_id(self) -> Optional[str]: - return None if self.attributes is None else self.attributes.source_id - - @source_id.setter - def source_id(self, source_id: Optional[str]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.source_id = source_id - - @property - def report_type(self) -> Optional[dict[str, str]]: - return None if self.attributes is None else self.attributes.report_type + def qlik_space_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.qlik_space_type - @report_type.setter - def report_type(self, report_type: Optional[dict[str, str]]): + @qlik_space_type.setter + def qlik_space_type(self, qlik_space_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.report_type = report_type + self.attributes.qlik_space_type = qlik_space_type @property - def detail_columns(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.detail_columns + def qlik_datasets(self) -> Optional[list[QlikDataset]]: + return None if self.attributes is None else self.attributes.qlik_datasets - @detail_columns.setter - def detail_columns(self, detail_columns: Optional[set[str]]): + @qlik_datasets.setter + def qlik_datasets(self, qlik_datasets: Optional[list[QlikDataset]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.detail_columns = detail_columns + self.attributes.qlik_datasets = qlik_datasets @property - def dashboards(self) -> Optional[list[SalesforceDashboard]]: - return None if self.attributes is None else self.attributes.dashboards + def qlik_apps(self) -> Optional[list[QlikApp]]: + return None if self.attributes is None else self.attributes.qlik_apps - @dashboards.setter - def dashboards(self, dashboards: Optional[list[SalesforceDashboard]]): + @qlik_apps.setter + def qlik_apps(self, qlik_apps: Optional[list[QlikApp]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.dashboards = dashboards - - @property - def organization(self) -> Optional[SalesforceOrganization]: - return None if self.attributes is None else self.attributes.organization + self.attributes.qlik_apps = qlik_apps - @organization.setter - def organization(self, organization: Optional[SalesforceOrganization]): - if self.attributes is None: - self.attributes = self.Attributes() - self.attributes.organization = organization - - class Attributes(Salesforce.Attributes): - source_id: Optional[str] = Field(None, description="", alias="sourceId") - report_type: Optional[dict[str, str]] = Field( - None, description="", alias="reportType" - ) - detail_columns: Optional[set[str]] = Field( - None, description="", alias="detailColumns" + class Attributes(Qlik.Attributes): + qlik_space_type: Optional[str] = Field( + None, description="", alias="qlikSpaceType" ) - dashboards: Optional[list[SalesforceDashboard]] = Field( - None, description="", alias="dashboards" + qlik_datasets: Optional[list[QlikDataset]] = Field( + None, description="", alias="qlikDatasets" ) # relationship - organization: Optional[SalesforceOrganization] = Field( - None, description="", alias="organization" + qlik_apps: Optional[list[QlikApp]] = Field( + None, description="", alias="qlikApps" ) # relationship - attributes: "SalesforceReport.Attributes" = Field( - default_factory=lambda: SalesforceReport.Attributes(), + attributes: "QlikSpace.Attributes" = Field( + default_factory=lambda: QlikSpace.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -SalesforceObject.Attributes.update_forward_refs() +QlikApp.Attributes.update_forward_refs() -SalesforceField.Attributes.update_forward_refs() +QlikChart.Attributes.update_forward_refs() -SalesforceOrganization.Attributes.update_forward_refs() +QlikDataset.Attributes.update_forward_refs() -SalesforceDashboard.Attributes.update_forward_refs() +QlikSheet.Attributes.update_forward_refs() -SalesforceReport.Attributes.update_forward_refs() +QlikSpace.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset74.py b/pyatlan/model/assets/asset74.py index ee1fc8053..e1f73bc7d 100644 --- a/pyatlan/model/assets/asset74.py +++ b/pyatlan/model/assets/asset74.py @@ -8,334 +8,871 @@ from pydantic import Field, validator -from pyatlan.model.enums import KafkaTopicCleanupPolicy, KafkaTopicCompressionType -from pyatlan.model.structs import KafkaTopicConsumption +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, + TextField, +) -from .asset50 import Kafka +from .asset49 import Salesforce -class KafkaConsumerGroup(Kafka): +class SalesforceObject(Salesforce): """Description""" - type_name: str = Field("KafkaConsumerGroup", allow_mutation=False) + type_name: str = Field("SalesforceObject", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "KafkaConsumerGroup": - raise ValueError("must be KafkaConsumerGroup") + if v != "SalesforceObject": + raise ValueError("must be SalesforceObject") return v def __setattr__(self, name, value): - if name in KafkaConsumerGroup._convience_properties: + if name in SalesforceObject._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "kafka_consumer_group_topic_consumption_properties", - "kafka_consumer_group_member_count", - "kafka_topic_names", - "kafka_topic_qualified_names", - "kafka_topics", + IS_CUSTOM: ClassVar[BooleanField] = BooleanField("isCustom", "isCustom") + """ + isCustom captures whether the object is a custom object or not + """ + IS_MERGABLE: ClassVar[BooleanField] = BooleanField("isMergable", "isMergable") + """ + TBC + """ + IS_QUERYABLE: ClassVar[BooleanField] = BooleanField("isQueryable", "isQueryable") + """ + TBC + """ + FIELD_COUNT: ClassVar[NumericField] = NumericField("fieldCount", "fieldCount") + """ + fieldCount is the number of fields in the object entity + """ + + LOOKUP_FIELDS: ClassVar[RelationField] = RelationField("lookupFields") + """ + TBC + """ + ORGANIZATION: ClassVar[RelationField] = RelationField("organization") + """ + TBC + """ + FIELDS: ClassVar[RelationField] = RelationField("fields") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "is_custom", + "is_mergable", + "is_queryable", + "field_count", + "lookup_fields", + "organization", + "fields", ] @property - def kafka_consumer_group_topic_consumption_properties( - self, - ) -> Optional[list[KafkaTopicConsumption]]: - return ( - None - if self.attributes is None - else self.attributes.kafka_consumer_group_topic_consumption_properties - ) + def is_custom(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_custom - @kafka_consumer_group_topic_consumption_properties.setter - def kafka_consumer_group_topic_consumption_properties( - self, - kafka_consumer_group_topic_consumption_properties: Optional[ - list[KafkaTopicConsumption] - ], - ): + @is_custom.setter + def is_custom(self, is_custom: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_consumer_group_topic_consumption_properties = ( - kafka_consumer_group_topic_consumption_properties - ) + self.attributes.is_custom = is_custom @property - def kafka_consumer_group_member_count(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.kafka_consumer_group_member_count - ) + def is_mergable(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_mergable - @kafka_consumer_group_member_count.setter - def kafka_consumer_group_member_count( - self, kafka_consumer_group_member_count: Optional[int] - ): + @is_mergable.setter + def is_mergable(self, is_mergable: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_consumer_group_member_count = ( - kafka_consumer_group_member_count - ) + self.attributes.is_mergable = is_mergable @property - def kafka_topic_names(self) -> Optional[set[str]]: - return None if self.attributes is None else self.attributes.kafka_topic_names + def is_queryable(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_queryable - @kafka_topic_names.setter - def kafka_topic_names(self, kafka_topic_names: Optional[set[str]]): + @is_queryable.setter + def is_queryable(self, is_queryable: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_names = kafka_topic_names + self.attributes.is_queryable = is_queryable @property - def kafka_topic_qualified_names(self) -> Optional[set[str]]: - return ( - None - if self.attributes is None - else self.attributes.kafka_topic_qualified_names - ) + def field_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.field_count - @kafka_topic_qualified_names.setter - def kafka_topic_qualified_names( - self, kafka_topic_qualified_names: Optional[set[str]] - ): + @field_count.setter + def field_count(self, field_count: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_qualified_names = kafka_topic_qualified_names + self.attributes.field_count = field_count @property - def kafka_topics(self) -> Optional[list[KafkaTopic]]: - return None if self.attributes is None else self.attributes.kafka_topics + def lookup_fields(self) -> Optional[list[SalesforceField]]: + return None if self.attributes is None else self.attributes.lookup_fields - @kafka_topics.setter - def kafka_topics(self, kafka_topics: Optional[list[KafkaTopic]]): + @lookup_fields.setter + def lookup_fields(self, lookup_fields: Optional[list[SalesforceField]]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topics = kafka_topics + self.attributes.lookup_fields = lookup_fields - class Attributes(Kafka.Attributes): - kafka_consumer_group_topic_consumption_properties: Optional[ - list[KafkaTopicConsumption] - ] = Field( - None, description="", alias="kafkaConsumerGroupTopicConsumptionProperties" - ) - kafka_consumer_group_member_count: Optional[int] = Field( - None, description="", alias="kafkaConsumerGroupMemberCount" - ) - kafka_topic_names: Optional[set[str]] = Field( - None, description="", alias="kafkaTopicNames" - ) - kafka_topic_qualified_names: Optional[set[str]] = Field( - None, description="", alias="kafkaTopicQualifiedNames" - ) - kafka_topics: Optional[list[KafkaTopic]] = Field( - None, description="", alias="kafkaTopics" + @property + def organization(self) -> Optional[SalesforceOrganization]: + return None if self.attributes is None else self.attributes.organization + + @organization.setter + def organization(self, organization: Optional[SalesforceOrganization]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.organization = organization + + @property + def fields(self) -> Optional[list[SalesforceField]]: + return None if self.attributes is None else self.attributes.fields + + @fields.setter + def fields(self, fields: Optional[list[SalesforceField]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.fields = fields + + class Attributes(Salesforce.Attributes): + is_custom: Optional[bool] = Field(None, description="", alias="isCustom") + is_mergable: Optional[bool] = Field(None, description="", alias="isMergable") + is_queryable: Optional[bool] = Field(None, description="", alias="isQueryable") + field_count: Optional[int] = Field(None, description="", alias="fieldCount") + lookup_fields: Optional[list[SalesforceField]] = Field( + None, description="", alias="lookupFields" + ) # relationship + organization: Optional[SalesforceOrganization] = Field( + None, description="", alias="organization" + ) # relationship + fields: Optional[list[SalesforceField]] = Field( + None, description="", alias="fields" ) # relationship - attributes: "KafkaConsumerGroup.Attributes" = Field( - default_factory=lambda: KafkaConsumerGroup.Attributes(), + attributes: "SalesforceObject.Attributes" = Field( + default_factory=lambda: SalesforceObject.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -class KafkaTopic(Kafka): +class SalesforceField(Salesforce): """Description""" - type_name: str = Field("KafkaTopic", allow_mutation=False) + type_name: str = Field("SalesforceField", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "KafkaTopic": - raise ValueError("must be KafkaTopic") + if v != "SalesforceField": + raise ValueError("must be SalesforceField") return v def __setattr__(self, name, value): - if name in KafkaTopic._convience_properties: + if name in SalesforceField._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [ - "kafka_topic_is_internal", - "kafka_topic_compression_type", - "kafka_topic_replication_factor", - "kafka_topic_segment_bytes", - "kafka_topic_partitions_count", - "kafka_topic_size_in_bytes", - "kafka_topic_record_count", - "kafka_topic_cleanup_policy", - "kafka_consumer_groups", + DATA_TYPE: ClassVar[TextField] = TextField("dataType", "dataType.text") + """ + data type of the field + """ + OBJECT_QUALIFIED_NAME: ClassVar[KeywordField] = KeywordField( + "objectQualifiedName", "objectQualifiedName" + ) + """ + TBC + """ + ORDER: ClassVar[NumericField] = NumericField("order", "order") + """ + TBC + """ + INLINE_HELP_TEXT: ClassVar[TextField] = TextField( + "inlineHelpText", "inlineHelpText.text" + ) + """ + TBC + """ + IS_CALCULATED: ClassVar[BooleanField] = BooleanField("isCalculated", "isCalculated") + """ + TBC + """ + FORMULA: ClassVar[KeywordField] = KeywordField("formula", "formula") + """ + TBC + """ + IS_CASE_SENSITIVE: ClassVar[BooleanField] = BooleanField( + "isCaseSensitive", "isCaseSensitive" + ) + """ + TBC + """ + IS_ENCRYPTED: ClassVar[BooleanField] = BooleanField("isEncrypted", "isEncrypted") + """ + TBC + """ + MAX_LENGTH: ClassVar[NumericField] = NumericField("maxLength", "maxLength") + """ + TBC + """ + IS_NULLABLE: ClassVar[BooleanField] = BooleanField("isNullable", "isNullable") + """ + TBC + """ + PRECISION: ClassVar[NumericField] = NumericField("precision", "precision") + """ + Total number of digits allowed + """ + NUMERIC_SCALE: ClassVar[NumericField] = NumericField("numericScale", "numericScale") + """ + TBC + """ + IS_UNIQUE: ClassVar[BooleanField] = BooleanField("isUnique", "isUnique") + """ + TBC + """ + PICKLIST_VALUES: ClassVar[KeywordField] = KeywordField( + "picklistValues", "picklistValues" + ) + """ + picklistValues is a list of values from which a user can pick from while adding a record + """ + IS_POLYMORPHIC_FOREIGN_KEY: ClassVar[BooleanField] = BooleanField( + "isPolymorphicForeignKey", "isPolymorphicForeignKey" + ) + """ + isPolymorphicForeignKey captures whether the field references to record of multiple objects + """ + DEFAULT_VALUE_FORMULA: ClassVar[KeywordField] = KeywordField( + "defaultValueFormula", "defaultValueFormula" + ) + """ + TBC + """ + + LOOKUP_OBJECTS: ClassVar[RelationField] = RelationField("lookupObjects") + """ + TBC + """ + OBJECT: ClassVar[RelationField] = RelationField("object") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "data_type", + "object_qualified_name", + "order", + "inline_help_text", + "is_calculated", + "formula", + "is_case_sensitive", + "is_encrypted", + "max_length", + "is_nullable", + "precision", + "numeric_scale", + "is_unique", + "picklist_values", + "is_polymorphic_foreign_key", + "default_value_formula", + "lookup_objects", + "object", ] @property - def kafka_topic_is_internal(self) -> Optional[bool]: - return ( - None if self.attributes is None else self.attributes.kafka_topic_is_internal - ) + def data_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.data_type - @kafka_topic_is_internal.setter - def kafka_topic_is_internal(self, kafka_topic_is_internal: Optional[bool]): + @data_type.setter + def data_type(self, data_type: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_is_internal = kafka_topic_is_internal + self.attributes.data_type = data_type @property - def kafka_topic_compression_type(self) -> Optional[KafkaTopicCompressionType]: + def object_qualified_name(self) -> Optional[str]: return ( - None - if self.attributes is None - else self.attributes.kafka_topic_compression_type + None if self.attributes is None else self.attributes.object_qualified_name ) - @kafka_topic_compression_type.setter - def kafka_topic_compression_type( - self, kafka_topic_compression_type: Optional[KafkaTopicCompressionType] - ): + @object_qualified_name.setter + def object_qualified_name(self, object_qualified_name: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_compression_type = kafka_topic_compression_type + self.attributes.object_qualified_name = object_qualified_name @property - def kafka_topic_replication_factor(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.kafka_topic_replication_factor - ) + def order(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.order - @kafka_topic_replication_factor.setter - def kafka_topic_replication_factor( - self, kafka_topic_replication_factor: Optional[int] - ): + @order.setter + def order(self, order: Optional[int]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_replication_factor = kafka_topic_replication_factor + self.attributes.order = order @property - def kafka_topic_segment_bytes(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.kafka_topic_segment_bytes - ) + def inline_help_text(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.inline_help_text - @kafka_topic_segment_bytes.setter - def kafka_topic_segment_bytes(self, kafka_topic_segment_bytes: Optional[int]): + @inline_help_text.setter + def inline_help_text(self, inline_help_text: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_segment_bytes = kafka_topic_segment_bytes + self.attributes.inline_help_text = inline_help_text @property - def kafka_topic_partitions_count(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.kafka_topic_partitions_count - ) + def is_calculated(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_calculated - @kafka_topic_partitions_count.setter - def kafka_topic_partitions_count(self, kafka_topic_partitions_count: Optional[int]): + @is_calculated.setter + def is_calculated(self, is_calculated: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_partitions_count = kafka_topic_partitions_count + self.attributes.is_calculated = is_calculated @property - def kafka_topic_size_in_bytes(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.kafka_topic_size_in_bytes - ) + def formula(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.formula - @kafka_topic_size_in_bytes.setter - def kafka_topic_size_in_bytes(self, kafka_topic_size_in_bytes: Optional[int]): + @formula.setter + def formula(self, formula: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_size_in_bytes = kafka_topic_size_in_bytes + self.attributes.formula = formula @property - def kafka_topic_record_count(self) -> Optional[int]: - return ( - None - if self.attributes is None - else self.attributes.kafka_topic_record_count - ) + def is_case_sensitive(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_case_sensitive - @kafka_topic_record_count.setter - def kafka_topic_record_count(self, kafka_topic_record_count: Optional[int]): + @is_case_sensitive.setter + def is_case_sensitive(self, is_case_sensitive: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_record_count = kafka_topic_record_count + self.attributes.is_case_sensitive = is_case_sensitive @property - def kafka_topic_cleanup_policy(self) -> Optional[KafkaTopicCleanupPolicy]: + def is_encrypted(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_encrypted + + @is_encrypted.setter + def is_encrypted(self, is_encrypted: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.is_encrypted = is_encrypted + + @property + def max_length(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.max_length + + @max_length.setter + def max_length(self, max_length: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.max_length = max_length + + @property + def is_nullable(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_nullable + + @is_nullable.setter + def is_nullable(self, is_nullable: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.is_nullable = is_nullable + + @property + def precision(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.precision + + @precision.setter + def precision(self, precision: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.precision = precision + + @property + def numeric_scale(self) -> Optional[float]: + return None if self.attributes is None else self.attributes.numeric_scale + + @numeric_scale.setter + def numeric_scale(self, numeric_scale: Optional[float]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.numeric_scale = numeric_scale + + @property + def is_unique(self) -> Optional[bool]: + return None if self.attributes is None else self.attributes.is_unique + + @is_unique.setter + def is_unique(self, is_unique: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.is_unique = is_unique + + @property + def picklist_values(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.picklist_values + + @picklist_values.setter + def picklist_values(self, picklist_values: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.picklist_values = picklist_values + + @property + def is_polymorphic_foreign_key(self) -> Optional[bool]: return ( None if self.attributes is None - else self.attributes.kafka_topic_cleanup_policy + else self.attributes.is_polymorphic_foreign_key ) - @kafka_topic_cleanup_policy.setter - def kafka_topic_cleanup_policy( - self, kafka_topic_cleanup_policy: Optional[KafkaTopicCleanupPolicy] - ): + @is_polymorphic_foreign_key.setter + def is_polymorphic_foreign_key(self, is_polymorphic_foreign_key: Optional[bool]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_topic_cleanup_policy = kafka_topic_cleanup_policy + self.attributes.is_polymorphic_foreign_key = is_polymorphic_foreign_key @property - def kafka_consumer_groups(self) -> Optional[list[KafkaConsumerGroup]]: + def default_value_formula(self) -> Optional[str]: return ( - None if self.attributes is None else self.attributes.kafka_consumer_groups + None if self.attributes is None else self.attributes.default_value_formula ) - @kafka_consumer_groups.setter - def kafka_consumer_groups( - self, kafka_consumer_groups: Optional[list[KafkaConsumerGroup]] - ): + @default_value_formula.setter + def default_value_formula(self, default_value_formula: Optional[str]): if self.attributes is None: self.attributes = self.Attributes() - self.attributes.kafka_consumer_groups = kafka_consumer_groups + self.attributes.default_value_formula = default_value_formula - class Attributes(Kafka.Attributes): - kafka_topic_is_internal: Optional[bool] = Field( - None, description="", alias="kafkaTopicIsInternal" + @property + def lookup_objects(self) -> Optional[list[SalesforceObject]]: + return None if self.attributes is None else self.attributes.lookup_objects + + @lookup_objects.setter + def lookup_objects(self, lookup_objects: Optional[list[SalesforceObject]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.lookup_objects = lookup_objects + + @property + def object(self) -> Optional[SalesforceObject]: + return None if self.attributes is None else self.attributes.object + + @object.setter + def object(self, object: Optional[SalesforceObject]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.object = object + + class Attributes(Salesforce.Attributes): + data_type: Optional[str] = Field(None, description="", alias="dataType") + object_qualified_name: Optional[str] = Field( + None, description="", alias="objectQualifiedName" + ) + order: Optional[int] = Field(None, description="", alias="order") + inline_help_text: Optional[str] = Field( + None, description="", alias="inlineHelpText" + ) + is_calculated: Optional[bool] = Field( + None, description="", alias="isCalculated" ) - kafka_topic_compression_type: Optional[KafkaTopicCompressionType] = Field( - None, description="", alias="kafkaTopicCompressionType" + formula: Optional[str] = Field(None, description="", alias="formula") + is_case_sensitive: Optional[bool] = Field( + None, description="", alias="isCaseSensitive" ) - kafka_topic_replication_factor: Optional[int] = Field( - None, description="", alias="kafkaTopicReplicationFactor" + is_encrypted: Optional[bool] = Field(None, description="", alias="isEncrypted") + max_length: Optional[int] = Field(None, description="", alias="maxLength") + is_nullable: Optional[bool] = Field(None, description="", alias="isNullable") + precision: Optional[int] = Field(None, description="", alias="precision") + numeric_scale: Optional[float] = Field( + None, description="", alias="numericScale" ) - kafka_topic_segment_bytes: Optional[int] = Field( - None, description="", alias="kafkaTopicSegmentBytes" + is_unique: Optional[bool] = Field(None, description="", alias="isUnique") + picklist_values: Optional[set[str]] = Field( + None, description="", alias="picklistValues" ) - kafka_topic_partitions_count: Optional[int] = Field( - None, description="", alias="kafkaTopicPartitionsCount" + is_polymorphic_foreign_key: Optional[bool] = Field( + None, description="", alias="isPolymorphicForeignKey" ) - kafka_topic_size_in_bytes: Optional[int] = Field( - None, description="", alias="kafkaTopicSizeInBytes" + default_value_formula: Optional[str] = Field( + None, description="", alias="defaultValueFormula" + ) + lookup_objects: Optional[list[SalesforceObject]] = Field( + None, description="", alias="lookupObjects" + ) # relationship + object: Optional[SalesforceObject] = Field( + None, description="", alias="object" + ) # relationship + + attributes: "SalesforceField.Attributes" = Field( + default_factory=lambda: SalesforceField.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class SalesforceOrganization(Salesforce): + """Description""" + + type_name: str = Field("SalesforceOrganization", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "SalesforceOrganization": + raise ValueError("must be SalesforceOrganization") + return v + + def __setattr__(self, name, value): + if name in SalesforceOrganization._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SOURCE_ID: ClassVar[KeywordField] = KeywordField("sourceId", "sourceId") + """ + sourceId is the Id of the organization entity on salesforce + """ + + REPORTS: ClassVar[RelationField] = RelationField("reports") + """ + TBC + """ + OBJECTS: ClassVar[RelationField] = RelationField("objects") + """ + TBC + """ + DASHBOARDS: ClassVar[RelationField] = RelationField("dashboards") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "source_id", + "reports", + "objects", + "dashboards", + ] + + @property + def source_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.source_id + + @source_id.setter + def source_id(self, source_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_id = source_id + + @property + def reports(self) -> Optional[list[SalesforceReport]]: + return None if self.attributes is None else self.attributes.reports + + @reports.setter + def reports(self, reports: Optional[list[SalesforceReport]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.reports = reports + + @property + def objects(self) -> Optional[list[SalesforceObject]]: + return None if self.attributes is None else self.attributes.objects + + @objects.setter + def objects(self, objects: Optional[list[SalesforceObject]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.objects = objects + + @property + def dashboards(self) -> Optional[list[SalesforceDashboard]]: + return None if self.attributes is None else self.attributes.dashboards + + @dashboards.setter + def dashboards(self, dashboards: Optional[list[SalesforceDashboard]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboards = dashboards + + class Attributes(Salesforce.Attributes): + source_id: Optional[str] = Field(None, description="", alias="sourceId") + reports: Optional[list[SalesforceReport]] = Field( + None, description="", alias="reports" + ) # relationship + objects: Optional[list[SalesforceObject]] = Field( + None, description="", alias="objects" + ) # relationship + dashboards: Optional[list[SalesforceDashboard]] = Field( + None, description="", alias="dashboards" + ) # relationship + + attributes: "SalesforceOrganization.Attributes" = Field( + default_factory=lambda: SalesforceOrganization.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class SalesforceDashboard(Salesforce): + """Description""" + + type_name: str = Field("SalesforceDashboard", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "SalesforceDashboard": + raise ValueError("must be SalesforceDashboard") + return v + + def __setattr__(self, name, value): + if name in SalesforceDashboard._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SOURCE_ID: ClassVar[KeywordField] = KeywordField("sourceId", "sourceId") + """ + sourceId is the Id of the dashboard entity on salesforce + """ + DASHBOARD_TYPE: ClassVar[KeywordField] = KeywordField( + "dashboardType", "dashboardType" + ) + """ + dashboardType is the type of dashboard in salesforce + """ + REPORT_COUNT: ClassVar[NumericField] = NumericField("reportCount", "reportCount") + """ + reportCount is the number of reports linked to the dashboard entity on salesforce + """ + + REPORTS: ClassVar[RelationField] = RelationField("reports") + """ + TBC + """ + ORGANIZATION: ClassVar[RelationField] = RelationField("organization") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "source_id", + "dashboard_type", + "report_count", + "reports", + "organization", + ] + + @property + def source_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.source_id + + @source_id.setter + def source_id(self, source_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_id = source_id + + @property + def dashboard_type(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.dashboard_type + + @dashboard_type.setter + def dashboard_type(self, dashboard_type: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboard_type = dashboard_type + + @property + def report_count(self) -> Optional[int]: + return None if self.attributes is None else self.attributes.report_count + + @report_count.setter + def report_count(self, report_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.report_count = report_count + + @property + def reports(self) -> Optional[list[SalesforceReport]]: + return None if self.attributes is None else self.attributes.reports + + @reports.setter + def reports(self, reports: Optional[list[SalesforceReport]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.reports = reports + + @property + def organization(self) -> Optional[SalesforceOrganization]: + return None if self.attributes is None else self.attributes.organization + + @organization.setter + def organization(self, organization: Optional[SalesforceOrganization]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.organization = organization + + class Attributes(Salesforce.Attributes): + source_id: Optional[str] = Field(None, description="", alias="sourceId") + dashboard_type: Optional[str] = Field( + None, description="", alias="dashboardType" ) - kafka_topic_record_count: Optional[int] = Field( - None, description="", alias="kafkaTopicRecordCount" + report_count: Optional[int] = Field(None, description="", alias="reportCount") + reports: Optional[list[SalesforceReport]] = Field( + None, description="", alias="reports" + ) # relationship + organization: Optional[SalesforceOrganization] = Field( + None, description="", alias="organization" + ) # relationship + + attributes: "SalesforceDashboard.Attributes" = Field( + default_factory=lambda: SalesforceDashboard.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class SalesforceReport(Salesforce): + """Description""" + + type_name: str = Field("SalesforceReport", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "SalesforceReport": + raise ValueError("must be SalesforceReport") + return v + + def __setattr__(self, name, value): + if name in SalesforceReport._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + SOURCE_ID: ClassVar[KeywordField] = KeywordField("sourceId", "sourceId") + """ + sourceId is the Id of the report entity on salesforce + """ + REPORT_TYPE: ClassVar[KeywordField] = KeywordField("reportType", "reportType") + """ + reportType is the type of report in salesforce + """ + DETAIL_COLUMNS: ClassVar[KeywordField] = KeywordField( + "detailColumns", "detailColumns" + ) + """ + detailColumns is a list of column names on the report + """ + + DASHBOARDS: ClassVar[RelationField] = RelationField("dashboards") + """ + TBC + """ + ORGANIZATION: ClassVar[RelationField] = RelationField("organization") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "source_id", + "report_type", + "detail_columns", + "dashboards", + "organization", + ] + + @property + def source_id(self) -> Optional[str]: + return None if self.attributes is None else self.attributes.source_id + + @source_id.setter + def source_id(self, source_id: Optional[str]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.source_id = source_id + + @property + def report_type(self) -> Optional[dict[str, str]]: + return None if self.attributes is None else self.attributes.report_type + + @report_type.setter + def report_type(self, report_type: Optional[dict[str, str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.report_type = report_type + + @property + def detail_columns(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.detail_columns + + @detail_columns.setter + def detail_columns(self, detail_columns: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.detail_columns = detail_columns + + @property + def dashboards(self) -> Optional[list[SalesforceDashboard]]: + return None if self.attributes is None else self.attributes.dashboards + + @dashboards.setter + def dashboards(self, dashboards: Optional[list[SalesforceDashboard]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.dashboards = dashboards + + @property + def organization(self) -> Optional[SalesforceOrganization]: + return None if self.attributes is None else self.attributes.organization + + @organization.setter + def organization(self, organization: Optional[SalesforceOrganization]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.organization = organization + + class Attributes(Salesforce.Attributes): + source_id: Optional[str] = Field(None, description="", alias="sourceId") + report_type: Optional[dict[str, str]] = Field( + None, description="", alias="reportType" ) - kafka_topic_cleanup_policy: Optional[KafkaTopicCleanupPolicy] = Field( - None, description="", alias="kafkaTopicCleanupPolicy" + detail_columns: Optional[set[str]] = Field( + None, description="", alias="detailColumns" ) - kafka_consumer_groups: Optional[list[KafkaConsumerGroup]] = Field( - None, description="", alias="kafkaConsumerGroups" + dashboards: Optional[list[SalesforceDashboard]] = Field( + None, description="", alias="dashboards" + ) # relationship + organization: Optional[SalesforceOrganization] = Field( + None, description="", alias="organization" ) # relationship - attributes: "KafkaTopic.Attributes" = Field( - default_factory=lambda: KafkaTopic.Attributes(), + attributes: "SalesforceReport.Attributes" = Field( + default_factory=lambda: SalesforceReport.Attributes(), description="Map of attributes in the instance and their values. The specific keys of this map will vary by " "type, so are described in the sub-types of this schema.\n", ) -KafkaConsumerGroup.Attributes.update_forward_refs() +SalesforceObject.Attributes.update_forward_refs() + + +SalesforceField.Attributes.update_forward_refs() + + +SalesforceOrganization.Attributes.update_forward_refs() + + +SalesforceDashboard.Attributes.update_forward_refs() -KafkaTopic.Attributes.update_forward_refs() +SalesforceReport.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset75.py b/pyatlan/model/assets/asset75.py index a235c6570..b6bdb78ed 100644 --- a/pyatlan/model/assets/asset75.py +++ b/pyatlan/model/assets/asset75.py @@ -4,30 +4,433 @@ from __future__ import annotations -from typing import ClassVar +from typing import ClassVar, Optional from pydantic import Field, validator -from .asset72 import QlikSpace +from pyatlan.model.enums import KafkaTopicCleanupPolicy, KafkaTopicCompressionType +from pyatlan.model.fields.atlan_fields import ( + BooleanField, + KeywordField, + NumericField, + RelationField, +) +from pyatlan.model.structs import KafkaTopicConsumption +from .asset51 import Kafka -class QlikStream(QlikSpace): + +class KafkaConsumerGroup(Kafka): + """Description""" + + type_name: str = Field("KafkaConsumerGroup", allow_mutation=False) + + @validator("type_name") + def validate_type_name(cls, v): + if v != "KafkaConsumerGroup": + raise ValueError("must be KafkaConsumerGroup") + return v + + def __setattr__(self, name, value): + if name in KafkaConsumerGroup._convenience_properties: + return object.__setattr__(self, name, value) + super().__setattr__(name, value) + + KAFKA_CONSUMER_GROUP_TOPIC_CONSUMPTION_PROPERTIES: ClassVar[ + KeywordField + ] = KeywordField( + "kafkaConsumerGroupTopicConsumptionProperties", + "kafkaConsumerGroupTopicConsumptionProperties", + ) + """ + TBC + """ + KAFKA_CONSUMER_GROUP_MEMBER_COUNT: ClassVar[NumericField] = NumericField( + "kafkaConsumerGroupMemberCount", "kafkaConsumerGroupMemberCount" + ) + """ + TBC + """ + KAFKA_TOPIC_NAMES: ClassVar[KeywordField] = KeywordField( + "kafkaTopicNames", "kafkaTopicNames" + ) + """ + TBC + """ + KAFKA_TOPIC_QUALIFIED_NAMES: ClassVar[KeywordField] = KeywordField( + "kafkaTopicQualifiedNames", "kafkaTopicQualifiedNames" + ) + """ + TBC + """ + + KAFKA_TOPICS: ClassVar[RelationField] = RelationField("kafkaTopics") + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "kafka_consumer_group_topic_consumption_properties", + "kafka_consumer_group_member_count", + "kafka_topic_names", + "kafka_topic_qualified_names", + "kafka_topics", + ] + + @property + def kafka_consumer_group_topic_consumption_properties( + self, + ) -> Optional[list[KafkaTopicConsumption]]: + return ( + None + if self.attributes is None + else self.attributes.kafka_consumer_group_topic_consumption_properties + ) + + @kafka_consumer_group_topic_consumption_properties.setter + def kafka_consumer_group_topic_consumption_properties( + self, + kafka_consumer_group_topic_consumption_properties: Optional[ + list[KafkaTopicConsumption] + ], + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_consumer_group_topic_consumption_properties = ( + kafka_consumer_group_topic_consumption_properties + ) + + @property + def kafka_consumer_group_member_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.kafka_consumer_group_member_count + ) + + @kafka_consumer_group_member_count.setter + def kafka_consumer_group_member_count( + self, kafka_consumer_group_member_count: Optional[int] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_consumer_group_member_count = ( + kafka_consumer_group_member_count + ) + + @property + def kafka_topic_names(self) -> Optional[set[str]]: + return None if self.attributes is None else self.attributes.kafka_topic_names + + @kafka_topic_names.setter + def kafka_topic_names(self, kafka_topic_names: Optional[set[str]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_names = kafka_topic_names + + @property + def kafka_topic_qualified_names(self) -> Optional[set[str]]: + return ( + None + if self.attributes is None + else self.attributes.kafka_topic_qualified_names + ) + + @kafka_topic_qualified_names.setter + def kafka_topic_qualified_names( + self, kafka_topic_qualified_names: Optional[set[str]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_qualified_names = kafka_topic_qualified_names + + @property + def kafka_topics(self) -> Optional[list[KafkaTopic]]: + return None if self.attributes is None else self.attributes.kafka_topics + + @kafka_topics.setter + def kafka_topics(self, kafka_topics: Optional[list[KafkaTopic]]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topics = kafka_topics + + class Attributes(Kafka.Attributes): + kafka_consumer_group_topic_consumption_properties: Optional[ + list[KafkaTopicConsumption] + ] = Field( + None, description="", alias="kafkaConsumerGroupTopicConsumptionProperties" + ) + kafka_consumer_group_member_count: Optional[int] = Field( + None, description="", alias="kafkaConsumerGroupMemberCount" + ) + kafka_topic_names: Optional[set[str]] = Field( + None, description="", alias="kafkaTopicNames" + ) + kafka_topic_qualified_names: Optional[set[str]] = Field( + None, description="", alias="kafkaTopicQualifiedNames" + ) + kafka_topics: Optional[list[KafkaTopic]] = Field( + None, description="", alias="kafkaTopics" + ) # relationship + + attributes: "KafkaConsumerGroup.Attributes" = Field( + default_factory=lambda: KafkaConsumerGroup.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +class KafkaTopic(Kafka): """Description""" - type_name: str = Field("QlikStream", allow_mutation=False) + type_name: str = Field("KafkaTopic", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "QlikStream": - raise ValueError("must be QlikStream") + if v != "KafkaTopic": + raise ValueError("must be KafkaTopic") return v def __setattr__(self, name, value): - if name in QlikStream._convience_properties: + if name in KafkaTopic._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + KAFKA_TOPIC_IS_INTERNAL: ClassVar[BooleanField] = BooleanField( + "kafkaTopicIsInternal", "kafkaTopicIsInternal" + ) + """ + TBC + """ + KAFKA_TOPIC_COMPRESSION_TYPE: ClassVar[KeywordField] = KeywordField( + "kafkaTopicCompressionType", "kafkaTopicCompressionType" + ) + """ + TBC + """ + KAFKA_TOPIC_REPLICATION_FACTOR: ClassVar[NumericField] = NumericField( + "kafkaTopicReplicationFactor", "kafkaTopicReplicationFactor" + ) + """ + TBC + """ + KAFKA_TOPIC_SEGMENT_BYTES: ClassVar[NumericField] = NumericField( + "kafkaTopicSegmentBytes", "kafkaTopicSegmentBytes" + ) + """ + TBC + """ + KAFKA_TOPIC_PARTITIONS_COUNT: ClassVar[NumericField] = NumericField( + "kafkaTopicPartitionsCount", "kafkaTopicPartitionsCount" + ) + """ + TBC + """ + KAFKA_TOPIC_SIZE_IN_BYTES: ClassVar[NumericField] = NumericField( + "kafkaTopicSizeInBytes", "kafkaTopicSizeInBytes" + ) + """ + TBC + """ + KAFKA_TOPIC_RECORD_COUNT: ClassVar[NumericField] = NumericField( + "kafkaTopicRecordCount", "kafkaTopicRecordCount" + ) + """ + TBC + """ + KAFKA_TOPIC_CLEANUP_POLICY: ClassVar[KeywordField] = KeywordField( + "kafkaTopicCleanupPolicy", "kafkaTopicCleanupPolicy" + ) + """ + TBC + """ + + KAFKA_CONSUMER_GROUPS: ClassVar[RelationField] = RelationField( + "kafkaConsumerGroups" + ) + """ + TBC + """ + + _convenience_properties: ClassVar[list[str]] = [ + "kafka_topic_is_internal", + "kafka_topic_compression_type", + "kafka_topic_replication_factor", + "kafka_topic_segment_bytes", + "kafka_topic_partitions_count", + "kafka_topic_size_in_bytes", + "kafka_topic_record_count", + "kafka_topic_cleanup_policy", + "kafka_consumer_groups", + ] + + @property + def kafka_topic_is_internal(self) -> Optional[bool]: + return ( + None if self.attributes is None else self.attributes.kafka_topic_is_internal + ) + + @kafka_topic_is_internal.setter + def kafka_topic_is_internal(self, kafka_topic_is_internal: Optional[bool]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_is_internal = kafka_topic_is_internal + + @property + def kafka_topic_compression_type(self) -> Optional[KafkaTopicCompressionType]: + return ( + None + if self.attributes is None + else self.attributes.kafka_topic_compression_type + ) + + @kafka_topic_compression_type.setter + def kafka_topic_compression_type( + self, kafka_topic_compression_type: Optional[KafkaTopicCompressionType] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_compression_type = kafka_topic_compression_type + + @property + def kafka_topic_replication_factor(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.kafka_topic_replication_factor + ) + + @kafka_topic_replication_factor.setter + def kafka_topic_replication_factor( + self, kafka_topic_replication_factor: Optional[int] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_replication_factor = kafka_topic_replication_factor + + @property + def kafka_topic_segment_bytes(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.kafka_topic_segment_bytes + ) + + @kafka_topic_segment_bytes.setter + def kafka_topic_segment_bytes(self, kafka_topic_segment_bytes: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_segment_bytes = kafka_topic_segment_bytes + + @property + def kafka_topic_partitions_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.kafka_topic_partitions_count + ) + + @kafka_topic_partitions_count.setter + def kafka_topic_partitions_count(self, kafka_topic_partitions_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_partitions_count = kafka_topic_partitions_count + + @property + def kafka_topic_size_in_bytes(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.kafka_topic_size_in_bytes + ) + + @kafka_topic_size_in_bytes.setter + def kafka_topic_size_in_bytes(self, kafka_topic_size_in_bytes: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_size_in_bytes = kafka_topic_size_in_bytes + + @property + def kafka_topic_record_count(self) -> Optional[int]: + return ( + None + if self.attributes is None + else self.attributes.kafka_topic_record_count + ) + + @kafka_topic_record_count.setter + def kafka_topic_record_count(self, kafka_topic_record_count: Optional[int]): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_record_count = kafka_topic_record_count + + @property + def kafka_topic_cleanup_policy(self) -> Optional[KafkaTopicCleanupPolicy]: + return ( + None + if self.attributes is None + else self.attributes.kafka_topic_cleanup_policy + ) + + @kafka_topic_cleanup_policy.setter + def kafka_topic_cleanup_policy( + self, kafka_topic_cleanup_policy: Optional[KafkaTopicCleanupPolicy] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_topic_cleanup_policy = kafka_topic_cleanup_policy + + @property + def kafka_consumer_groups(self) -> Optional[list[KafkaConsumerGroup]]: + return ( + None if self.attributes is None else self.attributes.kafka_consumer_groups + ) + + @kafka_consumer_groups.setter + def kafka_consumer_groups( + self, kafka_consumer_groups: Optional[list[KafkaConsumerGroup]] + ): + if self.attributes is None: + self.attributes = self.Attributes() + self.attributes.kafka_consumer_groups = kafka_consumer_groups + + class Attributes(Kafka.Attributes): + kafka_topic_is_internal: Optional[bool] = Field( + None, description="", alias="kafkaTopicIsInternal" + ) + kafka_topic_compression_type: Optional[KafkaTopicCompressionType] = Field( + None, description="", alias="kafkaTopicCompressionType" + ) + kafka_topic_replication_factor: Optional[int] = Field( + None, description="", alias="kafkaTopicReplicationFactor" + ) + kafka_topic_segment_bytes: Optional[int] = Field( + None, description="", alias="kafkaTopicSegmentBytes" + ) + kafka_topic_partitions_count: Optional[int] = Field( + None, description="", alias="kafkaTopicPartitionsCount" + ) + kafka_topic_size_in_bytes: Optional[int] = Field( + None, description="", alias="kafkaTopicSizeInBytes" + ) + kafka_topic_record_count: Optional[int] = Field( + None, description="", alias="kafkaTopicRecordCount" + ) + kafka_topic_cleanup_policy: Optional[KafkaTopicCleanupPolicy] = Field( + None, description="", alias="kafkaTopicCleanupPolicy" + ) + kafka_consumer_groups: Optional[list[KafkaConsumerGroup]] = Field( + None, description="", alias="kafkaConsumerGroups" + ) # relationship + + attributes: "KafkaTopic.Attributes" = Field( + default_factory=lambda: KafkaTopic.Attributes(), + description="Map of attributes in the instance and their values. The specific keys of this map will vary by " + "type, so are described in the sub-types of this schema.\n", + ) + + +KafkaConsumerGroup.Attributes.update_forward_refs() -QlikStream.Attributes.update_forward_refs() +KafkaTopic.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset76.py b/pyatlan/model/assets/asset76.py index c84cb96d4..2136390f2 100644 --- a/pyatlan/model/assets/asset76.py +++ b/pyatlan/model/assets/asset76.py @@ -8,26 +8,26 @@ from pydantic import Field, validator -from .asset74 import KafkaTopic +from .asset73 import QlikSpace -class AzureEventHub(KafkaTopic): +class QlikStream(QlikSpace): """Description""" - type_name: str = Field("AzureEventHub", allow_mutation=False) + type_name: str = Field("QlikStream", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "AzureEventHub": - raise ValueError("must be AzureEventHub") + if v != "QlikStream": + raise ValueError("must be QlikStream") return v def __setattr__(self, name, value): - if name in AzureEventHub._convience_properties: + if name in QlikStream._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] -AzureEventHub.Attributes.update_forward_refs() +QlikStream.Attributes.update_forward_refs() diff --git a/pyatlan/model/assets/asset22.py b/pyatlan/model/assets/asset77.py similarity index 53% rename from pyatlan/model/assets/asset22.py rename to pyatlan/model/assets/asset77.py index 1ebed5424..509f39574 100644 --- a/pyatlan/model/assets/asset22.py +++ b/pyatlan/model/assets/asset77.py @@ -8,26 +8,26 @@ from pydantic import Field, validator -from .asset00 import Catalog +from .asset75 import KafkaTopic -class Insight(Catalog): +class AzureEventHub(KafkaTopic): """Description""" - type_name: str = Field("Insight", allow_mutation=False) + type_name: str = Field("AzureEventHub", allow_mutation=False) @validator("type_name") def validate_type_name(cls, v): - if v != "Insight": - raise ValueError("must be Insight") + if v != "AzureEventHub": + raise ValueError("must be AzureEventHub") return v def __setattr__(self, name, value): - if name in Insight._convience_properties: + if name in AzureEventHub._convenience_properties: return object.__setattr__(self, name, value) super().__setattr__(name, value) - _convience_properties: ClassVar[list[str]] = [] + _convenience_properties: ClassVar[list[str]] = [] -Insight.Attributes.update_forward_refs() +AzureEventHub.Attributes.update_forward_refs() diff --git a/pyatlan/model/fields/asset.py b/pyatlan/model/fields/asset.py deleted file mode 100644 index ba15b9137..000000000 --- a/pyatlan/model/fields/asset.py +++ /dev/null @@ -1,13 +0,0 @@ -from pyatlan.model.fields.atlan_fields import KeywordTextField, KeywordTextStemmedField -from pyatlan.model.fields.referenceable import ReferenceableFields - - -class AssetFields(ReferenceableFields): - - NAME = KeywordTextStemmedField("name", "name.keyword", "name", "name.stemmed") - """Human-readable name of the asset.""" - - QUALIFIED_NAME = KeywordTextField( - "qualifiedName", "qualifiedName", "qualifiedName.text" - ) - """Unique fully-qualified name of the asset in Atlan.""" diff --git a/pyatlan/model/fields/atlas_glossary_term.py b/pyatlan/model/fields/atlas_glossary_term.py deleted file mode 100644 index d96b1d0be..000000000 --- a/pyatlan/model/fields/atlas_glossary_term.py +++ /dev/null @@ -1,11 +0,0 @@ -from pyatlan.model.fields.asset import AssetFields -from pyatlan.model.fields.atlan_fields import KeywordField - - -class AtlasGlossaryTermFields(AssetFields): - - ANCHOR = KeywordField("anchor", "__glossary") - """Glossary in which the term is contained, searchable by the qualifiedName of the glossary.""" - - CATEGORIES = KeywordField("categories", "__categories") - """Categories in which the term is organized, searchable by the qualifiedName of the category.""" diff --git a/pyatlan/model/fields/referenceable.py b/pyatlan/model/fields/referenceable.py deleted file mode 100644 index 7cc958942..000000000 --- a/pyatlan/model/fields/referenceable.py +++ /dev/null @@ -1,49 +0,0 @@ -from pyatlan.model.fields.atlan_fields import ( - KeywordField, - KeywordTextField, - NumericField, -) - - -class ReferenceableFields: - - TYPE_NAME = KeywordTextField("typeName", "__typeName.keyword", "__typeName") - """Type of the asset. For example Table, Column, and so on.""" - - GUID = KeywordField("guid", "__guid") - """Globally unique identifier (GUID) of any object in Atlan.""" - - CREATED_BY = KeywordField("createdBy", "__createdBy") - """Atlan user who created this asset.""" - - UPDATED_BY = KeywordField("updatedBy", "__modifiedBy") - """Atlan user who last updated the asset.""" - - STATUS = KeywordField("status", "__state") - """Asset status in Atlan (active vs deleted).""" - - ATLAN_TAGS = KeywordTextField( - "classificationNames", "__traitNames", "__classificationsText" - ) - """ - All directly-assigned Atlan tags that exist on an asset, searchable by internal hashed-string ID of the Atlan tag. - """ - - PROPAGATED_ATLAN_TAGS = KeywordTextField( - "classificationNames", "__propagatedTraitNames", "__classificationsText" - ) - """All propagated Atlan tags that exist on an asset, searchable by internal hashed-string ID of the Atlan tag.""" - - ASSIGNED_TERMS = KeywordTextField("meanings", "__meanings", "__meaningsText") - """All terms attached to an asset, searchable by the term's qualifiedName.""" - - SUPER_TYPE_NAMES = KeywordTextField( - "typeName", "__superTypeNames.keyword", "__superTypeNames" - ) - """All super types of an asset.""" - - CREATE_TIME = NumericField("createTime", "__timestamp") - """Time (in milliseconds) when the asset was created.""" - - UPDATE_TIME = NumericField("updateTime", "__modificationTimestamp") - """Time (in milliseconds) when the asset was last updated.""" diff --git a/pyatlan/model/fluent_search.py b/pyatlan/model/fluent_search.py index ab5796db9..5bcc58f45 100644 --- a/pyatlan/model/fluent_search.py +++ b/pyatlan/model/fluent_search.py @@ -3,9 +3,9 @@ import dataclasses from typing import Optional, Union, cast +from pyatlan.model.assets import Referenceable from pyatlan.model.enums import EntityStatus from pyatlan.model.fields.atlan_fields import AtlanField -from pyatlan.model.fields.referenceable import ReferenceableFields from pyatlan.model.search import DSL, Bool, IndexSearchRequest, Query, SortItem @@ -27,7 +27,7 @@ def active_assets() -> Query: :returns: a query that will only match assets that are active in Atlan """ - return ReferenceableFields.STATUS.eq(EntityStatus.ACTIVE.value) + return Referenceable.STATUS.eq(EntityStatus.ACTIVE.value) @staticmethod def archived_assets() -> Query: @@ -36,7 +36,7 @@ def archived_assets() -> Query: :returns: a query that will only match assets that are archived (soft-deleted) in Atlan """ - return ReferenceableFields.STATUS.eq(EntityStatus.DELETED.value) + return Referenceable.STATUS.eq(EntityStatus.DELETED.value) @staticmethod def asset_type(of: type) -> Query: @@ -46,7 +46,7 @@ def asset_type(of: type) -> Query: :param of: type for assets to match :returns: a query that will only match assets of the type provided """ - return ReferenceableFields.TYPE_NAME.eq(of.__name__) + return Referenceable.TYPE_NAME.eq(of.__name__) @staticmethod def asset_types(one_of: list[type]) -> Query: @@ -56,9 +56,7 @@ def asset_types(one_of: list[type]) -> Query: :param one_of: types for assets to match :returns: a query that iwll only match assets of one of the types provided """ - return ReferenceableFields.TYPE_NAME.within( - list(map(lambda x: x.__name__, one_of)) - ) + return Referenceable.TYPE_NAME.within(list(map(lambda x: x.__name__, one_of))) @staticmethod def super_types(one_of: Union[type, list[type]]) -> Query: @@ -70,10 +68,10 @@ def super_types(one_of: Union[type, list[type]]) -> Query: :returns: a query that will only match assets of a subtype of the types provided """ if isinstance(one_of, list): - return ReferenceableFields.SUPER_TYPE_NAMES.within( + return Referenceable.SUPER_TYPE_NAMES.within( list(map(lambda x: x.__name__, one_of)) ) - return ReferenceableFields.SUPER_TYPE_NAMES.eq(one_of.__name__) + return Referenceable.SUPER_TYPE_NAMES.eq(one_of.__name__) @staticmethod def tagged( @@ -99,23 +97,21 @@ def tagged( if directly: if values: return FluentSearch( - wheres=[ReferenceableFields.ATLAN_TAGS.within(values)] + wheres=[Referenceable.ATLAN_TAGS.within(values)] ).to_query() - return FluentSearch( - wheres=[ReferenceableFields.ATLAN_TAGS.exists()] - ).to_query() + return FluentSearch(wheres=[Referenceable.ATLAN_TAGS.exists()]).to_query() if values: return FluentSearch( where_somes=[ - ReferenceableFields.ATLAN_TAGS.within(values), - ReferenceableFields.PROPAGATED_ATLAN_TAGS.within(values), + Referenceable.ATLAN_TAGS.within(values), + Referenceable.PROPAGATED_ATLAN_TAGS.within(values), ], _min_somes=1, ).to_query() return FluentSearch( where_somes=[ - ReferenceableFields.ATLAN_TAGS.exists(), - ReferenceableFields.PROPAGATED_ATLAN_TAGS.exists(), + Referenceable.ATLAN_TAGS.exists(), + Referenceable.PROPAGATED_ATLAN_TAGS.exists(), ], _min_somes=1, ).to_query() @@ -131,8 +127,8 @@ def assigned_term(qualified_names: Optional[list[str]] = None) -> Query: :returns: a query that will only match assets that have at least one term assigned """ if qualified_names: - return ReferenceableFields.ASSIGNED_TERMS.within(qualified_names) - return ReferenceableFields.ASSIGNED_TERMS.exists() + return Referenceable.ASSIGNED_TERMS.within(qualified_names) + return Referenceable.ASSIGNED_TERMS.exists() def __init__( self, diff --git a/pyatlan/model/search.py b/pyatlan/model/search.py index acfce2773..17fcaaff6 100644 --- a/pyatlan/model/search.py +++ b/pyatlan/model/search.py @@ -512,7 +512,7 @@ def __add__(self, other): if other.filter: q.filter += other.filter else: - q.must.append(other) + q.filter.append(other) return q __radd__ = __add__ diff --git a/pyatlan/model/structs.py b/pyatlan/model/structs.py index f9af9bcd5..7ed1bfbec 100644 --- a/pyatlan/model/structs.py +++ b/pyatlan/model/structs.py @@ -70,6 +70,45 @@ class ColumnValueFrequencyMap(AtlanObject): ) +class BadgeCondition(AtlanObject): + """Description""" + + @classmethod + # @validate_arguments() + def create( + cls, + *, + badge_condition_operator: BadgeComparisonOperator, + badge_condition_value: str, + badge_condition_colorhex: Union[BadgeConditionColor, str] + ) -> "BadgeCondition": + validate_required_fields( + [ + "badge_condition_operator", + "badge_condition_value", + "badge_condition_colorhex", + ], + [badge_condition_operator, badge_condition_value, badge_condition_colorhex], + ) + return cls( + badge_condition_operator=badge_condition_operator.value, + badge_condition_value=badge_condition_value, + badge_condition_colorhex=badge_condition_colorhex.value + if isinstance(badge_condition_colorhex, BadgeConditionColor) + else badge_condition_colorhex, + ) + + badge_condition_operator: Optional["str"] = Field( + None, description="", alias="badgeConditionOperator" + ) + badge_condition_value: Optional["str"] = Field( + None, description="", alias="badgeConditionValue" + ) + badge_condition_colorhex: Optional["str"] = Field( + None, description="", alias="badgeConditionColorhex" + ) + + class SourceTagAttachmentValue(AtlanObject): """Description""" @@ -110,45 +149,6 @@ class SourceTagAttachment(AtlanObject): ) -class BadgeCondition(AtlanObject): - """Description""" - - @classmethod - # @validate_arguments() - def create( - cls, - *, - badge_condition_operator: BadgeComparisonOperator, - badge_condition_value: str, - badge_condition_colorhex: Union[BadgeConditionColor, str] - ) -> "BadgeCondition": - validate_required_fields( - [ - "badge_condition_operator", - "badge_condition_value", - "badge_condition_colorhex", - ], - [badge_condition_operator, badge_condition_value, badge_condition_colorhex], - ) - return cls( - badge_condition_operator=badge_condition_operator.value, - badge_condition_value=badge_condition_value, - badge_condition_colorhex=badge_condition_colorhex.value - if isinstance(badge_condition_colorhex, BadgeConditionColor) - else badge_condition_colorhex, - ) - - badge_condition_operator: Optional["str"] = Field( - None, description="", alias="badgeConditionOperator" - ) - badge_condition_value: Optional["str"] = Field( - None, description="", alias="badgeConditionValue" - ) - badge_condition_colorhex: Optional["str"] = Field( - None, description="", alias="badgeConditionColorhex" - ) - - class AzureTag(AtlanObject): """Description""" diff --git a/pyatlan/model/typedef.py b/pyatlan/model/typedef.py index cc256df62..c467c8616 100644 --- a/pyatlan/model/typedef.py +++ b/pyatlan/model/typedef.py @@ -455,6 +455,13 @@ def archive(self, by: str) -> AttributeDef: return self +class RelationshipAttributeDef(AttributeDef): + is_legacy_attribute: Optional[bool] = Field(description="Unused.") + relationship_type_name: Optional[str] = Field( + description="Name of the relationship type." + ) + + class StructDef(TypeDef): category: AtlanTypeCategory = AtlanTypeCategory.STRUCT attribute_defs: Optional[List[AttributeDef]] = Field( diff --git a/tests/integration/glossary_test.py b/tests/integration/glossary_test.py index 9bdd9454e..c63c4fcdf 100644 --- a/tests/integration/glossary_test.py +++ b/tests/integration/glossary_test.py @@ -11,8 +11,6 @@ from pyatlan.client.atlan import AtlanClient from pyatlan.error import NotFoundError from pyatlan.model.assets import AtlasGlossary, AtlasGlossaryCategory, AtlasGlossaryTerm -from pyatlan.model.fields.asset import AssetFields -from pyatlan.model.fields.atlas_glossary_term import AtlasGlossaryTermFields from pyatlan.model.fluent_search import CompoundQuery, FluentSearch from pyatlan.model.search import DSL, IndexSearchRequest from tests.integration.client import TestId, delete_asset @@ -180,8 +178,8 @@ def test_compound_queries( CompoundQuery() .where(CompoundQuery.active_assets()) .where(CompoundQuery.asset_type(AtlasGlossaryTerm)) - .where(AssetFields.NAME.startswith(MODULE_NAME)) - .where(AtlasGlossaryTermFields.ANCHOR.eq(glossary.qualified_name)) + .where(AtlasGlossaryTerm.NAME.startswith(MODULE_NAME)) + .where(AtlasGlossaryTerm.ANCHOR.eq(glossary.qualified_name)) ).to_query() request = IndexSearchRequest(dsl=DSL(query=cq)) response = client.search(request) @@ -192,9 +190,9 @@ def test_compound_queries( CompoundQuery() .where(CompoundQuery.active_assets()) .where(CompoundQuery.asset_type(AtlasGlossaryTerm)) - .where(AssetFields.NAME.startswith(MODULE_NAME)) - .where(AtlasGlossaryTermFields.ANCHOR.eq(glossary.qualified_name)) - .where_not(AssetFields.NAME.eq(term2.name)) + .where(AtlasGlossaryTerm.NAME.startswith(MODULE_NAME)) + .where(AtlasGlossaryTerm.ANCHOR.eq(glossary.qualified_name)) + .where_not(AtlasGlossaryTerm.NAME.eq(term2.name)) ).to_query() request = IndexSearchRequest(dsl=DSL(query=cq)) response = client.search(request) @@ -213,10 +211,10 @@ def test_fluent_search( .page_size(1) .where(CompoundQuery.active_assets()) .where(CompoundQuery.asset_type(AtlasGlossaryTerm)) - .where(AssetFields.NAME.startswith(MODULE_NAME)) - .where(AtlasGlossaryTermFields.ANCHOR.eq(glossary.qualified_name)) - .include_on_results(AtlasGlossaryTermFields.ANCHOR) - .include_on_relations(AssetFields.NAME) + .where(AtlasGlossaryTerm.NAME.startswith(MODULE_NAME)) + .where(AtlasGlossaryTerm.ANCHOR.eq(glossary.qualified_name)) + .include_on_results(AtlasGlossaryTerm.ANCHOR) + .include_on_relations(AtlasGlossary.NAME) ) assert terms.count(client) == 2 @@ -237,11 +235,11 @@ def test_fluent_search( wheres=[ CompoundQuery.active_assets(), CompoundQuery.asset_type(AtlasGlossaryTerm), - AssetFields.NAME.startswith(MODULE_NAME), - AtlasGlossaryTermFields.ANCHOR.startswith(glossary.qualified_name), + AtlasGlossaryTerm.NAME.startswith(MODULE_NAME), + AtlasGlossaryTerm.ANCHOR.startswith(glossary.qualified_name), ], - _includes_on_results=[AtlasGlossaryTermFields.ANCHOR.atlan_field_name], - _includes_on_relations=[AssetFields.NAME.atlan_field_name], + _includes_on_results=[AtlasGlossaryTerm.ANCHOR.atlan_field_name], + _includes_on_relations=[AtlasGlossary.NAME.atlan_field_name], ).execute(client) guids_alt = [] @@ -257,12 +255,12 @@ def test_fluent_search( wheres=[ CompoundQuery.active_assets(), CompoundQuery.asset_type(AtlasGlossaryTerm), - AssetFields.NAME.startswith(MODULE_NAME), - AtlasGlossaryTermFields.ANCHOR.startswith(glossary.qualified_name), + AtlasGlossaryTerm.NAME.startswith(MODULE_NAME), + AtlasGlossaryTerm.ANCHOR.startswith(glossary.qualified_name), ], _includes_on_results=["anchor"], _includes_on_relations=["name"], - sorts=[AssetFields.NAME.order()], + sorts=[AtlasGlossaryTerm.NAME.order()], ).execute(client) names = [] diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index cfc399452..30bc5fafe 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -470,9 +470,9 @@ def get_request(*args, **kwargs): assert request.dsl assert request.dsl.query assert isinstance(request.dsl.query, Bool) is True - assert request.dsl.query.must - assert 3 == len(request.dsl.query.must) - term1, term2, term3 = request.dsl.query.must + assert request.dsl.query.filter + assert 3 == len(request.dsl.query.filter) + term1, term2, term3 = request.dsl.query.filter assert isinstance(term1, Term) is True assert term1.field == "__state" assert term1.value == "ACTIVE" @@ -625,9 +625,9 @@ def get_request(*args, **kwargs): assert request.dsl assert request.dsl.query assert isinstance(request.dsl.query, Bool) is True - assert request.dsl.query.must - assert 4 == len(request.dsl.query.must) - term1, term2, term3, term4 = request.dsl.query.must + assert request.dsl.query.filter + assert 4 == len(request.dsl.query.filter) + term1, term2, term3, term4 = request.dsl.query.filter assert term1.field == "__state" assert term1.value == "ACTIVE" assert isinstance(term2, Term) is True @@ -875,9 +875,9 @@ def get_request(*args, **kwargs): assert request.dsl assert request.dsl.query assert isinstance(request.dsl.query, Bool) is True - assert request.dsl.query.must - assert 4 == len(request.dsl.query.must) - term1, term2, term3, term4 = request.dsl.query.must + assert request.dsl.query.filter + assert 4 == len(request.dsl.query.filter) + term1, term2, term3, term4 = request.dsl.query.filter assert term1.field == "__state" assert term1.value == "ACTIVE" assert isinstance(term2, Term) is True diff --git a/tests/unit/test_search_model.py b/tests/unit/test_search_model.py index 0340b22e7..cc9106de2 100644 --- a/tests/unit/test_search_model.py +++ b/tests/unit/test_search_model.py @@ -266,7 +266,7 @@ def test_dsl(): dsl.json(by_alias=True, exclude_none=True) == '{"from": 0, "size": 100, "track_total_hits": true, "post_filter": {"term": {"databaseName.keyword": ' '{"value": "ATLAN_SAMPLE_DATA"}}}, "query": {"term": ' - '{"__typeName.keyword": {"value": "Schema"}}}}' + '{"__typeName.keyword": {"value": "Schema"}}}, "sort": [{"__guid": {"order": "asc"}}]}' ) @@ -281,8 +281,8 @@ def test_index_search_request(): == '{"attributes": ["schemaName", "databaseName"],' ' "dsl": {"from": 0, "size": 100, "track_total_hits": true, ' '"post_filter": {"term": {"databaseName.keyword": ' - '{"value": "ATLAN_SAMPLE_DATA"}}}, "query": {"term": {"__typeName.keyword": {"value": "Schema"}}}}, ' - '"relationAttributes": []}' + '{"value": "ATLAN_SAMPLE_DATA"}}}, "query": {"term": {"__typeName.keyword": {"value": "Schema"}}}, ' + '"sort": [{"__guid": {"order": "asc"}}]}, "relationAttributes": []}' ) @@ -291,8 +291,8 @@ def test_adding_terms_results_in_must_bool(): term_2 = Term(field="name", value="Dave") result = term_1 + term_2 assert isinstance(result, Bool) - assert len(result.must) == 2 - assert term_1 in result.must and term_2 in result.must + assert len(result.filter) == 2 + assert term_1 in result.filter and term_2 in result.filter def test_anding_terms_results_in_must_bool(): @@ -300,8 +300,8 @@ def test_anding_terms_results_in_must_bool(): term_2 = Term(field="name", value="Dave") result = term_1 & term_2 assert isinstance(result, Bool) - assert len(result.must) == 2 - assert term_1 in result.must and term_2 in result.must + assert len(result.filter) == 2 + assert term_1 in result.filter and term_2 in result.filter def test_oring_terms_results_in_must_bool(): @@ -325,11 +325,11 @@ def test_negate_terms_results_must_not_bool(): "q1, q2, expected", [ ( - Bool(must=[Term(field="name", value="Bob")]), - Bool(must=[Term(field="name", value="Dave")]), + Bool(filter=[Term(field="name", value="Bob")]), + Bool(filter=[Term(field="name", value="Dave")]), { "bool": { - "must": [ + "filter": [ {"term": {"name": {"value": "Bob"}}}, {"term": {"name": {"value": "Dave"}}}, ] @@ -338,10 +338,10 @@ def test_negate_terms_results_must_not_bool(): ), ( Term(field="name", value="Bob"), - Bool(must=[Term(field="name", value="Fred")]), + Bool(filter=[Term(field="name", value="Fred")]), { "bool": { - "must": [ + "filter": [ {"term": {"name": {"value": "Fred"}}}, {"term": {"name": {"value": "Bob"}}}, ] @@ -349,11 +349,11 @@ def test_negate_terms_results_must_not_bool(): }, ), ( - Bool(must=[Term(field="name", value="Fred")]), + Bool(filter=[Term(field="name", value="Fred")]), Term(field="name", value="Bob"), { "bool": { - "must": [ + "filter": [ {"term": {"name": {"value": "Fred"}}}, {"term": {"name": {"value": "Bob"}}}, ] @@ -1254,9 +1254,9 @@ def test_with_active_glossary(): sut = with_active_glossary(name=GLOSSARY_NAME) - assert sut.must - assert 3 == len(sut.must) - term1, term2, term3 = sut.must + assert sut.filter + assert 3 == len(sut.filter) + term1, term2, term3 = sut.filter assert isinstance(term1, Term) is True assert term1.field == "__state" assert term1.value == "ACTIVE" @@ -1306,9 +1306,9 @@ def test_with_active_category(): name=GLOSSARY_CATEGORY_NAME, glossary_qualified_name=GLOSSARY_QUALIFIED_NAME ) - assert sut.must - assert 4 == len(sut.must) - term1, term2, term3, term4 = sut.must + assert sut.filter + assert 4 == len(sut.filter) + term1, term2, term3, term4 = sut.filter assert isinstance(term1, Term) is True assert term1.field == "__state" assert term1.value == "ACTIVE" @@ -1361,9 +1361,9 @@ def test_with_active_term(): name=GLOSSARY_TERM_NAME, glossary_qualified_name=GLOSSARY_QUALIFIED_NAME ) - assert sut.must - assert 4 == len(sut.must) - term1, term2, term3, term4 = sut.must + assert sut.filter + assert 4 == len(sut.filter) + term1, term2, term3, term4 = sut.filter assert isinstance(term1, Term) is True assert term1.field == "__state" assert term1.value == "ACTIVE" From 48388207cb76d77ecb39442f2729537bd0807067 Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Tue, 22 Aug 2023 15:52:57 +0100 Subject: [PATCH 06/12] Adds all possible operations for custom metadata fields Signed-off-by: Christopher Grote --- pyatlan/model/fields/atlan_fields.py | 116 +++++++++++++++++++++- tests/integration/custom_metadata_test.py | 43 ++++---- 2 files changed, 134 insertions(+), 25 deletions(-) diff --git a/pyatlan/model/fields/atlan_fields.py b/pyatlan/model/fields/atlan_fields.py index 2dcdb1257..f58434271 100644 --- a/pyatlan/model/fields/atlan_fields.py +++ b/pyatlan/model/fields/atlan_fields.py @@ -10,6 +10,7 @@ Prefix, Query, Range, + SearchFieldType, SortItem, Term, Terms, @@ -138,7 +139,7 @@ def keyword_field_name(self) -> str: def startswith(self, value: StrictStr, case_insensitive: bool = False) -> Query: """ Returns a query that will match all assets whose field has a value that starts with - the provided value. Note that this can als obe a case-insensitive match. + the provided value. Note that this can also be a case-insensitive match. :param value: the value (prefix) to check the field's value starts with :param case_insensitive: if True, will match the value irrespective of case, otherwise will be a case-sensitive @@ -412,3 +413,116 @@ def __init__(self, set_name: str, attribute_name: str): self.attribute_def = CustomMetadataCache.get_attribute_def( self.elastic_field_name ) + + def eq(self, value: SearchFieldType, case_insensitive: bool = False) -> Query: + """ + Returns a query that will match all assets whose field has a value that exactly equals + the provided value. + + :param value: the value to check the field's value is exactly equal to + :param case_insensitive: if True, will match the value irrespective of case, otherwise will be a case-sensitive + match + :returns: a query that will only match assets whose value for the field is exactly equal to the value provided + """ + return Term( + field=self.elastic_field_name, + value=value, + case_insensitive=case_insensitive, + ) + + def startswith(self, value: StrictStr, case_insensitive: bool = False) -> Query: + """ + Returns a query that will match all assets whose field has a value that starts with + the provided value. Note that this can also be a case-insensitive match. + + :param value: the value (prefix) to check the field's value starts with + :param case_insensitive: if True, will match the value irrespective of case, otherwise will be a case-sensitive + match + :returns: a query that will only match assets whose value for the field starts with the value provided + """ + return Prefix( + field=self.elastic_field_name, + value=value, + case_insensitive=case_insensitive, + ) + + def within(self, values: list[str]) -> Query: + """ + Returns a query that will match all assets whose field has a value that exactly matches + at least one of the provided string values. + + :param values: the values (strings) to check the field's value is exactly equal to + :returns: a query that will only match assets whose value for the field is exactly equal to at least one of + the values provided + """ + return Terms(field=self.elastic_field_name, values=values) + + def match(self, value: StrictStr) -> Query: + """ + Returns a query that will textually match the provided value against the field. This + analyzes the provided value according to the same analysis carried out on the field + (for example, tokenization, stemming, and so on). + + :param value: the string value to match against + :returns: a query that will only match assets whose analyzed value for the field matches the value provided + (which will also be analyzed) + """ + return Match( + field=self.elastic_field_name, + query=value, + ) + + def gt(self, value: Union[StrictInt, StrictFloat]) -> Query: + """ + Returns a query that will match all assets whose field has a value that is strictly + greater than the provided numeric value. + + :param value: the numeric value to compare against + :returns: a query that will only match assets whose value for the field is strictly greater than the numeric + value provided + """ + return Range(field=self.elastic_field_name, gt=value) + + def gte(self, value: Union[StrictInt, StrictFloat]) -> Query: + """ + Returns a query that will match all assets whose field has a value that is greater + than or equal to the provided numeric value. + + :param value: the numeric value to compare against + :returns: a query that will only match assets whose value for the field is greater than or equal to the numeric + value provided + """ + return Range(field=self.elastic_field_name, gte=value) + + def lt(self, value: Union[StrictInt, StrictFloat]) -> Query: + """ + Returns a query that will match all assets whose field has a value that is strictly + less than the provided numeric value. + + :param value: the numeric value to compare against + :returns: a value that will only match assets whose value for the field is strictly less than the numeric + value provided + """ + return Range(field=self.elastic_field_name, lt=value) + + def lte(self, value: Union[StrictInt, StrictFloat]) -> Query: + """ + Returns a query that will match all assets whose field has a value that is less + than or equal to the provided numeric value. + + :param value: the numeric value to compare against + :returns: a query that will only match assets whose value for the field is less than or equal to the numeric + value provided + """ + return Range(field=self.elastic_field_name, lte=value) + + def between( + self, + minimum: Union[StrictInt, StrictFloat], + maximum: Union[StrictInt, StrictFloat], + ) -> Query: + """ + Returns a query that will match all assets whose field has a value between the minimum and + maximum specified values, inclusive. + """ + return Range(field=self.elastic_field_name, gte=minimum, lte=maximum) diff --git a/tests/integration/custom_metadata_test.py b/tests/integration/custom_metadata_test.py index 21975c686..860fc0cd7 100644 --- a/tests/integration/custom_metadata_test.py +++ b/tests/integration/custom_metadata_test.py @@ -7,7 +7,7 @@ from pyatlan.cache.custom_metadata_cache import CustomMetadataCache from pyatlan.client.atlan import AtlanClient -from pyatlan.model.assets import AtlasGlossary, AtlasGlossaryTerm, Badge +from pyatlan.model.assets import Asset, AtlasGlossary, AtlasGlossaryTerm, Badge from pyatlan.model.custom_metadata import CustomMetadataDict from pyatlan.model.enums import ( AtlanCustomAttributePrimitiveType, @@ -16,8 +16,9 @@ BadgeConditionColor, EntityStatus, ) +from pyatlan.model.fields.atlan_fields import CustomMetadataField +from pyatlan.model.fluent_search import CompoundQuery, FluentSearch from pyatlan.model.group import AtlanGroup, CreateGroupResponse -from pyatlan.model.search import DSL, Bool, Exists, IndexSearchRequest, Term from pyatlan.model.structs import BadgeCondition from pyatlan.model.typedef import AttributeDef, CustomMetadataDef, EnumDef from tests.integration.admin_test import create_group, delete_group @@ -505,22 +506,19 @@ def test_search_by_any_accountable( glossary: AtlasGlossary, term: AtlasGlossaryTerm, ): - be_active = Term.with_state("ACTIVE") - be_a_term = Term.with_type_name("AtlasGlossaryTerm") - have_attr = Exists.with_custom_metadata( - set_name=CM_RACI, attr_name=CM_ATTR_RACI_ACCOUNTABLE - ) - query = Bool(must=[be_active, be_a_term, have_attr]) - dsl = DSL(query=query) attributes = ["name", "anchor"] cm_attributes = CustomMetadataCache.get_attributes_for_search_results( set_name=CM_RACI ) assert cm_attributes attributes.extend(cm_attributes) - request = IndexSearchRequest( - dsl=dsl, attributes=attributes, relation_attributes=["name"] - ) + request = ( + FluentSearch(_includes_on_results=attributes) + .where(CompoundQuery.active_assets()) + .where(CompoundQuery.asset_type(AtlasGlossaryTerm)) + .where(CustomMetadataField(CM_RACI, CM_ATTR_RACI_ACCOUNTABLE).exists()) + .include_on_relations(Asset.NAME) + ).to_request() response = client.search(criteria=request) assert response count = 0 @@ -549,18 +547,15 @@ def test_search_by_specific_accountable( glossary: AtlasGlossary, term: AtlasGlossaryTerm, ): - be_active = Term.with_state("ACTIVE") - be_a_term = Term.with_type_name("AtlasGlossaryTerm") - have_attr = Term.with_custom_metadata( - set_name=CM_RACI, - attr_name=CM_ATTR_RACI_ACCOUNTABLE, - value=FIXED_USER, - ) - query = Bool(must=[be_active, be_a_term, have_attr]) - dsl = DSL(query=query) - request = IndexSearchRequest( - dsl=dsl, attributes=["name", "anchor"], relation_attributes=["name"] - ) + request = ( + FluentSearch() + .where(CompoundQuery.active_assets()) + .where(CompoundQuery.asset_type(AtlasGlossaryTerm)) + .where(CustomMetadataField(CM_RACI, CM_ATTR_RACI_ACCOUNTABLE).eq(FIXED_USER)) + .include_on_results(Asset.NAME) + .include_on_results(AtlasGlossaryTerm.ANCHOR) + .include_on_relations(Asset.NAME) + ).to_request() response = client.search(criteria=request) assert response count = 0 From 180dd6ab078b5556868424c403adb06b54726043 Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Tue, 22 Aug 2023 23:55:36 +0100 Subject: [PATCH 07/12] Changes per review comments Signed-off-by: Christopher Grote --- pyatlan/model/fields/atlan_fields.py | 100 +++++++++++++++------------ pyatlan/model/fluent_search.py | 18 ++--- 2 files changed, 61 insertions(+), 57 deletions(-) diff --git a/pyatlan/model/fields/atlan_fields.py b/pyatlan/model/fields/atlan_fields.py index f58434271..a7ab39271 100644 --- a/pyatlan/model/fields/atlan_fields.py +++ b/pyatlan/model/fields/atlan_fields.py @@ -33,13 +33,13 @@ class RelationField(AtlanField): searchable. """ - def __init__(self, atlan: StrictStr): + def __init__(self, atlan_field_name: StrictStr): """ Default constructor. - :param atlan: name of the attribute in the metastore + :param atlan_field_name: name of the attribute in the metastore """ - self.atlan_field_name = atlan + self.atlan_field_name = atlan_field_name class SearchableField(AtlanField): @@ -49,15 +49,15 @@ class SearchableField(AtlanField): elastic_field_name: StrictStr - def __init__(self, atlan: StrictStr, elastic: StrictStr): + def __init__(self, atlan_field_name: StrictStr, elastic_field_name: StrictStr): """ Default constructor. - :param atlan: name of the attribute in the metastore - :param elastic: name of the field in the search index + :param atlan_field_name: name of the attribute in the metastore + :param elastic_field_name: name of the field in the search index """ - self.atlan_field_name = atlan - self.elastic_field_name = elastic + self.atlan_field_name = atlan_field_name + self.elastic_field_name = elastic_field_name def exists(self) -> Query: """ @@ -83,14 +83,14 @@ class BooleanField(SearchableField): Represents any field in Atlan that can be searched only by truthiness. """ - def __init__(self, atlan: StrictStr, boolean: StrictStr): + def __init__(self, atlan_field_name: StrictStr, boolean_field_name: StrictStr): """ Default constructor. - :param atlan: name of the attribute in the metastore - :param boolean: name of the bool field in the search index + :param atlan_field_name: name of the attribute in the metastore + :param boolean_field_name: name of the bool field in the search index """ - super().__init__(atlan, boolean) + super().__init__(atlan_field_name, boolean_field_name) @property def boolean_field_name(self) -> str: @@ -118,14 +118,14 @@ class KeywordField(SearchableField): Represents any field in Atlan that can be searched only by keyword (no text-analyzed fuzziness). """ - def __init__(self, atlan: StrictStr, keyword: StrictStr): + def __init__(self, atlan_field_name: StrictStr, keyword_field_name: StrictStr): """ Default constructor. - :param atlan: name of the attribute in the metastore - :param keyword: name of the keyword field in the search index + :param atlan_field_name: name of the attribute in the metastore + :param keyword_field_name: name of the keyword field in the search index """ - super().__init__(atlan, keyword) + super().__init__(atlan_field_name, keyword_field_name) @property def keyword_field_name(self) -> str: @@ -185,14 +185,14 @@ class TextField(SearchableField): Represents any field in Atlan that can only be searched using text-related search operations. """ - def __init__(self, atlan: StrictStr, text: StrictStr): + def __init__(self, atlan_field_name: StrictStr, text_field_name: StrictStr): """ Default constructor. - :param atlan: name of the attribute in the metastore - :param text: name of the text field in the search index + :param atlan_field_name: name of the attribute in the metastore + :param text_field_name: name of the text field in the search index """ - super().__init__(atlan, text) + super().__init__(atlan_field_name, text_field_name) @property def text_field_name(self) -> str: @@ -224,14 +224,14 @@ class NumericField(SearchableField): Represents any field in Atlan that can be searched using only numeric search operations. """ - def __init__(self, atlan: StrictStr, numeric: StrictStr): + def __init__(self, atlan_field_name: StrictStr, numeric_field_name: StrictStr): """ Default constructor. - :param atlan: name of the attribute in the metastore - :param numeric: name of the numeric field in the search index + :param atlan_field_name: name of the attribute in the metastore + :param numeric_field_name: name of the numeric field in the search index """ - super().__init__(atlan, numeric) + super().__init__(atlan_field_name, numeric_field_name) @property def numeric_field_name(self) -> str: @@ -316,16 +316,21 @@ class NumericRankField(NumericField): rank_field_name: StrictStr - def __init__(self, atlan: StrictStr, numeric: StrictStr, rank: StrictStr): + def __init__( + self, + atlan_field_name: StrictStr, + numeric_field_name: StrictStr, + rank_field_name: StrictStr, + ): """ Default constructor. - :param atlan: name of the attribute in the metastore - :param numeric: name of the numeric field in the search index - :param rank: name of the rank orderable field in the search index + :param atlan_field_name: name of the attribute in the metastore + :param numeric_field_name: name of the numeric field in the search index + :param rank_field_name: name of the rank orderable field in the search index """ - super().__init__(atlan, numeric) - self.rank_field_name = rank + super().__init__(atlan_field_name, numeric_field_name) + self.rank_field_name = rank_field_name class KeywordTextField(KeywordField, TextField): @@ -335,16 +340,21 @@ class KeywordTextField(KeywordField, TextField): _text_field_name: StrictStr - def __init__(self, atlan: StrictStr, keyword: StrictStr, text: StrictStr): + def __init__( + self, + atlan_field_name: StrictStr, + keyword_field_name: StrictStr, + text_field_name: StrictStr, + ): """ Default constructor. - :param atlan: name of the attribute in the metastore - :param keyword: name of the keyword field in the search index - :param text: name of the text field in the search index + :param atlan_field_name: name of the attribute in the metastore + :param keyword_field_name: name of the keyword field in the search index + :param text_field_name: name of the text field in the search index """ - super(KeywordField, self).__init__(atlan, keyword) - self._text_field_name = text + super(KeywordField, self).__init__(atlan_field_name, keyword_field_name) + self._text_field_name = text_field_name @property def text_field_name(self) -> str: @@ -360,18 +370,22 @@ class KeywordTextStemmedField(KeywordTextField): stemmed_field_name: StrictStr def __init__( - self, atlan: StrictStr, keyword: StrictStr, text: StrictStr, stemmed: StrictStr + self, + atlan_field_name: StrictStr, + keyword_field_name: StrictStr, + text_field_name: StrictStr, + stemmed_field_name: StrictStr, ): """ Default constructor. - :param atlan: name of the attribute in the metastore - :param keyword: name of the keyword field in the search index - :param text: name of the text field in the search index - :param stemmed: name of the stemmed text field in the search index + :param atlan_field_name: name of the attribute in the metastore + :param keyword_field_name: name of the keyword field in the search index + :param text_field_name: name of the text field in the search index + :param stemmed_field_name: name of the stemmed text field in the search index """ - super().__init__(atlan, keyword, text) - self.stemmed_field_name = stemmed + super().__init__(atlan_field_name, keyword_field_name, text_field_name) + self.stemmed_field_name = stemmed_field_name def match_stemmed(self, value: StrictStr) -> Query: """ diff --git a/pyatlan/model/fluent_search.py b/pyatlan/model/fluent_search.py index 5bcc58f45..ab592e24c 100644 --- a/pyatlan/model/fluent_search.py +++ b/pyatlan/model/fluent_search.py @@ -1,7 +1,8 @@ from __future__ import annotations +import copy import dataclasses -from typing import Optional, Union, cast +from typing import Optional, Union from pyatlan.model.assets import Referenceable from pyatlan.model.enums import EntityStatus @@ -148,12 +149,7 @@ def _clone(self) -> "CompoundQuery": :returns: copy of the current CompoundQuery """ - return self.__class__( - wheres=self.wheres, - where_nots=self.where_nots, - where_somes=self.where_somes, - _min_somes=self._min_somes, - ) + return copy.deepcopy(self) def where(self, query: Query) -> "CompoundQuery": """ @@ -258,13 +254,7 @@ def _clone(self) -> "FluentSearch": :returns: copy of the current FluentSearch """ - clone: FluentSearch = cast(FluentSearch, super()._clone()) - clone.sorts = self.sorts - # TODO clone.aggregations = self.aggregations - clone._page_size = self._page_size - clone._includes_on_results = self._includes_on_results - clone._includes_on_relations = self._includes_on_relations - return clone + return copy.deepcopy(self) def sort(self, by: SortItem) -> "FluentSearch": """ From 970a04b54f9d55ee9e9a3275a27d2d34795c24c6 Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Tue, 22 Aug 2023 23:56:12 +0100 Subject: [PATCH 08/12] Removed file that is no longer used (I think?) Signed-off-by: Christopher Grote --- .../methods/assets/referenceable.jinja2 | 107 ------------------ 1 file changed, 107 deletions(-) delete mode 100644 pyatlan/generator/templates/methods/assets/referenceable.jinja2 diff --git a/pyatlan/generator/templates/methods/assets/referenceable.jinja2 b/pyatlan/generator/templates/methods/assets/referenceable.jinja2 deleted file mode 100644 index 54784bb27..000000000 --- a/pyatlan/generator/templates/methods/assets/referenceable.jinja2 +++ /dev/null @@ -1,107 +0,0 @@ - - business_attributes: Optional[dict[str, Any]] = Field( - None, - description='Map of custom metadata attributes and values defined on the entity.\n', - alias='businessAttributes' - ) - created_by: Optional[str] = Field( - None, - description='Username of the user who created the object.\n', - example='jsmith', - ) - create_time: Optional[int] = Field( - None, - description='Time (epoch) at which this object was created, in milliseconds.\n', - example=1648852296555, - ) - delete_handler: Optional[str] = Field( - None, - description="Details on the handler used for deletion of the asset.", - example="Hard", - ) - guid: str = Field( - "", - description='Unique identifier of the entity instance.\n', - example='917ffec9-fa84-4c59-8e6c-c7b114d04be3', - ) - is_incomplete: Optional[bool] = Field(True, description='', example=True) - labels: Optional[list[str]] = Field(None, description='Internal use only.') - relationship_attributes: Optional[dict[str, Any]] = Field( - None, - description='Map of relationships for the entity. The specific keys of this map will vary by type, ' - 'so are described in the sub-types of this schema.\n', - ) - status: Optional[EntityStatus] = Field( - None, - description="Status of the entity", - example=EntityStatus.ACTIVE - ) - type_name: str = Field( - None, description='Name of the type definition that defines this instance.\n' - ) - updated_by: Optional[str] = Field( - None, - description='Username of the user who last assets_updated the object.\n', - example='jsmith', - ) - update_time: Optional[int] = Field( - None, - description='Time (epoch) at which this object was last assets_updated, in milliseconds.\n', - example=1649172284333, - ) - version: Optional[int] = Field( - None, description='Version of this object.\n', example=2 - ) - atlan_tags: Optional[list[AtlanTag]] = Field( - None, description="Atlan tags", alias="classifications" - ) - classification_names: Optional[list[str]] = Field( - None, description="The names of the classifications that exist on the asset." - ) - display_text: Optional[str] = Field( - None, - description="Human-readable name of the entity..\n", - ) - entity_status: Optional[str] = Field( - None, - description="Status of the entity (if this is a related entity).\n", - ) - relationship_guid: Optional[str] = Field( - None, - description="Unique identifier of the relationship (when this is a related entity).\n", - ) - relationship_status: Optional[str] = Field( - None, - description="Status of the relationship (when this is a related entity).\n", - ) - relationship_type: Optional[str] = Field( - None, - description="Status of the relationship (when this is a related entity).\n", - ) - meaning_names: Optional[list[str]] = Field( - None, description="Names of assigned_terms that have been linked to this asset." - ) - meanings: Optional[list[Meaning]] = Field( - None, description="", alias="meanings" - ) - custom_attributes: Optional[dict[str, Any]] = Field(None, description="", alias="customAttributes") - scrubbed: Optional[bool] = Field( - None, description="", alias="fields removed from results" - ) - pending_tasks: Optional[list[str]] = Field(None) - - unique_attributes: Optional[dict[str, Any]] = Field(None) - - class Attributes(AtlanObject): - {%- for attribute_def in entity_def.attribute_defs %} - {%- set type = attribute_def.typeName | get_type %} - {%- set default_value = "''" if attribute_def.name == "qualifiedName" else "None" %} - {{attribute_def.name | to_snake_case }}: {% if attribute_def.isOptional %}Optional[{% endif %}{{type}}{% if attribute_def.isOptional %}]{% endif %} = Field({{ default_value }}, description='' , alias='{{attribute_def.name}}') - {%- endfor %} - {%- for attribute_def in entity_def.relationship_attribute_defs %} - {%- set type = attribute_def.typeName | get_type %} - {{attribute_def.name | to_snake_case }}: {% if attribute_def.isOptional %}Optional[{% endif %}{{type}}{% if attribute_def.isOptional %}]{% endif %} = Field(None, description='', alias='{{attribute_def.name}}') # relationship - {%- endfor %} - - def validate_required(self): - pass From 77276e5b5fe72ea6c3531378778b451a7955f751 Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Wed, 23 Aug 2023 11:07:36 +0100 Subject: [PATCH 09/12] Changes exists -> has_any_value Signed-off-by: Christopher Grote --- pyatlan/model/fields/atlan_fields.py | 2 +- pyatlan/model/fluent_search.py | 10 ++++++---- tests/integration/custom_metadata_test.py | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pyatlan/model/fields/atlan_fields.py b/pyatlan/model/fields/atlan_fields.py index a7ab39271..bcc003fd2 100644 --- a/pyatlan/model/fields/atlan_fields.py +++ b/pyatlan/model/fields/atlan_fields.py @@ -59,7 +59,7 @@ def __init__(self, atlan_field_name: StrictStr, elastic_field_name: StrictStr): self.atlan_field_name = atlan_field_name self.elastic_field_name = elastic_field_name - def exists(self) -> Query: + def has_any_value(self) -> Query: """ Returns a query that will only match assets that have some non-null, non-empty value (no matter what actual value) for the field. diff --git a/pyatlan/model/fluent_search.py b/pyatlan/model/fluent_search.py index ab592e24c..5529146ad 100644 --- a/pyatlan/model/fluent_search.py +++ b/pyatlan/model/fluent_search.py @@ -100,7 +100,9 @@ def tagged( return FluentSearch( wheres=[Referenceable.ATLAN_TAGS.within(values)] ).to_query() - return FluentSearch(wheres=[Referenceable.ATLAN_TAGS.exists()]).to_query() + return FluentSearch( + wheres=[Referenceable.ATLAN_TAGS.has_any_value()] + ).to_query() if values: return FluentSearch( where_somes=[ @@ -111,8 +113,8 @@ def tagged( ).to_query() return FluentSearch( where_somes=[ - Referenceable.ATLAN_TAGS.exists(), - Referenceable.PROPAGATED_ATLAN_TAGS.exists(), + Referenceable.ATLAN_TAGS.has_any_value(), + Referenceable.PROPAGATED_ATLAN_TAGS.has_any_value(), ], _min_somes=1, ).to_query() @@ -129,7 +131,7 @@ def assigned_term(qualified_names: Optional[list[str]] = None) -> Query: """ if qualified_names: return Referenceable.ASSIGNED_TERMS.within(qualified_names) - return Referenceable.ASSIGNED_TERMS.exists() + return Referenceable.ASSIGNED_TERMS.has_any_value() def __init__( self, diff --git a/tests/integration/custom_metadata_test.py b/tests/integration/custom_metadata_test.py index 860fc0cd7..fa0c1f7c3 100644 --- a/tests/integration/custom_metadata_test.py +++ b/tests/integration/custom_metadata_test.py @@ -516,7 +516,7 @@ def test_search_by_any_accountable( FluentSearch(_includes_on_results=attributes) .where(CompoundQuery.active_assets()) .where(CompoundQuery.asset_type(AtlasGlossaryTerm)) - .where(CustomMetadataField(CM_RACI, CM_ATTR_RACI_ACCOUNTABLE).exists()) + .where(CustomMetadataField(CM_RACI, CM_ATTR_RACI_ACCOUNTABLE).has_any_value()) .include_on_relations(Asset.NAME) ).to_request() response = client.search(criteria=request) From b545432432f434080d237be80e5c7cdf14339c64 Mon Sep 17 00:00:00 2001 From: Ernest Hill <105281429+ErnestoLoma@users.noreply.github.com> Date: Wed, 23 Aug 2023 13:37:18 +0300 Subject: [PATCH 10/12] Update HISTORY.md --- HISTORY.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 84e6d35d6..d9124f576 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 0.6.1 (August 23, 2023) +* Adds a new FluentSearch approach to searching (no need to know Elastic anymore) +* Changes default inclusion operation for Bool queries to filter rather than must (for efficiency) + ## 0.6.0 (August 17, 2023) * Added: * Adds new purpose policy permissions (attaching / detaching terms from assets) From f8b3c9cb085fff8d2b014a6a2e24b49088f14603 Mon Sep 17 00:00:00 2001 From: Ernest Hill <105281429+ErnestoLoma@users.noreply.github.com> Date: Wed, 23 Aug 2023 13:37:43 +0300 Subject: [PATCH 11/12] Update version.txt --- pyatlan/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyatlan/version.txt b/pyatlan/version.txt index a918a2aa1..ee6cdce3c 100644 --- a/pyatlan/version.txt +++ b/pyatlan/version.txt @@ -1 +1 @@ -0.6.0 +0.6.1 From c47a3afe5c72c5cb7cf9b5cacfe6839da706647e Mon Sep 17 00:00:00 2001 From: Christopher Grote Date: Wed, 23 Aug 2023 17:32:12 +0100 Subject: [PATCH 12/12] Limit event retrieval to maximum of 1000 in testing Signed-off-by: Christopher Grote --- tests/integration/admin_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/integration/admin_test.py b/tests/integration/admin_test.py index 921afa419..9a37f3a11 100644 --- a/tests/integration/admin_test.py +++ b/tests/integration/admin_test.py @@ -174,6 +174,8 @@ def test_retrieve_logs( count = 0 for _ in events: count += 1 + if count >= 1000: + break assert count > 0 @@ -187,4 +189,6 @@ def test_retrieve_admin_logs( count = 0 for _ in events: count += 1 + if count >= 1000: + break assert count > 0