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 StringbaseType()Returns the value of thebaseTyperecord component.code()Returns the value of thecoderecord component.@Nullable StringReturns the value of thecontainerTyperecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisUnique()Returns the value of theisUniquerecord component.Returns the value of themediaTyperecord component.final StringtoString()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 aCtxApiResponserecord class.- Parameters:
code- the value for thecoderecord componentdescription- the value for thedescriptionrecord componentbaseType- the value for thebaseTyperecord componentcontainerType- the value for thecontainerTyperecord componentmediaType- the value for themediaTyperecord componentisUnique- the value for theisUniquerecord 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 thecoderecord component.- Returns:
- the value of the
coderecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
baseType
Returns the value of thebaseTyperecord component.- Returns:
- the value of the
baseTyperecord component
-
containerType
Returns the value of thecontainerTyperecord component.- Returns:
- the value of the
containerTyperecord component
-
mediaType
Returns the value of themediaTyperecord component.- Returns:
- the value of the
mediaTyperecord component
-
isUnique
public boolean isUnique()Returns the value of theisUniquerecord component.- Returns:
- the value of the
isUniquerecord component
-