Class ApiError.Builder

java.lang.Object
org.forgerock.api.models.ApiError.Builder
Enclosing class:
ApiError

public static final class ApiError.Builder extends Object
Builder for the ApiError.
  • Method Details

    • code

      public ApiError.Builder code(Integer code)
      Set the error code.
      Parameters:
      code - The apiError code.
      Returns:
      This builder.
    • description

      public ApiError.Builder description(LocalizableString description)
      Set the error description.
      Parameters:
      description - ApiError description
      Returns:
      This builder.
    • description

      public ApiError.Builder description(String description)
      Set the error description.
      Parameters:
      description - ApiError description
      Returns:
      This builder.
    • schema

      public ApiError.Builder schema(Schema schema)
      Set the schema.
      Parameters:
      schema - ApiError schema
      Returns:
      This builder.
    • reference

      public ApiError.Builder reference(Reference reference)
      Set the error as a reference to another definition.
      Parameters:
      reference - The reference.
      Returns:
      This builder.
    • build

      public ApiError build()
      Builds the ApiError.
      Returns:
      ApiError instance