Record Class SecurityRequirementInfo
java.lang.Object
java.lang.Record
io.github.torand.openapi2java.model.SecurityRequirementInfo
- Record Components:
scheme- the security scheme.scopes- the scopes, if any.annotation- the OpenAPI annotation, if any.
public record SecurityRequirementInfo(String scheme, List<String> scopes, AnnotationInfo annotation)
extends Record
Describes a security requirement.
-
Constructor Summary
ConstructorsConstructorDescriptionSecurityRequirementInfo(String scheme) Constructs aSecurityRequirementInfoobject.SecurityRequirementInfo(String scheme, List<String> scopes, AnnotationInfo annotation) Creates an instance of aSecurityRequirementInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.scheme()Returns the value of theschemerecord component.scopes()Returns the value of thescopesrecord component.final StringtoString()Returns a string representation of this record class.withAnnotation(AnnotationInfo annotation) Returns a newSecurityRequirementInfoobject with specified OpenAPI annotation.withScopes(Collection<String> scopes) Returns a newSecurityRequirementInfoobject with specified scopes.
-
Constructor Details
-
SecurityRequirementInfo
Constructs aSecurityRequirementInfoobject.- Parameters:
scheme- the security scheme.
-
SecurityRequirementInfo
Creates an instance of aSecurityRequirementInforecord class.- Parameters:
scheme- the value for theschemerecord componentscopes- the value for thescopesrecord componentannotation- the value for theannotationrecord component
-
-
Method Details
-
withScopes
Returns a newSecurityRequirementInfoobject with specified scopes.- Parameters:
scopes- the scopes.- Returns:
- the new and updated
SecurityRequirementInfoobject.
-
withAnnotation
Returns a newSecurityRequirementInfoobject with specified OpenAPI annotation.- Parameters:
annotation- the OpenAPI annotation.- Returns:
- the new and updated
SecurityRequirementInfoobject.
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
scheme
Returns the value of theschemerecord component.- Returns:
- the value of the
schemerecord component
-
scopes
Returns the value of thescopesrecord component.- Returns:
- the value of the
scopesrecord component
-
annotation
Returns the value of theannotationrecord component.- Returns:
- the value of the
annotationrecord component
-