From 7d0ddd33897690da40c4336537eca885ec6223c7 Mon Sep 17 00:00:00 2001 From: gulevsky Date: Tue, 8 Nov 2022 16:16:33 +0300 Subject: [PATCH] generate sealed interfaces for entity enumerations generate sealed interfaces for entity enumerations --- .../generators/kotlin_dsl/generator.py | 6 +- .../kotlin_dsl/kotlin_dsl_entities.py | 9 +- .../api_generator/schema/modeling/entities.py | 9 +- .../tests/references/kotlin_dsl/Entity.kt | 4 +- .../references/kotlin_dsl/EntityWithArray.kt | 2 +- .../kotlin_dsl/EntityWithArrayOfEnums.kt | 2 +- .../EntityWithArrayOfExpressions.kt | 2 +- .../EntityWithArrayOfNestedItems.kt | 2 +- .../EntityWithArrayWithTransform.kt | 2 +- .../kotlin_dsl/EntityWithComplexProperty.kt | 2 +- ...tityWithComplexPropertyWithDefaultValue.kt | 2 +- .../kotlin_dsl/EntityWithEntityProperty.kt | 2 +- .../EntityWithOptionalComplexProperty.kt | 2 +- .../kotlin_dsl/EntityWithOptionalProperty.kt | 2 +- .../EntityWithOptionalStringEnumProperty.kt | 2 +- .../EntityWithPropertyWithDefaultValue.kt | 2 +- .../kotlin_dsl/EntityWithRequiredProperty.kt | 2 +- .../kotlin_dsl/EntityWithSimpleProperties.kt | 2 +- .../kotlin_dsl/EntityWithStrictArray.kt | 2 +- .../EntityWithStringArrayProperty.kt | 2 +- .../EntityWithStringEnumProperty.kt | 2 +- ...yWithStringEnumPropertyWithDefaultValue.kt | 2 +- .../kotlin_dsl/EntityWithoutProperties.kt | 2 +- json-builder/kotlin/build.gradle | 23 ++- .../com/yandex/div/dsl/model/ActionBase.kt | 102 ------------- ...{BoolIntVariable.kt => BooleanVariable.kt} | 34 ++--- .../com/yandex/div/dsl/model/ColorVariable.kt | 2 +- .../kotlin/com/yandex/div/dsl/model/Div.kt | 6 +- .../div/dsl/model/DivAbsoluteEdgeInsets.kt | 102 +++++++++++++ .../yandex/div/dsl/model/DivAccessibility.kt | 12 ++ .../com/yandex/div/dsl/model/DivAction.kt | 21 +-- .../div/dsl/model/DivAlignmentVertical.kt | 1 + .../dsl/model/DivAppearanceSetTransition.kt | 2 +- .../div/dsl/model/DivAppearanceTransition.kt | 5 +- .../com/yandex/div/dsl/model/DivBackground.kt | 5 +- .../com/yandex/div/dsl/model/DivBase.kt | 1 + .../com/yandex/div/dsl/model/DivBlendMode.kt | 19 +++ .../com/yandex/div/dsl/model/DivBlur.kt | 62 ++++++++ .../dsl/model/DivChangeBoundsTransition.kt | 2 +- .../div/dsl/model/DivChangeSetTransition.kt | 2 +- .../div/dsl/model/DivChangeTransition.kt | 5 +- .../yandex/div/dsl/model/DivCircleShape.kt | 68 +++++++++ .../com/yandex/div/dsl/model/DivContainer.kt | 134 +++++++++++++++++- .../com/yandex/div/dsl/model/DivCount.kt | 5 +- .../com/yandex/div/dsl/model/DivCustom.kt | 13 +- ...adCallbacks.kt => DivDownloadCallbacks.kt} | 34 ++--- .../com/yandex/div/dsl/model/DivDrawable.kt | 5 +- .../yandex/div/dsl/model/DivFadeTransition.kt | 2 +- .../dsl/model/{DivHover.kt => DivFilter.kt} | 5 +- .../com/yandex/div/dsl/model/DivFixedCount.kt | 2 +- .../com/yandex/div/dsl/model/DivFixedSize.kt | 2 +- .../com/yandex/div/dsl/model/DivGallery.kt | 24 +++- .../com/yandex/div/dsl/model/DivGifImage.kt | 13 +- .../com/yandex/div/dsl/model/DivGrid.kt | 13 +- .../div/dsl/model/DivHoverBackgroundColor.kt | 62 -------- .../com/yandex/div/dsl/model/DivImage.kt | 35 ++++- .../div/dsl/model/DivImageBackground.kt | 13 +- .../com/yandex/div/dsl/model/DivIndicator.kt | 14 +- .../yandex/div/dsl/model/DivInfinityCount.kt | 2 +- .../com/yandex/div/dsl/model/DivInput.kt | 39 +++-- ...ientBackground.kt => DivLinearGradient.kt} | 32 ++--- .../div/dsl/model/DivMatchParentSize.kt | 2 +- .../div/dsl/model/DivNeighbourPageSize.kt | 2 +- .../div/dsl/model/DivNinePatchBackground.kt | 73 ++++++++++ .../com/yandex/div/dsl/model/DivPageSize.kt | 2 +- .../com/yandex/div/dsl/model/DivPager.kt | 13 +- .../div/dsl/model/DivPagerLayoutMode.kt | 5 +- .../com/yandex/div/dsl/model/DivPivot.kt | 14 ++ .../com/yandex/div/dsl/model/DivPivotFixed.kt | 80 +++++++++++ .../div/dsl/model/DivPivotPercentage.kt | 62 ++++++++ .../yandex/div/dsl/model/DivRadialGradient.kt | 95 +++++++++++++ .../div/dsl/model/DivRadialGradientCenter.kt | 14 ++ .../dsl/model/DivRadialGradientFixedCenter.kt | 73 ++++++++++ .../div/dsl/model/DivRadialGradientRadius.kt | 14 ++ .../model/DivRadialGradientRelativeCenter.kt | 62 ++++++++ .../model/DivRadialGradientRelativeRadius.kt | 69 +++++++++ .../div/dsl/model/DivRoundedRectangleShape.kt | 2 +- .../div/dsl/model/DivScaleTransition.kt | 2 +- .../com/yandex/div/dsl/model/DivSeparator.kt | 14 +- .../com/yandex/div/dsl/model/DivShape.kt | 5 +- .../yandex/div/dsl/model/DivShapeDrawable.kt | 2 +- .../com/yandex/div/dsl/model/DivSize.kt | 5 +- .../div/dsl/model/DivSlideTransition.kt | 2 +- .../com/yandex/div/dsl/model/DivSlider.kt | 24 +++- .../div/dsl/model/DivSolidBackground.kt | 2 +- .../com/yandex/div/dsl/model/DivState.kt | 13 +- .../com/yandex/div/dsl/model/DivTabs.kt | 13 +- .../com/yandex/div/dsl/model/DivText.kt | 34 ++++- .../yandex/div/dsl/model/DivTextGradient.kt | 14 ++ .../com/yandex/div/dsl/model/DivTransform.kt | 90 ++++++++++++ .../com/yandex/div/dsl/model/DivVariable.kt | 5 +- .../div/dsl/model/DivVisibilityAction.kt | 10 +- .../div/dsl/model/DivWrapContentSize.kt | 2 +- .../yandex/div/dsl/model/IntegerVariable.kt | 2 +- .../yandex/div/dsl/model/NumberVariable.kt | 2 +- .../{StrVariable.kt => StringVariable.kt} | 32 ++--- .../com/yandex/div/dsl/model/UrlVariable.kt | 2 +- 97 files changed, 1468 insertions(+), 378 deletions(-) delete mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/ActionBase.kt rename json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/{BoolIntVariable.kt => BooleanVariable.kt} (62%) create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAbsoluteEdgeInsets.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBlendMode.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBlur.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCircleShape.kt rename json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/{DownloadCallbacks.kt => DivDownloadCallbacks.kt} (68%) rename json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/{DivHover.kt => DivFilter.kt} (82%) delete mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivHoverBackgroundColor.kt rename json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/{DivGradientBackground.kt => DivLinearGradient.kt} (63%) create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivNinePatchBackground.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivot.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivotFixed.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivotPercentage.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradient.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientCenter.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientFixedCenter.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRadius.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRelativeCenter.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRelativeRadius.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTextGradient.kt create mode 100644 json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTransform.kt rename json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/{StrVariable.kt => StringVariable.kt} (66%) diff --git a/api_generator/api_generator/generators/kotlin_dsl/generator.py b/api_generator/api_generator/generators/kotlin_dsl/generator.py index 4ce70f157..3d8f4b57f 100644 --- a/api_generator/api_generator/generators/kotlin_dsl/generator.py +++ b/api_generator/api_generator/generators/kotlin_dsl/generator.py @@ -68,7 +68,7 @@ class KotlinDSLGenerator(Generator): def __body_declaration(self, entity: KotlinDSLEntity) -> Text: result = Text() - if entity.enclosing_enumeration is not None: + if entity.enclosing_enumerations: static_type = entity.static_type if static_type is not None: result += EMPTY @@ -116,8 +116,8 @@ class KotlinDSLGenerator(Generator): result = Text() for annotation in self.kotlin_annotations: result += annotation - result += f'sealed class {entity_enumeration.enumeration_name}{entity_enumeration.supertype_declaration} {{' - result += ' abstract val type: String' + result += f'sealed interface {entity_enumeration.enumeration_name}{entity_enumeration.supertype_declaration} {{' + result += ' val type: String' result += '}' result += EMPTY if entity_enumeration.generate_case_for_templates: diff --git a/api_generator/api_generator/generators/kotlin_dsl/kotlin_dsl_entities.py b/api_generator/api_generator/generators/kotlin_dsl/kotlin_dsl_entities.py index b44c99cf2..a935c216a 100644 --- a/api_generator/api_generator/generators/kotlin_dsl/kotlin_dsl_entities.py +++ b/api_generator/api_generator/generators/kotlin_dsl/kotlin_dsl_entities.py @@ -83,9 +83,8 @@ class KotlinDSLEntity(Entity): @property def supertype_declaration(self) -> str: supertypes = [] - enumeration = self.enclosing_enumeration - if enumeration is not None: - supertypes.append(f'{utils.capitalize_camel_case(enumeration.name)}()') + for enumeration in self.enclosing_enumerations: + supertypes.append(f'{utils.capitalize_camel_case(enumeration.name)}') if self.root_entity: supertypes.append('Root') additional_supertypes = self.protocol_plus_super_entities @@ -377,7 +376,7 @@ class KotlinDSLEntityEnumeration(EntityEnumeration): result += f'private class {self.template_case_name} constructor(' result += ' @JsonProperty(\"type\") override val type: String,' result += ' @JsonIgnore val bindings: Array>' - result += f') : {self.enumeration_name}() {{' + result += f') : {self.enumeration_name} {{' result += EMPTY result += ' @JsonAnyGetter' result += ' fun properties(): Map {' @@ -389,7 +388,7 @@ class KotlinDSLEntityEnumeration(EntityEnumeration): result += ' type: String,' result += ' vararg bindings: PropertyOverriding<*>' result += f'): LiteralProperty<{self.enumeration_name}> {{' - result += f' return LiteralProperty{self.template_case_name}(type, bindings))' + result += f' return LiteralProperty({self.template_case_name}(type, bindings))' result += '}' result += EMPTY result += 'fun CardContext.template(' diff --git a/api_generator/api_generator/schema/modeling/entities.py b/api_generator/api_generator/schema/modeling/entities.py index 85ba3f5cb..c2bc2509c 100644 --- a/api_generator/api_generator/schema/modeling/entities.py +++ b/api_generator/api_generator/schema/modeling/entities.py @@ -278,8 +278,8 @@ class Entity(Declarable): return self._implemented_protocol @property - def enclosing_enumeration(self) -> Optional[EntityEnumeration]: - return self._enclosing_enumeration + def enclosing_enumerations(self) -> List[EntityEnumeration]: + return self._enclosing_enumerations @property def inner_types(self) -> List[Declarable]: @@ -344,15 +344,14 @@ class Entity(Declarable): None) if self._lang is GeneratedLanguage.KOTLIN_DSL: - self._enclosing_enumeration = None + self._enclosing_enumerations = list() for enumeration in global_objects: valid_enumeration = False if isinstance(enumeration, EntityEnumeration): valid_names = [self._name, self._resolved_name, self._original_name] valid_enumeration = any(ent[0] in valid_names for ent in enumeration.entities) if valid_enumeration: - self._enclosing_enumeration = enumeration - break + self._enclosing_enumerations.append(enumeration) def check_dependencies_resolved(self, location: ElementLocation, stack: List[Declarable]) -> None: if self in stack: diff --git a/api_generator/tests/references/kotlin_dsl/Entity.kt b/api_generator/tests/references/kotlin_dsl/Entity.kt index 9dda86da6..4deab18c3 100644 --- a/api_generator/tests/references/kotlin_dsl/Entity.kt +++ b/api_generator/tests/references/kotlin_dsl/Entity.kt @@ -9,6 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class Entity { - abstract val type: String +sealed interface Entity { + val type: String } diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithArray.kt b/api_generator/tests/references/kotlin_dsl/EntityWithArray.kt index f2442b2fc..84e710f42 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithArray.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithArray.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithArray internal constructor( @JsonIgnore val array: Property>?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_array" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfEnums.kt b/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfEnums.kt index 9fe79afdc..b03a4ef66 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfEnums.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfEnums.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithArrayOfEnums internal constructor( @JsonIgnore val items: Property>?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_array_of_enums" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfExpressions.kt b/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfExpressions.kt index cd844b922..dffaa0e1e 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfExpressions.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfExpressions.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithArrayOfExpressions internal constructor( @JsonIgnore val items: Property>?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_array_of_expressions" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfNestedItems.kt b/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfNestedItems.kt index a953a0e30..1314ec156 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfNestedItems.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithArrayOfNestedItems.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithArrayOfNestedItems internal constructor( @JsonIgnore val items: Property>?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_array_of_nested_items" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithArrayWithTransform.kt b/api_generator/tests/references/kotlin_dsl/EntityWithArrayWithTransform.kt index 459c68da2..4ea622445 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithArrayWithTransform.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithArrayWithTransform.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithArrayWithTransform internal constructor( @JsonIgnore val array: Property>?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_array_with_transform" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithComplexProperty.kt b/api_generator/tests/references/kotlin_dsl/EntityWithComplexProperty.kt index ef60851d4..82fa3155e 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithComplexProperty.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithComplexProperty.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithComplexProperty internal constructor( @JsonIgnore val property: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_complex_property" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithComplexPropertyWithDefaultValue.kt b/api_generator/tests/references/kotlin_dsl/EntityWithComplexPropertyWithDefaultValue.kt index 07460297e..74267c84f 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithComplexPropertyWithDefaultValue.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithComplexPropertyWithDefaultValue.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithComplexPropertyWithDefaultValue internal constructor( @JsonIgnore val property: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_complex_property_with_default_value" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithEntityProperty.kt b/api_generator/tests/references/kotlin_dsl/EntityWithEntityProperty.kt index 1e4f46ad6..3a60eeab5 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithEntityProperty.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithEntityProperty.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithEntityProperty internal constructor( @JsonIgnore val entity: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_entity_property" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithOptionalComplexProperty.kt b/api_generator/tests/references/kotlin_dsl/EntityWithOptionalComplexProperty.kt index 09f066a81..9f9e14297 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithOptionalComplexProperty.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithOptionalComplexProperty.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithOptionalComplexProperty internal constructor( @JsonIgnore val property: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_optional_complex_property" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithOptionalProperty.kt b/api_generator/tests/references/kotlin_dsl/EntityWithOptionalProperty.kt index cd2ef5c54..402ad4394 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithOptionalProperty.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithOptionalProperty.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithOptionalProperty internal constructor( @JsonIgnore val property: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_optional_property" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithOptionalStringEnumProperty.kt b/api_generator/tests/references/kotlin_dsl/EntityWithOptionalStringEnumProperty.kt index a07a0b3d0..9f12baae5 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithOptionalStringEnumProperty.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithOptionalStringEnumProperty.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithOptionalStringEnumProperty internal constructor( @JsonIgnore val property: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_optional_string_enum_property" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithPropertyWithDefaultValue.kt b/api_generator/tests/references/kotlin_dsl/EntityWithPropertyWithDefaultValue.kt index e8962f73d..8da5061fc 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithPropertyWithDefaultValue.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithPropertyWithDefaultValue.kt @@ -13,7 +13,7 @@ class EntityWithPropertyWithDefaultValue internal constructor( @JsonIgnore val int: Property?, @JsonIgnore val nested: Property?, @JsonIgnore val url: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_property_with_default_value" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithRequiredProperty.kt b/api_generator/tests/references/kotlin_dsl/EntityWithRequiredProperty.kt index d9d4e50bd..15f916b03 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithRequiredProperty.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithRequiredProperty.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithRequiredProperty internal constructor( @JsonIgnore val property: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_required_property" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithSimpleProperties.kt b/api_generator/tests/references/kotlin_dsl/EntityWithSimpleProperties.kt index 21c01bd85..be102afab 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithSimpleProperties.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithSimpleProperties.kt @@ -19,7 +19,7 @@ class EntityWithSimpleProperties internal constructor( @JsonIgnore val positiveInteger: Property?, @JsonIgnore val string: Property?, @JsonIgnore val url: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_simple_properties" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithStrictArray.kt b/api_generator/tests/references/kotlin_dsl/EntityWithStrictArray.kt index 5f3df4a61..d135e1eef 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithStrictArray.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithStrictArray.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithStrictArray internal constructor( @JsonIgnore val array: Property>?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_strict_array" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithStringArrayProperty.kt b/api_generator/tests/references/kotlin_dsl/EntityWithStringArrayProperty.kt index 13e66f5a9..5f2526c56 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithStringArrayProperty.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithStringArrayProperty.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithStringArrayProperty internal constructor( @JsonIgnore val array: Property>?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_string_array_property" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithStringEnumProperty.kt b/api_generator/tests/references/kotlin_dsl/EntityWithStringEnumProperty.kt index 9797c6195..497794c76 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithStringEnumProperty.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithStringEnumProperty.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithStringEnumProperty internal constructor( @JsonIgnore val property: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_string_enum_property" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithStringEnumPropertyWithDefaultValue.kt b/api_generator/tests/references/kotlin_dsl/EntityWithStringEnumPropertyWithDefaultValue.kt index 469d7cbd0..c5aa8722f 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithStringEnumPropertyWithDefaultValue.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithStringEnumPropertyWithDefaultValue.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class EntityWithStringEnumPropertyWithDefaultValue internal constructor( @JsonIgnore val value: Property?, -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_with_string_enum_property_with_default_value" diff --git a/api_generator/tests/references/kotlin_dsl/EntityWithoutProperties.kt b/api_generator/tests/references/kotlin_dsl/EntityWithoutProperties.kt index 29168b23a..2aff70548 100644 --- a/api_generator/tests/references/kotlin_dsl/EntityWithoutProperties.kt +++ b/api_generator/tests/references/kotlin_dsl/EntityWithoutProperties.kt @@ -10,7 +10,7 @@ import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* class EntityWithoutProperties internal constructor( -) : Entity() { +) : Entity { @JsonProperty("type") override val type = "entity_without_properties" } diff --git a/json-builder/kotlin/build.gradle b/json-builder/kotlin/build.gradle index a82cade48..1487d251a 100644 --- a/json-builder/kotlin/build.gradle +++ b/json-builder/kotlin/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20" } } @@ -19,13 +19,22 @@ sourceSets { } } +def versions = [ + jackson: "2.14.0", + jsonAssert: "1.5.1", + junit5: "5.9.1", + kotlin: "1.7.20" +] + dependencies { - implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10' - implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$versions.kotlin" + implementation "org.jetbrains.kotlin:kotlin-reflect:$versions.kotlin" - implementation 'com.fasterxml.jackson.core:jackson-annotations:2.13.2' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2' - implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.13.2' + implementation "com.fasterxml.jackson.core:jackson-annotations:$versions.jackson" + implementation "com.fasterxml.jackson.core:jackson-databind:$versions.jackson" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$versions.jackson" - testImplementation 'junit:junit:4.12' + testImplementation "org.junit.jupiter:junit-jupiter-api:$versions.junit5" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$versions.junit5" + testImplementation "org.skyscreamer:jsonassert:$versions.jsonAssert" } diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/ActionBase.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/ActionBase.kt deleted file mode 100644 index 66de6ed9d..000000000 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/ActionBase.kt +++ /dev/null @@ -1,102 +0,0 @@ -// Generated code. Do not modify. - -package com.yandex.div.dsl.model - -import java.net.URI -import com.fasterxml.jackson.annotation.* -import com.yandex.div.dsl.* -import com.yandex.div.dsl.context.* -import com.yandex.div.dsl.type.* -import com.yandex.div.dsl.util.* - -class ActionBase internal constructor( - @JsonIgnore val logId: Property?, - @JsonIgnore val payload: Property>?, - @JsonIgnore val referer: Property?, - @JsonIgnore val url: Property?, -) { - - @JsonAnyGetter - internal fun properties(): Map { - return propertyMapOf( - "log_id" to logId, - "payload" to payload, - "referer" to referer, - "url" to url, - ) - } -} - -fun TemplateContext.actionBase(): LiteralProperty { - return value(ActionBase( - logId = null, - payload = null, - referer = null, - url = null, - )) -} - -fun TemplateContext.actionBase( - logId: Property? = null, - payload: Property>? = null, - referer: Property? = null, - url: Property? = null, -): LiteralProperty { - return value(ActionBase( - logId = logId, - payload = payload, - referer = referer, - url = url, - )) -} - -fun TemplateContext.actionBase( - logId: String? = null, - payload: Map? = null, - referer: URI? = null, - url: URI? = null, -): LiteralProperty { - return value(ActionBase( - logId = optionalValue(logId), - payload = optionalValue(payload), - referer = optionalValue(referer), - url = optionalValue(url), - )) -} - -fun CardContext.actionBase(): ActionBase { - return ActionBase( - logId = null, - payload = null, - referer = null, - url = null, - ) -} - -fun CardContext.actionBase( - logId: ValueProperty? = null, - payload: ValueProperty>? = null, - referer: ValueProperty? = null, - url: ValueProperty? = null, -): ActionBase { - return ActionBase( - logId = logId, - payload = payload, - referer = referer, - url = url, - ) -} - -fun CardContext.actionBase( - logId: String? = null, - payload: Map? = null, - referer: URI? = null, - url: URI? = null, -): ActionBase { - return ActionBase( - logId = optionalValue(logId), - payload = optionalValue(payload), - referer = optionalValue(referer), - url = optionalValue(url), - ) -} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/BoolIntVariable.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/BooleanVariable.kt similarity index 62% rename from json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/BoolIntVariable.kt rename to json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/BooleanVariable.kt index 4b38f0ed9..8920697b6 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/BoolIntVariable.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/BooleanVariable.kt @@ -9,12 +9,12 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -class BoolIntVariable internal constructor( +class BooleanVariable internal constructor( @JsonIgnore val name: Property?, @JsonIgnore val value: Property?, -) : DivVariable() { +) : DivVariable { - @JsonProperty("type") override val type = "bool_int" + @JsonProperty("type") override val type = "boolean" @JsonAnyGetter internal fun properties(): Map { @@ -25,48 +25,48 @@ class BoolIntVariable internal constructor( } } -fun TemplateContext.boolIntVariable(): LiteralProperty { - return value(BoolIntVariable( +fun TemplateContext.booleanVariable(): LiteralProperty { + return value(BooleanVariable( name = null, value = null, )) } -fun TemplateContext.boolIntVariable( +fun TemplateContext.booleanVariable( name: Property? = null, value: Property? = null, -): LiteralProperty { - return value(BoolIntVariable( +): LiteralProperty { + return value(BooleanVariable( name = name, value = value, )) } -fun TemplateContext.boolIntVariable( +fun TemplateContext.booleanVariable( name: String? = null, value: BoolInt? = null, -): LiteralProperty { - return value(BoolIntVariable( +): LiteralProperty { + return value(BooleanVariable( name = optionalValue(name), value = optionalValue(value), )) } -fun CardContext.boolIntVariable( +fun CardContext.booleanVariable( name: ValueProperty, value: ValueProperty, -): BoolIntVariable { - return BoolIntVariable( +): BooleanVariable { + return BooleanVariable( name = name, value = value, ) } -fun CardContext.boolIntVariable( +fun CardContext.booleanVariable( name: String, value: BoolInt, -): BoolIntVariable { - return BoolIntVariable( +): BooleanVariable { + return BooleanVariable( name = value(name), value = value(value), ) diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/ColorVariable.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/ColorVariable.kt index cae009cba..4dee70890 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/ColorVariable.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/ColorVariable.kt @@ -12,7 +12,7 @@ import com.yandex.div.dsl.util.* class ColorVariable internal constructor( @JsonIgnore val name: Property?, @JsonIgnore val value: Property?, -) : DivVariable() { +) : DivVariable { @JsonProperty("type") override val type = "color" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/Div.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/Div.kt index 2dd501ec7..29c25b325 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/Div.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/Div.kt @@ -9,14 +9,14 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class Div { - abstract val type: String +sealed interface Div { + val type: String } private class TemplatedDiv constructor( @JsonProperty("type") override val type: String, @JsonIgnore val bindings: Array> -) : Div() { +) : Div { @JsonAnyGetter fun properties(): Map { diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAbsoluteEdgeInsets.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAbsoluteEdgeInsets.kt new file mode 100644 index 000000000..070a40772 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAbsoluteEdgeInsets.kt @@ -0,0 +1,102 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivAbsoluteEdgeInsets internal constructor( + @JsonIgnore val bottom: Property?, + @JsonIgnore val left: Property?, + @JsonIgnore val right: Property?, + @JsonIgnore val top: Property?, +) { + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "bottom" to bottom, + "left" to left, + "right" to right, + "top" to top, + ) + } +} + +fun TemplateContext.divAbsoluteEdgeInsets(): LiteralProperty { + return value(DivAbsoluteEdgeInsets( + bottom = null, + left = null, + right = null, + top = null, + )) +} + +fun TemplateContext.divAbsoluteEdgeInsets( + bottom: Property? = null, + left: Property? = null, + right: Property? = null, + top: Property? = null, +): LiteralProperty { + return value(DivAbsoluteEdgeInsets( + bottom = bottom, + left = left, + right = right, + top = top, + )) +} + +fun TemplateContext.divAbsoluteEdgeInsets( + bottom: Int? = null, + left: Int? = null, + right: Int? = null, + top: Int? = null, +): LiteralProperty { + return value(DivAbsoluteEdgeInsets( + bottom = optionalValue(bottom), + left = optionalValue(left), + right = optionalValue(right), + top = optionalValue(top), + )) +} + +fun CardContext.divAbsoluteEdgeInsets(): DivAbsoluteEdgeInsets { + return DivAbsoluteEdgeInsets( + bottom = null, + left = null, + right = null, + top = null, + ) +} + +fun CardContext.divAbsoluteEdgeInsets( + bottom: ValueProperty? = null, + left: ValueProperty? = null, + right: ValueProperty? = null, + top: ValueProperty? = null, +): DivAbsoluteEdgeInsets { + return DivAbsoluteEdgeInsets( + bottom = bottom, + left = left, + right = right, + top = top, + ) +} + +fun CardContext.divAbsoluteEdgeInsets( + bottom: Int? = null, + left: Int? = null, + right: Int? = null, + top: Int? = null, +): DivAbsoluteEdgeInsets { + return DivAbsoluteEdgeInsets( + bottom = optionalValue(bottom), + left = optionalValue(left), + right = optionalValue(right), + top = optionalValue(top), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAccessibility.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAccessibility.kt index e5bb6a6c9..52fe0e0eb 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAccessibility.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAccessibility.kt @@ -13,6 +13,7 @@ class DivAccessibility internal constructor( @JsonIgnore val description: Property?, @JsonIgnore val hint: Property?, @JsonIgnore val mode: Property?, + @JsonIgnore val muteAfterAction: Property?, @JsonIgnore val stateDescription: Property?, @JsonIgnore val type: Property?, ) { @@ -23,6 +24,7 @@ class DivAccessibility internal constructor( "description" to description, "hint" to hint, "mode" to mode, + "mute_after_action" to muteAfterAction, "state_description" to stateDescription, "type" to type, ) @@ -50,6 +52,7 @@ fun TemplateContext.divAccessibility(): LiteralProperty description = null, hint = null, mode = null, + muteAfterAction = null, stateDescription = null, type = null, )) @@ -59,6 +62,7 @@ fun TemplateContext.divAccessibility( description: Property? = null, hint: Property? = null, mode: Property? = null, + muteAfterAction: Property? = null, stateDescription: Property? = null, type: Property? = null, ): LiteralProperty { @@ -66,6 +70,7 @@ fun TemplateContext.divAccessibility( description = description, hint = hint, mode = mode, + muteAfterAction = muteAfterAction, stateDescription = stateDescription, type = type, )) @@ -75,6 +80,7 @@ fun TemplateContext.divAccessibility( description: String? = null, hint: String? = null, mode: DivAccessibility.Mode? = null, + muteAfterAction: BoolInt? = null, stateDescription: String? = null, type: DivAccessibility.Type? = null, ): LiteralProperty { @@ -82,6 +88,7 @@ fun TemplateContext.divAccessibility( description = optionalValue(description), hint = optionalValue(hint), mode = optionalValue(mode), + muteAfterAction = optionalValue(muteAfterAction), stateDescription = optionalValue(stateDescription), type = optionalValue(type), )) @@ -92,6 +99,7 @@ fun CardContext.divAccessibility(): DivAccessibility { description = null, hint = null, mode = null, + muteAfterAction = null, stateDescription = null, type = null, ) @@ -101,6 +109,7 @@ fun CardContext.divAccessibility( description: ValueProperty? = null, hint: ValueProperty? = null, mode: ValueProperty? = null, + muteAfterAction: ValueProperty? = null, stateDescription: ValueProperty? = null, type: ValueProperty? = null, ): DivAccessibility { @@ -108,6 +117,7 @@ fun CardContext.divAccessibility( description = description, hint = hint, mode = mode, + muteAfterAction = muteAfterAction, stateDescription = stateDescription, type = type, ) @@ -117,6 +127,7 @@ fun CardContext.divAccessibility( description: String? = null, hint: String? = null, mode: DivAccessibility.Mode? = null, + muteAfterAction: BoolInt? = null, stateDescription: String? = null, type: DivAccessibility.Type? = null, ): DivAccessibility { @@ -124,6 +135,7 @@ fun CardContext.divAccessibility( description = optionalValue(description), hint = optionalValue(hint), mode = optionalValue(mode), + muteAfterAction = optionalValue(muteAfterAction), stateDescription = optionalValue(stateDescription), type = optionalValue(type), ) diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAction.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAction.kt index d28343177..17a273f48 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAction.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAction.kt @@ -10,8 +10,7 @@ import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* class DivAction internal constructor( - @JsonIgnore val downloadCallbacks: Property?, - @JsonIgnore val hover: Property?, + @JsonIgnore val downloadCallbacks: Property?, @JsonIgnore val logId: Property?, @JsonIgnore val logUrl: Property?, @JsonIgnore val menuItems: Property>?, @@ -25,7 +24,6 @@ class DivAction internal constructor( internal fun properties(): Map { return propertyMapOf( "download_callbacks" to downloadCallbacks, - "hover" to hover, "log_id" to logId, "log_url" to logUrl, "menu_items" to menuItems, @@ -61,7 +59,6 @@ class DivAction internal constructor( fun TemplateContext.divAction(): LiteralProperty { return value(DivAction( downloadCallbacks = null, - hover = null, logId = null, logUrl = null, menuItems = null, @@ -74,8 +71,7 @@ fun TemplateContext.divAction(): LiteralProperty { fun TemplateContext.divAction( logId: Property? = null, - downloadCallbacks: Property? = null, - hover: Property? = null, + downloadCallbacks: Property? = null, logUrl: Property? = null, menuItems: Property>? = null, payload: Property>? = null, @@ -85,7 +81,6 @@ fun TemplateContext.divAction( ): LiteralProperty { return value(DivAction( downloadCallbacks = downloadCallbacks, - hover = hover, logId = logId, logUrl = logUrl, menuItems = menuItems, @@ -98,8 +93,7 @@ fun TemplateContext.divAction( fun TemplateContext.divAction( logId: String? = null, - downloadCallbacks: DownloadCallbacks? = null, - hover: DivHover? = null, + downloadCallbacks: DivDownloadCallbacks? = null, logUrl: URI? = null, menuItems: List? = null, payload: Map? = null, @@ -109,7 +103,6 @@ fun TemplateContext.divAction( ): LiteralProperty { return value(DivAction( downloadCallbacks = optionalValue(downloadCallbacks), - hover = optionalValue(hover), logId = optionalValue(logId), logUrl = optionalValue(logUrl), menuItems = optionalValue(menuItems), @@ -154,8 +147,7 @@ fun TemplateContext.menuItem( fun CardContext.divAction( logId: ValueProperty, - downloadCallbacks: ValueProperty? = null, - hover: ValueProperty? = null, + downloadCallbacks: ValueProperty? = null, logUrl: ValueProperty? = null, menuItems: ValueProperty>? = null, payload: ValueProperty>? = null, @@ -165,7 +157,6 @@ fun CardContext.divAction( ): DivAction { return DivAction( downloadCallbacks = downloadCallbacks, - hover = hover, logId = logId, logUrl = logUrl, menuItems = menuItems, @@ -178,8 +169,7 @@ fun CardContext.divAction( fun CardContext.divAction( logId: String, - downloadCallbacks: DownloadCallbacks? = null, - hover: DivHover? = null, + downloadCallbacks: DivDownloadCallbacks? = null, logUrl: URI? = null, menuItems: List? = null, payload: Map? = null, @@ -189,7 +179,6 @@ fun CardContext.divAction( ): DivAction { return DivAction( downloadCallbacks = optionalValue(downloadCallbacks), - hover = optionalValue(hover), logId = value(logId), logUrl = optionalValue(logUrl), menuItems = optionalValue(menuItems), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAlignmentVertical.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAlignmentVertical.kt index 709251405..5bde1212d 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAlignmentVertical.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAlignmentVertical.kt @@ -13,4 +13,5 @@ enum class DivAlignmentVertical(@JsonValue val value: String) { TOP("top"), CENTER("center"), BOTTOM("bottom"), + BASELINE("baseline"), } diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAppearanceSetTransition.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAppearanceSetTransition.kt index 691db73a7..2a8aa4ad8 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAppearanceSetTransition.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAppearanceSetTransition.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class DivAppearanceSetTransition internal constructor( @JsonIgnore val items: Property>?, -) : DivAppearanceTransition() { +) : DivAppearanceTransition { @JsonProperty("type") override val type = "set" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAppearanceTransition.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAppearanceTransition.kt index d8ee7deb9..5e1b48ff4 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAppearanceTransition.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivAppearanceTransition.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivAppearanceTransition { - abstract val type: String +sealed interface DivAppearanceTransition { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBackground.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBackground.kt index cae7fe556..4c0a7ceb9 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBackground.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBackground.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivBackground { - abstract val type: String +sealed interface DivBackground { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBase.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBase.kt index 8a641a4c4..52ac9bce8 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBase.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBase.kt @@ -26,6 +26,7 @@ interface DivBase { val rowSpan: Property? val selectedActions: Property>? val tooltips: Property>? + val transform: Property? val transitionChange: Property? val transitionIn: Property? val transitionOut: Property? diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBlendMode.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBlendMode.kt new file mode 100644 index 000000000..d68c9d27a --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBlendMode.kt @@ -0,0 +1,19 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +enum class DivBlendMode(@JsonValue val value: String) { + SOURCE_IN("source_in"), + SOURCE_ATOP("source_atop"), + DARKEN("darken"), + LIGHTEN("lighten"), + MULTIPLY("multiply"), + SCREEN("screen"), +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBlur.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBlur.kt new file mode 100644 index 000000000..238a688de --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivBlur.kt @@ -0,0 +1,62 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivBlur internal constructor( + @JsonIgnore val radius: Property?, +) : DivFilter { + + @JsonProperty("type") override val type = "blur" + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "radius" to radius, + ) + } +} + +fun TemplateContext.divBlur(): LiteralProperty { + return value(DivBlur( + radius = null, + )) +} + +fun TemplateContext.divBlur( + radius: Property? = null, +): LiteralProperty { + return value(DivBlur( + radius = radius, + )) +} + +fun TemplateContext.divBlur( + radius: Int? = null, +): LiteralProperty { + return value(DivBlur( + radius = optionalValue(radius), + )) +} + +fun CardContext.divBlur( + radius: ValueProperty, +): DivBlur { + return DivBlur( + radius = radius, + ) +} + +fun CardContext.divBlur( + radius: Int, +): DivBlur { + return DivBlur( + radius = value(radius), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeBoundsTransition.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeBoundsTransition.kt index ee8a0dee0..0f737385c 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeBoundsTransition.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeBoundsTransition.kt @@ -13,7 +13,7 @@ class DivChangeBoundsTransition internal constructor( @JsonIgnore override val duration: Property?, @JsonIgnore override val interpolator: Property?, @JsonIgnore override val startDelay: Property?, -) : DivChangeTransition(), DivTransitionBase { +) : DivChangeTransition, DivTransitionBase { @JsonProperty("type") override val type = "change_bounds" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeSetTransition.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeSetTransition.kt index 8d355e316..fafecf8c4 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeSetTransition.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeSetTransition.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class DivChangeSetTransition internal constructor( @JsonIgnore val items: Property>?, -) : DivChangeTransition() { +) : DivChangeTransition { @JsonProperty("type") override val type = "set" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeTransition.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeTransition.kt index c8b8653a5..b71495159 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeTransition.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivChangeTransition.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivChangeTransition { - abstract val type: String +sealed interface DivChangeTransition { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCircleShape.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCircleShape.kt new file mode 100644 index 000000000..30c249677 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCircleShape.kt @@ -0,0 +1,68 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivCircleShape internal constructor( + @JsonIgnore val radius: Property?, +) : DivShape { + + @JsonProperty("type") override val type = "circle" + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "radius" to radius, + ) + } +} + +fun TemplateContext.divCircleShape(): LiteralProperty { + return value(DivCircleShape( + radius = null, + )) +} + +fun TemplateContext.divCircleShape( + radius: Property? = null, +): LiteralProperty { + return value(DivCircleShape( + radius = radius, + )) +} + +fun TemplateContext.divCircleShape( + radius: DivFixedSize? = null, +): LiteralProperty { + return value(DivCircleShape( + radius = optionalValue(radius), + )) +} + +fun CardContext.divCircleShape(): DivCircleShape { + return DivCircleShape( + radius = null, + ) +} + +fun CardContext.divCircleShape( + radius: ValueProperty? = null, +): DivCircleShape { + return DivCircleShape( + radius = radius, + ) +} + +fun CardContext.divCircleShape( + radius: DivFixedSize? = null, +): DivCircleShape { + return DivCircleShape( + radius = optionalValue(radius), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivContainer.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivContainer.kt index e98e29a79..5dca30862 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivContainer.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivContainer.kt @@ -28,13 +28,17 @@ class DivContainer internal constructor( @JsonIgnore override val height: Property?, @JsonIgnore override val id: Property?, @JsonIgnore val items: Property>?, + @JsonIgnore val layoutMode: Property?, + @JsonIgnore val lineSeparator: Property?, @JsonIgnore val longtapActions: Property>?, @JsonIgnore override val margins: Property?, @JsonIgnore val orientation: Property?, @JsonIgnore override val paddings: Property?, @JsonIgnore override val rowSpan: Property?, @JsonIgnore override val selectedActions: Property>?, + @JsonIgnore val separator: Property?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -43,7 +47,7 @@ class DivContainer internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "container" @@ -68,13 +72,17 @@ class DivContainer internal constructor( "height" to height, "id" to id, "items" to items, + "layout_mode" to layoutMode, + "line_separator" to lineSeparator, "longtap_actions" to longtapActions, "margins" to margins, "orientation" to orientation, "paddings" to paddings, "row_span" to rowSpan, "selected_actions" to selectedActions, + "separator" to separator, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -86,11 +94,34 @@ class DivContainer internal constructor( ) } + enum class LayoutMode(@JsonValue val value: String) { + NO_WRAP("no_wrap"), + WRAP("wrap"), + } + enum class Orientation(@JsonValue val value: String) { VERTICAL("vertical"), HORIZONTAL("horizontal"), OVERLAP("overlap"), } + + class Separator internal constructor( + @JsonIgnore val showAtEnd: Property?, + @JsonIgnore val showAtStart: Property?, + @JsonIgnore val showBetween: Property?, + @JsonIgnore val style: Property?, + ) { + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "show_at_end" to showAtEnd, + "show_at_start" to showAtStart, + "show_between" to showBetween, + "style" to style, + ) + } + } } fun TemplateContext.divContainer(): LiteralProperty { @@ -113,13 +144,17 @@ fun TemplateContext.divContainer(): LiteralProperty { height = null, id = null, items = null, + layoutMode = null, + lineSeparator = null, longtapActions = null, margins = null, orientation = null, paddings = null, rowSpan = null, selectedActions = null, + separator = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -150,13 +185,17 @@ fun TemplateContext.divContainer( focus: Property? = null, height: Property? = null, id: Property? = null, + layoutMode: Property? = null, + lineSeparator: Property? = null, longtapActions: Property>? = null, margins: Property? = null, orientation: Property? = null, paddings: Property? = null, rowSpan: Property? = null, selectedActions: Property>? = null, + separator: Property? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -185,13 +224,17 @@ fun TemplateContext.divContainer( height = height, id = id, items = items, + layoutMode = layoutMode, + lineSeparator = lineSeparator, longtapActions = longtapActions, margins = margins, orientation = orientation, paddings = paddings, rowSpan = rowSpan, selectedActions = selectedActions, + separator = separator, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -222,13 +265,17 @@ fun TemplateContext.divContainer( focus: DivFocus? = null, height: DivSize? = null, id: String? = null, + layoutMode: DivContainer.LayoutMode? = null, + lineSeparator: DivContainer.Separator? = null, longtapActions: List? = null, margins: DivEdgeInsets? = null, orientation: DivContainer.Orientation? = null, paddings: DivEdgeInsets? = null, rowSpan: Int? = null, selectedActions: List? = null, + separator: DivContainer.Separator? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -257,13 +304,17 @@ fun TemplateContext.divContainer( height = optionalValue(height), id = optionalValue(id), items = optionalValue(items), + layoutMode = optionalValue(layoutMode), + lineSeparator = optionalValue(lineSeparator), longtapActions = optionalValue(longtapActions), margins = optionalValue(margins), orientation = optionalValue(orientation), paddings = optionalValue(paddings), rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), + separator = optionalValue(separator), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -275,6 +326,43 @@ fun TemplateContext.divContainer( )) } +fun TemplateContext.separator(): LiteralProperty { + return value(DivContainer.Separator( + showAtEnd = null, + showAtStart = null, + showBetween = null, + style = null, + )) +} + +fun TemplateContext.separator( + style: Property? = null, + showAtEnd: Property? = null, + showAtStart: Property? = null, + showBetween: Property? = null, +): LiteralProperty { + return value(DivContainer.Separator( + showAtEnd = showAtEnd, + showAtStart = showAtStart, + showBetween = showBetween, + style = style, + )) +} + +fun TemplateContext.separator( + style: DivDrawable? = null, + showAtEnd: BoolInt? = null, + showAtStart: BoolInt? = null, + showBetween: BoolInt? = null, +): LiteralProperty { + return value(DivContainer.Separator( + showAtEnd = optionalValue(showAtEnd), + showAtStart = optionalValue(showAtStart), + showBetween = optionalValue(showBetween), + style = optionalValue(style), + )) +} + fun CardContext.divContainer( items: ValueProperty>, accessibility: ValueProperty? = null, @@ -294,13 +382,17 @@ fun CardContext.divContainer( focus: ValueProperty? = null, height: ValueProperty? = null, id: ValueProperty? = null, + layoutMode: ValueProperty? = null, + lineSeparator: ValueProperty? = null, longtapActions: ValueProperty>? = null, margins: ValueProperty? = null, orientation: ValueProperty? = null, paddings: ValueProperty? = null, rowSpan: ValueProperty? = null, selectedActions: ValueProperty>? = null, + separator: ValueProperty? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -329,13 +421,17 @@ fun CardContext.divContainer( height = height, id = id, items = items, + layoutMode = layoutMode, + lineSeparator = lineSeparator, longtapActions = longtapActions, margins = margins, orientation = orientation, paddings = paddings, rowSpan = rowSpan, selectedActions = selectedActions, + separator = separator, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -366,13 +462,17 @@ fun CardContext.divContainer( focus: DivFocus? = null, height: DivSize? = null, id: String? = null, + layoutMode: DivContainer.LayoutMode? = null, + lineSeparator: DivContainer.Separator? = null, longtapActions: List? = null, margins: DivEdgeInsets? = null, orientation: DivContainer.Orientation? = null, paddings: DivEdgeInsets? = null, rowSpan: Int? = null, selectedActions: List? = null, + separator: DivContainer.Separator? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -401,13 +501,17 @@ fun CardContext.divContainer( height = optionalValue(height), id = optionalValue(id), items = value(items), + layoutMode = optionalValue(layoutMode), + lineSeparator = optionalValue(lineSeparator), longtapActions = optionalValue(longtapActions), margins = optionalValue(margins), orientation = optionalValue(orientation), paddings = optionalValue(paddings), rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), + separator = optionalValue(separator), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -418,3 +522,31 @@ fun CardContext.divContainer( width = optionalValue(width), ) } + +fun CardContext.separator( + style: ValueProperty, + showAtEnd: ValueProperty? = null, + showAtStart: ValueProperty? = null, + showBetween: ValueProperty? = null, +): DivContainer.Separator { + return DivContainer.Separator( + showAtEnd = showAtEnd, + showAtStart = showAtStart, + showBetween = showBetween, + style = style, + ) +} + +fun CardContext.separator( + style: DivDrawable, + showAtEnd: BoolInt? = null, + showAtStart: BoolInt? = null, + showBetween: BoolInt? = null, +): DivContainer.Separator { + return DivContainer.Separator( + showAtEnd = optionalValue(showAtEnd), + showAtStart = optionalValue(showAtStart), + showBetween = optionalValue(showBetween), + style = value(style), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCount.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCount.kt index 4e78fc427..fa3094331 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCount.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCount.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivCount { - abstract val type: String +sealed interface DivCount { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCustom.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCustom.kt index 38b22f249..5694a1fb5 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCustom.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivCustom.kt @@ -29,6 +29,7 @@ class DivCustom internal constructor( @JsonIgnore override val rowSpan: Property?, @JsonIgnore override val selectedActions: Property>?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -37,7 +38,7 @@ class DivCustom internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "custom" @@ -63,6 +64,7 @@ class DivCustom internal constructor( "row_span" to rowSpan, "selected_actions" to selectedActions, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -96,6 +98,7 @@ fun TemplateContext.divCustom(): LiteralProperty { rowSpan = null, selectedActions = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -127,6 +130,7 @@ fun TemplateContext.divCustom( rowSpan: Property? = null, selectedActions: Property>? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -156,6 +160,7 @@ fun TemplateContext.divCustom( rowSpan = rowSpan, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -187,6 +192,7 @@ fun TemplateContext.divCustom( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -216,6 +222,7 @@ fun TemplateContext.divCustom( rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -247,6 +254,7 @@ fun CardContext.divCustom( rowSpan: ValueProperty? = null, selectedActions: ValueProperty>? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -276,6 +284,7 @@ fun CardContext.divCustom( rowSpan = rowSpan, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -307,6 +316,7 @@ fun CardContext.divCustom( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -336,6 +346,7 @@ fun CardContext.divCustom( rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DownloadCallbacks.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivDownloadCallbacks.kt similarity index 68% rename from json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DownloadCallbacks.kt rename to json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivDownloadCallbacks.kt index 3a6d009cc..08ca4d146 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DownloadCallbacks.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivDownloadCallbacks.kt @@ -9,7 +9,7 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -class DownloadCallbacks internal constructor( +class DivDownloadCallbacks internal constructor( @JsonIgnore val onFailActions: Property>?, @JsonIgnore val onSuccessActions: Property>?, ) { @@ -23,55 +23,55 @@ class DownloadCallbacks internal constructor( } } -fun TemplateContext.downloadCallbacks(): LiteralProperty { - return value(DownloadCallbacks( +fun TemplateContext.divDownloadCallbacks(): LiteralProperty { + return value(DivDownloadCallbacks( onFailActions = null, onSuccessActions = null, )) } -fun TemplateContext.downloadCallbacks( +fun TemplateContext.divDownloadCallbacks( onFailActions: Property>? = null, onSuccessActions: Property>? = null, -): LiteralProperty { - return value(DownloadCallbacks( +): LiteralProperty { + return value(DivDownloadCallbacks( onFailActions = onFailActions, onSuccessActions = onSuccessActions, )) } -fun TemplateContext.downloadCallbacks( +fun TemplateContext.divDownloadCallbacks( onFailActions: List? = null, onSuccessActions: List? = null, -): LiteralProperty { - return value(DownloadCallbacks( +): LiteralProperty { + return value(DivDownloadCallbacks( onFailActions = optionalValue(onFailActions), onSuccessActions = optionalValue(onSuccessActions), )) } -fun CardContext.downloadCallbacks(): DownloadCallbacks { - return DownloadCallbacks( +fun CardContext.divDownloadCallbacks(): DivDownloadCallbacks { + return DivDownloadCallbacks( onFailActions = null, onSuccessActions = null, ) } -fun CardContext.downloadCallbacks( +fun CardContext.divDownloadCallbacks( onFailActions: ValueProperty>? = null, onSuccessActions: ValueProperty>? = null, -): DownloadCallbacks { - return DownloadCallbacks( +): DivDownloadCallbacks { + return DivDownloadCallbacks( onFailActions = onFailActions, onSuccessActions = onSuccessActions, ) } -fun CardContext.downloadCallbacks( +fun CardContext.divDownloadCallbacks( onFailActions: List? = null, onSuccessActions: List? = null, -): DownloadCallbacks { - return DownloadCallbacks( +): DivDownloadCallbacks { + return DivDownloadCallbacks( onFailActions = optionalValue(onFailActions), onSuccessActions = optionalValue(onSuccessActions), ) diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivDrawable.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivDrawable.kt index 203b23088..4cf10b530 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivDrawable.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivDrawable.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivDrawable { - abstract val type: String +sealed interface DivDrawable { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFadeTransition.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFadeTransition.kt index 46622744c..8f7f69e85 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFadeTransition.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFadeTransition.kt @@ -14,7 +14,7 @@ class DivFadeTransition internal constructor( @JsonIgnore override val duration: Property?, @JsonIgnore override val interpolator: Property?, @JsonIgnore override val startDelay: Property?, -) : DivAppearanceTransition(), DivTransitionBase { +) : DivAppearanceTransition, DivTransitionBase { @JsonProperty("type") override val type = "fade" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivHover.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFilter.kt similarity index 82% rename from json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivHover.kt rename to json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFilter.kt index 27ca825a5..8a06997a9 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivHover.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFilter.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivHover { - abstract val type: String +sealed interface DivFilter { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFixedCount.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFixedCount.kt index e7780c83a..6288d5e38 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFixedCount.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFixedCount.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class DivFixedCount internal constructor( @JsonIgnore val value: Property?, -) : DivCount() { +) : DivCount { @JsonProperty("type") override val type = "fixed" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFixedSize.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFixedSize.kt index 92a130b70..2ee35f42d 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFixedSize.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivFixedSize.kt @@ -12,7 +12,7 @@ import com.yandex.div.dsl.util.* class DivFixedSize internal constructor( @JsonIgnore val unit: Property?, @JsonIgnore val value: Property?, -) : DivSize() { +) : DivSize, DivRadialGradientRadius { @JsonProperty("type") override val type = "fixed" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGallery.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGallery.kt index e54b317dc..dd937d29f 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGallery.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGallery.kt @@ -19,6 +19,7 @@ class DivGallery internal constructor( @JsonIgnore val columnCount: Property?, @JsonIgnore override val columnSpan: Property?, @JsonIgnore val crossContentAlignment: Property?, + @JsonIgnore val crossSpacing: Property?, @JsonIgnore val defaultItem: Property?, @JsonIgnore override val extensions: Property>?, @JsonIgnore override val focus: Property?, @@ -34,6 +35,7 @@ class DivGallery internal constructor( @JsonIgnore val scrollMode: Property?, @JsonIgnore override val selectedActions: Property>?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -42,7 +44,7 @@ class DivGallery internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "gallery" @@ -58,6 +60,7 @@ class DivGallery internal constructor( "column_count" to columnCount, "column_span" to columnSpan, "cross_content_alignment" to crossContentAlignment, + "cross_spacing" to crossSpacing, "default_item" to defaultItem, "extensions" to extensions, "focus" to focus, @@ -73,6 +76,7 @@ class DivGallery internal constructor( "scroll_mode" to scrollMode, "selected_actions" to selectedActions, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -112,6 +116,7 @@ fun TemplateContext.divGallery(): LiteralProperty { columnCount = null, columnSpan = null, crossContentAlignment = null, + crossSpacing = null, defaultItem = null, extensions = null, focus = null, @@ -127,6 +132,7 @@ fun TemplateContext.divGallery(): LiteralProperty { scrollMode = null, selectedActions = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -149,6 +155,7 @@ fun TemplateContext.divGallery( columnCount: Property? = null, columnSpan: Property? = null, crossContentAlignment: Property? = null, + crossSpacing: Property? = null, defaultItem: Property? = null, extensions: Property>? = null, focus: Property? = null, @@ -163,6 +170,7 @@ fun TemplateContext.divGallery( scrollMode: Property? = null, selectedActions: Property>? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -182,6 +190,7 @@ fun TemplateContext.divGallery( columnCount = columnCount, columnSpan = columnSpan, crossContentAlignment = crossContentAlignment, + crossSpacing = crossSpacing, defaultItem = defaultItem, extensions = extensions, focus = focus, @@ -197,6 +206,7 @@ fun TemplateContext.divGallery( scrollMode = scrollMode, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -219,6 +229,7 @@ fun TemplateContext.divGallery( columnCount: Int? = null, columnSpan: Int? = null, crossContentAlignment: DivGallery.CrossContentAlignment? = null, + crossSpacing: Int? = null, defaultItem: Int? = null, extensions: List? = null, focus: DivFocus? = null, @@ -233,6 +244,7 @@ fun TemplateContext.divGallery( scrollMode: DivGallery.ScrollMode? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -252,6 +264,7 @@ fun TemplateContext.divGallery( columnCount = optionalValue(columnCount), columnSpan = optionalValue(columnSpan), crossContentAlignment = optionalValue(crossContentAlignment), + crossSpacing = optionalValue(crossSpacing), defaultItem = optionalValue(defaultItem), extensions = optionalValue(extensions), focus = optionalValue(focus), @@ -267,6 +280,7 @@ fun TemplateContext.divGallery( scrollMode = optionalValue(scrollMode), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -289,6 +303,7 @@ fun CardContext.divGallery( columnCount: ValueProperty? = null, columnSpan: ValueProperty? = null, crossContentAlignment: ValueProperty? = null, + crossSpacing: ValueProperty? = null, defaultItem: ValueProperty? = null, extensions: ValueProperty>? = null, focus: ValueProperty? = null, @@ -303,6 +318,7 @@ fun CardContext.divGallery( scrollMode: ValueProperty? = null, selectedActions: ValueProperty>? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -322,6 +338,7 @@ fun CardContext.divGallery( columnCount = columnCount, columnSpan = columnSpan, crossContentAlignment = crossContentAlignment, + crossSpacing = crossSpacing, defaultItem = defaultItem, extensions = extensions, focus = focus, @@ -337,6 +354,7 @@ fun CardContext.divGallery( scrollMode = scrollMode, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -359,6 +377,7 @@ fun CardContext.divGallery( columnCount: Int? = null, columnSpan: Int? = null, crossContentAlignment: DivGallery.CrossContentAlignment? = null, + crossSpacing: Int? = null, defaultItem: Int? = null, extensions: List? = null, focus: DivFocus? = null, @@ -373,6 +392,7 @@ fun CardContext.divGallery( scrollMode: DivGallery.ScrollMode? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -392,6 +412,7 @@ fun CardContext.divGallery( columnCount = optionalValue(columnCount), columnSpan = optionalValue(columnSpan), crossContentAlignment = optionalValue(crossContentAlignment), + crossSpacing = optionalValue(crossSpacing), defaultItem = optionalValue(defaultItem), extensions = optionalValue(extensions), focus = optionalValue(focus), @@ -407,6 +428,7 @@ fun CardContext.divGallery( scrollMode = optionalValue(scrollMode), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGifImage.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGifImage.kt index 2b3586070..2ee1e17b2 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGifImage.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGifImage.kt @@ -39,6 +39,7 @@ class DivGifImage internal constructor( @JsonIgnore val scale: Property?, @JsonIgnore override val selectedActions: Property>?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -47,7 +48,7 @@ class DivGifImage internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "gif" @@ -83,6 +84,7 @@ class DivGifImage internal constructor( "scale" to scale, "selected_actions" to selectedActions, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -126,6 +128,7 @@ fun TemplateContext.divGifImage(): LiteralProperty { scale = null, selectedActions = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -167,6 +170,7 @@ fun TemplateContext.divGifImage( scale: Property? = null, selectedActions: Property>? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -206,6 +210,7 @@ fun TemplateContext.divGifImage( scale = scale, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -247,6 +252,7 @@ fun TemplateContext.divGifImage( scale: DivImageScale? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -286,6 +292,7 @@ fun TemplateContext.divGifImage( scale = optionalValue(scale), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -327,6 +334,7 @@ fun CardContext.divGifImage( scale: ValueProperty? = null, selectedActions: ValueProperty>? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -366,6 +374,7 @@ fun CardContext.divGifImage( scale = scale, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -407,6 +416,7 @@ fun CardContext.divGifImage( scale: DivImageScale? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -446,6 +456,7 @@ fun CardContext.divGifImage( scale = optionalValue(scale), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGrid.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGrid.kt index a1acbc709..336f7872d 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGrid.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGrid.kt @@ -35,6 +35,7 @@ class DivGrid internal constructor( @JsonIgnore override val rowSpan: Property?, @JsonIgnore override val selectedActions: Property>?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -43,7 +44,7 @@ class DivGrid internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "grid" @@ -75,6 +76,7 @@ class DivGrid internal constructor( "row_span" to rowSpan, "selected_actions" to selectedActions, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -114,6 +116,7 @@ fun TemplateContext.divGrid(): LiteralProperty { rowSpan = null, selectedActions = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -151,6 +154,7 @@ fun TemplateContext.divGrid( rowSpan: Property? = null, selectedActions: Property>? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -186,6 +190,7 @@ fun TemplateContext.divGrid( rowSpan = rowSpan, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -223,6 +228,7 @@ fun TemplateContext.divGrid( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -258,6 +264,7 @@ fun TemplateContext.divGrid( rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -295,6 +302,7 @@ fun CardContext.divGrid( rowSpan: ValueProperty? = null, selectedActions: ValueProperty>? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -330,6 +338,7 @@ fun CardContext.divGrid( rowSpan = rowSpan, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -367,6 +376,7 @@ fun CardContext.divGrid( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -402,6 +412,7 @@ fun CardContext.divGrid( rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivHoverBackgroundColor.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivHoverBackgroundColor.kt deleted file mode 100644 index 04bd382aa..000000000 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivHoverBackgroundColor.kt +++ /dev/null @@ -1,62 +0,0 @@ -// Generated code. Do not modify. - -package com.yandex.div.dsl.model - -import java.net.URI -import com.fasterxml.jackson.annotation.* -import com.yandex.div.dsl.* -import com.yandex.div.dsl.context.* -import com.yandex.div.dsl.type.* -import com.yandex.div.dsl.util.* - -class DivHoverBackgroundColor internal constructor( - @JsonIgnore val color: Property?, -) : DivHover() { - - @JsonProperty("type") override val type = "background-color" - - @JsonAnyGetter - internal fun properties(): Map { - return propertyMapOf( - "color" to color, - ) - } -} - -fun TemplateContext.divHoverBackgroundColor(): LiteralProperty { - return value(DivHoverBackgroundColor( - color = null, - )) -} - -fun TemplateContext.divHoverBackgroundColor( - color: Property? = null, -): LiteralProperty { - return value(DivHoverBackgroundColor( - color = color, - )) -} - -fun TemplateContext.divHoverBackgroundColor( - color: Color? = null, -): LiteralProperty { - return value(DivHoverBackgroundColor( - color = optionalValue(color), - )) -} - -fun CardContext.divHoverBackgroundColor( - color: ValueProperty, -): DivHoverBackgroundColor { - return DivHoverBackgroundColor( - color = color, - ) -} - -fun CardContext.divHoverBackgroundColor( - color: Color, -): DivHoverBackgroundColor { - return DivHoverBackgroundColor( - color = value(color), - ) -} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivImage.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivImage.kt index 589ff5252..4d20e48b6 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivImage.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivImage.kt @@ -26,6 +26,7 @@ class DivImage internal constructor( @JsonIgnore val contentAlignmentVertical: Property?, @JsonIgnore val doubletapActions: Property>?, @JsonIgnore override val extensions: Property>?, + @JsonIgnore val filters: Property>?, @JsonIgnore override val focus: Property?, @JsonIgnore override val height: Property?, @JsonIgnore val highPriorityPreviewShow: Property?, @@ -41,7 +42,9 @@ class DivImage internal constructor( @JsonIgnore val scale: Property?, @JsonIgnore override val selectedActions: Property>?, @JsonIgnore val tintColor: Property?, + @JsonIgnore val tintMode: Property?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -50,7 +53,7 @@ class DivImage internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "image" @@ -73,6 +76,7 @@ class DivImage internal constructor( "content_alignment_vertical" to contentAlignmentVertical, "doubletap_actions" to doubletapActions, "extensions" to extensions, + "filters" to filters, "focus" to focus, "height" to height, "high_priority_preview_show" to highPriorityPreviewShow, @@ -88,7 +92,9 @@ class DivImage internal constructor( "scale" to scale, "selected_actions" to selectedActions, "tint_color" to tintColor, + "tint_mode" to tintMode, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -119,6 +125,7 @@ fun TemplateContext.divImage(): LiteralProperty { contentAlignmentVertical = null, doubletapActions = null, extensions = null, + filters = null, focus = null, height = null, highPriorityPreviewShow = null, @@ -134,7 +141,9 @@ fun TemplateContext.divImage(): LiteralProperty { scale = null, selectedActions = null, tintColor = null, + tintMode = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -164,6 +173,7 @@ fun TemplateContext.divImage( contentAlignmentVertical: Property? = null, doubletapActions: Property>? = null, extensions: Property>? = null, + filters: Property>? = null, focus: Property? = null, height: Property? = null, highPriorityPreviewShow: Property? = null, @@ -178,7 +188,9 @@ fun TemplateContext.divImage( scale: Property? = null, selectedActions: Property>? = null, tintColor: Property? = null, + tintMode: Property? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -205,6 +217,7 @@ fun TemplateContext.divImage( contentAlignmentVertical = contentAlignmentVertical, doubletapActions = doubletapActions, extensions = extensions, + filters = filters, focus = focus, height = height, highPriorityPreviewShow = highPriorityPreviewShow, @@ -220,7 +233,9 @@ fun TemplateContext.divImage( scale = scale, selectedActions = selectedActions, tintColor = tintColor, + tintMode = tintMode, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -250,6 +265,7 @@ fun TemplateContext.divImage( contentAlignmentVertical: DivAlignmentVertical? = null, doubletapActions: List? = null, extensions: List? = null, + filters: List? = null, focus: DivFocus? = null, height: DivSize? = null, highPriorityPreviewShow: BoolInt? = null, @@ -264,7 +280,9 @@ fun TemplateContext.divImage( scale: DivImageScale? = null, selectedActions: List? = null, tintColor: Color? = null, + tintMode: DivBlendMode? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -291,6 +309,7 @@ fun TemplateContext.divImage( contentAlignmentVertical = optionalValue(contentAlignmentVertical), doubletapActions = optionalValue(doubletapActions), extensions = optionalValue(extensions), + filters = optionalValue(filters), focus = optionalValue(focus), height = optionalValue(height), highPriorityPreviewShow = optionalValue(highPriorityPreviewShow), @@ -306,7 +325,9 @@ fun TemplateContext.divImage( scale = optionalValue(scale), selectedActions = optionalValue(selectedActions), tintColor = optionalValue(tintColor), + tintMode = optionalValue(tintMode), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -336,6 +357,7 @@ fun CardContext.divImage( contentAlignmentVertical: ValueProperty? = null, doubletapActions: ValueProperty>? = null, extensions: ValueProperty>? = null, + filters: ValueProperty>? = null, focus: ValueProperty? = null, height: ValueProperty? = null, highPriorityPreviewShow: ValueProperty? = null, @@ -350,7 +372,9 @@ fun CardContext.divImage( scale: ValueProperty? = null, selectedActions: ValueProperty>? = null, tintColor: ValueProperty? = null, + tintMode: ValueProperty? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -377,6 +401,7 @@ fun CardContext.divImage( contentAlignmentVertical = contentAlignmentVertical, doubletapActions = doubletapActions, extensions = extensions, + filters = filters, focus = focus, height = height, highPriorityPreviewShow = highPriorityPreviewShow, @@ -392,7 +417,9 @@ fun CardContext.divImage( scale = scale, selectedActions = selectedActions, tintColor = tintColor, + tintMode = tintMode, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -422,6 +449,7 @@ fun CardContext.divImage( contentAlignmentVertical: DivAlignmentVertical? = null, doubletapActions: List? = null, extensions: List? = null, + filters: List? = null, focus: DivFocus? = null, height: DivSize? = null, highPriorityPreviewShow: BoolInt? = null, @@ -436,7 +464,9 @@ fun CardContext.divImage( scale: DivImageScale? = null, selectedActions: List? = null, tintColor: Color? = null, + tintMode: DivBlendMode? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -463,6 +493,7 @@ fun CardContext.divImage( contentAlignmentVertical = optionalValue(contentAlignmentVertical), doubletapActions = optionalValue(doubletapActions), extensions = optionalValue(extensions), + filters = optionalValue(filters), focus = optionalValue(focus), height = optionalValue(height), highPriorityPreviewShow = optionalValue(highPriorityPreviewShow), @@ -478,7 +509,9 @@ fun CardContext.divImage( scale = optionalValue(scale), selectedActions = optionalValue(selectedActions), tintColor = optionalValue(tintColor), + tintMode = optionalValue(tintMode), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivImageBackground.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivImageBackground.kt index 029806131..ef4225734 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivImageBackground.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivImageBackground.kt @@ -13,10 +13,11 @@ class DivImageBackground internal constructor( @JsonIgnore val alpha: Property?, @JsonIgnore val contentAlignmentHorizontal: Property?, @JsonIgnore val contentAlignmentVertical: Property?, + @JsonIgnore val filters: Property>?, @JsonIgnore val imageUrl: Property?, @JsonIgnore val preloadRequired: Property?, @JsonIgnore val scale: Property?, -) : DivBackground() { +) : DivBackground { @JsonProperty("type") override val type = "image" @@ -26,6 +27,7 @@ class DivImageBackground internal constructor( "alpha" to alpha, "content_alignment_horizontal" to contentAlignmentHorizontal, "content_alignment_vertical" to contentAlignmentVertical, + "filters" to filters, "image_url" to imageUrl, "preload_required" to preloadRequired, "scale" to scale, @@ -38,6 +40,7 @@ fun TemplateContext.divImageBackground(): LiteralProperty TemplateContext.divImageBackground( alpha: Property? = null, contentAlignmentHorizontal: Property? = null, contentAlignmentVertical: Property? = null, + filters: Property>? = null, preloadRequired: Property? = null, scale: Property? = null, ): LiteralProperty { @@ -56,6 +60,7 @@ fun TemplateContext.divImageBackground( alpha = alpha, contentAlignmentHorizontal = contentAlignmentHorizontal, contentAlignmentVertical = contentAlignmentVertical, + filters = filters, imageUrl = imageUrl, preloadRequired = preloadRequired, scale = scale, @@ -67,6 +72,7 @@ fun TemplateContext.divImageBackground( alpha: Double? = null, contentAlignmentHorizontal: DivAlignmentHorizontal? = null, contentAlignmentVertical: DivAlignmentVertical? = null, + filters: List? = null, preloadRequired: BoolInt? = null, scale: DivImageScale? = null, ): LiteralProperty { @@ -74,6 +80,7 @@ fun TemplateContext.divImageBackground( alpha = optionalValue(alpha), contentAlignmentHorizontal = optionalValue(contentAlignmentHorizontal), contentAlignmentVertical = optionalValue(contentAlignmentVertical), + filters = optionalValue(filters), imageUrl = optionalValue(imageUrl), preloadRequired = optionalValue(preloadRequired), scale = optionalValue(scale), @@ -85,6 +92,7 @@ fun CardContext.divImageBackground( alpha: ValueProperty? = null, contentAlignmentHorizontal: ValueProperty? = null, contentAlignmentVertical: ValueProperty? = null, + filters: ValueProperty>? = null, preloadRequired: ValueProperty? = null, scale: ValueProperty? = null, ): DivImageBackground { @@ -92,6 +100,7 @@ fun CardContext.divImageBackground( alpha = alpha, contentAlignmentHorizontal = contentAlignmentHorizontal, contentAlignmentVertical = contentAlignmentVertical, + filters = filters, imageUrl = imageUrl, preloadRequired = preloadRequired, scale = scale, @@ -103,6 +112,7 @@ fun CardContext.divImageBackground( alpha: Double? = null, contentAlignmentHorizontal: DivAlignmentHorizontal? = null, contentAlignmentVertical: DivAlignmentVertical? = null, + filters: List? = null, preloadRequired: BoolInt? = null, scale: DivImageScale? = null, ): DivImageBackground { @@ -110,6 +120,7 @@ fun CardContext.divImageBackground( alpha = optionalValue(alpha), contentAlignmentHorizontal = optionalValue(contentAlignmentHorizontal), contentAlignmentVertical = optionalValue(contentAlignmentVertical), + filters = optionalValue(filters), imageUrl = value(imageUrl), preloadRequired = optionalValue(preloadRequired), scale = optionalValue(scale), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivIndicator.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivIndicator.kt index 71396bc2b..63bcafc9b 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivIndicator.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivIndicator.kt @@ -34,6 +34,7 @@ class DivIndicator internal constructor( @JsonIgnore val shape: Property?, @JsonIgnore val spaceBetweenCenters: Property?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -42,7 +43,7 @@ class DivIndicator internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "indicator" @@ -73,6 +74,7 @@ class DivIndicator internal constructor( "shape" to shape, "space_between_centers" to spaceBetweenCenters, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -117,6 +119,7 @@ fun TemplateContext.divIndicator(): LiteralProperty { shape = null, spaceBetweenCenters = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -153,6 +156,7 @@ fun TemplateContext.divIndicator( shape: Property? = null, spaceBetweenCenters: Property? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -187,6 +191,7 @@ fun TemplateContext.divIndicator( shape = shape, spaceBetweenCenters = spaceBetweenCenters, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -223,6 +228,7 @@ fun TemplateContext.divIndicator( shape: DivShape? = null, spaceBetweenCenters: DivFixedSize? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -257,6 +263,7 @@ fun TemplateContext.divIndicator( shape = optionalValue(shape), spaceBetweenCenters = optionalValue(spaceBetweenCenters), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -294,6 +301,7 @@ fun CardContext.divIndicator(): DivIndicator { shape = null, spaceBetweenCenters = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -330,6 +338,7 @@ fun CardContext.divIndicator( shape: ValueProperty? = null, spaceBetweenCenters: ValueProperty? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -364,6 +373,7 @@ fun CardContext.divIndicator( shape = shape, spaceBetweenCenters = spaceBetweenCenters, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -400,6 +410,7 @@ fun CardContext.divIndicator( shape: DivShape? = null, spaceBetweenCenters: DivFixedSize? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -434,6 +445,7 @@ fun CardContext.divIndicator( shape = optionalValue(shape), spaceBetweenCenters = optionalValue(spaceBetweenCenters), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivInfinityCount.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivInfinityCount.kt index e8afa03b4..5724aaa58 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivInfinityCount.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivInfinityCount.kt @@ -10,7 +10,7 @@ import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* class DivInfinityCount internal constructor( -) : DivCount() { +) : DivCount { @JsonProperty("type") override val type = "infinity" } diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivInput.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivInput.kt index 257bacd3e..e032cb187 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivInput.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivInput.kt @@ -32,7 +32,7 @@ class DivInput internal constructor( @JsonIgnore val letterSpacing: Property?, @JsonIgnore val lineHeight: Property?, @JsonIgnore override val margins: Property?, - @JsonIgnore val maxLines: Property?, + @JsonIgnore val maxVisibleLines: Property?, @JsonIgnore val nativeInterface: Property?, @JsonIgnore override val paddings: Property?, @JsonIgnore override val rowSpan: Property?, @@ -41,6 +41,7 @@ class DivInput internal constructor( @JsonIgnore val textColor: Property?, @JsonIgnore val textVariable: Property?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -49,7 +50,7 @@ class DivInput internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "input" @@ -78,7 +79,7 @@ class DivInput internal constructor( "letter_spacing" to letterSpacing, "line_height" to lineHeight, "margins" to margins, - "max_lines" to maxLines, + "max_visible_lines" to maxVisibleLines, "native_interface" to nativeInterface, "paddings" to paddings, "row_span" to rowSpan, @@ -87,6 +88,7 @@ class DivInput internal constructor( "text_color" to textColor, "text_variable" to textVariable, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -99,12 +101,12 @@ class DivInput internal constructor( } enum class KeyboardType(@JsonValue val value: String) { - TEXT("text"), + SINGLE_LINE_TEXT("single_line_text"), + MULTI_LINE_TEXT("multi_line_text"), PHONE("phone"), NUMBER("number"), EMAIL("email"), URI("uri"), - DATE("date"), } class NativeInterface internal constructor( @@ -144,7 +146,7 @@ fun TemplateContext.divInput(): LiteralProperty { letterSpacing = null, lineHeight = null, margins = null, - maxLines = null, + maxVisibleLines = null, nativeInterface = null, paddings = null, rowSpan = null, @@ -153,6 +155,7 @@ fun TemplateContext.divInput(): LiteralProperty { textColor = null, textVariable = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -188,7 +191,7 @@ fun TemplateContext.divInput( letterSpacing: Property? = null, lineHeight: Property? = null, margins: Property? = null, - maxLines: Property? = null, + maxVisibleLines: Property? = null, nativeInterface: Property? = null, paddings: Property? = null, rowSpan: Property? = null, @@ -196,6 +199,7 @@ fun TemplateContext.divInput( selectedActions: Property>? = null, textColor: Property? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -228,7 +232,7 @@ fun TemplateContext.divInput( letterSpacing = letterSpacing, lineHeight = lineHeight, margins = margins, - maxLines = maxLines, + maxVisibleLines = maxVisibleLines, nativeInterface = nativeInterface, paddings = paddings, rowSpan = rowSpan, @@ -237,6 +241,7 @@ fun TemplateContext.divInput( textColor = textColor, textVariable = textVariable, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -272,7 +277,7 @@ fun TemplateContext.divInput( letterSpacing: Double? = null, lineHeight: Int? = null, margins: DivEdgeInsets? = null, - maxLines: Int? = null, + maxVisibleLines: Int? = null, nativeInterface: DivInput.NativeInterface? = null, paddings: DivEdgeInsets? = null, rowSpan: Int? = null, @@ -280,6 +285,7 @@ fun TemplateContext.divInput( selectedActions: List? = null, textColor: Color? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -312,7 +318,7 @@ fun TemplateContext.divInput( letterSpacing = optionalValue(letterSpacing), lineHeight = optionalValue(lineHeight), margins = optionalValue(margins), - maxLines = optionalValue(maxLines), + maxVisibleLines = optionalValue(maxVisibleLines), nativeInterface = optionalValue(nativeInterface), paddings = optionalValue(paddings), rowSpan = optionalValue(rowSpan), @@ -321,6 +327,7 @@ fun TemplateContext.divInput( textColor = optionalValue(textColor), textVariable = optionalValue(textVariable), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -378,7 +385,7 @@ fun CardContext.divInput( letterSpacing: ValueProperty? = null, lineHeight: ValueProperty? = null, margins: ValueProperty? = null, - maxLines: ValueProperty? = null, + maxVisibleLines: ValueProperty? = null, nativeInterface: ValueProperty? = null, paddings: ValueProperty? = null, rowSpan: ValueProperty? = null, @@ -386,6 +393,7 @@ fun CardContext.divInput( selectedActions: ValueProperty>? = null, textColor: ValueProperty? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -418,7 +426,7 @@ fun CardContext.divInput( letterSpacing = letterSpacing, lineHeight = lineHeight, margins = margins, - maxLines = maxLines, + maxVisibleLines = maxVisibleLines, nativeInterface = nativeInterface, paddings = paddings, rowSpan = rowSpan, @@ -427,6 +435,7 @@ fun CardContext.divInput( textColor = textColor, textVariable = textVariable, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -462,7 +471,7 @@ fun CardContext.divInput( letterSpacing: Double? = null, lineHeight: Int? = null, margins: DivEdgeInsets? = null, - maxLines: Int? = null, + maxVisibleLines: Int? = null, nativeInterface: DivInput.NativeInterface? = null, paddings: DivEdgeInsets? = null, rowSpan: Int? = null, @@ -470,6 +479,7 @@ fun CardContext.divInput( selectedActions: List? = null, textColor: Color? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -502,7 +512,7 @@ fun CardContext.divInput( letterSpacing = optionalValue(letterSpacing), lineHeight = optionalValue(lineHeight), margins = optionalValue(margins), - maxLines = optionalValue(maxLines), + maxVisibleLines = optionalValue(maxVisibleLines), nativeInterface = optionalValue(nativeInterface), paddings = optionalValue(paddings), rowSpan = optionalValue(rowSpan), @@ -511,6 +521,7 @@ fun CardContext.divInput( textColor = optionalValue(textColor), textVariable = value(textVariable), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGradientBackground.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivLinearGradient.kt similarity index 63% rename from json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGradientBackground.kt rename to json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivLinearGradient.kt index 50dc275b0..824031b33 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivGradientBackground.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivLinearGradient.kt @@ -9,10 +9,10 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -class DivGradientBackground internal constructor( +class DivLinearGradient internal constructor( @JsonIgnore val angle: Property?, @JsonIgnore val colors: Property>?, -) : DivBackground() { +) : DivTextGradient, DivBackground { @JsonProperty("type") override val type = "gradient" @@ -25,48 +25,48 @@ class DivGradientBackground internal constructor( } } -fun TemplateContext.divGradientBackground(): LiteralProperty { - return value(DivGradientBackground( +fun TemplateContext.divLinearGradient(): LiteralProperty { + return value(DivLinearGradient( angle = null, colors = null, )) } -fun TemplateContext.divGradientBackground( +fun TemplateContext.divLinearGradient( colors: Property>? = null, angle: Property? = null, -): LiteralProperty { - return value(DivGradientBackground( +): LiteralProperty { + return value(DivLinearGradient( angle = angle, colors = colors, )) } -fun TemplateContext.divGradientBackground( +fun TemplateContext.divLinearGradient( colors: List? = null, angle: Int? = null, -): LiteralProperty { - return value(DivGradientBackground( +): LiteralProperty { + return value(DivLinearGradient( angle = optionalValue(angle), colors = optionalValue(colors), )) } -fun CardContext.divGradientBackground( +fun CardContext.divLinearGradient( colors: ValueProperty>, angle: ValueProperty? = null, -): DivGradientBackground { - return DivGradientBackground( +): DivLinearGradient { + return DivLinearGradient( angle = angle, colors = colors, ) } -fun CardContext.divGradientBackground( +fun CardContext.divLinearGradient( colors: List, angle: Int? = null, -): DivGradientBackground { - return DivGradientBackground( +): DivLinearGradient { + return DivLinearGradient( angle = optionalValue(angle), colors = value(colors), ) diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivMatchParentSize.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivMatchParentSize.kt index dfdd482de..aa835779b 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivMatchParentSize.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivMatchParentSize.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class DivMatchParentSize internal constructor( @JsonIgnore val weight: Property?, -) : DivSize() { +) : DivSize { @JsonProperty("type") override val type = "match_parent" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivNeighbourPageSize.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivNeighbourPageSize.kt index 0c30c1112..8cbc5b1dc 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivNeighbourPageSize.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivNeighbourPageSize.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class DivNeighbourPageSize internal constructor( @JsonIgnore val neighbourPageWidth: Property?, -) : DivPagerLayoutMode() { +) : DivPagerLayoutMode { @JsonProperty("type") override val type = "fixed" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivNinePatchBackground.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivNinePatchBackground.kt new file mode 100644 index 000000000..7da287729 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivNinePatchBackground.kt @@ -0,0 +1,73 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivNinePatchBackground internal constructor( + @JsonIgnore val imageUrl: Property?, + @JsonIgnore val insets: Property?, +) : DivBackground { + + @JsonProperty("type") override val type = "nine_patch_image" + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "image_url" to imageUrl, + "insets" to insets, + ) + } +} + +fun TemplateContext.divNinePatchBackground(): LiteralProperty { + return value(DivNinePatchBackground( + imageUrl = null, + insets = null, + )) +} + +fun TemplateContext.divNinePatchBackground( + imageUrl: Property? = null, + insets: Property? = null, +): LiteralProperty { + return value(DivNinePatchBackground( + imageUrl = imageUrl, + insets = insets, + )) +} + +fun TemplateContext.divNinePatchBackground( + imageUrl: URI? = null, + insets: DivAbsoluteEdgeInsets? = null, +): LiteralProperty { + return value(DivNinePatchBackground( + imageUrl = optionalValue(imageUrl), + insets = optionalValue(insets), + )) +} + +fun CardContext.divNinePatchBackground( + imageUrl: ValueProperty, + insets: ValueProperty, +): DivNinePatchBackground { + return DivNinePatchBackground( + imageUrl = imageUrl, + insets = insets, + ) +} + +fun CardContext.divNinePatchBackground( + imageUrl: URI, + insets: DivAbsoluteEdgeInsets, +): DivNinePatchBackground { + return DivNinePatchBackground( + imageUrl = value(imageUrl), + insets = value(insets), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPageSize.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPageSize.kt index ab3cb8a72..2d6d04dba 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPageSize.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPageSize.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class DivPageSize internal constructor( @JsonIgnore val pageWidth: Property?, -) : DivPagerLayoutMode() { +) : DivPagerLayoutMode { @JsonProperty("type") override val type = "percentage" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPager.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPager.kt index 44b957cff..680c6d443 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPager.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPager.kt @@ -32,6 +32,7 @@ class DivPager internal constructor( @JsonIgnore override val rowSpan: Property?, @JsonIgnore override val selectedActions: Property>?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -40,7 +41,7 @@ class DivPager internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "pager" @@ -69,6 +70,7 @@ class DivPager internal constructor( "row_span" to rowSpan, "selected_actions" to selectedActions, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -110,6 +112,7 @@ fun TemplateContext.divPager(): LiteralProperty { rowSpan = null, selectedActions = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -144,6 +147,7 @@ fun TemplateContext.divPager( rowSpan: Property? = null, selectedActions: Property>? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -176,6 +180,7 @@ fun TemplateContext.divPager( rowSpan = rowSpan, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -210,6 +215,7 @@ fun TemplateContext.divPager( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -242,6 +248,7 @@ fun TemplateContext.divPager( rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -276,6 +283,7 @@ fun CardContext.divPager( rowSpan: ValueProperty? = null, selectedActions: ValueProperty>? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -308,6 +316,7 @@ fun CardContext.divPager( rowSpan = rowSpan, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -342,6 +351,7 @@ fun CardContext.divPager( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -374,6 +384,7 @@ fun CardContext.divPager( rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPagerLayoutMode.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPagerLayoutMode.kt index e844df473..0cae69a8e 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPagerLayoutMode.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPagerLayoutMode.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivPagerLayoutMode { - abstract val type: String +sealed interface DivPagerLayoutMode { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivot.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivot.kt new file mode 100644 index 000000000..0c8643855 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivot.kt @@ -0,0 +1,14 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +sealed interface DivPivot { + val type: String +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivotFixed.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivotFixed.kt new file mode 100644 index 000000000..4ecbfd48c --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivotFixed.kt @@ -0,0 +1,80 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivPivotFixed internal constructor( + @JsonIgnore val unit: Property?, + @JsonIgnore val value: Property?, +) : DivPivot { + + @JsonProperty("type") override val type = "pivot-fixed" + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "unit" to unit, + "value" to value, + ) + } +} + +fun TemplateContext.divPivotFixed(): LiteralProperty { + return value(DivPivotFixed( + unit = null, + value = null, + )) +} + +fun TemplateContext.divPivotFixed( + unit: Property? = null, + value: Property? = null, +): LiteralProperty { + return value(DivPivotFixed( + unit = unit, + value = value, + )) +} + +fun TemplateContext.divPivotFixed( + unit: DivSizeUnit? = null, + value: Int? = null, +): LiteralProperty { + return value(DivPivotFixed( + unit = optionalValue(unit), + value = optionalValue(value), + )) +} + +fun CardContext.divPivotFixed(): DivPivotFixed { + return DivPivotFixed( + unit = null, + value = null, + ) +} + +fun CardContext.divPivotFixed( + unit: ValueProperty? = null, + value: ValueProperty? = null, +): DivPivotFixed { + return DivPivotFixed( + unit = unit, + value = value, + ) +} + +fun CardContext.divPivotFixed( + unit: DivSizeUnit? = null, + value: Int? = null, +): DivPivotFixed { + return DivPivotFixed( + unit = optionalValue(unit), + value = optionalValue(value), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivotPercentage.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivotPercentage.kt new file mode 100644 index 000000000..1416ef82d --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivPivotPercentage.kt @@ -0,0 +1,62 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivPivotPercentage internal constructor( + @JsonIgnore val value: Property?, +) : DivPivot { + + @JsonProperty("type") override val type = "pivot-percentage" + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "value" to value, + ) + } +} + +fun TemplateContext.divPivotPercentage(): LiteralProperty { + return value(DivPivotPercentage( + value = null, + )) +} + +fun TemplateContext.divPivotPercentage( + value: Property? = null, +): LiteralProperty { + return value(DivPivotPercentage( + value = value, + )) +} + +fun TemplateContext.divPivotPercentage( + value: Double? = null, +): LiteralProperty { + return value(DivPivotPercentage( + value = optionalValue(value), + )) +} + +fun CardContext.divPivotPercentage( + value: ValueProperty, +): DivPivotPercentage { + return DivPivotPercentage( + value = value, + ) +} + +fun CardContext.divPivotPercentage( + value: Double, +): DivPivotPercentage { + return DivPivotPercentage( + value = value(value), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradient.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradient.kt new file mode 100644 index 000000000..6bfb8437f --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradient.kt @@ -0,0 +1,95 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivRadialGradient internal constructor( + @JsonIgnore val centerX: Property?, + @JsonIgnore val centerY: Property?, + @JsonIgnore val colors: Property>?, + @JsonIgnore val radius: Property?, +) : DivTextGradient, DivBackground { + + @JsonProperty("type") override val type = "radial_gradient" + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "center_x" to centerX, + "center_y" to centerY, + "colors" to colors, + "radius" to radius, + ) + } +} + +fun TemplateContext.divRadialGradient(): LiteralProperty { + return value(DivRadialGradient( + centerX = null, + centerY = null, + colors = null, + radius = null, + )) +} + +fun TemplateContext.divRadialGradient( + colors: Property>? = null, + centerX: Property? = null, + centerY: Property? = null, + radius: Property? = null, +): LiteralProperty { + return value(DivRadialGradient( + centerX = centerX, + centerY = centerY, + colors = colors, + radius = radius, + )) +} + +fun TemplateContext.divRadialGradient( + colors: List? = null, + centerX: DivRadialGradientCenter? = null, + centerY: DivRadialGradientCenter? = null, + radius: DivRadialGradientRadius? = null, +): LiteralProperty { + return value(DivRadialGradient( + centerX = optionalValue(centerX), + centerY = optionalValue(centerY), + colors = optionalValue(colors), + radius = optionalValue(radius), + )) +} + +fun CardContext.divRadialGradient( + colors: ValueProperty>, + centerX: ValueProperty? = null, + centerY: ValueProperty? = null, + radius: ValueProperty? = null, +): DivRadialGradient { + return DivRadialGradient( + centerX = centerX, + centerY = centerY, + colors = colors, + radius = radius, + ) +} + +fun CardContext.divRadialGradient( + colors: List, + centerX: DivRadialGradientCenter? = null, + centerY: DivRadialGradientCenter? = null, + radius: DivRadialGradientRadius? = null, +): DivRadialGradient { + return DivRadialGradient( + centerX = optionalValue(centerX), + centerY = optionalValue(centerY), + colors = value(colors), + radius = optionalValue(radius), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientCenter.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientCenter.kt new file mode 100644 index 000000000..4d6d5a173 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientCenter.kt @@ -0,0 +1,14 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +sealed interface DivRadialGradientCenter { + val type: String +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientFixedCenter.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientFixedCenter.kt new file mode 100644 index 000000000..a7a6e44ab --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientFixedCenter.kt @@ -0,0 +1,73 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivRadialGradientFixedCenter internal constructor( + @JsonIgnore val unit: Property?, + @JsonIgnore val value: Property?, +) : DivRadialGradientCenter { + + @JsonProperty("type") override val type = "fixed" + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "unit" to unit, + "value" to value, + ) + } +} + +fun TemplateContext.divRadialGradientFixedCenter(): LiteralProperty { + return value(DivRadialGradientFixedCenter( + unit = null, + value = null, + )) +} + +fun TemplateContext.divRadialGradientFixedCenter( + value: Property? = null, + unit: Property? = null, +): LiteralProperty { + return value(DivRadialGradientFixedCenter( + unit = unit, + value = value, + )) +} + +fun TemplateContext.divRadialGradientFixedCenter( + value: Int? = null, + unit: DivSizeUnit? = null, +): LiteralProperty { + return value(DivRadialGradientFixedCenter( + unit = optionalValue(unit), + value = optionalValue(value), + )) +} + +fun CardContext.divRadialGradientFixedCenter( + value: ValueProperty, + unit: ValueProperty? = null, +): DivRadialGradientFixedCenter { + return DivRadialGradientFixedCenter( + unit = unit, + value = value, + ) +} + +fun CardContext.divRadialGradientFixedCenter( + value: Int, + unit: DivSizeUnit? = null, +): DivRadialGradientFixedCenter { + return DivRadialGradientFixedCenter( + unit = optionalValue(unit), + value = value(value), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRadius.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRadius.kt new file mode 100644 index 000000000..b27752e11 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRadius.kt @@ -0,0 +1,14 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +sealed interface DivRadialGradientRadius { + val type: String +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRelativeCenter.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRelativeCenter.kt new file mode 100644 index 000000000..10f39f2dc --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRelativeCenter.kt @@ -0,0 +1,62 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivRadialGradientRelativeCenter internal constructor( + @JsonIgnore val value: Property?, +) : DivRadialGradientCenter { + + @JsonProperty("type") override val type = "relative" + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "value" to value, + ) + } +} + +fun TemplateContext.divRadialGradientRelativeCenter(): LiteralProperty { + return value(DivRadialGradientRelativeCenter( + value = null, + )) +} + +fun TemplateContext.divRadialGradientRelativeCenter( + value: Property? = null, +): LiteralProperty { + return value(DivRadialGradientRelativeCenter( + value = value, + )) +} + +fun TemplateContext.divRadialGradientRelativeCenter( + value: Double? = null, +): LiteralProperty { + return value(DivRadialGradientRelativeCenter( + value = optionalValue(value), + )) +} + +fun CardContext.divRadialGradientRelativeCenter( + value: ValueProperty, +): DivRadialGradientRelativeCenter { + return DivRadialGradientRelativeCenter( + value = value, + ) +} + +fun CardContext.divRadialGradientRelativeCenter( + value: Double, +): DivRadialGradientRelativeCenter { + return DivRadialGradientRelativeCenter( + value = value(value), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRelativeRadius.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRelativeRadius.kt new file mode 100644 index 000000000..fbabcb1e9 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRadialGradientRelativeRadius.kt @@ -0,0 +1,69 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivRadialGradientRelativeRadius internal constructor( + @JsonIgnore val value: Property?, +) : DivRadialGradientRadius { + + @JsonProperty("type") override val type = "relative" + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "value" to value, + ) + } + + enum class Value(@JsonValue val value: String) { + NEAREST_CORNER("nearest_corner"), + FARTHEST_CORNER("farthest_corner"), + NEAREST_SIDE("nearest_side"), + FARTHEST_SIDE("farthest_side"), + } +} + +fun TemplateContext.divRadialGradientRelativeRadius(): LiteralProperty { + return value(DivRadialGradientRelativeRadius( + value = null, + )) +} + +fun TemplateContext.divRadialGradientRelativeRadius( + value: Property? = null, +): LiteralProperty { + return value(DivRadialGradientRelativeRadius( + value = value, + )) +} + +fun TemplateContext.divRadialGradientRelativeRadius( + value: DivRadialGradientRelativeRadius.Value? = null, +): LiteralProperty { + return value(DivRadialGradientRelativeRadius( + value = optionalValue(value), + )) +} + +fun CardContext.divRadialGradientRelativeRadius( + value: ValueProperty, +): DivRadialGradientRelativeRadius { + return DivRadialGradientRelativeRadius( + value = value, + ) +} + +fun CardContext.divRadialGradientRelativeRadius( + value: DivRadialGradientRelativeRadius.Value, +): DivRadialGradientRelativeRadius { + return DivRadialGradientRelativeRadius( + value = value(value), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRoundedRectangleShape.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRoundedRectangleShape.kt index 51c53acb2..35fb6c94b 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRoundedRectangleShape.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivRoundedRectangleShape.kt @@ -13,7 +13,7 @@ class DivRoundedRectangleShape internal constructor( @JsonIgnore val cornerRadius: Property?, @JsonIgnore val itemHeight: Property?, @JsonIgnore val itemWidth: Property?, -) : DivShape() { +) : DivShape { @JsonProperty("type") override val type = "rounded_rectangle" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivScaleTransition.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivScaleTransition.kt index fe2a6b25b..22235e930 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivScaleTransition.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivScaleTransition.kt @@ -16,7 +16,7 @@ class DivScaleTransition internal constructor( @JsonIgnore val pivotY: Property?, @JsonIgnore val scale: Property?, @JsonIgnore override val startDelay: Property?, -) : DivAppearanceTransition(), DivTransitionBase { +) : DivAppearanceTransition, DivTransitionBase { @JsonProperty("type") override val type = "scale" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSeparator.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSeparator.kt index c19a4973e..05880562f 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSeparator.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSeparator.kt @@ -32,6 +32,7 @@ class DivSeparator internal constructor( @JsonIgnore override val rowSpan: Property?, @JsonIgnore override val selectedActions: Property>?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -40,7 +41,7 @@ class DivSeparator internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "separator" @@ -69,6 +70,7 @@ class DivSeparator internal constructor( "row_span" to rowSpan, "selected_actions" to selectedActions, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -124,6 +126,7 @@ fun TemplateContext.divSeparator(): LiteralProperty { rowSpan = null, selectedActions = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -158,6 +161,7 @@ fun TemplateContext.divSeparator( rowSpan: Property? = null, selectedActions: Property>? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -190,6 +194,7 @@ fun TemplateContext.divSeparator( rowSpan = rowSpan, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -224,6 +229,7 @@ fun TemplateContext.divSeparator( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -256,6 +262,7 @@ fun TemplateContext.divSeparator( rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -318,6 +325,7 @@ fun CardContext.divSeparator(): DivSeparator { rowSpan = null, selectedActions = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -352,6 +360,7 @@ fun CardContext.divSeparator( rowSpan: ValueProperty? = null, selectedActions: ValueProperty>? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -384,6 +393,7 @@ fun CardContext.divSeparator( rowSpan = rowSpan, selectedActions = selectedActions, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -418,6 +428,7 @@ fun CardContext.divSeparator( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -450,6 +461,7 @@ fun CardContext.divSeparator( rowSpan = optionalValue(rowSpan), selectedActions = optionalValue(selectedActions), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivShape.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivShape.kt index e7ccbbab6..ff62dc4ef 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivShape.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivShape.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivShape { - abstract val type: String +sealed interface DivShape { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivShapeDrawable.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivShapeDrawable.kt index ba1e47653..546deadab 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivShapeDrawable.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivShapeDrawable.kt @@ -13,7 +13,7 @@ class DivShapeDrawable internal constructor( @JsonIgnore val color: Property?, @JsonIgnore val shape: Property?, @JsonIgnore val stroke: Property?, -) : DivDrawable() { +) : DivDrawable { @JsonProperty("type") override val type = "shape_drawable" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSize.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSize.kt index aad17c19b..ca2874ffc 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSize.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSize.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivSize { - abstract val type: String +sealed interface DivSize { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSlideTransition.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSlideTransition.kt index e714a5ca6..28bfc1ce8 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSlideTransition.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSlideTransition.kt @@ -15,7 +15,7 @@ class DivSlideTransition internal constructor( @JsonIgnore val edge: Property?, @JsonIgnore override val interpolator: Property?, @JsonIgnore override val startDelay: Property?, -) : DivAppearanceTransition(), DivTransitionBase { +) : DivAppearanceTransition, DivTransitionBase { @JsonProperty("type") override val type = "slide" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSlider.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSlider.kt index 53079f7da..4c640a165 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSlider.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSlider.kt @@ -26,6 +26,7 @@ class DivSlider internal constructor( @JsonIgnore val minValue: Property?, @JsonIgnore override val paddings: Property?, @JsonIgnore override val rowSpan: Property?, + @JsonIgnore val secondaryValueAccessibility: Property?, @JsonIgnore override val selectedActions: Property>?, @JsonIgnore val thumbSecondaryStyle: Property?, @JsonIgnore val thumbSecondaryTextStyle: Property?, @@ -38,6 +39,7 @@ class DivSlider internal constructor( @JsonIgnore override val tooltips: Property>?, @JsonIgnore val trackActiveStyle: Property?, @JsonIgnore val trackInactiveStyle: Property?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -46,7 +48,7 @@ class DivSlider internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "slider" @@ -69,6 +71,7 @@ class DivSlider internal constructor( "min_value" to minValue, "paddings" to paddings, "row_span" to rowSpan, + "secondary_value_accessibility" to secondaryValueAccessibility, "selected_actions" to selectedActions, "thumb_secondary_style" to thumbSecondaryStyle, "thumb_secondary_text_style" to thumbSecondaryTextStyle, @@ -81,6 +84,7 @@ class DivSlider internal constructor( "tooltips" to tooltips, "track_active_style" to trackActiveStyle, "track_inactive_style" to trackInactiveStyle, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -131,6 +135,7 @@ fun TemplateContext.divSlider(): LiteralProperty { minValue = null, paddings = null, rowSpan = null, + secondaryValueAccessibility = null, selectedActions = null, thumbSecondaryStyle = null, thumbSecondaryTextStyle = null, @@ -143,6 +148,7 @@ fun TemplateContext.divSlider(): LiteralProperty { tooltips = null, trackActiveStyle = null, trackInactiveStyle = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -174,6 +180,7 @@ fun TemplateContext.divSlider( minValue: Property? = null, paddings: Property? = null, rowSpan: Property? = null, + secondaryValueAccessibility: Property? = null, selectedActions: Property>? = null, thumbSecondaryStyle: Property? = null, thumbSecondaryTextStyle: Property? = null, @@ -183,6 +190,7 @@ fun TemplateContext.divSlider( tickMarkActiveStyle: Property? = null, tickMarkInactiveStyle: Property? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -209,6 +217,7 @@ fun TemplateContext.divSlider( minValue = minValue, paddings = paddings, rowSpan = rowSpan, + secondaryValueAccessibility = secondaryValueAccessibility, selectedActions = selectedActions, thumbSecondaryStyle = thumbSecondaryStyle, thumbSecondaryTextStyle = thumbSecondaryTextStyle, @@ -221,6 +230,7 @@ fun TemplateContext.divSlider( tooltips = tooltips, trackActiveStyle = trackActiveStyle, trackInactiveStyle = trackInactiveStyle, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -252,6 +262,7 @@ fun TemplateContext.divSlider( minValue: Int? = null, paddings: DivEdgeInsets? = null, rowSpan: Int? = null, + secondaryValueAccessibility: DivAccessibility? = null, selectedActions: List? = null, thumbSecondaryStyle: DivDrawable? = null, thumbSecondaryTextStyle: DivSlider.TextStyle? = null, @@ -261,6 +272,7 @@ fun TemplateContext.divSlider( tickMarkActiveStyle: DivDrawable? = null, tickMarkInactiveStyle: DivDrawable? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -287,6 +299,7 @@ fun TemplateContext.divSlider( minValue = optionalValue(minValue), paddings = optionalValue(paddings), rowSpan = optionalValue(rowSpan), + secondaryValueAccessibility = optionalValue(secondaryValueAccessibility), selectedActions = optionalValue(selectedActions), thumbSecondaryStyle = optionalValue(thumbSecondaryStyle), thumbSecondaryTextStyle = optionalValue(thumbSecondaryTextStyle), @@ -299,6 +312,7 @@ fun TemplateContext.divSlider( tooltips = optionalValue(tooltips), trackActiveStyle = optionalValue(trackActiveStyle), trackInactiveStyle = optionalValue(trackInactiveStyle), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -372,6 +386,7 @@ fun CardContext.divSlider( minValue: ValueProperty? = null, paddings: ValueProperty? = null, rowSpan: ValueProperty? = null, + secondaryValueAccessibility: ValueProperty? = null, selectedActions: ValueProperty>? = null, thumbSecondaryStyle: ValueProperty? = null, thumbSecondaryTextStyle: ValueProperty? = null, @@ -381,6 +396,7 @@ fun CardContext.divSlider( tickMarkActiveStyle: ValueProperty? = null, tickMarkInactiveStyle: ValueProperty? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -407,6 +423,7 @@ fun CardContext.divSlider( minValue = minValue, paddings = paddings, rowSpan = rowSpan, + secondaryValueAccessibility = secondaryValueAccessibility, selectedActions = selectedActions, thumbSecondaryStyle = thumbSecondaryStyle, thumbSecondaryTextStyle = thumbSecondaryTextStyle, @@ -419,6 +436,7 @@ fun CardContext.divSlider( tooltips = tooltips, trackActiveStyle = trackActiveStyle, trackInactiveStyle = trackInactiveStyle, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -450,6 +468,7 @@ fun CardContext.divSlider( minValue: Int? = null, paddings: DivEdgeInsets? = null, rowSpan: Int? = null, + secondaryValueAccessibility: DivAccessibility? = null, selectedActions: List? = null, thumbSecondaryStyle: DivDrawable? = null, thumbSecondaryTextStyle: DivSlider.TextStyle? = null, @@ -459,6 +478,7 @@ fun CardContext.divSlider( tickMarkActiveStyle: DivDrawable? = null, tickMarkInactiveStyle: DivDrawable? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -485,6 +505,7 @@ fun CardContext.divSlider( minValue = optionalValue(minValue), paddings = optionalValue(paddings), rowSpan = optionalValue(rowSpan), + secondaryValueAccessibility = optionalValue(secondaryValueAccessibility), selectedActions = optionalValue(selectedActions), thumbSecondaryStyle = optionalValue(thumbSecondaryStyle), thumbSecondaryTextStyle = optionalValue(thumbSecondaryTextStyle), @@ -497,6 +518,7 @@ fun CardContext.divSlider( tooltips = optionalValue(tooltips), trackActiveStyle = value(trackActiveStyle), trackInactiveStyle = value(trackInactiveStyle), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSolidBackground.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSolidBackground.kt index 097dda543..eb8c13e9d 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSolidBackground.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivSolidBackground.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class DivSolidBackground internal constructor( @JsonIgnore val color: Property?, -) : DivBackground() { +) : DivBackground { @JsonProperty("type") override val type = "solid" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivState.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivState.kt index 03110e090..33c4d8ad3 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivState.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivState.kt @@ -29,6 +29,7 @@ class DivState internal constructor( @JsonIgnore override val selectedActions: Property>?, @JsonIgnore val states: Property>?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore val transitionAnimationSelector: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @@ -38,7 +39,7 @@ class DivState internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "state" @@ -64,6 +65,7 @@ class DivState internal constructor( "selected_actions" to selectedActions, "states" to states, "tooltips" to tooltips, + "transform" to transform, "transition_animation_selector" to transitionAnimationSelector, "transition_change" to transitionChange, "transition_in" to transitionIn, @@ -118,6 +120,7 @@ fun TemplateContext.divState(): LiteralProperty { selectedActions = null, states = null, tooltips = null, + transform = null, transitionAnimationSelector = null, transitionChange = null, transitionIn = null, @@ -150,6 +153,7 @@ fun TemplateContext.divState( rowSpan: Property? = null, selectedActions: Property>? = null, tooltips: Property>? = null, + transform: Property? = null, transitionAnimationSelector: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, @@ -180,6 +184,7 @@ fun TemplateContext.divState( selectedActions = selectedActions, states = states, tooltips = tooltips, + transform = transform, transitionAnimationSelector = transitionAnimationSelector, transitionChange = transitionChange, transitionIn = transitionIn, @@ -212,6 +217,7 @@ fun TemplateContext.divState( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionAnimationSelector: DivTransitionSelector? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, @@ -242,6 +248,7 @@ fun TemplateContext.divState( selectedActions = optionalValue(selectedActions), states = optionalValue(states), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionAnimationSelector = optionalValue(transitionAnimationSelector), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), @@ -316,6 +323,7 @@ fun CardContext.divState( rowSpan: ValueProperty? = null, selectedActions: ValueProperty>? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionAnimationSelector: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, @@ -346,6 +354,7 @@ fun CardContext.divState( selectedActions = selectedActions, states = states, tooltips = tooltips, + transform = transform, transitionAnimationSelector = transitionAnimationSelector, transitionChange = transitionChange, transitionIn = transitionIn, @@ -378,6 +387,7 @@ fun CardContext.divState( rowSpan: Int? = null, selectedActions: List? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionAnimationSelector: DivTransitionSelector? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, @@ -408,6 +418,7 @@ fun CardContext.divState( selectedActions = optionalValue(selectedActions), states = value(states), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionAnimationSelector = optionalValue(transitionAnimationSelector), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTabs.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTabs.kt index 032f06bc4..79b934b6d 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTabs.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTabs.kt @@ -36,6 +36,7 @@ class DivTabs internal constructor( @JsonIgnore val tabTitleStyle: Property?, @JsonIgnore val titlePaddings: Property?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -44,7 +45,7 @@ class DivTabs internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "tabs" @@ -77,6 +78,7 @@ class DivTabs internal constructor( "tab_title_style" to tabTitleStyle, "title_paddings" to titlePaddings, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -185,6 +187,7 @@ fun TemplateContext.divTabs(): LiteralProperty { tabTitleStyle = null, titlePaddings = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -223,6 +226,7 @@ fun TemplateContext.divTabs( tabTitleStyle: Property? = null, titlePaddings: Property? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -259,6 +263,7 @@ fun TemplateContext.divTabs( tabTitleStyle = tabTitleStyle, titlePaddings = titlePaddings, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -297,6 +302,7 @@ fun TemplateContext.divTabs( tabTitleStyle: DivTabs.TabTitleStyle? = null, titlePaddings: DivEdgeInsets? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -333,6 +339,7 @@ fun TemplateContext.divTabs( tabTitleStyle = optionalValue(tabTitleStyle), titlePaddings = optionalValue(titlePaddings), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -510,6 +517,7 @@ fun CardContext.divTabs( tabTitleStyle: ValueProperty? = null, titlePaddings: ValueProperty? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -546,6 +554,7 @@ fun CardContext.divTabs( tabTitleStyle = tabTitleStyle, titlePaddings = titlePaddings, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -584,6 +593,7 @@ fun CardContext.divTabs( tabTitleStyle: DivTabs.TabTitleStyle? = null, titlePaddings: DivEdgeInsets? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -620,6 +630,7 @@ fun CardContext.divTabs( tabTitleStyle = optionalValue(tabTitleStyle), titlePaddings = optionalValue(titlePaddings), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivText.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivText.kt index 5c37ebdba..e6747663e 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivText.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivText.kt @@ -49,8 +49,9 @@ class DivText internal constructor( @JsonIgnore val textAlignmentHorizontal: Property?, @JsonIgnore val textAlignmentVertical: Property?, @JsonIgnore val textColor: Property?, - @JsonIgnore val textGradient: Property?, + @JsonIgnore val textGradient: Property?, @JsonIgnore override val tooltips: Property>?, + @JsonIgnore override val transform: Property?, @JsonIgnore override val transitionChange: Property?, @JsonIgnore override val transitionIn: Property?, @JsonIgnore override val transitionOut: Property?, @@ -61,7 +62,7 @@ class DivText internal constructor( @JsonIgnore override val visibilityAction: Property?, @JsonIgnore override val visibilityActions: Property>?, @JsonIgnore override val width: Property?, -) : Div(), DivBase { +) : Div, DivBase { @JsonProperty("type") override val type = "text" @@ -109,6 +110,7 @@ class DivText internal constructor( "text_color" to textColor, "text_gradient" to textGradient, "tooltips" to tooltips, + "transform" to transform, "transition_change" to transitionChange, "transition_in" to transitionIn, "transition_out" to transitionOut, @@ -151,6 +153,7 @@ class DivText internal constructor( @JsonIgnore val height: Property?, @JsonIgnore val start: Property?, @JsonIgnore val tintColor: Property?, + @JsonIgnore val tintMode: Property?, @JsonIgnore val url: Property?, @JsonIgnore val width: Property?, ) { @@ -161,6 +164,7 @@ class DivText internal constructor( "height" to height, "start" to start, "tint_color" to tintColor, + "tint_mode" to tintMode, "url" to url, "width" to width, ) @@ -247,6 +251,7 @@ fun TemplateContext.divText(): LiteralProperty { textColor = null, textGradient = null, tooltips = null, + transform = null, transitionChange = null, transitionIn = null, transitionOut = null, @@ -300,8 +305,9 @@ fun TemplateContext.divText( textAlignmentHorizontal: Property? = null, textAlignmentVertical: Property? = null, textColor: Property? = null, - textGradient: Property? = null, + textGradient: Property? = null, tooltips: Property>? = null, + transform: Property? = null, transitionChange: Property? = null, transitionIn: Property? = null, transitionOut: Property? = null, @@ -355,6 +361,7 @@ fun TemplateContext.divText( textColor = textColor, textGradient = textGradient, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -408,8 +415,9 @@ fun TemplateContext.divText( textAlignmentHorizontal: DivAlignmentHorizontal? = null, textAlignmentVertical: DivAlignmentVertical? = null, textColor: Color? = null, - textGradient: DivGradientBackground? = null, + textGradient: DivTextGradient? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -463,6 +471,7 @@ fun TemplateContext.divText( textColor = optionalValue(textColor), textGradient = optionalValue(textGradient), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -518,6 +527,7 @@ fun TemplateContext.image(): LiteralProperty { height = null, start = null, tintColor = null, + tintMode = null, url = null, width = null, )) @@ -528,12 +538,14 @@ fun TemplateContext.image( url: Property? = null, height: Property? = null, tintColor: Property? = null, + tintMode: Property? = null, width: Property? = null, ): LiteralProperty { return value(DivText.Image( height = height, start = start, tintColor = tintColor, + tintMode = tintMode, url = url, width = width, )) @@ -544,12 +556,14 @@ fun TemplateContext.image( url: URI? = null, height: DivFixedSize? = null, tintColor: Color? = null, + tintMode: DivBlendMode? = null, width: DivFixedSize? = null, ): LiteralProperty { return value(DivText.Image( height = optionalValue(height), start = optionalValue(start), tintColor = optionalValue(tintColor), + tintMode = optionalValue(tintMode), url = optionalValue(url), width = optionalValue(width), )) @@ -677,8 +691,9 @@ fun CardContext.divText( textAlignmentHorizontal: ValueProperty? = null, textAlignmentVertical: ValueProperty? = null, textColor: ValueProperty? = null, - textGradient: ValueProperty? = null, + textGradient: ValueProperty? = null, tooltips: ValueProperty>? = null, + transform: ValueProperty? = null, transitionChange: ValueProperty? = null, transitionIn: ValueProperty? = null, transitionOut: ValueProperty? = null, @@ -732,6 +747,7 @@ fun CardContext.divText( textColor = textColor, textGradient = textGradient, tooltips = tooltips, + transform = transform, transitionChange = transitionChange, transitionIn = transitionIn, transitionOut = transitionOut, @@ -785,8 +801,9 @@ fun CardContext.divText( textAlignmentHorizontal: DivAlignmentHorizontal? = null, textAlignmentVertical: DivAlignmentVertical? = null, textColor: Color? = null, - textGradient: DivGradientBackground? = null, + textGradient: DivTextGradient? = null, tooltips: List? = null, + transform: DivTransform? = null, transitionChange: DivChangeTransition? = null, transitionIn: DivAppearanceTransition? = null, transitionOut: DivAppearanceTransition? = null, @@ -840,6 +857,7 @@ fun CardContext.divText( textColor = optionalValue(textColor), textGradient = optionalValue(textGradient), tooltips = optionalValue(tooltips), + transform = optionalValue(transform), transitionChange = optionalValue(transitionChange), transitionIn = optionalValue(transitionIn), transitionOut = optionalValue(transitionOut), @@ -886,12 +904,14 @@ fun CardContext.image( url: ValueProperty, height: ValueProperty? = null, tintColor: ValueProperty? = null, + tintMode: ValueProperty? = null, width: ValueProperty? = null, ): DivText.Image { return DivText.Image( height = height, start = start, tintColor = tintColor, + tintMode = tintMode, url = url, width = width, ) @@ -902,12 +922,14 @@ fun CardContext.image( url: URI, height: DivFixedSize? = null, tintColor: Color? = null, + tintMode: DivBlendMode? = null, width: DivFixedSize? = null, ): DivText.Image { return DivText.Image( height = optionalValue(height), start = value(start), tintColor = optionalValue(tintColor), + tintMode = optionalValue(tintMode), url = value(url), width = optionalValue(width), ) diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTextGradient.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTextGradient.kt new file mode 100644 index 000000000..597903b3a --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTextGradient.kt @@ -0,0 +1,14 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +sealed interface DivTextGradient { + val type: String +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTransform.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTransform.kt new file mode 100644 index 000000000..00ee69be3 --- /dev/null +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivTransform.kt @@ -0,0 +1,90 @@ +// Generated code. Do not modify. + +package com.yandex.div.dsl.model + +import java.net.URI +import com.fasterxml.jackson.annotation.* +import com.yandex.div.dsl.* +import com.yandex.div.dsl.context.* +import com.yandex.div.dsl.type.* +import com.yandex.div.dsl.util.* + +class DivTransform internal constructor( + @JsonIgnore val pivotX: Property?, + @JsonIgnore val pivotY: Property?, + @JsonIgnore val rotation: Property?, +) { + + @JsonAnyGetter + internal fun properties(): Map { + return propertyMapOf( + "pivot_x" to pivotX, + "pivot_y" to pivotY, + "rotation" to rotation, + ) + } +} + +fun TemplateContext.divTransform(): LiteralProperty { + return value(DivTransform( + pivotX = null, + pivotY = null, + rotation = null, + )) +} + +fun TemplateContext.divTransform( + pivotX: Property? = null, + pivotY: Property? = null, + rotation: Property? = null, +): LiteralProperty { + return value(DivTransform( + pivotX = pivotX, + pivotY = pivotY, + rotation = rotation, + )) +} + +fun TemplateContext.divTransform( + pivotX: DivPivot? = null, + pivotY: DivPivot? = null, + rotation: Double? = null, +): LiteralProperty { + return value(DivTransform( + pivotX = optionalValue(pivotX), + pivotY = optionalValue(pivotY), + rotation = optionalValue(rotation), + )) +} + +fun CardContext.divTransform(): DivTransform { + return DivTransform( + pivotX = null, + pivotY = null, + rotation = null, + ) +} + +fun CardContext.divTransform( + pivotX: ValueProperty? = null, + pivotY: ValueProperty? = null, + rotation: ValueProperty? = null, +): DivTransform { + return DivTransform( + pivotX = pivotX, + pivotY = pivotY, + rotation = rotation, + ) +} + +fun CardContext.divTransform( + pivotX: DivPivot? = null, + pivotY: DivPivot? = null, + rotation: Double? = null, +): DivTransform { + return DivTransform( + pivotX = optionalValue(pivotX), + pivotY = optionalValue(pivotY), + rotation = optionalValue(rotation), + ) +} diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivVariable.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivVariable.kt index adde7512d..bbe2e0011 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivVariable.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivVariable.kt @@ -9,7 +9,6 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -sealed class DivVariable { - abstract val type: String +sealed interface DivVariable { + val type: String } - diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivVisibilityAction.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivVisibilityAction.kt index 7d3f49f13..2e47eb714 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivVisibilityAction.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivVisibilityAction.kt @@ -10,7 +10,7 @@ import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* class DivVisibilityAction internal constructor( - @JsonIgnore val downloadCallbacks: Property?, + @JsonIgnore val downloadCallbacks: Property?, @JsonIgnore val logId: Property?, @JsonIgnore val logLimit: Property?, @JsonIgnore val payload: Property>?, @@ -50,7 +50,7 @@ fun TemplateContext.divVisibilityAction(): LiteralProperty TemplateContext.divVisibilityAction( logId: Property? = null, - downloadCallbacks: Property? = null, + downloadCallbacks: Property? = null, logLimit: Property? = null, payload: Property>? = null, referer: Property? = null, @@ -72,7 +72,7 @@ fun TemplateContext.divVisibilityAction( fun TemplateContext.divVisibilityAction( logId: String? = null, - downloadCallbacks: DownloadCallbacks? = null, + downloadCallbacks: DivDownloadCallbacks? = null, logLimit: Int? = null, payload: Map? = null, referer: URI? = null, @@ -94,7 +94,7 @@ fun TemplateContext.divVisibilityAction( fun CardContext.divVisibilityAction( logId: ValueProperty, - downloadCallbacks: ValueProperty? = null, + downloadCallbacks: ValueProperty? = null, logLimit: ValueProperty? = null, payload: ValueProperty>? = null, referer: ValueProperty? = null, @@ -116,7 +116,7 @@ fun CardContext.divVisibilityAction( fun CardContext.divVisibilityAction( logId: String, - downloadCallbacks: DownloadCallbacks? = null, + downloadCallbacks: DivDownloadCallbacks? = null, logLimit: Int? = null, payload: Map? = null, referer: URI? = null, diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivWrapContentSize.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivWrapContentSize.kt index f42090204..4af55f84f 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivWrapContentSize.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/DivWrapContentSize.kt @@ -11,7 +11,7 @@ import com.yandex.div.dsl.util.* class DivWrapContentSize internal constructor( @JsonIgnore val constrained: Property?, -) : DivSize() { +) : DivSize { @JsonProperty("type") override val type = "wrap_content" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/IntegerVariable.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/IntegerVariable.kt index d77b8cad9..a1734d6b7 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/IntegerVariable.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/IntegerVariable.kt @@ -12,7 +12,7 @@ import com.yandex.div.dsl.util.* class IntegerVariable internal constructor( @JsonIgnore val name: Property?, @JsonIgnore val value: Property?, -) : DivVariable() { +) : DivVariable { @JsonProperty("type") override val type = "integer" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/NumberVariable.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/NumberVariable.kt index 76e390c5e..2516fd219 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/NumberVariable.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/NumberVariable.kt @@ -12,7 +12,7 @@ import com.yandex.div.dsl.util.* class NumberVariable internal constructor( @JsonIgnore val name: Property?, @JsonIgnore val value: Property?, -) : DivVariable() { +) : DivVariable { @JsonProperty("type") override val type = "number" diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/StrVariable.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/StringVariable.kt similarity index 66% rename from json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/StrVariable.kt rename to json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/StringVariable.kt index 9ad1884ac..8b6bf26c5 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/StrVariable.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/StringVariable.kt @@ -9,10 +9,10 @@ import com.yandex.div.dsl.context.* import com.yandex.div.dsl.type.* import com.yandex.div.dsl.util.* -class StrVariable internal constructor( +class StringVariable internal constructor( @JsonIgnore val name: Property?, @JsonIgnore val value: Property?, -) : DivVariable() { +) : DivVariable { @JsonProperty("type") override val type = "string" @@ -25,48 +25,48 @@ class StrVariable internal constructor( } } -fun TemplateContext.strVariable(): LiteralProperty { - return value(StrVariable( +fun TemplateContext.stringVariable(): LiteralProperty { + return value(StringVariable( name = null, value = null, )) } -fun TemplateContext.strVariable( +fun TemplateContext.stringVariable( name: Property? = null, value: Property? = null, -): LiteralProperty { - return value(StrVariable( +): LiteralProperty { + return value(StringVariable( name = name, value = value, )) } -fun TemplateContext.strVariable( +fun TemplateContext.stringVariable( name: String? = null, value: String? = null, -): LiteralProperty { - return value(StrVariable( +): LiteralProperty { + return value(StringVariable( name = optionalValue(name), value = optionalValue(value), )) } -fun CardContext.strVariable( +fun CardContext.stringVariable( name: ValueProperty, value: ValueProperty, -): StrVariable { - return StrVariable( +): StringVariable { + return StringVariable( name = name, value = value, ) } -fun CardContext.strVariable( +fun CardContext.stringVariable( name: String, value: String, -): StrVariable { - return StrVariable( +): StringVariable { + return StringVariable( name = value(name), value = value(value), ) diff --git a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/UrlVariable.kt b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/UrlVariable.kt index 90952e586..aba069617 100644 --- a/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/UrlVariable.kt +++ b/json-builder/kotlin/src/generated/kotlin/com/yandex/div/dsl/model/UrlVariable.kt @@ -12,7 +12,7 @@ import com.yandex.div.dsl.util.* class UrlVariable internal constructor( @JsonIgnore val name: Property?, @JsonIgnore val value: Property?, -) : DivVariable() { +) : DivVariable { @JsonProperty("type") override val type = "url"