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.
-
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
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-