ca.wheatstalk.cdkecskeycloak.DatabaseInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdk-ecs-keycloak Show documentation
Show all versions of cdk-ecs-keycloak Show documentation
@wheatstalk/cdk-ecs-keycloak
package ca.wheatstalk.cdkecskeycloak;
/**
* Information about needed to connect to the database.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.24.0 (build b722f66)", date = "2021-03-04T07:10:04.598Z")
@software.amazon.jsii.Jsii(module = ca.wheatstalk.cdkecskeycloak.$Module.class, fqn = "@wheatstalk/cdk-ecs-keycloak.DatabaseInfo")
@software.amazon.jsii.Jsii.Proxy(DatabaseInfo.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface DatabaseInfo extends software.amazon.jsii.JsiiSerializable {
/**
* Database credentials in standard RDS json format.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.secretsmanager.ISecret getCredentials();
/**
* Database vendor.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull ca.wheatstalk.cdkecskeycloak.KeycloakDatabaseVendor getVendor();
/**
* A connectable so that the cluster can allow itself to connect to the database.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IConnectable getConnectable() {
return null;
}
/**
* @return a {@link Builder} of {@link DatabaseInfo}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link DatabaseInfo}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
private software.amazon.awscdk.services.secretsmanager.ISecret credentials;
private ca.wheatstalk.cdkecskeycloak.KeycloakDatabaseVendor vendor;
private software.amazon.awscdk.services.ec2.IConnectable connectable;
/**
* Sets the value of {@link DatabaseInfo#getCredentials}
* @param credentials Database credentials in standard RDS json format. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder credentials(software.amazon.awscdk.services.secretsmanager.ISecret credentials) {
this.credentials = credentials;
return this;
}
/**
* Sets the value of {@link DatabaseInfo#getVendor}
* @param vendor Database vendor. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vendor(ca.wheatstalk.cdkecskeycloak.KeycloakDatabaseVendor vendor) {
this.vendor = vendor;
return this;
}
/**
* Sets the value of {@link DatabaseInfo#getConnectable}
* @param connectable A connectable so that the cluster can allow itself to connect to the database.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder connectable(software.amazon.awscdk.services.ec2.IConnectable connectable) {
this.connectable = connectable;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link DatabaseInfo}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public DatabaseInfo build() {
return new Jsii$Proxy(credentials, vendor, connectable);
}
}
/**
* An implementation for {@link DatabaseInfo}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DatabaseInfo {
private final software.amazon.awscdk.services.secretsmanager.ISecret credentials;
private final ca.wheatstalk.cdkecskeycloak.KeycloakDatabaseVendor vendor;
private final software.amazon.awscdk.services.ec2.IConnectable connectable;
/**
* 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.credentials = software.amazon.jsii.Kernel.get(this, "credentials", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.secretsmanager.ISecret.class));
this.vendor = software.amazon.jsii.Kernel.get(this, "vendor", software.amazon.jsii.NativeType.forClass(ca.wheatstalk.cdkecskeycloak.KeycloakDatabaseVendor.class));
this.connectable = software.amazon.jsii.Kernel.get(this, "connectable", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IConnectable.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final software.amazon.awscdk.services.secretsmanager.ISecret credentials, final ca.wheatstalk.cdkecskeycloak.KeycloakDatabaseVendor vendor, final software.amazon.awscdk.services.ec2.IConnectable connectable) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.credentials = java.util.Objects.requireNonNull(credentials, "credentials is required");
this.vendor = java.util.Objects.requireNonNull(vendor, "vendor is required");
this.connectable = connectable;
}
@Override
public final software.amazon.awscdk.services.secretsmanager.ISecret getCredentials() {
return this.credentials;
}
@Override
public final ca.wheatstalk.cdkecskeycloak.KeycloakDatabaseVendor getVendor() {
return this.vendor;
}
@Override
public final software.amazon.awscdk.services.ec2.IConnectable getConnectable() {
return this.connectable;
}
@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("credentials", om.valueToTree(this.getCredentials()));
data.set("vendor", om.valueToTree(this.getVendor()));
if (this.getConnectable() != null) {
data.set("connectable", om.valueToTree(this.getConnectable()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@wheatstalk/cdk-ecs-keycloak.DatabaseInfo"));
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;
DatabaseInfo.Jsii$Proxy that = (DatabaseInfo.Jsii$Proxy) o;
if (!credentials.equals(that.credentials)) return false;
if (!vendor.equals(that.vendor)) return false;
return this.connectable != null ? this.connectable.equals(that.connectable) : that.connectable == null;
}
@Override
public final int hashCode() {
int result = this.credentials.hashCode();
result = 31 * result + (this.vendor.hashCode());
result = 31 * result + (this.connectable != null ? this.connectable.hashCode() : 0);
return result;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy