Record Class CtxApiResponse
java.lang.Object
java.lang.Record
dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApiResponse
- Record Components:
code
- the HTTP response of this response (or 'default')description
- the description of this responsebaseType
- the type of this response, or nullcontainerType
- the container type of this response, or nullmediaType
- the media-type of this response if necessaryisUnique
- true if the container is a set (array with unique elements)
public record CtxApiResponse(String code, String description, @Nullable String baseType, @Nullable String containerType, Optional<String> mediaType, boolean isUnique)
extends Record
Template data for an API operation response.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable String
baseType()
Returns the value of thebaseType
record component.code()
Returns the value of thecode
record component.@Nullable String
Returns the value of thecontainerType
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isUnique()
Returns the value of theisUnique
record component.Returns the value of themediaType
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CtxApiResponse
public CtxApiResponse(String code, String description, @Nullable String baseType, @Nullable String containerType, Optional<String> mediaType, boolean isUnique) Creates an instance of aCtxApiResponse
record class.- Parameters:
code
- the value for thecode
record componentdescription
- the value for thedescription
record componentbaseType
- the value for thebaseType
record componentcontainerType
- the value for thecontainerType
record componentmediaType
- the value for themediaType
record componentisUnique
- the value for theisUnique
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 '=='. -
code
Returns the value of thecode
record component.- Returns:
- the value of the
code
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-
baseType
Returns the value of thebaseType
record component.- Returns:
- the value of the
baseType
record component
-
containerType
Returns the value of thecontainerType
record component.- Returns:
- the value of the
containerType
record component
-
mediaType
Returns the value of themediaType
record component.- Returns:
- the value of the
mediaType
record component
-
isUnique
public boolean isUnique()Returns the value of theisUnique
record component.- Returns:
- the value of the
isUnique
record component
-