Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,181 changes: 94 additions & 1,087 deletions pyatlan_v9/model/assets/__init__.py

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions pyatlan_v9/model/assets/_init_agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto-generated by PythonMsgspecRenderer.pkl - DO NOT EDIT
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Atlan Pte. Ltd.

"""
Agent module exports.

This module provides convenient imports for all Agent types and their Related variants.
"""

from .agent_related import RelatedAgent
from .agent import Agent

__all__ = [
"Agent",
"RelatedAgent",
]
6 changes: 0 additions & 6 deletions pyatlan_v9/model/assets/_init_business_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
"""

from .business_policy import BusinessPolicy
from .business_policy_exception import BusinessPolicyException
from .business_policy_incident import BusinessPolicyIncident
from .business_policy_log import BusinessPolicyLog
from .business_policy_related import (
RelatedBusinessPolicy,
RelatedBusinessPolicyException,
Expand All @@ -21,9 +18,6 @@

__all__ = [
"BusinessPolicy",
"BusinessPolicyException",
"BusinessPolicyIncident",
"BusinessPolicyLog",
"RelatedBusinessPolicy",
"RelatedBusinessPolicyException",
"RelatedBusinessPolicyIncident",
Expand Down
8 changes: 8 additions & 0 deletions pyatlan_v9/model/assets/_init_sap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

from .sap import SAP
from .sap_column_process import SAPColumnProcess
from .sap_erp_abap_program import SapErpAbapProgram
from .sap_erp_cds_view import SapErpCdsView
from .sap_erp_column import SapErpColumn
Expand All @@ -17,8 +18,10 @@
from .sap_erp_table import SapErpTable
from .sap_erp_transaction_code import SapErpTransactionCode
from .sap_erp_view import SapErpView
from .sap_process import SAPProcess
from .sap_related import (
RelatedSAP,
RelatedSAPColumnProcess,
RelatedSapErpAbapProgram,
RelatedSapErpCdsView,
RelatedSapErpColumn,
Expand All @@ -27,10 +30,13 @@
RelatedSapErpTable,
RelatedSapErpTransactionCode,
RelatedSapErpView,
RelatedSAPProcess,
)

__all__ = [
"RelatedSAP",
"RelatedSAPColumnProcess",
"RelatedSAPProcess",
"RelatedSapErpAbapProgram",
"RelatedSapErpCdsView",
"RelatedSapErpColumn",
Expand All @@ -40,6 +46,8 @@
"RelatedSapErpTransactionCode",
"RelatedSapErpView",
"SAP",
"SAPColumnProcess",
"SAPProcess",
"SapErpAbapProgram",
"SapErpCdsView",
"SapErpColumn",
Expand Down
75 changes: 75 additions & 0 deletions pyatlan_v9/model/assets/_init_sapbw.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Auto-generated by PythonMsgspecRenderer.pkl - DO NOT EDIT
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Atlan Pte. Ltd.

"""
SAPBW module exports.

This module provides convenient imports for all SAPBW types and their Related variants.
"""

from .sapbw_related import (
RelatedSAPBW,
RelatedSAPBWADSO,
RelatedSAPBWADSOField,
RelatedSAPBWCompositeProvider,
RelatedSAPBWCompositeProviderField,
RelatedSAPBWDTP,
RelatedSAPBWDataSource,
RelatedSAPBWDataSourceField,
RelatedSAPBWInfoArea,
RelatedSAPBWInfoObject,
RelatedSAPBWInfoSource,
RelatedSAPBWInfoSourceField,
RelatedSAPBWQuery,
RelatedSAPBWQueryElement,
RelatedSAPBWTransformation,
)
from .sapbw import SAPBW
from .sapbw_composite_provider import SAPBWCompositeProvider
from .sapbw_composite_provider_field import SAPBWCompositeProviderField
from .sapbw_data_source import SAPBWDataSource
from .sapbw_data_source_field import SAPBWDataSourceField
from .sapbw_info_area import SAPBWInfoArea
from .sapbw_info_object import SAPBWInfoObject
from .sapbw_info_source import SAPBWInfoSource
from .sapbw_info_source_field import SAPBWInfoSourceField
from .sapbw_query import SAPBWQuery
from .sapbw_query_element import SAPBWQueryElement
from .sapbw_transformation import SAPBWTransformation
from .sapbwadso import SAPBWADSO
from .sapbwadso_field import SAPBWADSOField
from .sapbwdtp import SAPBWDTP

__all__ = [
"RelatedSAPBW",
"RelatedSAPBWADSO",
"RelatedSAPBWADSOField",
"RelatedSAPBWCompositeProvider",
"RelatedSAPBWCompositeProviderField",
"RelatedSAPBWDTP",
"RelatedSAPBWDataSource",
"RelatedSAPBWDataSourceField",
"RelatedSAPBWInfoArea",
"RelatedSAPBWInfoObject",
"RelatedSAPBWInfoSource",
"RelatedSAPBWInfoSourceField",
"RelatedSAPBWQuery",
"RelatedSAPBWQueryElement",
"RelatedSAPBWTransformation",
"SAPBW",
"SAPBWADSO",
"SAPBWADSOField",
"SAPBWCompositeProvider",
"SAPBWCompositeProviderField",
"SAPBWDTP",
"SAPBWDataSource",
"SAPBWDataSourceField",
"SAPBWInfoArea",
"SAPBWInfoObject",
"SAPBWInfoSource",
"SAPBWInfoSourceField",
"SAPBWQuery",
"SAPBWQueryElement",
"SAPBWTransformation",
]
81 changes: 14 additions & 67 deletions pyatlan_v9/model/assets/access_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from pyatlan_v9.model.serde import Serde, get_serde
from pyatlan_v9.model.transform import register_asset

from .access_control_related import RelatedAccessControl, RelatedAuthPolicy
from .access_control_related import RelatedAuthPolicy
from .anomalo_related import RelatedAnomaloCheck
from .app_related import RelatedApplication, RelatedApplicationField
from .asset import (
Expand All @@ -37,6 +37,7 @@
_extract_asset_attrs,
_populate_asset_attrs,
)
from .context_related import RelatedContextRepository
from .data_contract_related import RelatedDataContract
from .data_mesh_related import RelatedDataProduct
from .data_quality_related import RelatedDataQualityRule, RelatedMetric
Expand Down Expand Up @@ -74,6 +75,7 @@ class AccessControl(Asset):
ANOMALO_CHECKS: ClassVar[Any] = None
APPLICATION: ClassVar[Any] = None
APPLICATION_FIELD: ClassVar[Any] = None
CONTEXT_REPOSITORIES: ClassVar[Any] = None
DATA_CONTRACT_LATEST: ClassVar[Any] = None
DATA_CONTRACT_LATEST_CERTIFIED: ClassVar[Any] = None
OUTPUT_PORT_DATA_PRODUCTS: ClassVar[Any] = None
Expand All @@ -93,6 +95,8 @@ class AccessControl(Asset):
SCHEMA_REGISTRY_SUBJECTS: ClassVar[Any] = None
SODA_CHECKS: ClassVar[Any] = None

type_name: Union[str, UnsetType] = "AccessControl"

channel_link: Union[str, None, UnsetType] = UNSET
"""TBC"""

Expand Down Expand Up @@ -138,6 +142,9 @@ class AccessControl(Asset):
application_field: Union[RelatedApplicationField, None, UnsetType] = UNSET
"""ApplicationField owning the Asset."""

context_repositories: Union[List[RelatedContextRepository], None, UnsetType] = UNSET
"""Context repositories that use this asset as input."""

data_contract_latest: Union[RelatedDataContract, None, UnsetType] = UNSET
"""Latest version of the data contract (in any status) for this asset."""

Expand Down Expand Up @@ -203,66 +210,6 @@ class AccessControl(Asset):
def __post_init__(self) -> None:
self.type_name = "AccessControl"

# =========================================================================
# SDK Methods
# =========================================================================

def validate(self, for_creation: bool = False) -> None:
"""
Dry-run validation of this AccessControl instance.

Checks that required fields (type_name, name, qualified_name) are set.
When ``for_creation=True``, also checks hierarchy-specific fields
(parent references, denormalized attributes) needed to create this asset.

This is purely opt-in and is NOT called by any serde path — only by
explicit user invocation (e.g., validating JSONL before sending to Atlan).

Args:
for_creation: If True, also validate fields required for asset creation.

Raises:
ValueError: If any required fields are missing or invalid.
"""
errors: list[str] = []
if self.type_name is UNSET:
errors.append("type_name is required")
if self.name is UNSET:
errors.append("name is required")
if self.qualified_name is UNSET or self.qualified_name is None:
errors.append("qualified_name is required")
if errors:
raise ValueError(f"AccessControl validation failed: {errors}")

def minimize(self) -> "AccessControl":
"""
Return a minimal copy of this AccessControl with only updater-required fields.

Calls :meth:`validate` first to ensure the instance is valid, then
returns a new AccessControl with only the fields needed for an update
(qualified_name, name, and any type-specific additional fields).

Returns:
A new AccessControl instance with only the minimum required fields.
"""
self.validate()
return AccessControl(qualified_name=self.qualified_name, name=self.name)

def relate(self) -> "RelatedAccessControl":
"""
Create a :class:`RelatedAccessControl` reference from this instance.

Returns a lightweight reference suitable for use in relationship
attributes. Prefers ``guid`` if set, otherwise falls back to
``qualified_name``.

Returns:
A RelatedAccessControl reference to this asset.
"""
if self.guid is not UNSET:
return RelatedAccessControl(guid=self.guid)
return RelatedAccessControl(qualified_name=self.qualified_name)

# =========================================================================
# Optimized Serialization Methods (override Asset base class)
# =========================================================================
Expand Down Expand Up @@ -367,6 +314,9 @@ class AccessControlRelationshipAttributes(AssetRelationshipAttributes):
application_field: Union[RelatedApplicationField, None, UnsetType] = UNSET
"""ApplicationField owning the Asset."""

context_repositories: Union[List[RelatedContextRepository], None, UnsetType] = UNSET
"""Context repositories that use this asset as input."""

data_contract_latest: Union[RelatedDataContract, None, UnsetType] = UNSET
"""Latest version of the data contract (in any status) for this asset."""

Expand Down Expand Up @@ -455,6 +405,7 @@ class AccessControlNested(AssetNested):
"anomalo_checks",
"application",
"application_field",
"context_repositories",
"data_contract_latest",
"data_contract_latest_certified",
"output_port_data_products",
Expand Down Expand Up @@ -544,9 +495,6 @@ def _access_control_to_nested(access_control: AccessControl) -> AccessControlNes
is_incomplete=access_control.is_incomplete,
provenance_type=access_control.provenance_type,
home_id=access_control.home_id,
depth=access_control.depth,
immediate_upstream=access_control.immediate_upstream,
immediate_downstream=access_control.immediate_downstream,
attributes=attrs,
relationship_attributes=replace_rels,
append_relationship_attributes=append_rels,
Expand Down Expand Up @@ -580,6 +528,7 @@ def _access_control_from_nested(nested: AccessControlNested) -> AccessControl:
updated_by=nested.updated_by,
classifications=nested.classifications,
classification_names=nested.classification_names,
meanings=nested.meanings,
labels=nested.labels,
business_attributes=nested.business_attributes,
custom_attributes=nested.custom_attributes,
Expand All @@ -588,9 +537,6 @@ def _access_control_from_nested(nested: AccessControlNested) -> AccessControl:
is_incomplete=nested.is_incomplete,
provenance_type=nested.provenance_type,
home_id=nested.home_id,
depth=nested.depth,
immediate_upstream=nested.immediate_upstream,
immediate_downstream=nested.immediate_downstream,
**_extract_access_control_attrs(attrs),
# Merged relationship attributes
**merged_rels,
Expand Down Expand Up @@ -646,6 +592,7 @@ def _access_control_from_nested_bytes(data: bytes, serde: Serde) -> AccessContro
AccessControl.ANOMALO_CHECKS = RelationField("anomaloChecks")
AccessControl.APPLICATION = RelationField("application")
AccessControl.APPLICATION_FIELD = RelationField("applicationField")
AccessControl.CONTEXT_REPOSITORIES = RelationField("contextRepositories")
AccessControl.DATA_CONTRACT_LATEST = RelationField("dataContractLatest")
AccessControl.DATA_CONTRACT_LATEST_CERTIFIED = RelationField(
"dataContractLatestCertified"
Expand Down
Loading
Loading