org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindowProps Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* The maintenanceWindow resource provides access to retrieve or update the current Atlas project maintenance window.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.941Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.CfnMaintenanceWindowProps")
@software.amazon.jsii.Jsii.Proxy(CfnMaintenanceWindowProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnMaintenanceWindowProps extends software.amazon.jsii.JsiiSerializable {
/**
* Zero-based integer that represents the hour of the of the day that the maintenance window starts according to a 24-hour clock.
*
* Use 0
for midnight and 12
for noon.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.Number getHourOfDay();
/**
* Flag that indicates whether MongoDB Cloud should defer all maintenance windows for one week after you enable them.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getAutoDeferOnceEnabled() {
return null;
}
/**
* One-based integer that represents the day of the week that the maintenance window starts.
*
* | Value | Day of Week |
* |---|---|
* | 1
| Sunday |
* | 2
| Monday |
* | 3
| Tuesday |
* | 4
| Wednesday |
* | 5
| Thursday |
* | 6
| Friday |
* | 7
| Saturday |
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getDayOfWeek() {
return null;
}
/**
* The profile is defined in AWS Secret manager.
*
* See Secret Manager Profile setup
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getProfile() {
return null;
}
/**
* Unique 24-hexadecimal digit string that identifies your project.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getProjectId() {
return null;
}
/**
* Flag that indicates whether MongoDB Cloud starts the maintenance window immediately upon receiving this request.
*
* To start the maintenance window immediately for your project, MongoDB Cloud must have maintenance scheduled and you must set a maintenance window. This flag resets to false
after MongoDB Cloud completes maintenance.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getStartAsap() {
return null;
}
/**
* @return a {@link Builder} of {@link CfnMaintenanceWindowProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnMaintenanceWindowProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Number hourOfDay;
java.lang.Boolean autoDeferOnceEnabled;
java.lang.Number dayOfWeek;
java.lang.String profile;
java.lang.String projectId;
java.lang.Boolean startAsap;
/**
* Sets the value of {@link CfnMaintenanceWindowProps#getHourOfDay}
* @param hourOfDay Zero-based integer that represents the hour of the of the day that the maintenance window starts according to a 24-hour clock. This parameter is required.
* Use 0
for midnight and 12
for noon.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder hourOfDay(java.lang.Number hourOfDay) {
this.hourOfDay = hourOfDay;
return this;
}
/**
* Sets the value of {@link CfnMaintenanceWindowProps#getAutoDeferOnceEnabled}
* @param autoDeferOnceEnabled Flag that indicates whether MongoDB Cloud should defer all maintenance windows for one week after you enable them.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder autoDeferOnceEnabled(java.lang.Boolean autoDeferOnceEnabled) {
this.autoDeferOnceEnabled = autoDeferOnceEnabled;
return this;
}
/**
* Sets the value of {@link CfnMaintenanceWindowProps#getDayOfWeek}
* @param dayOfWeek One-based integer that represents the day of the week that the maintenance window starts.
* | Value | Day of Week |
* |---|---|
* | 1
| Sunday |
* | 2
| Monday |
* | 3
| Tuesday |
* | 4
| Wednesday |
* | 5
| Thursday |
* | 6
| Friday |
* | 7
| Saturday |
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder dayOfWeek(java.lang.Number dayOfWeek) {
this.dayOfWeek = dayOfWeek;
return this;
}
/**
* Sets the value of {@link CfnMaintenanceWindowProps#getProfile}
* @param profile The profile is defined in AWS Secret manager.
* See Secret Manager Profile setup
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder profile(java.lang.String profile) {
this.profile = profile;
return this;
}
/**
* Sets the value of {@link CfnMaintenanceWindowProps#getProjectId}
* @param projectId Unique 24-hexadecimal digit string that identifies your project.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder projectId(java.lang.String projectId) {
this.projectId = projectId;
return this;
}
/**
* Sets the value of {@link CfnMaintenanceWindowProps#getStartAsap}
* @param startAsap Flag that indicates whether MongoDB Cloud starts the maintenance window immediately upon receiving this request.
* To start the maintenance window immediately for your project, MongoDB Cloud must have maintenance scheduled and you must set a maintenance window. This flag resets to false
after MongoDB Cloud completes maintenance.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder startAsap(java.lang.Boolean startAsap) {
this.startAsap = startAsap;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnMaintenanceWindowProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CfnMaintenanceWindowProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnMaintenanceWindowProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnMaintenanceWindowProps {
private final java.lang.Number hourOfDay;
private final java.lang.Boolean autoDeferOnceEnabled;
private final java.lang.Number dayOfWeek;
private final java.lang.String profile;
private final java.lang.String projectId;
private final java.lang.Boolean startAsap;
/**
* 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.hourOfDay = software.amazon.jsii.Kernel.get(this, "hourOfDay", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.autoDeferOnceEnabled = software.amazon.jsii.Kernel.get(this, "autoDeferOnceEnabled", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.dayOfWeek = software.amazon.jsii.Kernel.get(this, "dayOfWeek", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.profile = software.amazon.jsii.Kernel.get(this, "profile", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.projectId = software.amazon.jsii.Kernel.get(this, "projectId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.startAsap = software.amazon.jsii.Kernel.get(this, "startAsap", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.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.hourOfDay = java.util.Objects.requireNonNull(builder.hourOfDay, "hourOfDay is required");
this.autoDeferOnceEnabled = builder.autoDeferOnceEnabled;
this.dayOfWeek = builder.dayOfWeek;
this.profile = builder.profile;
this.projectId = builder.projectId;
this.startAsap = builder.startAsap;
}
@Override
public final java.lang.Number getHourOfDay() {
return this.hourOfDay;
}
@Override
public final java.lang.Boolean getAutoDeferOnceEnabled() {
return this.autoDeferOnceEnabled;
}
@Override
public final java.lang.Number getDayOfWeek() {
return this.dayOfWeek;
}
@Override
public final java.lang.String getProfile() {
return this.profile;
}
@Override
public final java.lang.String getProjectId() {
return this.projectId;
}
@Override
public final java.lang.Boolean getStartAsap() {
return this.startAsap;
}
@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("hourOfDay", om.valueToTree(this.getHourOfDay()));
if (this.getAutoDeferOnceEnabled() != null) {
data.set("autoDeferOnceEnabled", om.valueToTree(this.getAutoDeferOnceEnabled()));
}
if (this.getDayOfWeek() != null) {
data.set("dayOfWeek", om.valueToTree(this.getDayOfWeek()));
}
if (this.getProfile() != null) {
data.set("profile", om.valueToTree(this.getProfile()));
}
if (this.getProjectId() != null) {
data.set("projectId", om.valueToTree(this.getProjectId()));
}
if (this.getStartAsap() != null) {
data.set("startAsap", om.valueToTree(this.getStartAsap()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.CfnMaintenanceWindowProps"));
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;
CfnMaintenanceWindowProps.Jsii$Proxy that = (CfnMaintenanceWindowProps.Jsii$Proxy) o;
if (!hourOfDay.equals(that.hourOfDay)) return false;
if (this.autoDeferOnceEnabled != null ? !this.autoDeferOnceEnabled.equals(that.autoDeferOnceEnabled) : that.autoDeferOnceEnabled != null) return false;
if (this.dayOfWeek != null ? !this.dayOfWeek.equals(that.dayOfWeek) : that.dayOfWeek != null) return false;
if (this.profile != null ? !this.profile.equals(that.profile) : that.profile != null) return false;
if (this.projectId != null ? !this.projectId.equals(that.projectId) : that.projectId != null) return false;
return this.startAsap != null ? this.startAsap.equals(that.startAsap) : that.startAsap == null;
}
@Override
public final int hashCode() {
int result = this.hourOfDay.hashCode();
result = 31 * result + (this.autoDeferOnceEnabled != null ? this.autoDeferOnceEnabled.hashCode() : 0);
result = 31 * result + (this.dayOfWeek != null ? this.dayOfWeek.hashCode() : 0);
result = 31 * result + (this.profile != null ? this.profile.hashCode() : 0);
result = 31 * result + (this.projectId != null ? this.projectId.hashCode() : 0);
result = 31 * result + (this.startAsap != null ? this.startAsap.hashCode() : 0);
return result;
}
}
}