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
ConstructorsConstructorDescriptionResponseBodyMapping(String headerName, String mappedBodyType, boolean isListWrapper, boolean isValidated) Creates an instance of aResponseBodyMappingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theheaderNamerecord component.booleanReturns the value of theisListWrapperrecord component.booleanReturns the value of theisValidatedrecord component.Returns the value of themappedBodyTyperecord component.final StringtoString()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 aResponseBodyMappingrecord class.- Parameters:
headerName- the value for theheaderNamerecord componentmappedBodyType- the value for themappedBodyTyperecord componentisListWrapper- the value for theisListWrapperrecord componentisValidated- the value for theisValidatedrecord 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 theheaderNamerecord component.- Returns:
- the value of the
headerNamerecord component
-
mappedBodyType
Returns the value of themappedBodyTyperecord component.- Returns:
- the value of the
mappedBodyTyperecord component
-
isListWrapper
public boolean isListWrapper()Returns the value of theisListWrapperrecord component.- Returns:
- the value of the
isListWrapperrecord component
-
isValidated
public boolean isValidated()Returns the value of theisValidatedrecord component.- Returns:
- the value of the
isValidatedrecord component
-