Package software.amazon.smithy.waiters
Class Matcher<T>
java.lang.Object
software.amazon.smithy.waiters.Matcher<T>
- All Implemented Interfaces:
ToNode
- Direct Known Subclasses:
Matcher.ErrorTypeMember
,Matcher.InputOutputMember
,Matcher.OutputMember
,Matcher.SuccessMember
,Matcher.UnknownMember
Determines if an acceptor matches the current state of a resource.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Matches if an operation returns an error, and the error matches the expected error type.static final class
static final class
static final class
When set to true, matches when a call returns a success response.static final class
Represents an union value.static interface
Visits the variants of the Matcher union type. -
Method Summary
Modifier and TypeMethodDescriptionabstract <U> U
accept
(Matcher.Visitor<U> visitor) Visits the Matcher union type.final boolean
static Matcher<?>
Creates aMatcher
from aNode
.abstract String
Gets the member name of the matcher.abstract T
getValue()
Gets the value of the set matcher variant.final int
hashCode()
-
Method Details
-
getValue
Gets the value of the set matcher variant.- Returns:
- Returns the set variant's value.
-
getMemberName
Gets the member name of the matcher.- Returns:
- Returns the set member name.
-
accept
Visits the Matcher union type.- Type Parameters:
U
- The type returned by the visitor.- Parameters:
visitor
- Visitor to apply.- Returns:
- Returns the return value of the visitor.
-
hashCode
public final int hashCode() -
equals
-
fromNode
Creates aMatcher
from aNode
.- Parameters:
node
-Node
to create aMatcher
from.- Returns:
- Returns the create
Matcher
. - Throws:
ExpectationNotMetException
- if the givennode
is invalid.
-