Decorators (experimental)
Azure.Core.Experimental
Section titled “Azure.Core.Experimental”@changePropertyType
Section titled “@changePropertyType”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)Target
Section titled “Target”The model property to change.
ModelProperty
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| newType | Model | Union | Scalar | Enum | The new type to assign to the model property. |
@copyProperties
Section titled “@copyProperties”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)Target
Section titled “Target”The model to copy properties to.
Model
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| sourceModel | Model | The model to copy properties from. |
@copyVariants
Section titled “@copyVariants”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)Target
Section titled “Target”The union to copy variants to.
Union
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| sourceUnion | Union | The union to copy variants from. |