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

io.github.cdklabs.cdk.appflow.ValidationCondition Maven / Gradle / Ivy

The newest version!
package io.github.cdklabs.cdk.appflow;

/**
 * (experimental) A representation of a validation condition on a particular field in a flow execution.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T07:35:38.292Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.appflow.$Module.class, fqn = "@cdklabs/cdk-appflow.ValidationCondition")
public class ValidationCondition extends software.amazon.jsii.JsiiObject {

    protected ValidationCondition(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected ValidationCondition(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param field This parameter is required.
     * @param validation This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected ValidationCondition(final @org.jetbrains.annotations.NotNull java.lang.String field, final @org.jetbrains.annotations.NotNull java.lang.String validation) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(field, "field is required"), java.util.Objects.requireNonNull(validation, "validation is required") });
    }

    /**
     * @return a
     * @see ValidationCondition instance
     * @param field a field for which the validation will be performed. This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.ValidationCondition isDefault(final @org.jetbrains.annotations.NotNull java.lang.Object field) {
        if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
            if (
                 !(field instanceof java.lang.String)
                && !(field instanceof io.github.cdklabs.cdk.appflow.Field)
                && !(field.getClass().equals(software.amazon.jsii.JsiiObject.class))
            ) {
                throw new IllegalArgumentException(
                    new java.lang.StringBuilder("Expected ")
                        .append("field")
                        .append(" to be one of: java.lang.String, io.github.cdklabs.cdk.appflow.Field; received ")
                        .append(field.getClass()).toString());
            }
        }
        return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.appflow.ValidationCondition.class, "isDefault", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ValidationCondition.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required") });
    }

    /**
     * (experimental) Validates whether a particular field in an execution is negative.
     * 

* @return a * @see ValidationCondition instance * @param field a field for which the validation will be performed. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.ValidationCondition isNegative(final @org.jetbrains.annotations.NotNull java.lang.Object field) { if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) { if ( !(field instanceof java.lang.String) && !(field instanceof io.github.cdklabs.cdk.appflow.Field) && !(field.getClass().equals(software.amazon.jsii.JsiiObject.class)) ) { throw new IllegalArgumentException( new java.lang.StringBuilder("Expected ") .append("field") .append(" to be one of: java.lang.String, io.github.cdklabs.cdk.appflow.Field; received ") .append(field.getClass()).toString()); } } return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.appflow.ValidationCondition.class, "isNegative", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ValidationCondition.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required") }); } /** * @return a * @see ValidationCondition instance * @param field a field for which the validation will be performed. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.ValidationCondition isNotNull(final @org.jetbrains.annotations.NotNull java.lang.Object field) { if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) { if ( !(field instanceof java.lang.String) && !(field instanceof io.github.cdklabs.cdk.appflow.Field) && !(field.getClass().equals(software.amazon.jsii.JsiiObject.class)) ) { throw new IllegalArgumentException( new java.lang.StringBuilder("Expected ") .append("field") .append(" to be one of: java.lang.String, io.github.cdklabs.cdk.appflow.Field; received ") .append(field.getClass()).toString()); } } return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.appflow.ValidationCondition.class, "isNotNull", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ValidationCondition.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required") }); } /** * (experimental) Validates whether a particular field has no value. *

* @return a * @see ValidationCondition instance * @param field a field for which the validation will be performed. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.ValidationCondition isNull(final @org.jetbrains.annotations.NotNull java.lang.Object field) { if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) { if ( !(field instanceof java.lang.String) && !(field instanceof io.github.cdklabs.cdk.appflow.Field) && !(field.getClass().equals(software.amazon.jsii.JsiiObject.class)) ) { throw new IllegalArgumentException( new java.lang.StringBuilder("Expected ") .append("field") .append(" to be one of: java.lang.String, io.github.cdklabs.cdk.appflow.Field; received ") .append(field.getClass()).toString()); } } return software.amazon.jsii.JsiiObject.jsiiStaticCall(io.github.cdklabs.cdk.appflow.ValidationCondition.class, "isNull", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ValidationCondition.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required") }); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getField() { return software.amazon.jsii.Kernel.get(this, "field", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getValidation() { return software.amazon.jsii.Kernel.get(this, "validation", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy