io.github.cdklabs.cdk.appflow.Transform Maven / Gradle / Ivy
package io.github.cdklabs.cdk.appflow;
/**
* (experimental) A representation of a transform operation, that is an operation modifying source fields.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-11T10:39:08.295Z")
@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.Transform")
public class Transform extends io.github.cdklabs.cdk.appflow.OperationBase implements io.github.cdklabs.cdk.appflow.ITransform {
protected Transform(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected Transform(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param tasks This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Transform(final @org.jetbrains.annotations.NotNull java.util.List tasks) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(tasks, "tasks is required") });
}
/**
* (experimental) Masks the field with a specified mask.
*
* Default: '*'
*
* @return a
* @see Transform instance
* @param field a source field to mask. This parameter is required.
* @param mask a mask character.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.ITransform mask(final @org.jetbrains.annotations.NotNull java.lang.Object field, final @org.jetbrains.annotations.Nullable java.lang.String mask) {
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.Transform.class, "mask", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ITransform.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required"), mask });
}
/**
* (experimental) Masks the field with a specified mask.
*
* Default: '*'
*
* @return a
* @see Transform instance
* @param field a source field to mask. 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.ITransform mask(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.Transform.class, "mask", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ITransform.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required") });
}
/**
* @param field This parameter is required.
* @param length This parameter is required.
* @param mask
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.ITransform maskEnd(final @org.jetbrains.annotations.NotNull java.lang.Object field, final @org.jetbrains.annotations.NotNull java.lang.Number length, final @org.jetbrains.annotations.Nullable java.lang.String mask) {
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.Transform.class, "maskEnd", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ITransform.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required"), java.util.Objects.requireNonNull(length, "length is required"), mask });
}
/**
* @param field This parameter is required.
* @param length 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.ITransform maskEnd(final @org.jetbrains.annotations.NotNull java.lang.Object field, final @org.jetbrains.annotations.NotNull java.lang.Number length) {
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.Transform.class, "maskEnd", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ITransform.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required"), java.util.Objects.requireNonNull(length, "length is required") });
}
/**
* @param field This parameter is required.
* @param length This parameter is required.
* @param mask
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.appflow.ITransform maskStart(final @org.jetbrains.annotations.NotNull java.lang.Object field, final @org.jetbrains.annotations.NotNull java.lang.Number length, final @org.jetbrains.annotations.Nullable java.lang.String mask) {
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.Transform.class, "maskStart", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ITransform.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required"), java.util.Objects.requireNonNull(length, "length is required"), mask });
}
/**
* @param field This parameter is required.
* @param length 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.ITransform maskStart(final @org.jetbrains.annotations.NotNull java.lang.Object field, final @org.jetbrains.annotations.NotNull java.lang.Number length) {
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.Transform.class, "maskStart", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ITransform.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required"), java.util.Objects.requireNonNull(length, "length is required") });
}
/**
* (experimental) Truncates the field to a specified length.
*
* @return a
* @see Transform instance
* @param field a source field to truncate. This parameter is required.
* @param length the maximum length after truncation. 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.ITransform truncate(final @org.jetbrains.annotations.NotNull java.lang.Object field, final @org.jetbrains.annotations.NotNull java.lang.Number length) {
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.Transform.class, "truncate", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.appflow.ITransform.class), new Object[] { java.util.Objects.requireNonNull(field, "field is required"), java.util.Objects.requireNonNull(length, "length is required") });
}
}