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

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

There is a newer version: 2.167.1-alpha.0
Show newest version
package software.amazon.awscdk.services.glue.alpha;

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

* Example: *

*

 * Job.Builder.create(this, "RayJob")
 *         .executable(JobExecutable.pythonRay(PythonRayExecutableProps.builder()
 *                 .glueVersion(GlueVersion.V4_0)
 *                 .pythonVersion(PythonVersion.THREE_NINE)
 *                 .runtime(Runtime.RAY_TWO_FOUR)
 *                 .script(Code.fromAsset(join(__dirname, "job-script", "hello_world.py")))
 *                 .build()))
 *         .workerType(WorkerType.Z_2X)
 *         .workerCount(2)
 *         .description("an example Ray job")
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.99.0 (build 8f757e4)", date = "2024-06-13T18:49:27.684Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.glue.alpha.$Module.class, fqn = "@aws-cdk/aws-glue-alpha.PythonRayExecutableProps") @software.amazon.jsii.Jsii.Proxy(PythonRayExecutableProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface PythonRayExecutableProps 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) 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; } /** * (experimental) Additional Python modules that AWS Glue adds to the Python path before executing your script. *

* Equivalent to a job parameter --s3-py-modules. *

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

* @see https://docs.aws.amazon.com/glue/latest/dg/author-job-ray-job-parameters.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getS3PythonModules() { return null; } /** * @return a {@link Builder} of {@link PythonRayExecutableProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link PythonRayExecutableProps} */ @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; software.amazon.awscdk.services.glue.alpha.Runtime runtime; java.util.List s3PythonModules; /** * Sets the value of {@link PythonRayExecutableProps#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 PythonRayExecutableProps#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 PythonRayExecutableProps#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 PythonRayExecutableProps#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 PythonRayExecutableProps#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; } /** * Sets the value of {@link PythonRayExecutableProps#getS3PythonModules} * @param s3PythonModules Additional Python modules that AWS Glue adds to the Python path before executing your script. * Equivalent to a job parameter --s3-py-modules. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder s3PythonModules(java.util.List s3PythonModules) { this.s3PythonModules = (java.util.List)s3PythonModules; return this; } /** * Builds the configured instance. * @return a new instance of {@link PythonRayExecutableProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public PythonRayExecutableProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link PythonRayExecutableProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements PythonRayExecutableProps { 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 software.amazon.awscdk.services.glue.alpha.Runtime runtime; private final java.util.List s3PythonModules; /** * 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.runtime = software.amazon.jsii.Kernel.get(this, "runtime", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.Runtime.class)); this.s3PythonModules = software.amazon.jsii.Kernel.get(this, "s3PythonModules", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.Code.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.runtime = builder.runtime; this.s3PythonModules = (java.util.List)builder.s3PythonModules; } @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 software.amazon.awscdk.services.glue.alpha.Runtime getRuntime() { return this.runtime; } @Override public final java.util.List getS3PythonModules() { return this.s3PythonModules; } @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.getRuntime() != null) { data.set("runtime", om.valueToTree(this.getRuntime())); } if (this.getS3PythonModules() != null) { data.set("s3PythonModules", om.valueToTree(this.getS3PythonModules())); } 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.PythonRayExecutableProps")); 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; PythonRayExecutableProps.Jsii$Proxy that = (PythonRayExecutableProps.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.runtime != null ? !this.runtime.equals(that.runtime) : that.runtime != null) return false; return this.s3PythonModules != null ? this.s3PythonModules.equals(that.s3PythonModules) : that.s3PythonModules == 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.runtime != null ? this.runtime.hashCode() : 0); result = 31 * result + (this.s3PythonModules != null ? this.s3PythonModules.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy