Link class abstract
A Link Object represents a possible design-time link for a response.
The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
- Available extensions
- Annotations
-
- @freezed
Constructors
Properties
-
copyWith
→ $LinkCopyWith<
Link> -
Create a copy of Link
with the given fields replaced by the non-null parameter values.
no setterinherited
- description → String?
-
A description of the link.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- operationId → String?
-
The name of an existing, resolvable OAS operation, as defined with
a unique operationId. This field is mutually exclusive with the
operationRef
field.no setterinherited - operationRef → String?
-
A URI reference to an OAS operation. This field is mutually exclusive
with the
operationId
field.no setterinherited -
parameters
→ Map<
String, dynamic> ? -
A map representing parameters to pass to an operation. The key is the
parameter name, and the value is a constant or an expression.
no setterinherited
- requestBody → dynamic
-
A literal value or an expression to use as a request body when
calling the target operation.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- server → Server?
-
A server object to be used by the target operation.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Link value)) → TResult -
Available on Link, provided by the LinkPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Link value)?) → TResult? -
Available on Link, provided by the LinkPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_Link value)?, {required TResult orElse()}) → TResult -
Available on Link, provided by the LinkPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String? operationRef, String? operationId, Map< String, dynamic> ? parameters, dynamic requestBody, String? description, Server? server)?, {required TResult orElse()}) → TResult -
Available on Link, provided by the LinkPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Link to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String? operationRef, String? operationId, Map< String, dynamic> ? parameters, dynamic requestBody, String? description, Server? server)) → TResult -
Available on Link, provided by the LinkPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String? operationRef, String? operationId, Map< String, dynamic> ? parameters, dynamic requestBody, String? description, Server? server)?) → TResult? -
Available on Link, provided by the LinkPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited