Skip to content

Decorators (experimental)

Changes the type of a model property to a new type.

This can be used in situations where an existing model property type needs to be changed because it cannot be redefined.

WARNING: This decorator mutates the model property in place and should be used with EXTREME caution.

@Azure.Core.Experimental.changePropertyType(newType: Model | Union | Scalar | Enum)

The model property to change. ModelProperty

NameTypeDescription
newTypeModel | Union | Scalar | EnumThe new type to assign to the model property.

Copies the properties of source that do not already exist on target into target.

This can be used to add a group of properties to an existing model in cases where the model cannot be redefined.

WARNING: This decorator mutates the target model in place and should be used with EXTREME caution.

@Azure.Core.Experimental.copyProperties(sourceModel: Model)

The model to copy properties to. Model

NameTypeDescription
sourceModelModelThe model to copy properties from.

Copies the variants of sourceUnion that do not already exist on target into target.

This can be used to add a group of variants to an existing union in cases where the union cannot be redefined.

WARNING: This decorator mutates the target union in place and should be used with EXTREME caution.

@Azure.Core.Experimental.copyVariants(sourceUnion: Union)

The union to copy variants to. Union

NameTypeDescription
sourceUnionUnionThe union to copy variants from.