Module quak.framework.web.model
Record Class DynamicPathRequest<T>
java.lang.Object
java.lang.Record
io.john.amiscaray.quak.http.request.DynamicPathRequest<T>
- Type Parameters:
T- The type of the request body.- Record Components:
headers- The headers as a map.queryParams- The query parameters as a map.method- The request method.pathVariables- The path variables as a map.body- The request body.attributes- The attributes for the request (for server-side use).
- All Implemented Interfaces:
Request<T>
public record DynamicPathRequest<T>(Map<String,String> headers, Map<String,String> queryParams, RequestMethod method, Map<String,String> pathVariables, T body, Map<String,Object> attributes)
extends Record
implements Request<T>
A request for a path with path variables.
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicPathRequest(RequestMethod method, Map<String, String> pathVariables, T body) Create a DynamicPathRequest with empty headers, query params, and attributes.DynamicPathRequest(Map<String, String> headers, RequestMethod method, Map<String, String> pathVariables, T body) Create a DynamicPathRequest with empty query params, and attributes.DynamicPathRequest(Map<String, String> headers, Map<String, String> queryParams, RequestMethod method, Map<String, String> pathVariables, T body, Map<String, Object> attributes) Creates an instance of aDynamicPathRequestrecord class.Create a DynamicPathRequest with empty headers and attributes. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.body()Returns the value of thebodyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.method()Returns the value of themethodrecord component.Returns the value of thepathVariablesrecord component.Returns the value of thequeryParamsrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.john.amiscaray.quak.http.request.Request
getJWTAuthToken, getUserAuthentication
-
Constructor Details
-
DynamicPathRequest
Create a DynamicPathRequest with empty headers, query params, and attributes.- Parameters:
method- The HTTP method.pathVariables- The path variables as a map.body- The request body.
-
DynamicPathRequest
public DynamicPathRequest(Map<String, String> headers, RequestMethod method, Map<String, String> pathVariables, T body) Create a DynamicPathRequest with empty query params, and attributes.- Parameters:
headers- The headers as a map.method- The HTTP method.pathVariables- The path variables as a map.body- The request body.
-
DynamicPathRequest
Create a DynamicPathRequest with empty headers and attributes.- Parameters:
pathVariables- The path variables as a map.queryParams- The query params as a map.body- The request body.
-
DynamicPathRequest
public DynamicPathRequest(Map<String, String> headers, Map<String, String> queryParams, RequestMethod method, Map<String, String> pathVariables, T body, Map<String, Object> attributes) Creates an instance of aDynamicPathRequestrecord class.- Parameters:
headers- the value for theheadersrecord componentqueryParams- the value for thequeryParamsrecord componentmethod- the value for themethodrecord componentpathVariables- the value for thepathVariablesrecord componentbody- the value for thebodyrecord componentattributes- the value for theattributesrecord 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). -
headers
Returns the value of theheadersrecord component. -
queryParams
Returns the value of thequeryParamsrecord component.- Specified by:
queryParamsin interfaceRequest<T>- Returns:
- the value of the
queryParamsrecord component
-
method
Returns the value of themethodrecord component. -
pathVariables
Returns the value of thepathVariablesrecord component.- Returns:
- the value of the
pathVariablesrecord component
-
body
Returns the value of thebodyrecord component. -
attributes
Returns the value of theattributesrecord component.- Specified by:
attributesin interfaceRequest<T>- Returns:
- the value of the
attributesrecord component
-