# Path: clouddq/classes/entity_uri_schemes.py
# class EntityUriScheme(str, Enum):
#     """ """
# 
#     DATAPLEX = "DATAPLEX"
#     BIGQUERY = "BIGQUERY"
# 
#     @classmethod
#     def from_scheme(cls, scheme: str):
# 
#         try:
#             return cls(scheme.upper())
#         except ValueError:
#             raise NotImplementedError(f"{scheme} scheme is not implemented.")


from dataclasses import dataclass
from pprint import pformat
from clouddq.classes.entity_uri_schemes import EntityUriScheme
import logging
DATAPLEX_URI_FIELDS = ["projects", "locations", "lakes", "zones", "entities"]
BIGQUERY_URI_FIELDS = ["projects", "datasets", "tables"]
SAMPLE_DEFAULT_REGISTRIES_YAML = """
metadata_registry_defaults:
  dataplex:
    projects: <my-gcp-project-id>
    locations: <my-gcp-dataplex-region-id>
    lakes: <my-gcp-dataplex-lake-id>
    zones: <my-gcp-dataplex-zone-id>
"""

logger = logging.getLogger(__name__)


@dataclass
class MetadataRegistryDefaults:
    """ """

    default_configs: dict

    @classmethod
    def from_dict(
        cls: MetadataRegistryDefaults, kwargs: dict
    ) -> MetadataRegistryDefaults:
        default_configs = {}
        logger.debug(f"Parsing input 'metadata_registry_defaults':\n {pformat(kwargs)}")
        for registry_scheme, registry_defaults in kwargs.items():
            scheme = EntityUriScheme.from_scheme(registry_scheme)
            default_configs[scheme.value] = {}
            expected_uri_fields = None

# Path: clouddq/classes/entity_uri_schemes.py
# class EntityUriScheme(str, Enum):
#     """ """
# 
#     DATAPLEX = "DATAPLEX"
#     BIGQUERY = "BIGQUERY"
# 
#     @classmethod
#     def from_scheme(cls, scheme: str):
# 
#         try:
#             return cls(scheme.upper())
#         except ValueError:
#             raise NotImplementedError(f"{scheme} scheme is not implemented.")


# Path: clouddq/classes/metadata_registry_defaults.py
from dataclasses import dataclass
from pprint import pformat
from clouddq.classes.entity_uri_schemes import EntityUriScheme
import logging

DATAPLEX_URI_FIELDS = ["projects", "locations", "lakes", "zones", "entities"]
BIGQUERY_URI_FIELDS = ["projects", "datasets", "tables"]
SAMPLE_DEFAULT_REGISTRIES_YAML = """
metadata_registry_defaults:
  dataplex:
    projects: <my-gcp-project-id>
    locations: <my-gcp-dataplex-region-id>
    lakes: <my-gcp-dataplex-lake-id>
    zones: <my-gcp-dataplex-zone-id>
"""

logger = logging.getLogger(__name__)


@dataclass
class MetadataRegistryDefaults:
    """ """

    default_configs: dict

    @classmethod
    def from_dict(
        cls: MetadataRegistryDefaults, kwargs: dict
    ) -> MetadataRegistryDefaults:
        default_configs = {}
        logger.debug(f"Parsing input 'metadata_registry_defaults':\n {pformat(kwargs)}")
        for registry_scheme, registry_defaults in kwargs.items():
            scheme = EntityUriScheme.from_scheme(registry_scheme)
            default_configs[scheme.value] = {}
            expected_uri_fields = None

            if scheme == EntityUriScheme.DATAPLEX: