Package dev.adlin.vts4j.entity
Record Class Request
java.lang.Object
java.lang.Record
dev.adlin.vts4j.entity.Request
public record Request(@NotNull String apiName, @NotNull String apiVersion, @NotNull String id, @NotNull String type, @NotNull com.google.gson.JsonObject payload)
extends Record
An object used to deserialize a request into JSON format and send it to the server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StringapiName()Returns the value of theapiNamerecord component.@NotNull StringReturns the value of theapiVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringid()Returns the value of theidrecord component.@NotNull com.google.gson.JsonObjectpayload()Returns the value of thepayloadrecord component.final StringtoString()Returns a string representation of this record class.@NotNull Stringtype()Returns the value of thetyperecord component.
-
Constructor Details
-
Request
public Request(@NotNull @NotNull String apiName, @NotNull @NotNull String apiVersion, @NotNull @NotNull String id, @NotNull @NotNull String type, @NotNull @NotNull com.google.gson.JsonObject payload) Creates an instance of aRequestrecord class.- Parameters:
apiName- the value for theapiNamerecord componentapiVersion- the value for theapiVersionrecord componentid- the value for theidrecord componenttype- the value for thetyperecord componentpayload- the value for thepayloadrecord component
-
-
Method Details
-
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). -
apiName
Returns the value of theapiNamerecord component.- Returns:
- the value of the
apiNamerecord component
-
apiVersion
Returns the value of theapiVersionrecord component.- Returns:
- the value of the
apiVersionrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
payload
@SerializedName("data") @NotNull public @NotNull com.google.gson.JsonObject payload()Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-