次の方法で共有


JsonField Class

  • java.lang.Object
    • com.azure.resourcemanager.eventgrid.models.JsonField

Implements

public final class JsonField
implements JsonSerializable<JsonField>

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 'id', 'topic' and 'eventtime' properties. This represents a field in the input event schema.

Constructor Summary

Constructor Description
JsonField()

Creates an instance of JsonField class.

Method Summary

Modifier and Type Method and Description
static JsonField fromJson(JsonReader jsonReader)

Reads an instance of JsonField from the JsonReader.

String sourceField()

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

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

JsonField withSourceField(String sourceField)

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

Methods inherited from java.lang.Object

Constructor Details

JsonField

public JsonField()

Creates an instance of JsonField class.

Method Details

fromJson

public static JsonField fromJson(JsonReader jsonReader)

Reads an instance of JsonField from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of JsonField if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the JsonField.

sourceField

public String sourceField()

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

Returns:

the sourceField value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withSourceField

public JsonField withSourceField(String sourceField)

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

Parameters:

sourceField - the sourceField value to set.

Returns:

the JsonField object itself.

Applies to