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

software.amazon.awscdk.services.glue.alpha.PythonShellExecutableProps Maven / Gradle / Ivy

package software.amazon.awscdk.services.glue.alpha;

/**
 * (experimental) Props for creating a Python shell job executable.
 * 

* Example: *

*

 * Bucket bucket;
 * Job.Builder.create(this, "PythonShellJob")
 *         .executable(JobExecutable.pythonShell(PythonShellExecutableProps.builder()
 *                 .glueVersion(GlueVersion.V1_0)
 *                 .pythonVersion(PythonVersion.THREE)
 *                 .script(Code.fromBucket(bucket, "script.py"))
 *                 .build()))
 *         .description("an example Python Shell job")
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-11-15T10:25:09.352Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.glue.alpha.$Module.class, fqn = "@aws-cdk/aws-glue-alpha.PythonShellExecutableProps") @software.amazon.jsii.Jsii.Proxy(PythonShellExecutableProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface PythonShellExecutableProps extends software.amazon.jsii.JsiiSerializable { /** * (experimental) Glue version. *

* @see https://docs.aws.amazon.com/glue/latest/dg/release-notes.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.GlueVersion getGlueVersion(); /** * (experimental) The Python version to use. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.PythonVersion getPythonVersion(); /** * (experimental) The script that executes a job. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.Code getScript(); /** * (experimental) Additional files, such as configuration files that AWS Glue copies to the working directory of your script before executing it. *

* Only individual files are supported, directories are not supported. * Equivalent to a job parameter --extra-files. *

* Default: [] - no extra files are copied to the working directory *

* @see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getExtraFiles() { return null; } /** * (experimental) Additional Python files that AWS Glue adds to the Python path before executing your script. *

* Only individual files are supported, directories are not supported. * Equivalent to a job parameter --extra-py-files. *

* Default: - no extra python files and argument is not set *

* @see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getExtraPythonFiles() { return null; } /** * (experimental) Runtime. *

* It is required for Ray jobs. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.glue.alpha.Runtime getRuntime() { return null; } /** * @return a {@link Builder} of {@link PythonShellExecutableProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link PythonShellExecutableProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { software.amazon.awscdk.services.glue.alpha.GlueVersion glueVersion; software.amazon.awscdk.services.glue.alpha.PythonVersion pythonVersion; software.amazon.awscdk.services.glue.alpha.Code script; java.util.List extraFiles; java.util.List extraPythonFiles; software.amazon.awscdk.services.glue.alpha.Runtime runtime; /** * Sets the value of {@link PythonShellExecutableProps#getGlueVersion} * @param glueVersion Glue version. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder glueVersion(software.amazon.awscdk.services.glue.alpha.GlueVersion glueVersion) { this.glueVersion = glueVersion; return this; } /** * Sets the value of {@link PythonShellExecutableProps#getPythonVersion} * @param pythonVersion The Python version to use. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder pythonVersion(software.amazon.awscdk.services.glue.alpha.PythonVersion pythonVersion) { this.pythonVersion = pythonVersion; return this; } /** * Sets the value of {@link PythonShellExecutableProps#getScript} * @param script The script that executes a job. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder script(software.amazon.awscdk.services.glue.alpha.Code script) { this.script = script; return this; } /** * Sets the value of {@link PythonShellExecutableProps#getExtraFiles} * @param extraFiles Additional files, such as configuration files that AWS Glue copies to the working directory of your script before executing it. * Only individual files are supported, directories are not supported. * Equivalent to a job parameter --extra-files. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder extraFiles(java.util.List extraFiles) { this.extraFiles = (java.util.List)extraFiles; return this; } /** * Sets the value of {@link PythonShellExecutableProps#getExtraPythonFiles} * @param extraPythonFiles Additional Python files that AWS Glue adds to the Python path before executing your script. * Only individual files are supported, directories are not supported. * Equivalent to a job parameter --extra-py-files. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder extraPythonFiles(java.util.List extraPythonFiles) { this.extraPythonFiles = (java.util.List)extraPythonFiles; return this; } /** * Sets the value of {@link PythonShellExecutableProps#getRuntime} * @param runtime Runtime. * It is required for Ray jobs. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder runtime(software.amazon.awscdk.services.glue.alpha.Runtime runtime) { this.runtime = runtime; return this; } /** * Builds the configured instance. * @return a new instance of {@link PythonShellExecutableProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public PythonShellExecutableProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link PythonShellExecutableProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements PythonShellExecutableProps { private final software.amazon.awscdk.services.glue.alpha.GlueVersion glueVersion; private final software.amazon.awscdk.services.glue.alpha.PythonVersion pythonVersion; private final software.amazon.awscdk.services.glue.alpha.Code script; private final java.util.List extraFiles; private final java.util.List extraPythonFiles; private final software.amazon.awscdk.services.glue.alpha.Runtime runtime; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.glueVersion = software.amazon.jsii.Kernel.get(this, "glueVersion", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.GlueVersion.class)); this.pythonVersion = software.amazon.jsii.Kernel.get(this, "pythonVersion", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.PythonVersion.class)); this.script = software.amazon.jsii.Kernel.get(this, "script", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.Code.class)); this.extraFiles = software.amazon.jsii.Kernel.get(this, "extraFiles", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.Code.class))); this.extraPythonFiles = software.amazon.jsii.Kernel.get(this, "extraPythonFiles", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.Code.class))); this.runtime = software.amazon.jsii.Kernel.get(this, "runtime", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.Runtime.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @SuppressWarnings("unchecked") protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.glueVersion = java.util.Objects.requireNonNull(builder.glueVersion, "glueVersion is required"); this.pythonVersion = java.util.Objects.requireNonNull(builder.pythonVersion, "pythonVersion is required"); this.script = java.util.Objects.requireNonNull(builder.script, "script is required"); this.extraFiles = (java.util.List)builder.extraFiles; this.extraPythonFiles = (java.util.List)builder.extraPythonFiles; this.runtime = builder.runtime; } @Override public final software.amazon.awscdk.services.glue.alpha.GlueVersion getGlueVersion() { return this.glueVersion; } @Override public final software.amazon.awscdk.services.glue.alpha.PythonVersion getPythonVersion() { return this.pythonVersion; } @Override public final software.amazon.awscdk.services.glue.alpha.Code getScript() { return this.script; } @Override public final java.util.List getExtraFiles() { return this.extraFiles; } @Override public final java.util.List getExtraPythonFiles() { return this.extraPythonFiles; } @Override public final software.amazon.awscdk.services.glue.alpha.Runtime getRuntime() { return this.runtime; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("glueVersion", om.valueToTree(this.getGlueVersion())); data.set("pythonVersion", om.valueToTree(this.getPythonVersion())); data.set("script", om.valueToTree(this.getScript())); if (this.getExtraFiles() != null) { data.set("extraFiles", om.valueToTree(this.getExtraFiles())); } if (this.getExtraPythonFiles() != null) { data.set("extraPythonFiles", om.valueToTree(this.getExtraPythonFiles())); } if (this.getRuntime() != null) { data.set("runtime", om.valueToTree(this.getRuntime())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-glue-alpha.PythonShellExecutableProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PythonShellExecutableProps.Jsii$Proxy that = (PythonShellExecutableProps.Jsii$Proxy) o; if (!glueVersion.equals(that.glueVersion)) return false; if (!pythonVersion.equals(that.pythonVersion)) return false; if (!script.equals(that.script)) return false; if (this.extraFiles != null ? !this.extraFiles.equals(that.extraFiles) : that.extraFiles != null) return false; if (this.extraPythonFiles != null ? !this.extraPythonFiles.equals(that.extraPythonFiles) : that.extraPythonFiles != null) return false; return this.runtime != null ? this.runtime.equals(that.runtime) : that.runtime == null; } @Override public final int hashCode() { int result = this.glueVersion.hashCode(); result = 31 * result + (this.pythonVersion.hashCode()); result = 31 * result + (this.script.hashCode()); result = 31 * result + (this.extraFiles != null ? this.extraFiles.hashCode() : 0); result = 31 * result + (this.extraPythonFiles != null ? this.extraPythonFiles.hashCode() : 0); result = 31 * result + (this.runtime != null ? this.runtime.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy