Record Class GetEdgesResponse.EdgeMetadata
java.lang.Object
java.lang.Record
io.openems.common.jsonrpc.response.GetEdgesResponse.EdgeMetadata
- Enclosing class:
- GetEdgesResponse
public static record GetEdgesResponse.EdgeMetadata(String id, String comment, String producttype, SemanticVersion version, Role role, boolean isOnline, ZonedDateTime lastmessage, ZonedDateTime firstSetupProtocol, Level sumState)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionEdgeMetadata
(String id, String comment, String producttype, SemanticVersion version, Role role, boolean isOnline, ZonedDateTime lastmessage, ZonedDateTime firstSetupProtocol, Level sumState) Creates an instance of aEdgeMetadata
record class. -
Method Summary
Modifier and TypeMethodDescriptioncomment()
Returns the value of thecomment
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefirstSetupProtocol
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.boolean
isOnline()
Returns the value of theisOnline
record component.Returns the value of thelastmessage
record component.Returns the value of theproducttype
record component.role()
Returns the value of therole
record component.sumState()
Returns the value of thesumState
record component.static com.google.gson.JsonArray
toJson
(List<GetEdgesResponse.EdgeMetadata> metadatas) Converts a collection of EdgeMetadatas to a JsonArray.protected com.google.gson.JsonObject
final String
toString()
Returns a string representation of this record class.version()
Returns the value of theversion
record component.
-
Constructor Details
-
EdgeMetadata
public EdgeMetadata(String id, String comment, String producttype, SemanticVersion version, Role role, boolean isOnline, ZonedDateTime lastmessage, ZonedDateTime firstSetupProtocol, Level sumState) Creates an instance of aEdgeMetadata
record class.- Parameters:
id
- the value for theid
record componentcomment
- the value for thecomment
record componentproducttype
- the value for theproducttype
record componentversion
- the value for theversion
record componentrole
- the value for therole
record componentisOnline
- the value for theisOnline
record componentlastmessage
- the value for thelastmessage
record componentfirstSetupProtocol
- the value for thefirstSetupProtocol
record componentsumState
- the value for thesumState
record component
-
-
Method Details
-
toJson
Converts a collection of EdgeMetadatas to a JsonArray.[{ "id": String, "comment": String, "producttype": String, "version": String, "role":
Role
, "isOnline": boolean, "lastmessage": ZonedDateTime }]- Parameters:
metadatas
- the EdgeMetadatas- Returns:
- a JsonArray
-
toJsonObject
protected com.google.gson.JsonObject toJsonObject() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
comment
Returns the value of thecomment
record component.- Returns:
- the value of the
comment
record component
-
producttype
Returns the value of theproducttype
record component.- Returns:
- the value of the
producttype
record component
-
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-
role
Returns the value of therole
record component.- Returns:
- the value of the
role
record component
-
isOnline
public boolean isOnline()Returns the value of theisOnline
record component.- Returns:
- the value of the
isOnline
record component
-
lastmessage
Returns the value of thelastmessage
record component.- Returns:
- the value of the
lastmessage
record component
-
firstSetupProtocol
Returns the value of thefirstSetupProtocol
record component.- Returns:
- the value of the
firstSetupProtocol
record component
-
sumState
Returns the value of thesumState
record component.- Returns:
- the value of the
sumState
record component
-