software.amazon.awscdk.services.glue.alpha.DataFormatProps Maven / Gradle / Ivy
Show all versions of glue-alpha Show documentation
package software.amazon.awscdk.services.glue.alpha;
/**
* (experimental) Properties of a DataFormat instance.
*
* 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.*;
* ClassificationString classificationString;
* InputFormat inputFormat;
* OutputFormat outputFormat;
* SerializationLibrary serializationLibrary;
* DataFormatProps dataFormatProps = DataFormatProps.builder()
* .inputFormat(inputFormat)
* .outputFormat(outputFormat)
* .serializationLibrary(serializationLibrary)
* // the properties below are optional
* .classificationString(classificationString)
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-11-15T10:25:09.321Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.glue.alpha.$Module.class, fqn = "@aws-cdk/aws-glue-alpha.DataFormatProps")
@software.amazon.jsii.Jsii.Proxy(DataFormatProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface DataFormatProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) InputFormat
for this data format.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.InputFormat getInputFormat();
/**
* (experimental) OutputFormat
for this data format.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.OutputFormat getOutputFormat();
/**
* (experimental) Serialization library for this data format.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.glue.alpha.SerializationLibrary getSerializationLibrary();
/**
* (experimental) Classification string given to tables with this data format.
*
* Default: - No classification is specified.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.glue.alpha.ClassificationString getClassificationString() {
return null;
}
/**
* @return a {@link Builder} of {@link DataFormatProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link DataFormatProps}
*/
@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.InputFormat inputFormat;
software.amazon.awscdk.services.glue.alpha.OutputFormat outputFormat;
software.amazon.awscdk.services.glue.alpha.SerializationLibrary serializationLibrary;
software.amazon.awscdk.services.glue.alpha.ClassificationString classificationString;
/**
* Sets the value of {@link DataFormatProps#getInputFormat}
* @param inputFormat InputFormat
for this data format. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder inputFormat(software.amazon.awscdk.services.glue.alpha.InputFormat inputFormat) {
this.inputFormat = inputFormat;
return this;
}
/**
* Sets the value of {@link DataFormatProps#getOutputFormat}
* @param outputFormat OutputFormat
for this data format. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder outputFormat(software.amazon.awscdk.services.glue.alpha.OutputFormat outputFormat) {
this.outputFormat = outputFormat;
return this;
}
/**
* Sets the value of {@link DataFormatProps#getSerializationLibrary}
* @param serializationLibrary Serialization library for this data format. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder serializationLibrary(software.amazon.awscdk.services.glue.alpha.SerializationLibrary serializationLibrary) {
this.serializationLibrary = serializationLibrary;
return this;
}
/**
* Sets the value of {@link DataFormatProps#getClassificationString}
* @param classificationString Classification string given to tables with this data format.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder classificationString(software.amazon.awscdk.services.glue.alpha.ClassificationString classificationString) {
this.classificationString = classificationString;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link DataFormatProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public DataFormatProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link DataFormatProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DataFormatProps {
private final software.amazon.awscdk.services.glue.alpha.InputFormat inputFormat;
private final software.amazon.awscdk.services.glue.alpha.OutputFormat outputFormat;
private final software.amazon.awscdk.services.glue.alpha.SerializationLibrary serializationLibrary;
private final software.amazon.awscdk.services.glue.alpha.ClassificationString classificationString;
/**
* 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.inputFormat = software.amazon.jsii.Kernel.get(this, "inputFormat", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.InputFormat.class));
this.outputFormat = software.amazon.jsii.Kernel.get(this, "outputFormat", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.OutputFormat.class));
this.serializationLibrary = software.amazon.jsii.Kernel.get(this, "serializationLibrary", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.SerializationLibrary.class));
this.classificationString = software.amazon.jsii.Kernel.get(this, "classificationString", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.glue.alpha.ClassificationString.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.inputFormat = java.util.Objects.requireNonNull(builder.inputFormat, "inputFormat is required");
this.outputFormat = java.util.Objects.requireNonNull(builder.outputFormat, "outputFormat is required");
this.serializationLibrary = java.util.Objects.requireNonNull(builder.serializationLibrary, "serializationLibrary is required");
this.classificationString = builder.classificationString;
}
@Override
public final software.amazon.awscdk.services.glue.alpha.InputFormat getInputFormat() {
return this.inputFormat;
}
@Override
public final software.amazon.awscdk.services.glue.alpha.OutputFormat getOutputFormat() {
return this.outputFormat;
}
@Override
public final software.amazon.awscdk.services.glue.alpha.SerializationLibrary getSerializationLibrary() {
return this.serializationLibrary;
}
@Override
public final software.amazon.awscdk.services.glue.alpha.ClassificationString getClassificationString() {
return this.classificationString;
}
@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("inputFormat", om.valueToTree(this.getInputFormat()));
data.set("outputFormat", om.valueToTree(this.getOutputFormat()));
data.set("serializationLibrary", om.valueToTree(this.getSerializationLibrary()));
if (this.getClassificationString() != null) {
data.set("classificationString", om.valueToTree(this.getClassificationString()));
}
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.DataFormatProps"));
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;
DataFormatProps.Jsii$Proxy that = (DataFormatProps.Jsii$Proxy) o;
if (!inputFormat.equals(that.inputFormat)) return false;
if (!outputFormat.equals(that.outputFormat)) return false;
if (!serializationLibrary.equals(that.serializationLibrary)) return false;
return this.classificationString != null ? this.classificationString.equals(that.classificationString) : that.classificationString == null;
}
@Override
public final int hashCode() {
int result = this.inputFormat.hashCode();
result = 31 * result + (this.outputFormat.hashCode());
result = 31 * result + (this.serializationLibrary.hashCode());
result = 31 * result + (this.classificationString != null ? this.classificationString.hashCode() : 0);
return result;
}
}
}