# Path: openbrokerapi/api.py
# class BrokerCredentials:
#     def __init__(self, username: str, password: str):
# def _check_plan_id(broker: ServiceBroker, plan_id) -> bool:
# def get_blueprint(service_broker: ServiceBroker,
#                   broker_credentials: Union[None, List[BrokerCredentials], BrokerCredentials],
#                   logger: logging.Logger) -> Blueprint:
#     def extract_authorization_username(request: Request):
#     def error_handler(e):
#     def error_handler_not_implemented(e):
#     def error_handler_bad_request(e):
#     def catalog():
#     def provision(instance_id):
#     def update(instance_id):
#     def bind(instance_id, binding_id):
#     def unbind(instance_id, binding_id):
#     def deprovision(instance_id):
#     def last_operation(instance_id):
#     def last_binding_operation(instance_id, binding_id):
#     def get_instance(instance_id):
#     def get_binding(instance_id, binding_id):
# def serve_multiple(service_brokers: List[ServiceBroker],
#                    credentials: Union[List[BrokerCredentials], BrokerCredentials, None],
#                    logger: logging.Logger = logging.root,
#                    port=5000,
#                    debug=False):
# def serve(service_broker: ServiceBroker,
#           credentials: Union[List[BrokerCredentials], BrokerCredentials, None],
#           logger: logging.Logger = logging.root,
#           port=5000,
#           debug=False):
# 
# Path: openbrokerapi/catalog.py
# 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/service_broker.py
# class Service:
#     def __init__(self,
#                  id: str,
#                  name: str,
#                  description: str,
#                  bindable: bool,
#                  plans: List[ServicePlan],
#                  tags: List[str] = None,
#                  requires: List[str] = None,
#                  metadata: ServiceMetadata = None,
#                  dashboard_client: ServiceDashboardClient = None,
#                  plan_updateable: bool = False,
#                  instances_retrievable: bool = False,
#                  bindings_retrievable: bool = False,
#                  **kwargs
#                  ):
#         """
#         :param requires:  syslog_drain, route_forwarding or volume_mount
#         """
#         self.id = id
#         self.name = name
#         self.description = description
#         self.bindable = bindable
#         self.plans = plans
#         self.tags = tags
#         self.requires = requires
#         self.metadata = metadata
#         self.dashboard_client = dashboard_client
#         self.plan_updateable = plan_updateable
#         self.instances_retrievable = instances_retrievable
#         self.bindings_retrievable = bindings_retrievable
# 
#         self.__dict__.update(kwargs)
# 
# class ProvisionDetails:
#     def __init__(self,
#                  service_id: str,
#                  plan_id: str,
#                  organization_guid: str = None,
#                  space_guid: str = None,
#                  parameters: dict = None,
#                  context: dict = None,
#                  **kwargs):
#         self.service_id = service_id
#         self.plan_id = plan_id
#         self.organization_guid = organization_guid
#         self.space_guid = space_guid
#         self.parameters = parameters
#         self.context = context
# 
#         # Usage context information
#         if isinstance(context, dict) and 'organization_guid' in context:
#             if organization_guid is not None and context['organization_guid'] != organization_guid:
#                 raise TypeError('organization_guid does not match with context.organization_guid')
#             self.organization_guid = context['organization_guid']
#         if isinstance(context, dict) and 'space_guid' in context:
#             if space_guid is not None and context['space_guid'] != space_guid:
#                 raise TypeError('space_guid does not match with context.space_guid')
#             self.space_guid = context['space_guid']
# 
#         if DISABLE_SPACE_ORG_GUID_CHECK:
#             pass
#         elif None in (self.organization_guid, self.space_guid):
#             raise TypeError('Organization and space guid are required.')
# 
#         # HTTP contextual data
#         self.authorization_username = None  #: username of HTTP Basic Auth
#         self.originating_identity = None  #: decoded X-Broker-Originating-Identity HTTP Header
# 
# class ProvisionedServiceSpec:
#     def __init__(self,
#                  state: ProvisionState = ProvisionState.SUCCESSFUL_CREATED,
#                  dashboard_url: str = None,
#                  operation: str = None
#                  ):
#         self.state = state
#         self.dashboard_url = dashboard_url
#         self.operation = operation
# 
#     @property
#     def is_async(self):
#         return self.state == ProvisionState.IS_ASYNC
# 
# class DeprovisionDetails:
#     def __init__(self,
#                  service_id: str,
#                  plan_id: str
#                  ):
#         self.service_id = service_id
#         self.plan_id = plan_id
#         # HTTP contextual data
#         self.authorization_username = None  #: username of HTTP Basic Auth
#         self.originating_identity = None  #: decoded X-Broker-Originating-Identity HTTP Header
# 
# class DeprovisionServiceSpec:
#     def __init__(self,
#                  is_async: bool,
#                  operation: str = None
#                  ):
#         self.is_async = is_async
#         self.operation = operation


from typing import Union, List
from openbrokerapi.api import ServiceBroker
from openbrokerapi.catalog import ServicePlan
from openbrokerapi.service_broker import (
    Service,
    ProvisionDetails,
    ProvisionedServiceSpec,
    DeprovisionDetails,
    DeprovisionServiceSpec
)
import openbrokerapi



class MyServiceBroker(ServiceBroker):
    def catalog(self) -> Union[Service, List[Service]]:
        return Service(
            id='service id',
            name='service name',

# Path: openbrokerapi/api.py
# class BrokerCredentials:
#     def __init__(self, username: str, password: str):
# def _check_plan_id(broker: ServiceBroker, plan_id) -> bool:
# def get_blueprint(service_broker: ServiceBroker,
#                   broker_credentials: Union[None, List[BrokerCredentials], BrokerCredentials],
#                   logger: logging.Logger) -> Blueprint:
#     def extract_authorization_username(request: Request):
#     def error_handler(e):
#     def error_handler_not_implemented(e):
#     def error_handler_bad_request(e):
#     def catalog():
#     def provision(instance_id):
#     def update(instance_id):
#     def bind(instance_id, binding_id):
#     def unbind(instance_id, binding_id):
#     def deprovision(instance_id):
#     def last_operation(instance_id):
#     def last_binding_operation(instance_id, binding_id):
#     def get_instance(instance_id):
#     def get_binding(instance_id, binding_id):
# def serve_multiple(service_brokers: List[ServiceBroker],
#                    credentials: Union[List[BrokerCredentials], BrokerCredentials, None],
#                    logger: logging.Logger = logging.root,
#                    port=5000,
#                    debug=False):
# def serve(service_broker: ServiceBroker,
#           credentials: Union[List[BrokerCredentials], BrokerCredentials, None],
#           logger: logging.Logger = logging.root,
#           port=5000,
#           debug=False):
# 
# Path: openbrokerapi/catalog.py
# 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/service_broker.py
# class Service:
#     def __init__(self,
#                  id: str,
#                  name: str,
#                  description: str,
#                  bindable: bool,
#                  plans: List[ServicePlan],
#                  tags: List[str] = None,
#                  requires: List[str] = None,
#                  metadata: ServiceMetadata = None,
#                  dashboard_client: ServiceDashboardClient = None,
#                  plan_updateable: bool = False,
#                  instances_retrievable: bool = False,
#                  bindings_retrievable: bool = False,
#                  **kwargs
#                  ):
#         """
#         :param requires:  syslog_drain, route_forwarding or volume_mount
#         """
#         self.id = id
#         self.name = name
#         self.description = description
#         self.bindable = bindable
#         self.plans = plans
#         self.tags = tags
#         self.requires = requires
#         self.metadata = metadata
#         self.dashboard_client = dashboard_client
#         self.plan_updateable = plan_updateable
#         self.instances_retrievable = instances_retrievable
#         self.bindings_retrievable = bindings_retrievable
# 
#         self.__dict__.update(kwargs)
# 
# class ProvisionDetails:
#     def __init__(self,
#                  service_id: str,
#                  plan_id: str,
#                  organization_guid: str = None,
#                  space_guid: str = None,
#                  parameters: dict = None,
#                  context: dict = None,
#                  **kwargs):
#         self.service_id = service_id
#         self.plan_id = plan_id
#         self.organization_guid = organization_guid
#         self.space_guid = space_guid
#         self.parameters = parameters
#         self.context = context
# 
#         # Usage context information
#         if isinstance(context, dict) and 'organization_guid' in context:
#             if organization_guid is not None and context['organization_guid'] != organization_guid:
#                 raise TypeError('organization_guid does not match with context.organization_guid')
#             self.organization_guid = context['organization_guid']
#         if isinstance(context, dict) and 'space_guid' in context:
#             if space_guid is not None and context['space_guid'] != space_guid:
#                 raise TypeError('space_guid does not match with context.space_guid')
#             self.space_guid = context['space_guid']
# 
#         if DISABLE_SPACE_ORG_GUID_CHECK:
#             pass
#         elif None in (self.organization_guid, self.space_guid):
#             raise TypeError('Organization and space guid are required.')
# 
#         # HTTP contextual data
#         self.authorization_username = None  #: username of HTTP Basic Auth
#         self.originating_identity = None  #: decoded X-Broker-Originating-Identity HTTP Header
# 
# class ProvisionedServiceSpec:
#     def __init__(self,
#                  state: ProvisionState = ProvisionState.SUCCESSFUL_CREATED,
#                  dashboard_url: str = None,
#                  operation: str = None
#                  ):
#         self.state = state
#         self.dashboard_url = dashboard_url
#         self.operation = operation
# 
#     @property
#     def is_async(self):
#         return self.state == ProvisionState.IS_ASYNC
# 
# class DeprovisionDetails:
#     def __init__(self,
#                  service_id: str,
#                  plan_id: str
#                  ):
#         self.service_id = service_id
#         self.plan_id = plan_id
#         # HTTP contextual data
#         self.authorization_username = None  #: username of HTTP Basic Auth
#         self.originating_identity = None  #: decoded X-Broker-Originating-Identity HTTP Header
# 
# class DeprovisionServiceSpec:
#     def __init__(self,
#                  is_async: bool,
#                  operation: str = None
#                  ):
#         self.is_async = is_async
#         self.operation = operation


# Path: doc/_static/single_broker.py
from typing import Union, List
from openbrokerapi.api import ServiceBroker
from openbrokerapi.catalog import ServicePlan
from openbrokerapi.service_broker import (
    Service,
    ProvisionDetails,
    ProvisionedServiceSpec,
    DeprovisionDetails,
    DeprovisionServiceSpec
)
import openbrokerapi




class MyServiceBroker(ServiceBroker):
    def catalog(self) -> Union[Service, List[Service]]:
        return Service(
            id='service id',
            name='service name',

            description='service description',