Udostępnij za pośrednictwem


JsonFieldWithDefault Class

Definition

This is used to express the source of an input schema mapping for a single target field in the Event Grid Event schema. This is currently used in the mappings for the 'subject', 'eventtype' and 'dataversion' properties. This represents a field in the input event schema along with a default value to be used, and at least one of these two properties should be provided.

[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.JsonFieldWithDefaultTypeConverter))]
public class JsonFieldWithDefault : Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.IJsonFieldWithDefault
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.JsonFieldWithDefaultTypeConverter))>]
type JsonFieldWithDefault = class
    interface IJsonFieldWithDefault
    interface IJsonSerializable
Public Class JsonFieldWithDefault
Implements IJsonFieldWithDefault
Inheritance
JsonFieldWithDefault
Attributes
Implements

Constructors

JsonFieldWithDefault()

Creates an new JsonFieldWithDefault instance.

Properties

DefaultValue

The default value to be used for mapping when a SourceField is not provided or if there's no property with the specified name in the published JSON event payload.

SourceField

Name of a field in the input event schema that's to be used as the source of a mapping.

Methods

DeserializeFromDictionary(IDictionary)

Deserializes a IDictionary into an instance of JsonFieldWithDefault.

DeserializeFromPSObject(PSObject)

Deserializes a PSObject into an instance of JsonFieldWithDefault.

FromJson(JsonNode)

Deserializes a JsonNode into an instance of Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.IJsonFieldWithDefault.

FromJsonString(String)

Creates a new instance of JsonFieldWithDefault, deserializing the content from a json string.

ToJson(JsonObject, SerializationMode)

Serializes this instance of JsonFieldWithDefault into a JsonNode.

ToJsonString()

Serializes this instance to a json string.

ToString()

Applies to