# Path: openbrokerapi/catalog.py
# class ServiceDashboardClient:
#     def __init__(self,
#                  redirect_uri: str,
#                  id: str = None,
#                  secret: str = None,
#                  **kwargs
#                  ):
#         self.id = id
#         self.secret = secret
#         self.redirect_uri = redirect_uri
# 
#         self.__dict__.update(kwargs)
# 
# class ServiceMetadata:
#     def __init__(self,
#                  displayName: str,
#                  imageUrl: str,
#                  longDescription: str,
#                  providerDisplayName: str,
#                  documentationUrl: str,
#                  supportUrl: str,
#                  shareable: Optional[bool] = None,
#                  **kwargs
#                  ):
#         self.displayName = displayName
#         self.imageUrl = imageUrl
#         self.longDescription = longDescription
#         self.providerDisplayName = providerDisplayName
#         self.documentationUrl = documentationUrl
#         self.supportUrl = supportUrl
#         self.shareable = shareable
# 
#         self.__dict__.update(kwargs)
# 
# class ServicePlan:
#     def __init__(self,
#                  id: str,
#                  name: str,
#                  description: str,
#                  metadata: ServicePlanMetadata = None,
#                  free: bool = None,
#                  bindable: bool = None,
#                  schemas: Schemas = None,
#                  **kwargs):
#         self.id = id
#         self.name = name
#         self.description = description
#         self.metadata = metadata
#         self.free = free
#         self.bindable = bindable
#         self.schemas = schemas
# 
#         self.__dict__.update(kwargs)
# 
# Path: openbrokerapi/settings.py
# DISABLE_SPACE_ORG_GUID_CHECK = getenv('DISABLE_SPACE_ORG_GUID_CHECK', '').lower() == 'true'


from enum import Enum
from typing import List, Optional, Union
from openbrokerapi.catalog import (
    ServiceDashboardClient,
    ServiceMetadata,
    ServicePlan,
)
from openbrokerapi.settings import DISABLE_SPACE_ORG_GUID_CHECK
                 ):
        self.app_guid = app_guid
        self.plan_id = plan_id
        self.service_id = service_id
        self.parameters = parameters
        self.bind_resource = BindResource(**bind_resource) if bind_resource else None
        self.context = context
        # HTTP contextual data
        self.authorization_username = None  #: username of HTTP Basic Auth
        self.originating_identity = None  #: decoded X-Broker-Originating-Identity HTTP Header


class SharedDevice:
    def __init__(self,
                 volume_id: str,
                 mount_config: dict = None
                 ):
        self.volume_id = volume_id
        self.mount_config = mount_config


class VolumeMount:
    def __init__(self,
                 driver: str,
                 container_dir: str,
                 mode: str,
                 device_type: str,
                 device: SharedDevice
                 ):
        self.driver = driver

# Path: openbrokerapi/catalog.py
# class ServiceDashboardClient:
#     def __init__(self,
#                  redirect_uri: str,
#                  id: str = None,
#                  secret: str = None,
#                  **kwargs
#                  ):
#         self.id = id
#         self.secret = secret
#         self.redirect_uri = redirect_uri
# 
#         self.__dict__.update(kwargs)
# 
# class ServiceMetadata:
#     def __init__(self,
#                  displayName: str,
#                  imageUrl: str,
#                  longDescription: str,
#                  providerDisplayName: str,
#                  documentationUrl: str,
#                  supportUrl: str,
#                  shareable: Optional[bool] = None,
#                  **kwargs
#                  ):
#         self.displayName = displayName
#         self.imageUrl = imageUrl
#         self.longDescription = longDescription
#         self.providerDisplayName = providerDisplayName
#         self.documentationUrl = documentationUrl
#         self.supportUrl = supportUrl
#         self.shareable = shareable
# 
#         self.__dict__.update(kwargs)
# 
# class ServicePlan:
#     def __init__(self,
#                  id: str,
#                  name: str,
#                  description: str,
#                  metadata: ServicePlanMetadata = None,
#                  free: bool = None,
#                  bindable: bool = None,
#                  schemas: Schemas = None,
#                  **kwargs):
#         self.id = id
#         self.name = name
#         self.description = description
#         self.metadata = metadata
#         self.free = free
#         self.bindable = bindable
#         self.schemas = schemas
# 
#         self.__dict__.update(kwargs)
# 
# Path: openbrokerapi/settings.py
# DISABLE_SPACE_ORG_GUID_CHECK = getenv('DISABLE_SPACE_ORG_GUID_CHECK', '').lower() == 'true'


# Path: openbrokerapi/service_broker.py
from enum import Enum
from typing import List, Optional, Union
from openbrokerapi.catalog import (
    ServiceDashboardClient,
    ServiceMetadata,
    ServicePlan,
)
from openbrokerapi.settings import DISABLE_SPACE_ORG_GUID_CHECK

                 ):
        self.app_guid = app_guid
        self.plan_id = plan_id
        self.service_id = service_id
        self.parameters = parameters
        self.bind_resource = BindResource(**bind_resource) if bind_resource else None
        self.context = context
        # HTTP contextual data
        self.authorization_username = None  #: username of HTTP Basic Auth
        self.originating_identity = None  #: decoded X-Broker-Originating-Identity HTTP Header


class SharedDevice:
    def __init__(self,
                 volume_id: str,
                 mount_config: dict = None
                 ):
        self.volume_id = volume_id
        self.mount_config = mount_config


class VolumeMount:
    def __init__(self,
                 driver: str,
                 container_dir: str,
                 mode: str,
                 device_type: str,
                 device: SharedDevice
                 ):
        self.driver = driver

        self.container_dir = container_dir