com.amazonaws.services.backup.model.ListRecoveryPointsByBackupVaultRequest Maven / Gradle / Ivy
/*
* Copyright 2017-2022 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.backup.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListRecoveryPointsByBackupVaultRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of a logical container where backups are stored. Backup vaults are identified by names that are unique
* to the account used to create them and the Amazon Web Services Region where they are created. They consist of
* lowercase letters, numbers, and hyphens.
*
*
*
* Backup vault name might not be available when a supported service creates the backup.
*
*
*/
private String backupVaultName;
/**
*
* The next item following a partial list of returned items. For example, if a request is made to return
* maxResults
number of items, NextToken
allows you to return more items in your list
* starting at the location pointed to by the next token.
*
*/
private String nextToken;
/**
*
* The maximum number of items to be returned.
*
*/
private Integer maxResults;
/**
*
* Returns only recovery points that match the specified resource Amazon Resource Name (ARN).
*
*/
private String byResourceArn;
/**
*
* Returns only recovery points that match the specified resource type.
*
*/
private String byResourceType;
/**
*
* Returns only recovery points that match the specified backup plan ID.
*
*/
private String byBackupPlanId;
/**
*
* Returns only recovery points that were created before the specified timestamp.
*
*/
private java.util.Date byCreatedBefore;
/**
*
* Returns only recovery points that were created after the specified timestamp.
*
*/
private java.util.Date byCreatedAfter;
/**
*
* The name of a logical container where backups are stored. Backup vaults are identified by names that are unique
* to the account used to create them and the Amazon Web Services Region where they are created. They consist of
* lowercase letters, numbers, and hyphens.
*
*
*
* Backup vault name might not be available when a supported service creates the backup.
*
*
*
* @param backupVaultName
* The name of a logical container where backups are stored. Backup vaults are identified by names that are
* unique to the account used to create them and the Amazon Web Services Region where they are created. They
* consist of lowercase letters, numbers, and hyphens.
*
* Backup vault name might not be available when a supported service creates the backup.
*
*/
public void setBackupVaultName(String backupVaultName) {
this.backupVaultName = backupVaultName;
}
/**
*
* The name of a logical container where backups are stored. Backup vaults are identified by names that are unique
* to the account used to create them and the Amazon Web Services Region where they are created. They consist of
* lowercase letters, numbers, and hyphens.
*
*
*
* Backup vault name might not be available when a supported service creates the backup.
*
*
*
* @return The name of a logical container where backups are stored. Backup vaults are identified by names that are
* unique to the account used to create them and the Amazon Web Services Region where they are created. They
* consist of lowercase letters, numbers, and hyphens.
*
* Backup vault name might not be available when a supported service creates the backup.
*
*/
public String getBackupVaultName() {
return this.backupVaultName;
}
/**
*
* The name of a logical container where backups are stored. Backup vaults are identified by names that are unique
* to the account used to create them and the Amazon Web Services Region where they are created. They consist of
* lowercase letters, numbers, and hyphens.
*
*
*
* Backup vault name might not be available when a supported service creates the backup.
*
*
*
* @param backupVaultName
* The name of a logical container where backups are stored. Backup vaults are identified by names that are
* unique to the account used to create them and the Amazon Web Services Region where they are created. They
* consist of lowercase letters, numbers, and hyphens.
*
* Backup vault name might not be available when a supported service creates the backup.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRecoveryPointsByBackupVaultRequest withBackupVaultName(String backupVaultName) {
setBackupVaultName(backupVaultName);
return this;
}
/**
*
* The next item following a partial list of returned items. For example, if a request is made to return
* maxResults
number of items, NextToken
allows you to return more items in your list
* starting at the location pointed to by the next token.
*
*
* @param nextToken
* The next item following a partial list of returned items. For example, if a request is made to return
* maxResults
number of items, NextToken
allows you to return more items in your
* list starting at the location pointed to by the next token.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* The next item following a partial list of returned items. For example, if a request is made to return
* maxResults
number of items, NextToken
allows you to return more items in your list
* starting at the location pointed to by the next token.
*
*
* @return The next item following a partial list of returned items. For example, if a request is made to return
* maxResults
number of items, NextToken
allows you to return more items in your
* list starting at the location pointed to by the next token.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* The next item following a partial list of returned items. For example, if a request is made to return
* maxResults
number of items, NextToken
allows you to return more items in your list
* starting at the location pointed to by the next token.
*
*
* @param nextToken
* The next item following a partial list of returned items. For example, if a request is made to return
* maxResults
number of items, NextToken
allows you to return more items in your
* list starting at the location pointed to by the next token.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRecoveryPointsByBackupVaultRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* The maximum number of items to be returned.
*
*
* @param maxResults
* The maximum number of items to be returned.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of items to be returned.
*
*
* @return The maximum number of items to be returned.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of items to be returned.
*
*
* @param maxResults
* The maximum number of items to be returned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRecoveryPointsByBackupVaultRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
*
* Returns only recovery points that match the specified resource Amazon Resource Name (ARN).
*
*
* @param byResourceArn
* Returns only recovery points that match the specified resource Amazon Resource Name (ARN).
*/
public void setByResourceArn(String byResourceArn) {
this.byResourceArn = byResourceArn;
}
/**
*
* Returns only recovery points that match the specified resource Amazon Resource Name (ARN).
*
*
* @return Returns only recovery points that match the specified resource Amazon Resource Name (ARN).
*/
public String getByResourceArn() {
return this.byResourceArn;
}
/**
*
* Returns only recovery points that match the specified resource Amazon Resource Name (ARN).
*
*
* @param byResourceArn
* Returns only recovery points that match the specified resource Amazon Resource Name (ARN).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRecoveryPointsByBackupVaultRequest withByResourceArn(String byResourceArn) {
setByResourceArn(byResourceArn);
return this;
}
/**
*
* Returns only recovery points that match the specified resource type.
*
*
* @param byResourceType
* Returns only recovery points that match the specified resource type.
*/
public void setByResourceType(String byResourceType) {
this.byResourceType = byResourceType;
}
/**
*
* Returns only recovery points that match the specified resource type.
*
*
* @return Returns only recovery points that match the specified resource type.
*/
public String getByResourceType() {
return this.byResourceType;
}
/**
*
* Returns only recovery points that match the specified resource type.
*
*
* @param byResourceType
* Returns only recovery points that match the specified resource type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRecoveryPointsByBackupVaultRequest withByResourceType(String byResourceType) {
setByResourceType(byResourceType);
return this;
}
/**
*
* Returns only recovery points that match the specified backup plan ID.
*
*
* @param byBackupPlanId
* Returns only recovery points that match the specified backup plan ID.
*/
public void setByBackupPlanId(String byBackupPlanId) {
this.byBackupPlanId = byBackupPlanId;
}
/**
*
* Returns only recovery points that match the specified backup plan ID.
*
*
* @return Returns only recovery points that match the specified backup plan ID.
*/
public String getByBackupPlanId() {
return this.byBackupPlanId;
}
/**
*
* Returns only recovery points that match the specified backup plan ID.
*
*
* @param byBackupPlanId
* Returns only recovery points that match the specified backup plan ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRecoveryPointsByBackupVaultRequest withByBackupPlanId(String byBackupPlanId) {
setByBackupPlanId(byBackupPlanId);
return this;
}
/**
*
* Returns only recovery points that were created before the specified timestamp.
*
*
* @param byCreatedBefore
* Returns only recovery points that were created before the specified timestamp.
*/
public void setByCreatedBefore(java.util.Date byCreatedBefore) {
this.byCreatedBefore = byCreatedBefore;
}
/**
*
* Returns only recovery points that were created before the specified timestamp.
*
*
* @return Returns only recovery points that were created before the specified timestamp.
*/
public java.util.Date getByCreatedBefore() {
return this.byCreatedBefore;
}
/**
*
* Returns only recovery points that were created before the specified timestamp.
*
*
* @param byCreatedBefore
* Returns only recovery points that were created before the specified timestamp.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRecoveryPointsByBackupVaultRequest withByCreatedBefore(java.util.Date byCreatedBefore) {
setByCreatedBefore(byCreatedBefore);
return this;
}
/**
*
* Returns only recovery points that were created after the specified timestamp.
*
*
* @param byCreatedAfter
* Returns only recovery points that were created after the specified timestamp.
*/
public void setByCreatedAfter(java.util.Date byCreatedAfter) {
this.byCreatedAfter = byCreatedAfter;
}
/**
*
* Returns only recovery points that were created after the specified timestamp.
*
*
* @return Returns only recovery points that were created after the specified timestamp.
*/
public java.util.Date getByCreatedAfter() {
return this.byCreatedAfter;
}
/**
*
* Returns only recovery points that were created after the specified timestamp.
*
*
* @param byCreatedAfter
* Returns only recovery points that were created after the specified timestamp.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRecoveryPointsByBackupVaultRequest withByCreatedAfter(java.util.Date byCreatedAfter) {
setByCreatedAfter(byCreatedAfter);
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 (getBackupVaultName() != null)
sb.append("BackupVaultName: ").append(getBackupVaultName()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getByResourceArn() != null)
sb.append("ByResourceArn: ").append(getByResourceArn()).append(",");
if (getByResourceType() != null)
sb.append("ByResourceType: ").append(getByResourceType()).append(",");
if (getByBackupPlanId() != null)
sb.append("ByBackupPlanId: ").append(getByBackupPlanId()).append(",");
if (getByCreatedBefore() != null)
sb.append("ByCreatedBefore: ").append(getByCreatedBefore()).append(",");
if (getByCreatedAfter() != null)
sb.append("ByCreatedAfter: ").append(getByCreatedAfter());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListRecoveryPointsByBackupVaultRequest == false)
return false;
ListRecoveryPointsByBackupVaultRequest other = (ListRecoveryPointsByBackupVaultRequest) obj;
if (other.getBackupVaultName() == null ^ this.getBackupVaultName() == null)
return false;
if (other.getBackupVaultName() != null && other.getBackupVaultName().equals(this.getBackupVaultName()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
return false;
if (other.getByResourceArn() == null ^ this.getByResourceArn() == null)
return false;
if (other.getByResourceArn() != null && other.getByResourceArn().equals(this.getByResourceArn()) == false)
return false;
if (other.getByResourceType() == null ^ this.getByResourceType() == null)
return false;
if (other.getByResourceType() != null && other.getByResourceType().equals(this.getByResourceType()) == false)
return false;
if (other.getByBackupPlanId() == null ^ this.getByBackupPlanId() == null)
return false;
if (other.getByBackupPlanId() != null && other.getByBackupPlanId().equals(this.getByBackupPlanId()) == false)
return false;
if (other.getByCreatedBefore() == null ^ this.getByCreatedBefore() == null)
return false;
if (other.getByCreatedBefore() != null && other.getByCreatedBefore().equals(this.getByCreatedBefore()) == false)
return false;
if (other.getByCreatedAfter() == null ^ this.getByCreatedAfter() == null)
return false;
if (other.getByCreatedAfter() != null && other.getByCreatedAfter().equals(this.getByCreatedAfter()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getBackupVaultName() == null) ? 0 : getBackupVaultName().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getByResourceArn() == null) ? 0 : getByResourceArn().hashCode());
hashCode = prime * hashCode + ((getByResourceType() == null) ? 0 : getByResourceType().hashCode());
hashCode = prime * hashCode + ((getByBackupPlanId() == null) ? 0 : getByBackupPlanId().hashCode());
hashCode = prime * hashCode + ((getByCreatedBefore() == null) ? 0 : getByCreatedBefore().hashCode());
hashCode = prime * hashCode + ((getByCreatedAfter() == null) ? 0 : getByCreatedAfter().hashCode());
return hashCode;
}
@Override
public ListRecoveryPointsByBackupVaultRequest clone() {
return (ListRecoveryPointsByBackupVaultRequest) super.clone();
}
}