HypertextApplicationLanguageResource class

A representation of a JSON HAL resource, according to the specification available at https://datatracker.ietf.org/doc/html/draft-kelly-json-hal Resources are described in detail in

https://datatracker.ietf.org/doc/html/draft-kelly-json-hal#page-4

Bellow is an excerpt from the specification:

4. Resource Objects

A Resource Object represents a resource. It has two reserved properties:

  1. "_links": contains links to other resources.
  2. "_embedded": contains embedded resources. All other properties MUST be valid JSON, and represent the current state of the resource.

Constructors

HypertextApplicationLanguageResource.fromMap(Map<String, dynamic> map)
Provides a HAL Resource from a JSON-like map.

Properties

embedded Map<String, dynamic>
4.1.2. _embedded
final
embeddedKeys List<String>
List of keys for each embedded resource or list of embedded resources.
no setter
hashCode int
The hash code for this object.
no setterinherited
Available link objects and lists of link objects. Link Objects are described in detail in https://datatracker.ietf.org/doc/html/draft-kelly-json-hal#section-5
final
linksKeys List<String>
List of keys for each link relation type.
no setter
properties Map<String, dynamic>
The unreserved properties of the resource.
final
propertyKeys List<String>
List of keys for each property.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getEmbedded(String key) → dynamic
Given a link relation type returns the embedded resource or list of embedded resources for such relation type, null otherwise.
Given a link relation type returns the link object or list of link objects for such relation type, null otherwise.
getProperty(String key) → dynamic
Given a key for a property returns the property value for such key, null otherwise.
getSource() Map<String, dynamic>
hasEmbedded(String key) bool
Given a link relation type returns true if the resource has an embedded resource for such relation type, false otherwise.
Given a link relation type returns true if the resource has a link for such relation type, false otherwise.
hasProperty(String key) bool
Given a key for a property returns true if the resource has a property for such key, false otherwise.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited