All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.ValidationResult Maven / Gradle / Ivy

There is a newer version: 0.36.1
Show newest version
package software.amazon.awscdk;

/**
 * Representation of validation results.
 * 
 * Models a tree of validation errors so that we have as much information as possible
 * about the failure that occurred.
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.10.5 (build 46bc9b0)", date = "2019-05-06T20:49:40.963Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.$Module.class, fqn = "@aws-cdk/cdk.ValidationResult")
public class ValidationResult extends software.amazon.jsii.JsiiObject {
    protected ValidationResult(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
        super(mode);
    }
    public ValidationResult(@javax.annotation.Nullable final java.lang.String errorMessage, @javax.annotation.Nullable final software.amazon.awscdk.ValidationResults results) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.Jsii);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { errorMessage, results });
    }
    public ValidationResult(@javax.annotation.Nullable final java.lang.String errorMessage) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.Jsii);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { errorMessage });
    }
    public ValidationResult() {
        super(software.amazon.jsii.JsiiObject.InitializationMode.Jsii);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
    }

    /**
     * Turn a failed validation into an exception.
     */
    public void assertSuccess() {
        this.jsiiCall("assertSuccess", Void.class);
    }

    /**
     * Return a string rendering of the tree of validation failures.
     */
    public java.lang.String errorTree() {
        return this.jsiiCall("errorTree", java.lang.String.class);
    }

    /**
     * Wrap this result with an error message, if it concerns an error.
     */
    public software.amazon.awscdk.ValidationResult prefix(final java.lang.String message) {
        return this.jsiiCall("prefix", software.amazon.awscdk.ValidationResult.class, new Object[] { java.util.Objects.requireNonNull(message, "message is required") });
    }

    public java.lang.String getErrorMessage() {
        return this.jsiiGet("errorMessage", java.lang.String.class);
    }

    public java.lang.Boolean getIsSuccess() {
        return this.jsiiGet("isSuccess", java.lang.Boolean.class);
    }

    public software.amazon.awscdk.ValidationResults getResults() {
        return this.jsiiGet("results", software.amazon.awscdk.ValidationResults.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy