public class ThingAttribute extends Object implements Serializable
The properties of the thing, including thing name, thing type name, and a list of thing attributes.
| Constructor and Description |
|---|
ThingAttribute() |
| Modifier and Type | Method and Description |
|---|---|
ThingAttribute |
addattributesEntry(String key,
String value)
A list of thing attributes which are name-value pairs.
|
ThingAttribute |
clearattributesEntries()
Removes all the entries added into attributes.
|
boolean |
equals(Object obj) |
Map<String,String> |
getAttributes()
A list of thing attributes which are name-value pairs.
|
String |
getThingName()
The name of the thing.
|
String |
getThingTypeName()
The name of the thing type, if the thing has been associated with a type.
|
Long |
getVersion()
The version of the thing record in the registry.
|
int |
hashCode() |
void |
setAttributes(Map<String,String> attributes)
A list of thing attributes which are name-value pairs.
|
void |
setThingName(String thingName)
The name of the thing.
|
void |
setThingTypeName(String thingTypeName)
The name of the thing type, if the thing has been associated with a type.
|
void |
setVersion(Long version)
The version of the thing record in the registry.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ThingAttribute |
withAttributes(Map<String,String> attributes)
A list of thing attributes which are name-value pairs.
|
ThingAttribute |
withThingName(String thingName)
The name of the thing.
|
ThingAttribute |
withThingTypeName(String thingTypeName)
The name of the thing type, if the thing has been associated with a type.
|
ThingAttribute |
withVersion(Long version)
The version of the thing record in the registry.
|
public String getThingName()
The name of the thing.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9:_-]+
The name of the thing.
public void setThingName(String thingName)
The name of the thing.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9:_-]+
thingName - The name of the thing.
public ThingAttribute withThingName(String thingName)
The name of the thing.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9:_-]+
thingName - The name of the thing.
public String getThingTypeName()
The name of the thing type, if the thing has been associated with a type.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9:_-]+
The name of the thing type, if the thing has been associated with a type.
public void setThingTypeName(String thingTypeName)
The name of the thing type, if the thing has been associated with a type.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9:_-]+
thingTypeName - The name of the thing type, if the thing has been associated with a type.
public ThingAttribute withThingTypeName(String thingTypeName)
The name of the thing type, if the thing has been associated with a type.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9:_-]+
thingTypeName - The name of the thing type, if the thing has been associated with a type.
public Map<String,String> getAttributes()
A list of thing attributes which are name-value pairs.
A list of thing attributes which are name-value pairs.
public void setAttributes(Map<String,String> attributes)
A list of thing attributes which are name-value pairs.
attributes - A list of thing attributes which are name-value pairs.
public ThingAttribute withAttributes(Map<String,String> attributes)
A list of thing attributes which are name-value pairs.
Returns a reference to this object so that method calls can be chained together.
attributes - A list of thing attributes which are name-value pairs.
public ThingAttribute addattributesEntry(String key, String value)
A list of thing attributes which are name-value pairs.
The method adds a new key-value pair into attributes parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into attributes.value - The corresponding value of the entry to be added into
attributes.public ThingAttribute clearattributesEntries()
Returns a reference to this object so that method calls can be chained together.
public Long getVersion()
The version of the thing record in the registry.
The version of the thing record in the registry.
public void setVersion(Long version)
The version of the thing record in the registry.
version - The version of the thing record in the registry.
public ThingAttribute withVersion(Long version)
The version of the thing record in the registry.
Returns a reference to this object so that method calls can be chained together.
version - The version of the thing record in the registry.
public String toString()
toString in class ObjectObject.toString()Copyright © 2017. All rights reserved.