Record Class GetApps.Response
java.lang.Object
java.lang.Record
io.openems.edge.core.appmanager.jsonrpc.GetApps.Response
- Enclosing class:
GetApps
-
Constructor Summary
ConstructorsConstructorDescriptionResponse
(com.google.gson.JsonArray apps) Creates an instance of aResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonArray
apps()
Returns the value of theapps
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static GetApps.Response
newInstance
(List<OpenemsApp> availableApps, List<OpenemsAppInstance> instantiatedApps, Role userRole, Language language, Validator validator) Creates a new Response.static JsonSerializer
<GetApps.Response> Returns aJsonSerializer
for aGetApps.Response
.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Response
public Response(com.google.gson.JsonArray apps) Creates an instance of aResponse
record class.- Parameters:
apps
- the value for theapps
record component
-
-
Method Details
-
newInstance
public static GetApps.Response newInstance(List<OpenemsApp> availableApps, List<OpenemsAppInstance> instantiatedApps, Role userRole, Language language, Validator validator) Creates a new Response.- Parameters:
availableApps
- all available appinstantiatedApps
- allOpenemsAppInstance
userRole
- the currentRole
of the userlanguage
- the currentLanguage
of the uservalidator
- theValidator
to validate the app- Returns:
- the created Response
-
serializer
Returns aJsonSerializer
for aGetApps.Response
.- Returns:
- the created
JsonSerializer
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
apps
public com.google.gson.JsonArray apps()Returns the value of theapps
record component.- Returns:
- the value of the
apps
record component
-