Package io.micronaut.openapi.generator
Record Class ResponseBodyMapping
java.lang.Object
java.lang.Record
io.micronaut.openapi.generator.ResponseBodyMapping
- Record Components:
headerName
- The response header name that triggers the change of response type.mappedBodyType
- The type in which will be used as the response type. The type must take a single type parameter, which will be the original body.isListWrapper
- Whether the mapped body type needs to be supplied list items as property.isValidated
- Whether the mapped response body type required validation.
public record ResponseBodyMapping(String headerName, String mappedBodyType, boolean isListWrapper, boolean isValidated)
extends Record
A record that can be used to specify parameter mapping.
Parameter mapping would map a given parameter to a specific type and name.
-
Constructor Summary
ConstructorDescriptionResponseBodyMapping
(String headerName, String mappedBodyType, boolean isListWrapper, boolean isValidated) Creates an instance of aResponseBodyMapping
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theheaderName
record component.boolean
Returns the value of theisListWrapper
record component.boolean
Returns the value of theisValidated
record component.Returns the value of themappedBodyType
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ResponseBodyMapping
public ResponseBodyMapping(String headerName, String mappedBodyType, boolean isListWrapper, boolean isValidated) Creates an instance of aResponseBodyMapping
record class.- Parameters:
headerName
- the value for theheaderName
record componentmappedBodyType
- the value for themappedBodyType
record componentisListWrapper
- the value for theisListWrapper
record componentisValidated
- the value for theisValidated
record component
-
-
Method Details
-
doesMatch
-
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 '=='. -
headerName
Returns the value of theheaderName
record component.- Returns:
- the value of the
headerName
record component
-
mappedBodyType
Returns the value of themappedBodyType
record component.- Returns:
- the value of the
mappedBodyType
record component
-
isListWrapper
public boolean isListWrapper()Returns the value of theisListWrapper
record component.- Returns:
- the value of the
isListWrapper
record component
-
isValidated
public boolean isValidated()Returns the value of theisValidated
record component.- Returns:
- the value of the
isValidated
record component
-