com.amazonaws.services.securityhub.model.AwsBackupBackupVaultNotificationsDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides details about the Amazon SNS event notifications for the specified backup vault.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsBackupBackupVaultNotificationsDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* An array of events that indicate the status of jobs to back up resources to the backup vault. The following
* events are supported:
*
*
* -
*
* BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
*
*
* -
*
* COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
*
*
* -
*
* RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
*
*
* -
*
* S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
*
*
*
*/
private java.util.List backupVaultEvents;
/**
*
* The Amazon Resource Name (ARN) that uniquely identifies the Amazon SNS topic for a backup vault's events.
*
*/
private String snsTopicArn;
/**
*
* An array of events that indicate the status of jobs to back up resources to the backup vault. The following
* events are supported:
*
*
* -
*
* BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
*
*
* -
*
* COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
*
*
* -
*
* RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
*
*
* -
*
* S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
*
*
*
*
* @return An array of events that indicate the status of jobs to back up resources to the backup vault. The
* following events are supported:
*
* -
*
* BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
*
*
* -
*
* COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
*
*
* -
*
* RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
*
*
* -
*
* S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
*
*
*/
public java.util.List getBackupVaultEvents() {
return backupVaultEvents;
}
/**
*
* An array of events that indicate the status of jobs to back up resources to the backup vault. The following
* events are supported:
*
*
* -
*
* BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
*
*
* -
*
* COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
*
*
* -
*
* RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
*
*
* -
*
* S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
*
*
*
*
* @param backupVaultEvents
* An array of events that indicate the status of jobs to back up resources to the backup vault. The
* following events are supported:
*
* -
*
* BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
*
*
* -
*
* COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
*
*
* -
*
* RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
*
*
* -
*
* S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
*
*
*/
public void setBackupVaultEvents(java.util.Collection backupVaultEvents) {
if (backupVaultEvents == null) {
this.backupVaultEvents = null;
return;
}
this.backupVaultEvents = new java.util.ArrayList(backupVaultEvents);
}
/**
*
* An array of events that indicate the status of jobs to back up resources to the backup vault. The following
* events are supported:
*
*
* -
*
* BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
*
*
* -
*
* COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
*
*
* -
*
* RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
*
*
* -
*
* S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setBackupVaultEvents(java.util.Collection)} or {@link #withBackupVaultEvents(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param backupVaultEvents
* An array of events that indicate the status of jobs to back up resources to the backup vault. The
* following events are supported:
*
* -
*
* BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
*
*
* -
*
* COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
*
*
* -
*
* RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
*
*
* -
*
* S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsBackupBackupVaultNotificationsDetails withBackupVaultEvents(String... backupVaultEvents) {
if (this.backupVaultEvents == null) {
setBackupVaultEvents(new java.util.ArrayList(backupVaultEvents.length));
}
for (String ele : backupVaultEvents) {
this.backupVaultEvents.add(ele);
}
return this;
}
/**
*
* An array of events that indicate the status of jobs to back up resources to the backup vault. The following
* events are supported:
*
*
* -
*
* BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
*
*
* -
*
* COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
*
*
* -
*
* RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
*
*
* -
*
* S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
*
*
*
*
* @param backupVaultEvents
* An array of events that indicate the status of jobs to back up resources to the backup vault. The
* following events are supported:
*
* -
*
* BACKUP_JOB_STARTED | BACKUP_JOB_COMPLETED
*
*
* -
*
* COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | COPY_JOB_FAILED
*
*
* -
*
* RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | RECOVERY_POINT_MODIFIED
*
*
* -
*
* S3_BACKUP_OBJECT_FAILED | S3_RESTORE_OBJECT_FAILED
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsBackupBackupVaultNotificationsDetails withBackupVaultEvents(java.util.Collection backupVaultEvents) {
setBackupVaultEvents(backupVaultEvents);
return this;
}
/**
*
* The Amazon Resource Name (ARN) that uniquely identifies the Amazon SNS topic for a backup vault's events.
*
*
* @param snsTopicArn
* The Amazon Resource Name (ARN) that uniquely identifies the Amazon SNS topic for a backup vault's events.
*/
public void setSnsTopicArn(String snsTopicArn) {
this.snsTopicArn = snsTopicArn;
}
/**
*
* The Amazon Resource Name (ARN) that uniquely identifies the Amazon SNS topic for a backup vault's events.
*
*
* @return The Amazon Resource Name (ARN) that uniquely identifies the Amazon SNS topic for a backup vault's events.
*/
public String getSnsTopicArn() {
return this.snsTopicArn;
}
/**
*
* The Amazon Resource Name (ARN) that uniquely identifies the Amazon SNS topic for a backup vault's events.
*
*
* @param snsTopicArn
* The Amazon Resource Name (ARN) that uniquely identifies the Amazon SNS topic for a backup vault's events.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsBackupBackupVaultNotificationsDetails withSnsTopicArn(String snsTopicArn) {
setSnsTopicArn(snsTopicArn);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getBackupVaultEvents() != null)
sb.append("BackupVaultEvents: ").append(getBackupVaultEvents()).append(",");
if (getSnsTopicArn() != null)
sb.append("SnsTopicArn: ").append(getSnsTopicArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsBackupBackupVaultNotificationsDetails == false)
return false;
AwsBackupBackupVaultNotificationsDetails other = (AwsBackupBackupVaultNotificationsDetails) obj;
if (other.getBackupVaultEvents() == null ^ this.getBackupVaultEvents() == null)
return false;
if (other.getBackupVaultEvents() != null && other.getBackupVaultEvents().equals(this.getBackupVaultEvents()) == false)
return false;
if (other.getSnsTopicArn() == null ^ this.getSnsTopicArn() == null)
return false;
if (other.getSnsTopicArn() != null && other.getSnsTopicArn().equals(this.getSnsTopicArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getBackupVaultEvents() == null) ? 0 : getBackupVaultEvents().hashCode());
hashCode = prime * hashCode + ((getSnsTopicArn() == null) ? 0 : getSnsTopicArn().hashCode());
return hashCode;
}
@Override
public AwsBackupBackupVaultNotificationsDetails clone() {
try {
return (AwsBackupBackupVaultNotificationsDetails) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.securityhub.model.transform.AwsBackupBackupVaultNotificationsDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}