DeviceTwinProperties Class

  • java.lang.Object
    • com.azure.messaging.eventgrid.systemevents.DeviceTwinProperties

Implements

public final class DeviceTwinProperties
implements JsonSerializable<DeviceTwinProperties>

A portion of the properties that can be written only by the application back-end, and read by the device.

Constructor Summary

Constructor Description
DeviceTwinProperties()

Creates an instance of DeviceTwinProperties class.

Method Summary

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

Reads an instance of DeviceTwinProperties from the JsonReader.

DeviceTwinMetadata getMetadata()

Get the metadata property: Metadata information for the properties JSON document.

Float getVersion()

Get the version property: Version of device twin properties.

DeviceTwinProperties setMetadata(DeviceTwinMetadata metadata)

Set the metadata property: Metadata information for the properties JSON document.

DeviceTwinProperties setVersion(Float version)

Set the version property: Version of device twin properties.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

DeviceTwinProperties

public DeviceTwinProperties()

Creates an instance of DeviceTwinProperties class.

Method Details

fromJson

public static DeviceTwinProperties fromJson(JsonReader jsonReader)

Reads an instance of DeviceTwinProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getMetadata

public DeviceTwinMetadata getMetadata()

Get the metadata property: Metadata information for the properties JSON document.

Returns:

the metadata value.

getVersion

public Float getVersion()

Get the version property: Version of device twin properties.

Returns:

the version value.

setMetadata

public DeviceTwinProperties setMetadata(DeviceTwinMetadata metadata)

Set the metadata property: Metadata information for the properties JSON document.

Parameters:

metadata - the metadata value to set.

Returns:

the DeviceTwinProperties object itself.

setVersion

public DeviceTwinProperties setVersion(Float version)

Set the version property: Version of device twin properties.

Parameters:

version - the version value to set.

Returns:

the DeviceTwinProperties object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to

Azure SDK for Java

Latest