# Path: sevenbridges/errors.py
# class SbgError(Exception):
#     """Base class for SBG errors.
# 
#     Provides a base exception for all errors
#     that are thrown by sevenbridges-python library.
#     """
# 
#     def __init__(self, message=None, code=None, status=None, more_info=None):
#         """
#         :param code: Custom error code
#         :param status: Http status code.
#         :param message: Message describing the error.
#         """
#         self.code = code
#         self.status = status
#         self.message = message
#         self.more_info = more_info
# 
#     def __str__(self):
#         return str(self.message)


from datetime import datetime
from sevenbridges.errors import SbgError
        from sevenbridges.meta.resource import Resource
        from sevenbridges.models.project import Project
        from sevenbridges.models.task import Task
        from sevenbridges.models.app import App
        from sevenbridges.models.file import File
        from sevenbridges.models.user import User
        from sevenbridges.models.billing_group import BillingGroup
        from sevenbridges.models.volume import Volume
        from sevenbridges.models.marker import Marker
        from sevenbridges.models.division import Division
        from sevenbridges.models.team import Team
        from sevenbridges.models.storage_import import Import
        from sevenbridges.models.storage_export import Export
        from sevenbridges.models.dataset import Dataset
        from sevenbridges.models.member import Member
        from sevenbridges.models.automation import Automation
        from sevenbridges.models.automation import AutomationMember
        from sevenbridges.models.automation import AutomationPackage
        from sevenbridges.models.async_jobs import AsyncJob
        from sevenbridges.models.automation import AutomationRun



class Transform:
    @staticmethod
    def to_resource(resource):
        if not resource:
            raise SbgError('Invalid id value!')
        elif isinstance(resource, Resource) and hasattr(resource, 'id'):
            return resource.id
        elif isinstance(resource, str):
            return resource
        else:
            raise SbgError('Invalid id value!')

    @staticmethod
    def to_project(project):
        """Serializes project to id string
        :param project: object to serialize
        :return: string id
        """
        if not project:

# Path: sevenbridges/errors.py
# class SbgError(Exception):
#     """Base class for SBG errors.
# 
#     Provides a base exception for all errors
#     that are thrown by sevenbridges-python library.
#     """
# 
#     def __init__(self, message=None, code=None, status=None, more_info=None):
#         """
#         :param code: Custom error code
#         :param status: Http status code.
#         :param message: Message describing the error.
#         """
#         self.code = code
#         self.status = status
#         self.message = message
#         self.more_info = more_info
# 
#     def __str__(self):
#         return str(self.message)


# Path: sevenbridges/meta/transformer.py
from datetime import datetime
from sevenbridges.errors import SbgError
        from sevenbridges.meta.resource import Resource
        from sevenbridges.models.project import Project
        from sevenbridges.models.task import Task
        from sevenbridges.models.app import App
        from sevenbridges.models.file import File
        from sevenbridges.models.user import User
        from sevenbridges.models.billing_group import BillingGroup
        from sevenbridges.models.volume import Volume
        from sevenbridges.models.marker import Marker
        from sevenbridges.models.division import Division
        from sevenbridges.models.team import Team
        from sevenbridges.models.storage_import import Import
        from sevenbridges.models.storage_export import Export
        from sevenbridges.models.dataset import Dataset
        from sevenbridges.models.member import Member
        from sevenbridges.models.automation import Automation
        from sevenbridges.models.automation import AutomationMember
        from sevenbridges.models.automation import AutomationPackage
        from sevenbridges.models.async_jobs import AsyncJob
        from sevenbridges.models.automation import AutomationRun




class Transform:
    @staticmethod
    def to_resource(resource):
        if not resource:
            raise SbgError('Invalid id value!')
        elif isinstance(resource, Resource) and hasattr(resource, 'id'):
            return resource.id
        elif isinstance(resource, str):
            return resource
        else:
            raise SbgError('Invalid id value!')

    @staticmethod
    def to_project(project):
        """Serializes project to id string
        :param project: object to serialize
        :return: string id
        """
        if not project:

            raise SbgError('Project is required!')