org.mongodb.awscdk.resources.mongodbatlas.ApiPolicyItemView Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.866Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.ApiPolicyItemView")
@software.amazon.jsii.Jsii.Proxy(ApiPolicyItemView.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface ApiPolicyItemView extends software.amazon.jsii.JsiiSerializable {
/**
* Desired frequency of the new backup policy item specified by frequencyType.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getFrequencyInterval() {
return null;
}
/**
* Frequency associated with the backup policy item.
*
* One of the following values: hourly, daily, weekly, monthly or yearly.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getFrequencyType() {
return null;
}
/**
* Unique identifier of the backup policy item.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getId() {
return null;
}
/**
* Metric of duration of the backup policy item: days, weeks, months or years.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getRetentionUnit() {
return null;
}
/**
* Duration for which the backup is kept.
*
* Associated with retentionUnit.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getRetentionValue() {
return null;
}
/**
* @return a {@link Builder} of {@link ApiPolicyItemView}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ApiPolicyItemView}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Number frequencyInterval;
java.lang.String frequencyType;
java.lang.String id;
java.lang.String retentionUnit;
java.lang.Number retentionValue;
/**
* Sets the value of {@link ApiPolicyItemView#getFrequencyInterval}
* @param frequencyInterval Desired frequency of the new backup policy item specified by frequencyType.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder frequencyInterval(java.lang.Number frequencyInterval) {
this.frequencyInterval = frequencyInterval;
return this;
}
/**
* Sets the value of {@link ApiPolicyItemView#getFrequencyType}
* @param frequencyType Frequency associated with the backup policy item.
* One of the following values: hourly, daily, weekly, monthly or yearly.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder frequencyType(java.lang.String frequencyType) {
this.frequencyType = frequencyType;
return this;
}
/**
* Sets the value of {@link ApiPolicyItemView#getId}
* @param id Unique identifier of the backup policy item.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder id(java.lang.String id) {
this.id = id;
return this;
}
/**
* Sets the value of {@link ApiPolicyItemView#getRetentionUnit}
* @param retentionUnit Metric of duration of the backup policy item: days, weeks, months or years.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder retentionUnit(java.lang.String retentionUnit) {
this.retentionUnit = retentionUnit;
return this;
}
/**
* Sets the value of {@link ApiPolicyItemView#getRetentionValue}
* @param retentionValue Duration for which the backup is kept.
* Associated with retentionUnit.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder retentionValue(java.lang.Number retentionValue) {
this.retentionValue = retentionValue;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ApiPolicyItemView}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ApiPolicyItemView build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ApiPolicyItemView}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ApiPolicyItemView {
private final java.lang.Number frequencyInterval;
private final java.lang.String frequencyType;
private final java.lang.String id;
private final java.lang.String retentionUnit;
private final java.lang.Number retentionValue;
/**
* 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.frequencyInterval = software.amazon.jsii.Kernel.get(this, "frequencyInterval", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.frequencyType = software.amazon.jsii.Kernel.get(this, "frequencyType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.id = software.amazon.jsii.Kernel.get(this, "id", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.retentionUnit = software.amazon.jsii.Kernel.get(this, "retentionUnit", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.retentionValue = software.amazon.jsii.Kernel.get(this, "retentionValue", software.amazon.jsii.NativeType.forClass(java.lang.Number.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.frequencyInterval = builder.frequencyInterval;
this.frequencyType = builder.frequencyType;
this.id = builder.id;
this.retentionUnit = builder.retentionUnit;
this.retentionValue = builder.retentionValue;
}
@Override
public final java.lang.Number getFrequencyInterval() {
return this.frequencyInterval;
}
@Override
public final java.lang.String getFrequencyType() {
return this.frequencyType;
}
@Override
public final java.lang.String getId() {
return this.id;
}
@Override
public final java.lang.String getRetentionUnit() {
return this.retentionUnit;
}
@Override
public final java.lang.Number getRetentionValue() {
return this.retentionValue;
}
@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.getFrequencyInterval() != null) {
data.set("frequencyInterval", om.valueToTree(this.getFrequencyInterval()));
}
if (this.getFrequencyType() != null) {
data.set("frequencyType", om.valueToTree(this.getFrequencyType()));
}
if (this.getId() != null) {
data.set("id", om.valueToTree(this.getId()));
}
if (this.getRetentionUnit() != null) {
data.set("retentionUnit", om.valueToTree(this.getRetentionUnit()));
}
if (this.getRetentionValue() != null) {
data.set("retentionValue", om.valueToTree(this.getRetentionValue()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.ApiPolicyItemView"));
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;
ApiPolicyItemView.Jsii$Proxy that = (ApiPolicyItemView.Jsii$Proxy) o;
if (this.frequencyInterval != null ? !this.frequencyInterval.equals(that.frequencyInterval) : that.frequencyInterval != null) return false;
if (this.frequencyType != null ? !this.frequencyType.equals(that.frequencyType) : that.frequencyType != null) return false;
if (this.id != null ? !this.id.equals(that.id) : that.id != null) return false;
if (this.retentionUnit != null ? !this.retentionUnit.equals(that.retentionUnit) : that.retentionUnit != null) return false;
return this.retentionValue != null ? this.retentionValue.equals(that.retentionValue) : that.retentionValue == null;
}
@Override
public final int hashCode() {
int result = this.frequencyInterval != null ? this.frequencyInterval.hashCode() : 0;
result = 31 * result + (this.frequencyType != null ? this.frequencyType.hashCode() : 0);
result = 31 * result + (this.id != null ? this.id.hashCode() : 0);
result = 31 * result + (this.retentionUnit != null ? this.retentionUnit.hashCode() : 0);
result = 31 * result + (this.retentionValue != null ? this.retentionValue.hashCode() : 0);
return result;
}
}
}