Package software.amazon.smithy.contracts
Class Condition
java.lang.Object
software.amazon.smithy.contracts.Condition
- All Implemented Interfaces:
FromSourceLocation,ToNode,ToSmithyBuilder<Condition>
public final class Condition
extends Object
implements ToNode, ToSmithyBuilder<Condition>, FromSourceLocation
Defines an individual condition.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Condition.Builderbuilder()Creates a builder used to build an equivalentCondition.booleanstatic ConditionDocumentation about the condition.JMESPath expression that must evaluate to true.Gets the source location of a value.inthashCode()Take this object and create a builder that contains all of the current property values of this object.toNode()Converts a value to aNode.
-
Method Details
-
toNode
Description copied from interface:ToNodeConverts a value to aNode. -
fromNode
- Parameters:
node- Node to create the Condition from.- Returns:
- Returns the created Condition.
- Throws:
ExpectationNotMetException- if the given Node is invalid.
-
getSourceLocation
Description copied from interface:FromSourceLocationGets the source location of a value.- Specified by:
getSourceLocationin interfaceFromSourceLocation- Returns:
- Returns the source location of the value.
-
getExpression
JMESPath expression that must evaluate to true.- Returns:
- Return the JMESPath expression.
-
getDocumentation
Documentation about the condition.- Returns:
- Return the documentation.
-
toBuilder
Description copied from interface:ToSmithyBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToSmithyBuilder<Condition>- Returns:
- a builder for type T
-
builder
Creates a builder used to build an equivalentCondition.- Returns:
- the builder.
-
equals
-
hashCode
public int hashCode()
-