software.amazon.awscdk.services.glue.alpha.DatabaseProps Maven / Gradle / Ivy
Show all versions of glue-alpha Show documentation
package software.amazon.awscdk.services.glue.alpha;
/**
* 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.*;
* DatabaseProps databaseProps = DatabaseProps.builder()
* .databaseName("databaseName")
* .locationUri("locationUri")
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.78.1 (build 878761e)", date = "2023-04-05T23:24:21.810Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.glue.alpha.$Module.class, fqn = "@aws-cdk/aws-glue-alpha.DatabaseProps")
@software.amazon.jsii.Jsii.Proxy(DatabaseProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface DatabaseProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The name of the database.
*
* Default: - generated by CDK.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getDatabaseName() {
return null;
}
/**
* (experimental) The location of the database (for example, an HDFS path).
*
* Default: undefined. This field is optional in AWS::Glue::Database DatabaseInput
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getLocationUri() {
return null;
}
/**
* @return a {@link Builder} of {@link DatabaseProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link DatabaseProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String databaseName;
java.lang.String locationUri;
/**
* Sets the value of {@link DatabaseProps#getDatabaseName}
* @param databaseName The name of the database.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder databaseName(java.lang.String databaseName) {
this.databaseName = databaseName;
return this;
}
/**
* Sets the value of {@link DatabaseProps#getLocationUri}
* @param locationUri The location of the database (for example, an HDFS path).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder locationUri(java.lang.String locationUri) {
this.locationUri = locationUri;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link DatabaseProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public DatabaseProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link DatabaseProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DatabaseProps {
private final java.lang.String databaseName;
private final java.lang.String locationUri;
/**
* 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.databaseName = software.amazon.jsii.Kernel.get(this, "databaseName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.locationUri = software.amazon.jsii.Kernel.get(this, "locationUri", software.amazon.jsii.NativeType.forClass(java.lang.String.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.databaseName = builder.databaseName;
this.locationUri = builder.locationUri;
}
@Override
public final java.lang.String getDatabaseName() {
return this.databaseName;
}
@Override
public final java.lang.String getLocationUri() {
return this.locationUri;
}
@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();
if (this.getDatabaseName() != null) {
data.set("databaseName", om.valueToTree(this.getDatabaseName()));
}
if (this.getLocationUri() != null) {
data.set("locationUri", om.valueToTree(this.getLocationUri()));
}
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.DatabaseProps"));
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;
DatabaseProps.Jsii$Proxy that = (DatabaseProps.Jsii$Proxy) o;
if (this.databaseName != null ? !this.databaseName.equals(that.databaseName) : that.databaseName != null) return false;
return this.locationUri != null ? this.locationUri.equals(that.locationUri) : that.locationUri == null;
}
@Override
public final int hashCode() {
int result = this.databaseName != null ? this.databaseName.hashCode() : 0;
result = 31 * result + (this.locationUri != null ? this.locationUri.hashCode() : 0);
return result;
}
}
}