Record Class ServiceAuthorization
java.lang.Object
java.lang.Record
energy.eddie.regionconnector.fr.enedis.dto.subscription.ServiceAuthorization
- Record Components:
id- Identifier of the authorization.label- Label of the authorization.type- Type of the authorization (explicit, induced or implicit).
public record ServiceAuthorization(@Nullable Long id, @Nullable String label, @Nullable AuthorizationType type)
extends Record
Authorization details of a subscribed service.
-
Constructor Summary
ConstructorsConstructorDescriptionServiceAuthorization(@Nullable Long id, @Nullable String label, @Nullable AuthorizationType type) Creates an instance of aServiceAuthorizationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Longid()Returns the value of theidrecord component.@Nullable Stringlabel()Returns the value of thelabelrecord component.final StringtoString()Returns a string representation of this record class.@Nullable AuthorizationTypetype()Returns the value of thetyperecord component.
-
Constructor Details
-
ServiceAuthorization
public ServiceAuthorization(@Nullable Long id, @Nullable String label, @Nullable AuthorizationType type) Creates an instance of aServiceAuthorizationrecord class.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-