Class MatchFailure.Builder
java.lang.Object
software.amazon.awscdk.assertions.MatchFailure.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<MatchFailure>
- Enclosing interface:
MatchFailure
@Stability(Stable)
public static final class MatchFailure.Builder
extends Object
implements software.amazon.jsii.Builder<MatchFailure>
A builder for
MatchFailure
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofMatchFailure.getMatcher()
Sets the value ofMatchFailure.getMessage()
Sets the value ofMatchFailure.getPath()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
matcher
Sets the value ofMatchFailure.getMatcher()
- Parameters:
matcher
- The matcher that had the failure. This parameter is required.- Returns:
this
-
message
Sets the value ofMatchFailure.getMessage()
- Parameters:
message
- Failure message. This parameter is required.- Returns:
this
-
path
Sets the value ofMatchFailure.getPath()
- Parameters:
path
- The relative path in the target where the failure occurred. This parameter is required. If the failure occurred at root of the match tree, set the path to an empty list. If it occurs in the 5th index of an array nested within the 'foo' key of an object, set the path as['/foo', '[5]']
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<MatchFailure>
- Returns:
- a new instance of
MatchFailure
- Throws:
NullPointerException
- if any required attribute was not provided
-