com.amazonaws.services.fsx.model.CopySnapshotAndUpdateVolumeResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-fsx Show documentation
/*
* Copyright 2019-2024 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.fsx.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CopySnapshotAndUpdateVolumeResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ID of the volume that you copied the snapshot to.
*
*/
private String volumeId;
/**
*
* The lifecycle state of the destination volume.
*
*/
private String lifecycle;
/**
*
* A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system.
*
*/
private java.util.List administrativeActions;
/**
*
* The ID of the volume that you copied the snapshot to.
*
*
* @param volumeId
* The ID of the volume that you copied the snapshot to.
*/
public void setVolumeId(String volumeId) {
this.volumeId = volumeId;
}
/**
*
* The ID of the volume that you copied the snapshot to.
*
*
* @return The ID of the volume that you copied the snapshot to.
*/
public String getVolumeId() {
return this.volumeId;
}
/**
*
* The ID of the volume that you copied the snapshot to.
*
*
* @param volumeId
* The ID of the volume that you copied the snapshot to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopySnapshotAndUpdateVolumeResult withVolumeId(String volumeId) {
setVolumeId(volumeId);
return this;
}
/**
*
* The lifecycle state of the destination volume.
*
*
* @param lifecycle
* The lifecycle state of the destination volume.
* @see VolumeLifecycle
*/
public void setLifecycle(String lifecycle) {
this.lifecycle = lifecycle;
}
/**
*
* The lifecycle state of the destination volume.
*
*
* @return The lifecycle state of the destination volume.
* @see VolumeLifecycle
*/
public String getLifecycle() {
return this.lifecycle;
}
/**
*
* The lifecycle state of the destination volume.
*
*
* @param lifecycle
* The lifecycle state of the destination volume.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VolumeLifecycle
*/
public CopySnapshotAndUpdateVolumeResult withLifecycle(String lifecycle) {
setLifecycle(lifecycle);
return this;
}
/**
*
* The lifecycle state of the destination volume.
*
*
* @param lifecycle
* The lifecycle state of the destination volume.
* @return Returns a reference to this object so that method calls can be chained together.
* @see VolumeLifecycle
*/
public CopySnapshotAndUpdateVolumeResult withLifecycle(VolumeLifecycle lifecycle) {
this.lifecycle = lifecycle.toString();
return this;
}
/**
*
* A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system.
*
*
* @return A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system.
*/
public java.util.List getAdministrativeActions() {
return administrativeActions;
}
/**
*
* A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system.
*
*
* @param administrativeActions
* A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system.
*/
public void setAdministrativeActions(java.util.Collection administrativeActions) {
if (administrativeActions == null) {
this.administrativeActions = null;
return;
}
this.administrativeActions = new java.util.ArrayList(administrativeActions);
}
/**
*
* A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAdministrativeActions(java.util.Collection)} or
* {@link #withAdministrativeActions(java.util.Collection)} if you want to override the existing values.
*
*
* @param administrativeActions
* A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopySnapshotAndUpdateVolumeResult withAdministrativeActions(AdministrativeAction... administrativeActions) {
if (this.administrativeActions == null) {
setAdministrativeActions(new java.util.ArrayList(administrativeActions.length));
}
for (AdministrativeAction ele : administrativeActions) {
this.administrativeActions.add(ele);
}
return this;
}
/**
*
* A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system.
*
*
* @param administrativeActions
* A list of administrative actions for the file system that are in process or waiting to be processed.
* Administrative actions describe changes to the Amazon FSx system.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopySnapshotAndUpdateVolumeResult withAdministrativeActions(java.util.Collection administrativeActions) {
setAdministrativeActions(administrativeActions);
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 (getVolumeId() != null)
sb.append("VolumeId: ").append(getVolumeId()).append(",");
if (getLifecycle() != null)
sb.append("Lifecycle: ").append(getLifecycle()).append(",");
if (getAdministrativeActions() != null)
sb.append("AdministrativeActions: ").append(getAdministrativeActions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CopySnapshotAndUpdateVolumeResult == false)
return false;
CopySnapshotAndUpdateVolumeResult other = (CopySnapshotAndUpdateVolumeResult) obj;
if (other.getVolumeId() == null ^ this.getVolumeId() == null)
return false;
if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false)
return false;
if (other.getLifecycle() == null ^ this.getLifecycle() == null)
return false;
if (other.getLifecycle() != null && other.getLifecycle().equals(this.getLifecycle()) == false)
return false;
if (other.getAdministrativeActions() == null ^ this.getAdministrativeActions() == null)
return false;
if (other.getAdministrativeActions() != null && other.getAdministrativeActions().equals(this.getAdministrativeActions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode());
hashCode = prime * hashCode + ((getLifecycle() == null) ? 0 : getLifecycle().hashCode());
hashCode = prime * hashCode + ((getAdministrativeActions() == null) ? 0 : getAdministrativeActions().hashCode());
return hashCode;
}
@Override
public CopySnapshotAndUpdateVolumeResult clone() {
try {
return (CopySnapshotAndUpdateVolumeResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}