azure-docs-sdk-java/docs-ref-autogen/com.microsoft.azure.sdk.iot...

113 строки
9.0 KiB
YAML

### YamlMime:JavaType
uid: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata"
fullName: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata"
name: "TwinMetadata"
nameWithType: "TwinMetadata"
summary: "Representation of a single Twin metadata for the <xref uid=\"com.microsoft.azure.sdk.iot.deps.twin.TwinCollection\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TwinCollection\"></xref>."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "<xref href=\"java.lang.Object?alt=java.lang.Object&text=Object\" data-throw-if-not-resolved=\"False\" />"
methodsRef:
- "<xref href=\"java.lang.Object.clone()?alt=java.lang.Object.clone&text=clone\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.equals(java.lang.Object)?alt=java.lang.Object.equals&text=equals\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.finalize()?alt=java.lang.Object.finalize&text=finalize\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.getClass()?alt=java.lang.Object.getClass&text=getClass\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.hashCode()?alt=java.lang.Object.hashCode&text=hashCode\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.notify()?alt=java.lang.Object.notify&text=notify\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.notifyAll()?alt=java.lang.Object.notifyAll&text=notifyAll\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.toString()?alt=java.lang.Object.toString&text=toString\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait()?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait(long)?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"java.lang.Object.wait(long,int)?alt=java.lang.Object.wait&text=wait\" data-throw-if-not-resolved=\"False\" />"
syntax: "public class **TwinMetadata**"
fields:
- uid: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.LAST_UPDATE_TAG"
fullName: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.LAST_UPDATE_TAG"
name: "LAST_UPDATE_TAG"
nameWithType: "TwinMetadata.LAST_UPDATE_TAG"
modifiers:
- "static"
- "final"
field:
value: "$lastUpdated"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static final String LAST_UPDATE_TAG"
- uid: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.LAST_UPDATE_VERSION_TAG"
fullName: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.LAST_UPDATE_VERSION_TAG"
name: "LAST_UPDATE_VERSION_TAG"
nameWithType: "TwinMetadata.LAST_UPDATE_VERSION_TAG"
modifiers:
- "static"
- "final"
field:
value: "$lastUpdatedVersion"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static final String LAST_UPDATE_VERSION_TAG"
methods:
- uid: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.getLastUpdated()"
fullName: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.getLastUpdated()"
name: "getLastUpdated()"
nameWithType: "TwinMetadata.getLastUpdated()"
summary: "Getter for the last<wbr>Updated."
syntax: "public Date getLastUpdated()"
desc: "Getter for the lastUpdated."
returns:
description: "the <code>Date</code> with the stored lastUpdated. It can be <code>null</code>."
type: "<xref href=\"java.util.Date?alt=java.util.Date&text=Date\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.getLastUpdatedVersion()"
fullName: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.getLastUpdatedVersion()"
name: "getLastUpdatedVersion()"
nameWithType: "TwinMetadata.getLastUpdatedVersion()"
summary: "Getter for the last<wbr>Updated<wbr>Version."
syntax: "public Integer getLastUpdatedVersion()"
desc: "Getter for the lastUpdatedVersion."
returns:
description: "the <code>Integer</code> with the stored lastUpdatedVersion. It can be <code>null</code>."
type: "<xref href=\"java.lang.Integer?alt=java.lang.Integer&text=Integer\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.toJsonElement()"
fullName: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.toJsonElement()"
name: "toJsonElement()"
nameWithType: "TwinMetadata.toJsonElement()"
summary: "Serializer"
modifiers:
- "protected"
syntax: "protected JsonElement toJsonElement()"
desc: "Serializer\n\nCreates a `JsonElement`, which the content represents the information in this class in a JSON format. This is useful if the caller will integrate this JSON with JSON from other classes to generate a consolidated JSON."
returns:
description: "The <code>JsonElement</code> with the content of this class."
type: "<xref href=\"com.google.gson.JsonElement?alt=com.google.gson.JsonElement&text=JsonElement\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.toString()"
fullName: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.toString()"
name: "toString()"
nameWithType: "TwinMetadata.toString()"
summary: "Creates a pretty print JSON with the content of this class and subclasses."
overridden: "java.lang.Object.toString()"
syntax: "public String toString()"
desc: "Creates a pretty print JSON with the content of this class and subclasses."
returns:
description: "The <code>String</code> with the pretty print JSON."
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.tryExtractFromMap(java.lang.Object)"
fullName: "com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata.tryExtractFromMap(Object metadata)"
name: "tryExtractFromMap(Object metadata)"
nameWithType: "TwinMetadata.tryExtractFromMap(Object metadata)"
summary: "Metadata extractor"
modifiers:
- "protected"
- "static"
parameters:
- description: "the <code>Object</code> that may contains the metadata."
name: "metadata"
type: "<xref href=\"java.lang.Object?alt=java.lang.Object&text=Object\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected static TwinMetadata tryExtractFromMap(Object metadata)"
desc: "Metadata extractor\n\nThis internal method will try to find $lastUpdated and $lastUpdatedVersion at the first level of the provided Map (Object), and create a new instance of the TwinMetadata with this information.\n\nOnce the provide Object can or cannot be a Map, and, if it is a Map, it can or cannot contains a valid metadata, this method contains the label **try**, which means that it can return a valid TwinMetadata or `null`.\n\nFor instance, for the follow Map, this method will create a TwinMetadata with `lastUpdated = 2015-09-21T02:07:44.238Z` and `lastUpdatedVersion = 3`\n\n```java\n\"$lastUpdated\":\"2015-09-21T02:07:44.238Z\",\n \"$lastUpdatedVersion\":3,\n \"Value\":{\n \"$lastUpdated\":\"2016-09-21T02:07:44.238Z\",\n \"$lastUpdatedVersion\":5\n },\n \"NewValue\":{\n \"$lastUpdated\":\"2017-09-21T02:07:44.238Z\",\n \"$lastUpdatedVersion\":5\n }\n```"
returns:
description: "A valid TwinMetadata instance it the provided metadata <code>Object</code> is a Map with\n data and version metadata, or <code>null</code> for the other cases."
type: "<xref href=\"com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata?alt=com.microsoft.azure.sdk.iot.deps.twin.TwinMetadata&text=TwinMetadata\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "Representation of a single Twin metadata for the <xref uid=\"com.microsoft.azure.sdk.iot.deps.twin.TwinCollection\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TwinCollection\"></xref>.\n\nThe metadata is a set of pairs lastUpdated/lastUpdatedVersion for each property and sub-property in the Twin. It is optionally provided by the service and the clients can only ready it.\n\nThis class store the Date and Version for each entity in the <xref uid=\"com.microsoft.azure.sdk.iot.deps.twin.TwinCollection\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TwinCollection\"></xref>.\n\nFor instance, the following is a valid TwinCollection with its metadata.\n\n```java\n\"$metadata\":{\n \"$lastUpdated\":\"2017-09-21T02:07:44.238Z\",\n \"$lastUpdatedVersion\":4,\n \"MaxSpeed\":{\n \"$lastUpdated\":\"2017-09-21T02:07:44.238Z\",\n \"$lastUpdatedVersion\":3,\n \"Value\":{\n \"$lastUpdated\":\"2017-09-21T02:07:44.238Z\",\n \"$lastUpdatedVersion\":5\n },\n \"NewValue\":{\n \"$lastUpdated\":\"2017-09-21T02:07:44.238Z\",\n \"$lastUpdatedVersion\":5\n }\n }\n }\n```"
metadata: {}
package: "com.microsoft.azure.sdk.iot.deps.twin"
artifact: com.microsoft.azure.sdk.iot:iot-deps:0.12.0