software.amazon.awscdk.services.backup.CfnReportPlan Maven / Gradle / Ivy
Show all versions of backup Show documentation
package software.amazon.awscdk.services.backup;
/**
* A CloudFormation `AWS::Backup::ReportPlan`.
*
* Creates a report plan. A report plan is a document that contains information about the contents of the report and where AWS Backup will deliver it.
*
* If you call CreateReportPlan
with a plan that already exists, you receive an AlreadyExistsException
exception.
*
* For a sample AWS CloudFormation template, see the AWS Backup Developer Guide .
*
* 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 reportDeliveryChannel;
* Object reportSetting;
* CfnReportPlan cfnReportPlan = CfnReportPlan.Builder.create(this, "MyCfnReportPlan")
* .reportDeliveryChannel(reportDeliveryChannel)
* .reportSetting(reportSetting)
* // the properties below are optional
* .reportPlanDescription("reportPlanDescription")
* .reportPlanName("reportPlanName")
* .reportPlanTags(List.of(CfnTag.builder()
* .key("key")
* .value("value")
* .build()))
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.72.0 (build 4b8828b)", date = "2022-12-28T21:57:18.515Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.backup.$Module.class, fqn = "@aws-cdk/aws-backup.CfnReportPlan")
public class CfnReportPlan extends software.amazon.awscdk.core.CfnResource implements software.amazon.awscdk.core.IInspectable {
protected CfnReportPlan(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnReportPlan(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.backup.CfnReportPlan.class, "CFN_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Create a new `AWS::Backup::ReportPlan`.
*
* @param scope - scope in which this resource is defined. This parameter is required.
* @param id - scoped id of the resource. This parameter is required.
* @param props - resource properties. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CfnReportPlan(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.backup.CfnReportPlanProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* Examines the CloudFormation resource and discloses attributes.
*
* @param inspector - tree inspector to collect and process attributes. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public void inspect(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TreeInspector inspector) {
software.amazon.jsii.Kernel.call(this, "inspect", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(inspector, "inspector is required") });
}
/**
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map renderProperties(final @org.jetbrains.annotations.NotNull java.util.Map props) {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "renderProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)), new Object[] { java.util.Objects.requireNonNull(props, "props is required") }));
}
/**
* The CloudFormation resource type name for this resource class.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static java.lang.String CFN_RESOURCE_TYPE_NAME;
/**
* The Amazon Resource Name (ARN) of your report plan.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrReportPlanArn() {
return software.amazon.jsii.Kernel.get(this, "attrReportPlanArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
protected @org.jetbrains.annotations.NotNull java.util.Map getCfnProperties() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "cfnProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
* Contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Object getReportDeliveryChannel() {
return software.amazon.jsii.Kernel.get(this, "reportDeliveryChannel", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* Contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setReportDeliveryChannel(final @org.jetbrains.annotations.NotNull java.lang.Object value) {
software.amazon.jsii.Kernel.set(this, "reportDeliveryChannel", java.util.Objects.requireNonNull(value, "reportDeliveryChannel is required"));
}
/**
* Identifies the report template for the report. Reports are built using a report template. The report templates are:.
*
* RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT
*
* If the report template is RESOURCE_COMPLIANCE_REPORT
or CONTROL_COMPLIANCE_REPORT
, this API resource also describes the report coverage by AWS Regions and frameworks.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.Object getReportSetting() {
return software.amazon.jsii.Kernel.get(this, "reportSetting", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* Identifies the report template for the report. Reports are built using a report template. The report templates are:.
*
* RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT
*
* If the report template is RESOURCE_COMPLIANCE_REPORT
or CONTROL_COMPLIANCE_REPORT
, this API resource also describes the report coverage by AWS Regions and frameworks.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setReportSetting(final @org.jetbrains.annotations.NotNull java.lang.Object value) {
software.amazon.jsii.Kernel.set(this, "reportSetting", java.util.Objects.requireNonNull(value, "reportSetting is required"));
}
/**
* An optional description of the report plan with a maximum 1,024 characters.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getReportPlanDescription() {
return software.amazon.jsii.Kernel.get(this, "reportPlanDescription", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* An optional description of the report plan with a maximum 1,024 characters.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setReportPlanDescription(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "reportPlanDescription", value);
}
/**
* The unique name of the report plan.
*
* This name is between 1 and 256 characters starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getReportPlanName() {
return software.amazon.jsii.Kernel.get(this, "reportPlanName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The unique name of the report plan.
*
* This name is between 1 and 256 characters starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setReportPlanName(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "reportPlanName", value);
}
/**
* A list of tags to tag your report plan.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.Object getReportPlanTags() {
return software.amazon.jsii.Kernel.get(this, "reportPlanTags", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* A list of tags to tag your report plan.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setReportPlanTags(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.core.IResolvable value) {
software.amazon.jsii.Kernel.set(this, "reportPlanTags", value);
}
/**
* A list of tags to tag your report plan.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setReportPlanTags(final @org.jetbrains.annotations.Nullable java.util.List value) {
if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) {
for (int __idx_ac66f0 = 0; __idx_ac66f0 < value.size(); __idx_ac66f0++) {
final java.lang.Object __val_ac66f0 = value.get(__idx_ac66f0);
if (
!(__val_ac66f0 instanceof software.amazon.awscdk.core.IResolvable)
&& !(__val_ac66f0 instanceof software.amazon.awscdk.core.CfnTag)
&& !(__val_ac66f0.getClass().equals(software.amazon.jsii.JsiiObject.class))
) {
throw new IllegalArgumentException(
new java.lang.StringBuilder("Expected ")
.append("value").append(".get(").append(__idx_ac66f0).append(")")
.append(" to be one of: software.amazon.awscdk.core.IResolvable, software.amazon.awscdk.core.CfnTag; received ")
.append(__val_ac66f0.getClass()).toString());
}
}
}
software.amazon.jsii.Kernel.set(this, "reportPlanTags", value);
}
/**
* Contains information from your report plan about where to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.
*
* 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.*;
* ReportDeliveryChannelProperty reportDeliveryChannelProperty = ReportDeliveryChannelProperty.builder()
* .s3BucketName("s3BucketName")
* // the properties below are optional
* .formats(List.of("formats"))
* .s3KeyPrefix("s3KeyPrefix")
* .build();
*
*/
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.backup.$Module.class, fqn = "@aws-cdk/aws-backup.CfnReportPlan.ReportDeliveryChannelProperty")
@software.amazon.jsii.Jsii.Proxy(ReportDeliveryChannelProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static interface ReportDeliveryChannelProperty extends software.amazon.jsii.JsiiSerializable {
/**
* The unique name of the S3 bucket that receives your reports.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getS3BucketName();
/**
* A list of the format of your reports: `CSV` , `JSON` , or both.
*
* If not specified, the default format is CSV
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getFormats() {
return null;
}
/**
* The prefix for where AWS Backup Audit Manager delivers your reports to Amazon S3.
*
* The prefix is this part of the following path: s3://your-bucket-name/ prefix
/Backup/us-west-2/year/month/day/report-name. If not specified, there is no prefix.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getS3KeyPrefix() {
return null;
}
/**
* @return a {@link Builder} of {@link ReportDeliveryChannelProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ReportDeliveryChannelProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String s3BucketName;
java.util.List formats;
java.lang.String s3KeyPrefix;
/**
* Sets the value of {@link ReportDeliveryChannelProperty#getS3BucketName}
* @param s3BucketName The unique name of the S3 bucket that receives your reports. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder s3BucketName(java.lang.String s3BucketName) {
this.s3BucketName = s3BucketName;
return this;
}
/**
* Sets the value of {@link ReportDeliveryChannelProperty#getFormats}
* @param formats A list of the format of your reports: `CSV` , `JSON` , or both.
* If not specified, the default format is CSV
.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder formats(java.util.List formats) {
this.formats = formats;
return this;
}
/**
* Sets the value of {@link ReportDeliveryChannelProperty#getS3KeyPrefix}
* @param s3KeyPrefix The prefix for where AWS Backup Audit Manager delivers your reports to Amazon S3.
* The prefix is this part of the following path: s3://your-bucket-name/ prefix
/Backup/us-west-2/year/month/day/report-name. If not specified, there is no prefix.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder s3KeyPrefix(java.lang.String s3KeyPrefix) {
this.s3KeyPrefix = s3KeyPrefix;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ReportDeliveryChannelProperty}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ReportDeliveryChannelProperty build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ReportDeliveryChannelProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ReportDeliveryChannelProperty {
private final java.lang.String s3BucketName;
private final java.util.List formats;
private final java.lang.String s3KeyPrefix;
/**
* 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.s3BucketName = software.amazon.jsii.Kernel.get(this, "s3BucketName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.formats = software.amazon.jsii.Kernel.get(this, "formats", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.s3KeyPrefix = software.amazon.jsii.Kernel.get(this, "s3KeyPrefix", 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.s3BucketName = java.util.Objects.requireNonNull(builder.s3BucketName, "s3BucketName is required");
this.formats = builder.formats;
this.s3KeyPrefix = builder.s3KeyPrefix;
}
@Override
public final java.lang.String getS3BucketName() {
return this.s3BucketName;
}
@Override
public final java.util.List getFormats() {
return this.formats;
}
@Override
public final java.lang.String getS3KeyPrefix() {
return this.s3KeyPrefix;
}
@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("s3BucketName", om.valueToTree(this.getS3BucketName()));
if (this.getFormats() != null) {
data.set("formats", om.valueToTree(this.getFormats()));
}
if (this.getS3KeyPrefix() != null) {
data.set("s3KeyPrefix", om.valueToTree(this.getS3KeyPrefix()));
}
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.CfnReportPlan.ReportDeliveryChannelProperty"));
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;
ReportDeliveryChannelProperty.Jsii$Proxy that = (ReportDeliveryChannelProperty.Jsii$Proxy) o;
if (!s3BucketName.equals(that.s3BucketName)) return false;
if (this.formats != null ? !this.formats.equals(that.formats) : that.formats != null) return false;
return this.s3KeyPrefix != null ? this.s3KeyPrefix.equals(that.s3KeyPrefix) : that.s3KeyPrefix == null;
}
@Override
public final int hashCode() {
int result = this.s3BucketName.hashCode();
result = 31 * result + (this.formats != null ? this.formats.hashCode() : 0);
result = 31 * result + (this.s3KeyPrefix != null ? this.s3KeyPrefix.hashCode() : 0);
return result;
}
}
}
/**
* Contains detailed information about a report setting.
*
* 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.*;
* ReportSettingProperty reportSettingProperty = ReportSettingProperty.builder()
* .reportTemplate("reportTemplate")
* // the properties below are optional
* .accounts(List.of("accounts"))
* .frameworkArns(List.of("frameworkArns"))
* .organizationUnits(List.of("organizationUnits"))
* .regions(List.of("regions"))
* .build();
*
*/
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.backup.$Module.class, fqn = "@aws-cdk/aws-backup.CfnReportPlan.ReportSettingProperty")
@software.amazon.jsii.Jsii.Proxy(ReportSettingProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static interface ReportSettingProperty extends software.amazon.jsii.JsiiSerializable {
/**
* Identifies the report template for the report. Reports are built using a report template. The report templates are:.
*
* RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getReportTemplate();
/**
* These are the accounts to be included in the report.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getAccounts() {
return null;
}
/**
* The Amazon Resource Names (ARNs) of the frameworks a report covers.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getFrameworkArns() {
return null;
}
/**
* These are the Organizational Units to be included in the report.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getOrganizationUnits() {
return null;
}
/**
* These are the Regions to be included in the report.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getRegions() {
return null;
}
/**
* @return a {@link Builder} of {@link ReportSettingProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ReportSettingProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String reportTemplate;
java.util.List accounts;
java.util.List frameworkArns;
java.util.List organizationUnits;
java.util.List regions;
/**
* Sets the value of {@link ReportSettingProperty#getReportTemplate}
* @param reportTemplate Identifies the report template for the report. Reports are built using a report template. The report templates are:. This parameter is required.
* RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder reportTemplate(java.lang.String reportTemplate) {
this.reportTemplate = reportTemplate;
return this;
}
/**
* Sets the value of {@link ReportSettingProperty#getAccounts}
* @param accounts These are the accounts to be included in the report.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder accounts(java.util.List accounts) {
this.accounts = accounts;
return this;
}
/**
* Sets the value of {@link ReportSettingProperty#getFrameworkArns}
* @param frameworkArns The Amazon Resource Names (ARNs) of the frameworks a report covers.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder frameworkArns(java.util.List frameworkArns) {
this.frameworkArns = frameworkArns;
return this;
}
/**
* Sets the value of {@link ReportSettingProperty#getOrganizationUnits}
* @param organizationUnits These are the Organizational Units to be included in the report.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder organizationUnits(java.util.List organizationUnits) {
this.organizationUnits = organizationUnits;
return this;
}
/**
* Sets the value of {@link ReportSettingProperty#getRegions}
* @param regions These are the Regions to be included in the report.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder regions(java.util.List regions) {
this.regions = regions;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ReportSettingProperty}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ReportSettingProperty build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ReportSettingProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ReportSettingProperty {
private final java.lang.String reportTemplate;
private final java.util.List accounts;
private final java.util.List frameworkArns;
private final java.util.List organizationUnits;
private final java.util.List regions;
/**
* 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.reportTemplate = software.amazon.jsii.Kernel.get(this, "reportTemplate", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.accounts = software.amazon.jsii.Kernel.get(this, "accounts", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.frameworkArns = software.amazon.jsii.Kernel.get(this, "frameworkArns", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.organizationUnits = software.amazon.jsii.Kernel.get(this, "organizationUnits", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.regions = software.amazon.jsii.Kernel.get(this, "regions", software.amazon.jsii.NativeType.listOf(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.reportTemplate = java.util.Objects.requireNonNull(builder.reportTemplate, "reportTemplate is required");
this.accounts = builder.accounts;
this.frameworkArns = builder.frameworkArns;
this.organizationUnits = builder.organizationUnits;
this.regions = builder.regions;
}
@Override
public final java.lang.String getReportTemplate() {
return this.reportTemplate;
}
@Override
public final java.util.List getAccounts() {
return this.accounts;
}
@Override
public final java.util.List getFrameworkArns() {
return this.frameworkArns;
}
@Override
public final java.util.List getOrganizationUnits() {
return this.organizationUnits;
}
@Override
public final java.util.List getRegions() {
return this.regions;
}
@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("reportTemplate", om.valueToTree(this.getReportTemplate()));
if (this.getAccounts() != null) {
data.set("accounts", om.valueToTree(this.getAccounts()));
}
if (this.getFrameworkArns() != null) {
data.set("frameworkArns", om.valueToTree(this.getFrameworkArns()));
}
if (this.getOrganizationUnits() != null) {
data.set("organizationUnits", om.valueToTree(this.getOrganizationUnits()));
}
if (this.getRegions() != null) {
data.set("regions", om.valueToTree(this.getRegions()));
}
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.CfnReportPlan.ReportSettingProperty"));
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;
ReportSettingProperty.Jsii$Proxy that = (ReportSettingProperty.Jsii$Proxy) o;
if (!reportTemplate.equals(that.reportTemplate)) return false;
if (this.accounts != null ? !this.accounts.equals(that.accounts) : that.accounts != null) return false;
if (this.frameworkArns != null ? !this.frameworkArns.equals(that.frameworkArns) : that.frameworkArns != null) return false;
if (this.organizationUnits != null ? !this.organizationUnits.equals(that.organizationUnits) : that.organizationUnits != null) return false;
return this.regions != null ? this.regions.equals(that.regions) : that.regions == null;
}
@Override
public final int hashCode() {
int result = this.reportTemplate.hashCode();
result = 31 * result + (this.accounts != null ? this.accounts.hashCode() : 0);
result = 31 * result + (this.frameworkArns != null ? this.frameworkArns.hashCode() : 0);
result = 31 * result + (this.organizationUnits != null ? this.organizationUnits.hashCode() : 0);
result = 31 * result + (this.regions != null ? this.regions.hashCode() : 0);
return result;
}
}
}
/**
* A fluent builder for {@link software.amazon.awscdk.services.backup.CfnReportPlan}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope - scope in which this resource is defined. This parameter is required.
* @param id - scoped id of the resource. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.amazon.awscdk.core.Construct scope;
private final java.lang.String id;
private final software.amazon.awscdk.services.backup.CfnReportPlanProps.Builder props;
private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new software.amazon.awscdk.services.backup.CfnReportPlanProps.Builder();
}
/**
* Contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.
*
* @return {@code this}
* @param reportDeliveryChannel Contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder reportDeliveryChannel(final java.lang.Object reportDeliveryChannel) {
this.props.reportDeliveryChannel(reportDeliveryChannel);
return this;
}
/**
* Identifies the report template for the report. Reports are built using a report template. The report templates are:.
*
* RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT
*
* If the report template is RESOURCE_COMPLIANCE_REPORT
or CONTROL_COMPLIANCE_REPORT
, this API resource also describes the report coverage by AWS Regions and frameworks.
*
* @return {@code this}
* @param reportSetting Identifies the report template for the report. Reports are built using a report template. The report templates are:. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder reportSetting(final java.lang.Object reportSetting) {
this.props.reportSetting(reportSetting);
return this;
}
/**
* An optional description of the report plan with a maximum 1,024 characters.
*
* @return {@code this}
* @param reportPlanDescription An optional description of the report plan with a maximum 1,024 characters. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder reportPlanDescription(final java.lang.String reportPlanDescription) {
this.props.reportPlanDescription(reportPlanDescription);
return this;
}
/**
* The unique name of the report plan.
*
* This name is between 1 and 256 characters starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).
*
* @return {@code this}
* @param reportPlanName The unique name of the report plan. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder reportPlanName(final java.lang.String reportPlanName) {
this.props.reportPlanName(reportPlanName);
return this;
}
/**
* A list of tags to tag your report plan.
*
* @return {@code this}
* @param reportPlanTags A list of tags to tag your report plan. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder reportPlanTags(final software.amazon.awscdk.core.IResolvable reportPlanTags) {
this.props.reportPlanTags(reportPlanTags);
return this;
}
/**
* A list of tags to tag your report plan.
*
* @return {@code this}
* @param reportPlanTags A list of tags to tag your report plan. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder reportPlanTags(final java.util.List extends java.lang.Object> reportPlanTags) {
this.props.reportPlanTags(reportPlanTags);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.backup.CfnReportPlan}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public software.amazon.awscdk.services.backup.CfnReportPlan build() {
return new software.amazon.awscdk.services.backup.CfnReportPlan(
this.scope,
this.id,
this.props.build()
);
}
}
}