Sdílet prostřednictvím


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.

public class JsonFieldWithDefault
public class JsonFieldWithDefault : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.EventGrid.Models.JsonFieldWithDefault>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.EventGrid.Models.JsonFieldWithDefault>
type JsonFieldWithDefault = class
type JsonFieldWithDefault = class
    interface IJsonModel<JsonFieldWithDefault>
    interface IPersistableModel<JsonFieldWithDefault>
Public Class JsonFieldWithDefault
Public Class JsonFieldWithDefault
Implements IJsonModel(Of JsonFieldWithDefault), IPersistableModel(Of JsonFieldWithDefault)
Inheritance
JsonFieldWithDefault
Implements

Constructors

JsonFieldWithDefault()

Initializes a new instance of JsonFieldWithDefault.

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.

Explicit Interface Implementations

IJsonModel<JsonFieldWithDefault>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<JsonFieldWithDefault>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<JsonFieldWithDefault>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<JsonFieldWithDefault>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<JsonFieldWithDefault>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to