Package com.io7m.smfj.validation.api
Class SMFSchemaValidationError.Builder
- java.lang.Object
-
- com.io7m.smfj.validation.api.SMFSchemaValidationError.Builder
-
- Enclosing class:
- SMFSchemaValidationError
public static final class SMFSchemaValidationError.Builder extends java.lang.ObjectBuilds instances of typeSMFSchemaValidationError. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SMFSchemaValidationErrorbuild()Builds a newSMFSchemaValidationError.SMFSchemaValidationError.Builderfrom(SMFErrorType instance)Fill a builder with attribute values from the providedcom.io7m.smfj.core.SMFErrorTypeinstance.SMFSchemaValidationError.Builderfrom(SMFSchemaValidationErrorType instance)Fill a builder with attribute values from the providedcom.io7m.smfj.validation.api.SMFSchemaValidationErrorTypeinstance.SMFSchemaValidationError.BuildersetException(java.lang.Exception exception)Initializes the optional valueexceptionto exception.SMFSchemaValidationError.BuildersetException(java.util.Optional<? extends java.lang.Exception> exception)Initializes the optional valueexceptionto exception.SMFSchemaValidationError.BuildersetMessage(java.lang.String message)Initializes the value for themessageattribute.
-
-
-
Method Detail
-
from
public final SMFSchemaValidationError.Builder from(SMFSchemaValidationErrorType instance)
Fill a builder with attribute values from the providedcom.io7m.smfj.validation.api.SMFSchemaValidationErrorTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final SMFSchemaValidationError.Builder from(SMFErrorType instance)
Fill a builder with attribute values from the providedcom.io7m.smfj.core.SMFErrorTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setMessage
public final SMFSchemaValidationError.Builder setMessage(java.lang.String message)
Initializes the value for themessageattribute.- Parameters:
message- The value for message- Returns:
thisbuilder for use in a chained invocation
-
setException
public final SMFSchemaValidationError.Builder setException(java.lang.Exception exception)
Initializes the optional valueexceptionto exception.- Parameters:
exception- The value for exception- Returns:
thisbuilder for chained invocation
-
setException
public final SMFSchemaValidationError.Builder setException(java.util.Optional<? extends java.lang.Exception> exception)
Initializes the optional valueexceptionto exception.- Parameters:
exception- The value for exception- Returns:
thisbuilder for use in a chained invocation
-
build
public SMFSchemaValidationError build()
Builds a newSMFSchemaValidationError.- Returns:
- An immutable instance of SMFSchemaValidationError
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-