Package io.micronaut.gradle.openapi
Record Class ResponseBodyMappingModel
java.lang.Object
java.lang.Record
io.micronaut.gradle.openapi.ResponseBodyMappingModel
- Record Components:
headerName
- the header namemappedBodyType
- the mapped body typeisListWrapper
- if it's a list wrapperisValidated
- if it's validated
public record ResponseBodyMappingModel(String headerName, String mappedBodyType, boolean isListWrapper, boolean isValidated)
extends Record
An equivalent to Micronaut OpenAPI's ResponseBodyMapping but
without using classes from that dependency so that we can isolate
execution in workers.
-
Constructor Summary
ConstructorsConstructorDescriptionResponseBodyMappingModel
(String headerName, String mappedBodyType, boolean isListWrapper, boolean isValidated) Creates an instance of aResponseBodyMappingModel
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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
-
ResponseBodyMappingModel
public ResponseBodyMappingModel(String headerName, String mappedBodyType, boolean isListWrapper, boolean isValidated) Creates an instance of aResponseBodyMappingModel
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
-
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
-