def __init__(self, content_id: str, title: Optional[str] = None, items: List[Item] = None, validations_rules: Optional[List[ValidationRule]] = None, options: Optional[Options] = None, default_value: Optional[Item] = None): super().__init__(content_type="radiogroup", content_id=content_id) self.title = title self.items = serialized(items) self.validations_rules = serialized(validations_rules) self.options = dictionary_of_object_if_exist(options) self.default_value = serialized(default_value)
def __init__(self, content_id: str, content: List[Content], options: Optional[Options] = None): super().__init__(content_type="custom_container", content_id=content_id) self.content = serialized(content) self.options = dictionary_of_object_if_exist(options)
def __init__(self, content_id: str, title: Optional[str] = None, text: Optional[str] = None, placeholder: Optional[str] = None, validations_rules: Optional[List[ValidationRule]] = None, options: Optional[Options] = None): super().__init__(content_type="text_area", content_id=content_id) self.title = title self.text = text self.validations_rules = serialized(validations_rules) self.placeholder = placeholder self.options = dictionary_of_object_if_exist(options)
def __init__( self, content_id: str, validations_rules: Optional[ValidationRules] = None, title: Optional[str] = None, selected_date: Optional[str] = None, options: Optional[Options] = None ): super().__init__(content_type="date_picker", content_id=content_id) self.title = title self.selected_date = selected_date if options is not None: self.options = options.__dict__ self.validations_rules = serialized(validations_rules)