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 Details

    • Builder

      public Builder()
  • Method Details

    • matcher

      @Stability(Stable) public MatchFailure.Builder matcher(Matcher matcher)
      Sets the value of MatchFailure.getMatcher()
      Parameters:
      matcher - The matcher that had the failure. This parameter is required.
      Returns:
      this
    • message

      @Stability(Stable) public MatchFailure.Builder message(String message)
      Sets the value of MatchFailure.getMessage()
      Parameters:
      message - Failure message. This parameter is required.
      Returns:
      this
    • path

      @Stability(Stable) public MatchFailure.Builder path(List<String> path)
      Sets the value of MatchFailure.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

      @Stability(Stable) public MatchFailure build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<MatchFailure>
      Returns:
      a new instance of MatchFailure
      Throws:
      NullPointerException - if any required attribute was not provided