software.amazon.awscdk.services.backup.CfnBackupSelectionProps Maven / Gradle / Ivy
Show all versions of backup Show documentation
package software.amazon.awscdk.services.backup;
/**
* Properties for defining a `CfnBackupSelection`.
*
* 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.backup.*;
* Object conditions;
* CfnBackupSelectionProps cfnBackupSelectionProps = CfnBackupSelectionProps.builder()
* .backupPlanId("backupPlanId")
* .backupSelection(BackupSelectionResourceTypeProperty.builder()
* .iamRoleArn("iamRoleArn")
* .selectionName("selectionName")
* // the properties below are optional
* .conditions(conditions)
* .listOfTags(List.of(ConditionResourceTypeProperty.builder()
* .conditionKey("conditionKey")
* .conditionType("conditionType")
* .conditionValue("conditionValue")
* .build()))
* .notResources(List.of("notResources"))
* .resources(List.of("resources"))
* .build())
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.72.0 (build 4b8828b)", date = "2022-12-28T21:57:18.501Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.backup.$Module.class, fqn = "@aws-cdk/aws-backup.CfnBackupSelectionProps")
@software.amazon.jsii.Jsii.Proxy(CfnBackupSelectionProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnBackupSelectionProps extends software.amazon.jsii.JsiiSerializable {
/**
* Uniquely identifies a backup plan.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getBackupPlanId();
/**
* Specifies the body of a request to assign a set of resources to a backup plan.
*
* It includes an array of resources, an optional array of patterns to exclude resources, an optional role to provide access to the AWS service the resource belongs to, and an optional array of tags used to identify a set of resources.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.Object getBackupSelection();
/**
* @return a {@link Builder} of {@link CfnBackupSelectionProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CfnBackupSelectionProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String backupPlanId;
java.lang.Object backupSelection;
/**
* Sets the value of {@link CfnBackupSelectionProps#getBackupPlanId}
* @param backupPlanId Uniquely identifies a backup plan. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder backupPlanId(java.lang.String backupPlanId) {
this.backupPlanId = backupPlanId;
return this;
}
/**
* Sets the value of {@link CfnBackupSelectionProps#getBackupSelection}
* @param backupSelection Specifies the body of a request to assign a set of resources to a backup plan. This parameter is required.
* It includes an array of resources, an optional array of patterns to exclude resources, an optional role to provide access to the AWS service the resource belongs to, and an optional array of tags used to identify a set of resources.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder backupSelection(software.amazon.awscdk.core.IResolvable backupSelection) {
this.backupSelection = backupSelection;
return this;
}
/**
* Sets the value of {@link CfnBackupSelectionProps#getBackupSelection}
* @param backupSelection Specifies the body of a request to assign a set of resources to a backup plan. This parameter is required.
* It includes an array of resources, an optional array of patterns to exclude resources, an optional role to provide access to the AWS service the resource belongs to, and an optional array of tags used to identify a set of resources.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder backupSelection(software.amazon.awscdk.services.backup.CfnBackupSelection.BackupSelectionResourceTypeProperty backupSelection) {
this.backupSelection = backupSelection;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CfnBackupSelectionProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CfnBackupSelectionProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CfnBackupSelectionProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnBackupSelectionProps {
private final java.lang.String backupPlanId;
private final java.lang.Object backupSelection;
/**
* 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.backupPlanId = software.amazon.jsii.Kernel.get(this, "backupPlanId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.backupSelection = software.amazon.jsii.Kernel.get(this, "backupSelection", software.amazon.jsii.NativeType.forClass(java.lang.Object.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.backupPlanId = java.util.Objects.requireNonNull(builder.backupPlanId, "backupPlanId is required");
this.backupSelection = java.util.Objects.requireNonNull(builder.backupSelection, "backupSelection is required");
}
@Override
public final java.lang.String getBackupPlanId() {
return this.backupPlanId;
}
@Override
public final java.lang.Object getBackupSelection() {
return this.backupSelection;
}
@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("backupPlanId", om.valueToTree(this.getBackupPlanId()));
data.set("backupSelection", om.valueToTree(this.getBackupSelection()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-backup.CfnBackupSelectionProps"));
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;
CfnBackupSelectionProps.Jsii$Proxy that = (CfnBackupSelectionProps.Jsii$Proxy) o;
if (!backupPlanId.equals(that.backupPlanId)) return false;
return this.backupSelection.equals(that.backupSelection);
}
@Override
public final int hashCode() {
int result = this.backupPlanId.hashCode();
result = 31 * result + (this.backupSelection.hashCode());
return result;
}
}
}