# Path: clouddq/utils.py
# def assert_not_none_or_empty(value: typing.Any, error_msg: str) -> None:
#     """
# 
#     Args:
#       value: typing.Any:
#       error_msg: str:
# 
#     Returns:
# 
#     """
#     if not value:
#         raise ValueError(error_msg)


from dataclasses import dataclass
from clouddq.utils import assert_not_none_or_empty

    def to_dict(self: DataplexEntitySchemaField) -> dict:
        """
        Args:
          self: DataplexEntitySchemaField:

        Returns:

        """

        output = {
            "name": self.name,
            "type": self.type,
            "mode": self.mode,
        }

        return dict(output)

    @classmethod
    def from_dict(
        cls: DataplexEntitySchemaField, entity_id: str, kwargs: dict
    ) -> DataplexEntitySchemaField:

        name = kwargs.get("name")
        assert_not_none_or_empty(
            value=name,
            error_msg=f"DataplexEntity {entity_id}: must define non-empty value: 'name'",
        )

        type = kwargs.get("type")

# Path: clouddq/utils.py
# def assert_not_none_or_empty(value: typing.Any, error_msg: str) -> None:
#     """
# 
#     Args:
#       value: typing.Any:
#       error_msg: str:
# 
#     Returns:
# 
#     """
#     if not value:
#         raise ValueError(error_msg)


# Path: clouddq/classes/dataplex_entity_schema_field.py
from dataclasses import dataclass
from clouddq.utils import assert_not_none_or_empty


    def to_dict(self: DataplexEntitySchemaField) -> dict:
        """
        Args:
          self: DataplexEntitySchemaField:

        Returns:

        """

        output = {
            "name": self.name,
            "type": self.type,
            "mode": self.mode,
        }

        return dict(output)

    @classmethod
    def from_dict(
        cls: DataplexEntitySchemaField, entity_id: str, kwargs: dict
    ) -> DataplexEntitySchemaField:

        name = kwargs.get("name")
        assert_not_none_or_empty(
            value=name,
            error_msg=f"DataplexEntity {entity_id}: must define non-empty value: 'name'",
        )

        type = kwargs.get("type")

        assert_not_none_or_empty(