software.amazon.awscdk.services.redshift.alpha.ClusterParameterGroupProps Maven / Gradle / Ivy
Show all versions of redshift-alpha Show documentation
package software.amazon.awscdk.services.redshift.alpha;
/**
* (experimental) Properties for a parameter group.
*
* Example:
*
*
* import software.amazon.awscdk.services.redshift.alpha.ClusterParameterGroup;
* ClusterParameterGroup params = ClusterParameterGroup.Builder.create(this, "Params")
* .description("desc")
* .parameters(Map.of(
* "require_ssl", "true"))
* .build();
* params.addParameter("enable_user_activity_logging", "true");
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-19T18:12:10.161Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.redshift.alpha.$Module.class, fqn = "@aws-cdk/aws-redshift-alpha.ClusterParameterGroupProps")
@software.amazon.jsii.Jsii.Proxy(ClusterParameterGroupProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ClusterParameterGroupProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The parameters in this parameter group.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.util.Map getParameters();
/**
* (experimental) Description for this parameter group.
*
* Default: a CDK generated description
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getDescription() {
return null;
}
/**
* @return a {@link Builder} of {@link ClusterParameterGroupProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ClusterParameterGroupProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.Map parameters;
java.lang.String description;
/**
* Sets the value of {@link ClusterParameterGroupProps#getParameters}
* @param parameters The parameters in this parameter group. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder parameters(java.util.Map parameters) {
this.parameters = parameters;
return this;
}
/**
* Sets the value of {@link ClusterParameterGroupProps#getDescription}
* @param description Description for this parameter group.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ClusterParameterGroupProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public ClusterParameterGroupProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ClusterParameterGroupProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ClusterParameterGroupProps {
private final java.util.Map parameters;
private final java.lang.String description;
/**
* 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.parameters = software.amazon.jsii.Kernel.get(this, "parameters", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.description = software.amazon.jsii.Kernel.get(this, "description", 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.parameters = java.util.Objects.requireNonNull(builder.parameters, "parameters is required");
this.description = builder.description;
}
@Override
public final java.util.Map getParameters() {
return this.parameters;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@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("parameters", om.valueToTree(this.getParameters()));
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-redshift-alpha.ClusterParameterGroupProps"));
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;
ClusterParameterGroupProps.Jsii$Proxy that = (ClusterParameterGroupProps.Jsii$Proxy) o;
if (!parameters.equals(that.parameters)) return false;
return this.description != null ? this.description.equals(that.description) : that.description == null;
}
@Override
public final int hashCode() {
int result = this.parameters.hashCode();
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
return result;
}
}
}