PathSegment class

One path segment of a google.api.http path template.

Templates look like: /v1/{name} /v1/{name=shelves/*} /v1/{name=shelves/**} /cosmos/tx/v1beta1/{tx_hash} /cosmos/base/tendermint/v1beta1/blocks/{height}

A "variable" segment binds a (possibly nested, dotted) field path from the request message, e.g. {user.address.city}, to a part of the URL path. The optional =pattern after = constrains what it can match; for our purposes the only thing that matters is whether the pattern contains ** (multi-segment / greedy wildcard) or * (single segment wildcard) — both just mean "take the field's string value and put it here", the wildcard only affects how literal templates would match incoming requests, not how we build outgoing requests.

Constructors

PathSegment.literal(String literal)
const
PathSegment.variable(String? fieldPath, {String? pattern})
const

Properties

fieldPath String?
Dotted field path, e.g. user.address.city, only set if isVariable.
final
hashCode int
The hash code for this object.
no setterinherited
isGreedy bool
no setter
isVariable bool
final
literal String
final
pattern String?
Raw pattern after =, e.g. shelves/* or **. Null if there was none (bare {field}), meaning it behaves like a single-segment capture.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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