JsonFieldWithDefault Class
- java.
lang. Object - com.
azure. resourcemanager. eventgrid. models. JsonFieldWithDefault
- com.
Implements
public final class JsonFieldWithDefault
implements JsonSerializable<JsonFieldWithDefault>
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.
Constructor | Description |
---|---|
Json |
Creates an instance of Json |
Modifier and Type | Method and Description |
---|---|
String |
default Get the default |
static
Json |
from Reads an instance of Json |
String |
source Get the source |
Json |
to |
void |
validate()
Validates the instance. |
Json |
with Set the default |
Json |
with Set the source |
Methods inherited from java.lang.Object
JsonFieldWithDefault
public JsonFieldWithDefault()
Creates an instance of JsonFieldWithDefault class.
defaultValue
public String defaultValue()
Get the defaultValue property: 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.
Returns:
fromJson
public static JsonFieldWithDefault fromJson(JsonReader jsonReader)
Reads an instance of JsonFieldWithDefault from the JsonReader.
Parameters:
Returns:
Throws:
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:
toJson
validate
public void validate()
Validates the instance.
withDefaultValue
public JsonFieldWithDefault withDefaultValue(String defaultValue)
Set the defaultValue property: 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.
Parameters:
Returns:
withSourceField
public JsonFieldWithDefault 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:
Returns:
Azure SDK for Java-feedback
Azure SDK for Java is een open source project. Selecteer een koppeling om feedback te geven: