Decorators
Azure.Core
@finalLocation
Identifies a ModelProperty as containing the final location for the operation result.
@Azure.Core.finalLocation(finalResult?: Model | void)
Target
ModelProperty
Parameters
Name | Type | Description |
---|---|---|
finalResult | Model | void | Sets the expected return value for the final result. Overrides any value provided in the decorated property, if the property uses ResourceLocation |
@finalOperation
Identifies that an operation is the final operation for an LRO.
@Azure.Core.finalOperation(linkedOperation: Operation, parameters?: {})
Target
Operation
Parameters
Name | Type | Description |
---|---|---|
linkedOperation | Operation | The linked Operation |
parameters | {} | Map of RequestParameter<Name> and/or ResponseProperty<Name> that willbe passed to the linked operation request. |
@fixed
Marks an Enum as being fixed since enums in Azure are assumed to be extensible.
@Azure.Core.fixed
Target
Enum
Parameters
None
@items
Identifies the ModelProperty that contains the paged items. Can only be used on a Model marked with @pagedResult
.
@Azure.Core.items
Target
ModelProperty
Parameters
None
@lroCanceled
Used for custom StatusMonitor implementation. Identifies an EnumMember as a long-running āCanceledā terminal state.
@Azure.Core.lroCanceled
Target
EnumMember | UnionVariant
Parameters
None
@lroErrorResult
Used for custom StatusMonitor implementation. Identifies a model property of a StatusMonitor as containing the result of a long-running operation that terminates unsuccessfully (Failed).
@Azure.Core.lroErrorResult
Target
ModelProperty
Parameters
None
@lroFailed
Used for custom StatusMonitor implementation. Identifies an enum member as a long-running āFailedā terminal state.
@Azure.Core.lroFailed
Target
EnumMember | UnionVariant
Parameters
None
@lroResult
Used for custom StatusMonitor implementation. Identifies a model property of a StatusMonitor as containing the result of a long-running operation that terminates successfully (Succeeded).
@Azure.Core.lroResult
Target
ModelProperty
Parameters
None
@lroStatus
Used for custom StatusMonitor implementation. Identifies an Enum or ModelProperty as containing long-running operation status.
@Azure.Core.lroStatus
Target
Enum | Union | ModelProperty
Parameters
None
@lroSucceeded
Used for custom StatusMonitor implementation. Identifies an EnumMember as a long-running āSucceededā terminal state.
@Azure.Core.lroSucceeded
Target
EnumMember | UnionVariant
Parameters
None
@nextPageOperation
Identifies that an operation is used to retrieve the next page for paged operations.
@Azure.Core.nextPageOperation(linkedOperation: Operation, parameters?: {})
Target
Operation
Parameters
Name | Type | Description |
---|---|---|
linkedOperation | Operation | The linked Operation |
parameters | {} | Map of RequestParameter<Name> and/or ResponseProperty<Name> that willbe passed to the linked operation request. |
@operationLink
Identifies an operation that is linked to the target operation.
@Azure.Core.operationLink(linkedOperation: Operation, linkType: valueof string, parameters?: {})
Target
Operation
Parameters
Name | Type | Description |
---|---|---|
linkedOperation | Operation | The linked Operation |
linkType | valueof string | A string indicating the role of the linked operation |
parameters | {} | Map of RequestParameter<Name> and/or ResponseProperty<Name> that willbe passed to the linked operation request. |
@pagedResult
Marks a Model as a paged collection.
@Azure.Core.pagedResult
Target
Model
Parameters
None
@pollingLocation
Identifies a model property as containing the location to poll for operation state.
@Azure.Core.pollingLocation(options?: Azure.Core.PollingOptions)
Target
ModelProperty
Parameters
Name | Type | Description |
---|---|---|
options | PollingOptions | PollingOptions for the poller pointed to by this link. Overrides settings derived from property value it is decorating, if the value of the property is ResourceLocation |
@pollingOperation
Identifies that an operation is a polling operation for an LRO.
@Azure.Core.pollingOperation(linkedOperation: Operation, parameters?: {})
Target
Operation
Parameters
Name | Type | Description |
---|---|---|
linkedOperation | Operation | The linked Operation |
parameters | {} | Map of RequestParameter<Name> and/or ResponseProperty<Name> that willbe passed to the linked operation request. |
@pollingOperationParameter
Used to define how to call custom polling operations for long-running operations.
@Azure.Core.pollingOperationParameter(targetParameter?: ModelProperty | string)
Target
ModelProperty
Parameters
Name | Type | Description |
---|---|---|
targetParameter | ModelProperty | string | A reference to the polling operation parameter this parameter provides a value for, or the name of that parameter. The default value is the name of the decorated parameter or property. |
@useFinalStateVia
Overrides the final state value for an operation
@Azure.Core.useFinalStateVia(finalState: valueof "original-uri" | "operation-location" | "location" | "azure-async-operation")
Target
Operation
Parameters
Name | Type | Description |
---|---|---|
finalState | valueof "original-uri" | "operation-location" | "location" | "azure-async-operation" | The desired final state value |
Azure.Core.Foundations
@omitKeyProperties
Deletes any key properties from the model.
@Azure.Core.Foundations.omitKeyProperties
Target
Model
Parameters
None
@requestParameter
Identifies a property on a request model that serves as a linked operation parameter.
@Azure.Core.Foundations.requestParameter(name: valueof string)
Target
Model
Parameters
Name | Type | Description |
---|---|---|
name | valueof string | Property name on the target |
@responseProperty
Identifies a property on all non-error response models that serve as a linked operation parameter.
@Azure.Core.Foundations.responseProperty(name: valueof string)
Target
Model
Parameters
Name | Type | Description |
---|---|---|
name | valueof string | Property name on the target |
Azure.Core.Traits
@trait
@trait
marks a model type as representing a ātraitā and performs basic validation
checks.
@Azure.Core.Traits.trait(traitName?: valueof string)
Target
The model type to mark as a trait.
Model
Parameters
Name | Type | Description |
---|---|---|
traitName | valueof string | An optional name to uniquely identify the trait. If unspecified, the model type name is used. |
@traitAdded
Sets the version for when the trait was added to the specification. Can be applied to either a trait model type or its envelope property.
@Azure.Core.Traits.traitAdded(addedVersion: EnumMember | null)
Target
Model | ModelProperty
Parameters
Name | Type | Description |
---|---|---|
addedVersion | EnumMember | null | The enum member representing the service version. |
@traitContext
@traitContext
sets the applicable context for a trait on its envelope property.
@Azure.Core.Traits.traitContext(contexts: EnumMember | Union | unknown)
Target
The trait envelope property where the context will be applied.
ModelProperty
Parameters
Name | Type | Description |
---|---|---|
contexts | EnumMember | Union | unknown | An enum member or union of enum members representing the traitās applicable contexts. |
@traitLocation
@traitLocation
sets the applicable location for a trait on its envelope property.
@Azure.Core.Traits.traitLocation(contexts: EnumMember)
Target
The trait envelope property where the context will be applied.
ModelProperty
Parameters
Name | Type | Description |
---|---|---|
contexts | EnumMember | An enum member or union of enum members representing the traitās applicable contexts. |