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

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

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

/**
 * (experimental) A representation of a unitary action on the record fields.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T07:35:38.288Z")
@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.Task")
public class Task extends software.amazon.jsii.JsiiObject implements io.github.cdklabs.cdk.appflow.ITask {

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

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

    /**
     * @param type This parameter is required.
     * @param sourceFields This parameter is required.
     * @param connectorOperator This parameter is required.
     * @param properties This parameter is required.
     * @param destinationField
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public Task(final @org.jetbrains.annotations.NotNull java.lang.String type, final @org.jetbrains.annotations.NotNull java.util.List sourceFields, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.TaskConnectorOperator connectorOperator, final @org.jetbrains.annotations.NotNull java.util.List properties, final @org.jetbrains.annotations.Nullable java.lang.String destinationField) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(type, "type is required"), java.util.Objects.requireNonNull(sourceFields, "sourceFields is required"), java.util.Objects.requireNonNull(connectorOperator, "connectorOperator is required"), java.util.Objects.requireNonNull(properties, "properties is required"), destinationField });
    }

    /**
     * @param type This parameter is required.
     * @param sourceFields This parameter is required.
     * @param connectorOperator This parameter is required.
     * @param properties This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public Task(final @org.jetbrains.annotations.NotNull java.lang.String type, final @org.jetbrains.annotations.NotNull java.util.List sourceFields, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.TaskConnectorOperator connectorOperator, final @org.jetbrains.annotations.NotNull java.util.List properties) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(type, "type is required"), java.util.Objects.requireNonNull(sourceFields, "sourceFields is required"), java.util.Objects.requireNonNull(connectorOperator, "connectorOperator is required"), java.util.Objects.requireNonNull(properties, "properties is required") });
    }

    /**
     * @param _flow This parameter is required.
     * @param source This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @Override
    public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.appflow.CfnFlow.TaskProperty bind(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.IFlow _flow, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.ISource source) {
        return software.amazon.jsii.Kernel.call(this, "bind", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.appflow.CfnFlow.TaskProperty.class), new Object[] { java.util.Objects.requireNonNull(_flow, "_flow is required"), java.util.Objects.requireNonNull(source, "source is required") });
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.TaskConnectorOperator getConnectorOperator() {
        return software.amazon.jsii.Kernel.get(this, "connectorOperator", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.TaskConnectorOperator.class));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected void setConnectorOperator(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.TaskConnectorOperator value) {
        software.amazon.jsii.Kernel.set(this, "connectorOperator", java.util.Objects.requireNonNull(value, "connectorOperator is required"));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected @org.jetbrains.annotations.NotNull java.util.List getProperties() {
        return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "properties", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.TaskProperty.class))));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected void setProperties(final @org.jetbrains.annotations.NotNull java.util.List value) {
        software.amazon.jsii.Kernel.set(this, "properties", java.util.Objects.requireNonNull(value, "properties is required"));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected @org.jetbrains.annotations.NotNull java.util.List getSourceFields() {
        return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "sourceFields", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected void setSourceFields(final @org.jetbrains.annotations.NotNull java.util.List value) {
        software.amazon.jsii.Kernel.set(this, "sourceFields", java.util.Objects.requireNonNull(value, "sourceFields is required"));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected @org.jetbrains.annotations.NotNull java.lang.String getType() {
        return software.amazon.jsii.Kernel.get(this, "type", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected void setType(final @org.jetbrains.annotations.NotNull java.lang.String value) {
        software.amazon.jsii.Kernel.set(this, "type", java.util.Objects.requireNonNull(value, "type is required"));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected @org.jetbrains.annotations.Nullable java.lang.String getDestinationField() {
        return software.amazon.jsii.Kernel.get(this, "destinationField", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    protected void setDestinationField(final @org.jetbrains.annotations.Nullable java.lang.String value) {
        software.amazon.jsii.Kernel.set(this, "destinationField", value);
    }

    /**
     * (experimental) A fluent builder for {@link io.github.cdklabs.cdk.appflow.Task}.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        /**
         * @return a new instance of {@link Builder}.
         * @param type This parameter is required.
         * @param sourceFields This parameter is required.
         * @param properties This parameter is required.
         * @param destinationField
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public static Builder create(final java.lang.String type, final java.util.List sourceFields, final java.util.List properties, final java.lang.String destinationField) {
            return new Builder(type, sourceFields, properties, destinationField);
        }
        /**
         * @return a new instance of {@link Builder}.
         * @param type This parameter is required.
         * @param sourceFields This parameter is required.
         * @param properties This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public static Builder create(final java.lang.String type, final java.util.List sourceFields, final java.util.List properties) {
            return new Builder(type, sourceFields, properties, null);
        }

        private final java.lang.String type;
        private final java.util.List sourceFields;
        private final java.util.List properties;
        private final java.lang.String destinationField;
        private final io.github.cdklabs.cdk.appflow.TaskConnectorOperator.Builder connectorOperator;

        private Builder(final java.lang.String type, final java.util.List sourceFields, final java.util.List properties, final java.lang.String destinationField) {
            this.type = type;
            this.sourceFields = sourceFields;
            this.properties = properties;
            this.destinationField = destinationField;
            this.connectorOperator = new io.github.cdklabs.cdk.appflow.TaskConnectorOperator.Builder();
        }

        /**
         * @return {@code this}
         * @param operation This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder operation(final java.lang.String operation) {
            this.connectorOperator.operation(operation);
            return this;
        }

        /**
         * @return {@code this}
         * @param type This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder type(final io.github.cdklabs.cdk.appflow.ConnectorType type) {
            this.connectorOperator.type(type);
            return this;
        }

        /**
         * @return a newly built instance of {@link io.github.cdklabs.cdk.appflow.Task}.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        @Override
        public io.github.cdklabs.cdk.appflow.Task build() {
            return new io.github.cdklabs.cdk.appflow.Task(
                this.type,
                this.sourceFields,
                this.connectorOperator.build(),
                this.properties,
                this.destinationField
            );
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy