1from typing import List, Dict, Optional 2 3 4class ServiceMetadata: 5 def __init__(self, 6 displayName: str, 7 imageUrl: str, 8 longDescription: str, 9 providerDisplayName: str, 10 documentationUrl: str, 11 supportUrl: str, 12 shareable: Optional[bool] = None, 13 **kwargs 14 ): 15 self.displayName = displayName 16 self.imageUrl = imageUrl 17 self.longDescription = longDescription 18 self.providerDisplayName = providerDisplayName 19 self.documentationUrl = documentationUrl 20 self.supportUrl = supportUrl 21 self.shareable = shareable 22 23 self.__dict__.update(kwargs) 24 25 26class ServiceDashboardClient: 27 def __init__(self, 28 redirect_uri: str, 29 id: str = None, 30 secret: str = None, 31 **kwargs 32 ): 33 self.id = id 34 self.secret = secret 35 self.redirect_uri = redirect_uri 36 37 self.__dict__.update(kwargs) 38 39 40class ServicePlanCost: 41 def __init__(self, 42 amount: Dict[str, float], 43 unit: str, 44 **kwargs): 45 self.amount = amount 46 self.unit = unit 47 48 self.__dict__.update(kwargs) 49 50 51class ServicePlanMetadata: 52 def __init__(self, 53 displayName: str = None, 54 bullets: List[str] = None, 55 costs: List[ServicePlanCost] = None, 56 **kwargs 57 ): 58 self.displayName = displayName 59 self.bullets = bullets 60 self.costs = costs 61 62 self.__dict__.update(kwargs) 63 64 65class Schemas: 66 def __init__(self, 67 service_instance: Dict = None, 68 service_binding: Dict = None, 69 **kwargs): 70 self.service_instance = service_instance 71 self.service_binding = service_binding 72 73 self.__dict__.update(kwargs) 74 75 76class ServicePlan: 77 def __init__(self, 78 id: str, 79 name: str, 80 description: str, 81 metadata: ServicePlanMetadata = None, 82 free: bool = None, 83 bindable: bool = None, 84 schemas: Schemas = None, 85 **kwargs): 86 self.id = id 87 self.name = name 88 self.description = description 89 self.metadata = metadata 90 self.free = free 91 self.bindable = bindable 92 self.schemas = schemas 93 94 self.__dict__.update(kwargs) 95