# -*- coding: utf-8 -*-"""Base model implementation for AWS Redshift objects.This module provides the foundational data models for the AWS Redshift client library,implementing common patterns for representing and interacting with AWS Redshift resources.The models follow three key design patterns:1. **Raw Data Storage Pattern**:All models store the original API response data in a `_data` attribute, treating theAPI response schema as potentially unstable. Properties provide a stable interfacefor accessing the underlying data, making the code more resilient to API changes.2. **Property-Based Access Pattern**:All attributes are exposed through properties rather than direct instance attributes.This approach allows for lazy loading, data validation, and type conversion whilemaintaining a clean public interface.3. **Core Data Extraction Pattern**:Each model implements a `core_data` property that returns a standardized, minimalrepresentation of the object. This provides a consistent way to access essentialinformation across different model types.These models are designed to be instantiated by the API client methods, not directlyby users of the library. They provide a Pythonic interface to the JSON data returnedby the native boto3 AWS Redshift API."""importdataclassesfromfunc_args.apiimportT_KWARGS,REQ,BaseModel
[docs]@dataclasses.dataclassclassBase(BaseModel):raw_data:T_KWARGS=dataclasses.field(default=REQ)@propertydefcore_data(self)->T_KWARGS:""" Returns a dictionary containing the essential data of the model. This property must be implemented by all subclasses to provide a consistent minimal representation of the model's core data. """raiseNotImplementedError