次の方法で共有


JsonInputSchemaMapping Class

public final class JsonInputSchemaMapping
extends InputSchemaMapping

This enables publishing to Event Grid using a custom input schema. This can be used to map properties from a custom input JSON schema to the Event Grid event schema.

Constructor Summary

Constructor Description
JsonInputSchemaMapping()

Creates an instance of JsonInputSchemaMapping class.

Method Summary

Modifier and Type Method and Description
JsonFieldWithDefault dataVersion()

Get the dataVersion property: The mapping information for the DataVersion property of the Event Grid Event.

JsonField eventTime()

Get the eventTime property: The mapping information for the EventTime property of the Event Grid Event.

JsonFieldWithDefault eventType()

Get the eventType property: The mapping information for the EventType property of the Event Grid Event.

static JsonInputSchemaMapping fromJson(JsonReader jsonReader)

Reads an instance of JsonInputSchemaMapping from the JsonReader.

JsonField id()

Get the id property: The mapping information for the Id property of the Event Grid Event.

InputSchemaMappingType inputSchemaMappingType()

Get the inputSchemaMappingType property: Type of the custom mapping.

JsonFieldWithDefault subject()

Get the subject property: The mapping information for the Subject property of the Event Grid Event.

JsonWriter toJson(JsonWriter jsonWriter)
JsonField topic()

Get the topic property: The mapping information for the Topic property of the Event Grid Event.

void validate()

Validates the instance.

JsonInputSchemaMapping withDataVersion(JsonFieldWithDefault dataVersion)

Set the dataVersion property: The mapping information for the DataVersion property of the Event Grid Event.

JsonInputSchemaMapping withEventTime(JsonField eventTime)

Set the eventTime property: The mapping information for the EventTime property of the Event Grid Event.

JsonInputSchemaMapping withEventType(JsonFieldWithDefault eventType)

Set the eventType property: The mapping information for the EventType property of the Event Grid Event.

JsonInputSchemaMapping withId(JsonField id)

Set the id property: The mapping information for the Id property of the Event Grid Event.

JsonInputSchemaMapping withSubject(JsonFieldWithDefault subject)

Set the subject property: The mapping information for the Subject property of the Event Grid Event.

JsonInputSchemaMapping withTopic(JsonField topic)

Set the topic property: The mapping information for the Topic property of the Event Grid Event.

Methods inherited from InputSchemaMapping

Methods inherited from java.lang.Object

Constructor Details

JsonInputSchemaMapping

public JsonInputSchemaMapping()

Creates an instance of JsonInputSchemaMapping class.

Method Details

dataVersion

public JsonFieldWithDefault dataVersion()

Get the dataVersion property: The mapping information for the DataVersion property of the Event Grid Event.

Returns:

the dataVersion value.

eventTime

public JsonField eventTime()

Get the eventTime property: The mapping information for the EventTime property of the Event Grid Event.

Returns:

the eventTime value.

eventType

public JsonFieldWithDefault eventType()

Get the eventType property: The mapping information for the EventType property of the Event Grid Event.

Returns:

the eventType value.

fromJson

public static JsonInputSchemaMapping fromJson(JsonReader jsonReader)

Reads an instance of JsonInputSchemaMapping from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of JsonInputSchemaMapping 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 JsonInputSchemaMapping.

id

public JsonField id()

Get the id property: The mapping information for the Id property of the Event Grid Event.

Returns:

the id value.

inputSchemaMappingType

public InputSchemaMappingType inputSchemaMappingType()

Get the inputSchemaMappingType property: Type of the custom mapping.

Overrides:

JsonInputSchemaMapping.inputSchemaMappingType()

Returns:

the inputSchemaMappingType value.

subject

public JsonFieldWithDefault subject()

Get the subject property: The mapping information for the Subject property of the Event Grid Event.

Returns:

the subject value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

JsonInputSchemaMapping.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

topic

public JsonField topic()

Get the topic property: The mapping information for the Topic property of the Event Grid Event.

Returns:

the topic value.

validate

public void validate()

Validates the instance.

Overrides:

JsonInputSchemaMapping.validate()

withDataVersion

public JsonInputSchemaMapping withDataVersion(JsonFieldWithDefault dataVersion)

Set the dataVersion property: The mapping information for the DataVersion property of the Event Grid Event.

Parameters:

dataVersion - the dataVersion value to set.

Returns:

the JsonInputSchemaMapping object itself.

withEventTime

public JsonInputSchemaMapping withEventTime(JsonField eventTime)

Set the eventTime property: The mapping information for the EventTime property of the Event Grid Event.

Parameters:

eventTime - the eventTime value to set.

Returns:

the JsonInputSchemaMapping object itself.

withEventType

public JsonInputSchemaMapping withEventType(JsonFieldWithDefault eventType)

Set the eventType property: The mapping information for the EventType property of the Event Grid Event.

Parameters:

eventType - the eventType value to set.

Returns:

the JsonInputSchemaMapping object itself.

withId

public JsonInputSchemaMapping withId(JsonField id)

Set the id property: The mapping information for the Id property of the Event Grid Event.

Parameters:

id - the id value to set.

Returns:

the JsonInputSchemaMapping object itself.

withSubject

public JsonInputSchemaMapping withSubject(JsonFieldWithDefault subject)

Set the subject property: The mapping information for the Subject property of the Event Grid Event.

Parameters:

subject - the subject value to set.

Returns:

the JsonInputSchemaMapping object itself.

withTopic

public JsonInputSchemaMapping withTopic(JsonField topic)

Set the topic property: The mapping information for the Topic property of the Event Grid Event.

Parameters:

topic - the topic value to set.

Returns:

the JsonInputSchemaMapping object itself.

Applies to