Interface MockInput.Builder

  • Method Details

    • result

      MockInput.Builder result(String result)

      A JSON string containing the mocked result of the state invocation.

      Parameters:
      result - A JSON string containing the mocked result of the state invocation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • errorOutput

      MockInput.Builder errorOutput(MockErrorOutput errorOutput)

      The mocked error output when calling TestState. When specified, the mocked response is returned as a JSON object that contains an error and cause field.

      Parameters:
      errorOutput - The mocked error output when calling TestState. When specified, the mocked response is returned as a JSON object that contains an error and cause field.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • errorOutput

      default MockInput.Builder errorOutput(Consumer<MockErrorOutput.Builder> errorOutput)

      The mocked error output when calling TestState. When specified, the mocked response is returned as a JSON object that contains an error and cause field.

      This is a convenience method that creates an instance of the MockErrorOutput.Builder avoiding the need to create one manually via MockErrorOutput.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to errorOutput(MockErrorOutput).

      Parameters:
      errorOutput - a consumer that will call methods on MockErrorOutput.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • fieldValidationMode

      MockInput.Builder fieldValidationMode(String fieldValidationMode)

      Determines the level of strictness when validating mocked results against their respective API models. Values include:

      • STRICT: All required fields must be present, and all present fields must conform to the API's schema.

      • PRESENT: All present fields must conform to the API's schema.

      • NONE: No validation is performed.

      If no value is specified, the default value is STRICT.

      Parameters:
      fieldValidationMode - Determines the level of strictness when validating mocked results against their respective API models. Values include:

      • STRICT: All required fields must be present, and all present fields must conform to the API's schema.

      • PRESENT: All present fields must conform to the API's schema.

      • NONE: No validation is performed.

      If no value is specified, the default value is STRICT.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • fieldValidationMode

      MockInput.Builder fieldValidationMode(MockResponseValidationMode fieldValidationMode)

      Determines the level of strictness when validating mocked results against their respective API models. Values include:

      • STRICT: All required fields must be present, and all present fields must conform to the API's schema.

      • PRESENT: All present fields must conform to the API's schema.

      • NONE: No validation is performed.

      If no value is specified, the default value is STRICT.

      Parameters:
      fieldValidationMode - Determines the level of strictness when validating mocked results against their respective API models. Values include:

      • STRICT: All required fields must be present, and all present fields must conform to the API's schema.

      • PRESENT: All present fields must conform to the API's schema.

      • NONE: No validation is performed.

      If no value is specified, the default value is STRICT.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: