Record Class GetApp.Response
java.lang.Object
java.lang.Record
io.openems.edge.core.appmanager.jsonrpc.GetApp.Response
- Enclosing class:
GetApp
-
Constructor Summary
ConstructorsConstructorDescriptionResponse
(com.google.gson.JsonObject app) Creates an instance of aResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonObject
app()
Returns the value of theapp
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 GetApp.Response
newInstance
(OpenemsApp app, List<OpenemsAppInstance> instantiatedApps, Language language, Validator validator) Creates a Response.static JsonSerializer
<GetApp.Response> Returns aJsonSerializer
for aGetApp.Response
.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Response
public Response(com.google.gson.JsonObject app) Creates an instance of aResponse
record class.- Parameters:
app
- the value for theapp
record component
-
-
Method Details
-
newInstance
public static GetApp.Response newInstance(OpenemsApp app, List<OpenemsAppInstance> instantiatedApps, Language language, Validator validator) throws OpenemsError.OpenemsNamedException Creates a Response.- Parameters:
app
- the app of the responseinstantiatedApps
- all createdOpenemsAppInstance
language
- the current languagevalidator
- theValidator
- Returns:
- the created Response
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
serializer
Returns aJsonSerializer
for aGetApp.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)
. -
app
public com.google.gson.JsonObject app()Returns the value of theapp
record component.- Returns:
- the value of the
app
record component
-