Package io.micronaut.openapi.generator
Record Class ParameterMapping
java.lang.Object
java.lang.Record
io.micronaut.openapi.generator.ParameterMapping
- Record Components:
name- The name of the parameter as described by the name field in specification.location- The location of parameter. Path parameters cannot be mapped, as this behavior should not be used.mappedType- The type to which the parameter should be mapped. If multiple parameters have the same mapping, only one parameter will be present. If set to null, the original parameter will be deleted.mappedName- The unique name of the parameter to be used as method parameter name.isValidated- Whether the mapped parameter requires validation.
public record ParameterMapping(String name, ParameterMapping.ParameterLocation location, String mappedType, String mappedName, 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe location of the parameter to be mapped. -
Constructor Summary
ConstructorsConstructorDescriptionParameterMapping(String name, ParameterMapping.ParameterLocation location, String mappedType, String mappedName, boolean isValidated) Creates an instance of aParameterMappingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandoesMatch(org.openapitools.codegen.CodegenParameter parameter) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisValidatedrecord component.location()Returns the value of thelocationrecord component.Returns the value of themappedNamerecord component.Returns the value of themappedTyperecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ParameterMapping
public ParameterMapping(String name, ParameterMapping.ParameterLocation location, String mappedType, String mappedName, boolean isValidated) Creates an instance of aParameterMappingrecord class.- Parameters:
name- the value for thenamerecord componentlocation- the value for thelocationrecord componentmappedType- the value for themappedTyperecord componentmappedName- the value for themappedNamerecord componentisValidated- the value for theisValidatedrecord component
-
-
Method Details
-
doesMatch
public boolean doesMatch(org.openapitools.codegen.CodegenParameter parameter) -
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
mappedType
Returns the value of themappedTyperecord component.- Returns:
- the value of the
mappedTyperecord component
-
mappedName
Returns the value of themappedNamerecord component.- Returns:
- the value of the
mappedNamerecord component
-
isValidated
public boolean isValidated()Returns the value of theisValidatedrecord component.- Returns:
- the value of the
isValidatedrecord component
-