software.amazon.awscdk.services.glue.alpha.CodeConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-alpha Show documentation
Show all versions of glue-alpha Show documentation
The CDK Construct Library for AWS::Glue
package software.amazon.awscdk.services.glue.alpha;
/**
* (experimental) Result of binding Code
into a Job
.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.glue.alpha.*;
* CodeConfig codeConfig = CodeConfig.builder()
* .s3Location(Location.builder()
* .bucketName("bucketName")
* .objectKey("objectKey")
* // the properties below are optional
* .objectVersion("objectVersion")
* .build())
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.99.0 (build 8f757e4)", date = "2024-06-13T18:49:27.649Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.glue.alpha.$Module.class, fqn = "@aws-cdk/aws-glue-alpha.CodeConfig")
@software.amazon.jsii.Jsii.Proxy(CodeConfig.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface CodeConfig extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The location of the code in S3.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.s3.Location getS3Location();
/**
* @return a {@link Builder} of {@link CodeConfig}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CodeConfig}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.s3.Location s3Location;
/**
* Sets the value of {@link CodeConfig#getS3Location}
* @param s3Location The location of the code in S3. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder s3Location(software.amazon.awscdk.services.s3.Location s3Location) {
this.s3Location = s3Location;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CodeConfig}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public CodeConfig build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CodeConfig}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CodeConfig {
private final software.amazon.awscdk.services.s3.Location s3Location;
/**
* 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.s3Location = software.amazon.jsii.Kernel.get(this, "s3Location", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.Location.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.s3Location = java.util.Objects.requireNonNull(builder.s3Location, "s3Location is required");
}
@Override
public final software.amazon.awscdk.services.s3.Location getS3Location() {
return this.s3Location;
}
@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("s3Location", om.valueToTree(this.getS3Location()));
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.CodeConfig"));
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;
CodeConfig.Jsii$Proxy that = (CodeConfig.Jsii$Proxy) o;
return this.s3Location.equals(that.s3Location);
}
@Override
public final int hashCode() {
int result = this.s3Location.hashCode();
return result;
}
}
}