Class TraitDefinition.BreakingChangeRule
- java.lang.Object
-
- software.amazon.smithy.model.traits.TraitDefinition.BreakingChangeRule
-
- All Implemented Interfaces:
ToNode
- Enclosing class:
- TraitDefinition
public static final class TraitDefinition.BreakingChangeRule extends java.lang.Object implements ToNode
Represents an individual trait diff rule to define backward compatibility rules.
-
-
Constructor Summary
Constructors Constructor Description BreakingChangeRule(NodePointer path, Severity severity, TraitDefinition.ChangeType change, java.lang.String message)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
static TraitDefinition.BreakingChangeRule
fromNode(Node node)
Creates a TraitDiffRule from a Node.TraitDefinition.ChangeType
getChange()
NodePointer
getDefaultedPath()
Severity
getDefaultedSeverity()
java.util.Optional<java.lang.String>
getMessage()
java.util.Optional<NodePointer>
getPath()
java.util.Optional<Severity>
getSeverity()
int
hashCode()
Node
toNode()
Converts a value to aNode
.java.lang.String
toString()
-
-
-
Constructor Detail
-
BreakingChangeRule
public BreakingChangeRule(NodePointer path, Severity severity, TraitDefinition.ChangeType change, java.lang.String message)
-
-
Method Detail
-
getPath
public java.util.Optional<NodePointer> getPath()
-
getDefaultedPath
public NodePointer getDefaultedPath()
-
getSeverity
public java.util.Optional<Severity> getSeverity()
-
getDefaultedSeverity
public Severity getDefaultedSeverity()
-
getChange
public TraitDefinition.ChangeType getChange()
-
getMessage
public java.util.Optional<java.lang.String> getMessage()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
fromNode
public static TraitDefinition.BreakingChangeRule fromNode(Node node)
Creates a TraitDiffRule from a Node.- Parameters:
node
- Node to deserialize.- Returns:
- Returns the created TraitDiffRule.
- Throws:
ExpectationNotMetException
- if the node is invalid.
-
-