com.solidfire.element.api.GroupSnapshotMembers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solidfire-sdk-java Show documentation
Show all versions of solidfire-sdk-java Show documentation
Library for interfacing with the Public and Incubating SolidFire Element API.
The newest version!
/*
* Copyright © 2014-2016 NetApp, Inc. 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License 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.
*/
/*
* DO NOT EDIT THIS CODE BY HAND! It has been generated with jsvcgen.
*/
package com.solidfire.element.api;
import com.solidfire.gson.Gson;
import com.solidfire.core.client.Attributes;
import com.solidfire.gson.annotations.SerializedName;
import com.solidfire.core.annotation.Since;
import com.solidfire.core.javautil.Optional;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Objects;
/**
* GroupSnapshotMembers
* List of checksum, volumeIDs and snapshotIDs for each member of the group.
**/
public class GroupSnapshotMembers implements Serializable {
public static final long serialVersionUID = 4785362642461122102L;
@SerializedName("volumeID") private Long volumeID;
@SerializedName("snapshotID") private Long snapshotID;
@SerializedName("snapshotUUID") private java.util.UUID snapshotUUID;
@SerializedName("checksum") private String checksum;
@SerializedName("attributes") private Optional attributes;
@SerializedName("createTime") private Optional createTime;
@SerializedName("enableRemoteReplication") private Optional enableRemoteReplication;
@SerializedName("expirationReason") private Optional expirationReason;
@SerializedName("expirationTime") private Optional expirationTime;
@SerializedName("groupID") private Optional groupID;
@SerializedName("groupSnapshotUUID") private Optional groupSnapshotUUID;
@SerializedName("name") private Optional name;
@SerializedName("remoteStatus") private Optional remoteStatus;
@SerializedName("remoteStatuses") private Optional remoteStatuses;
@SerializedName("status") private Optional status;
@SerializedName("totalSize") private Optional totalSize;
@SerializedName("virtualVolumeID") private Optional virtualVolumeID;
@SerializedName("volumePairUUID") private Optional volumePairUUID;
// empty constructor
@Since("7.0")
public GroupSnapshotMembers() {}
// parameterized constructor
@Since("7.0")
public GroupSnapshotMembers(
Long volumeID,
Long snapshotID,
String checksum,
Optional attributes,
Optional createTime,
Optional enableRemoteReplication,
Optional expirationReason,
Optional expirationTime,
Optional groupID,
Optional groupSnapshotUUID,
Optional name,
Optional remoteStatus,
Optional remoteStatuses,
Optional status,
Optional totalSize,
Optional virtualVolumeID,
Optional volumePairUUID
)
{
this.volumeID = volumeID;
this.snapshotID = snapshotID;
this.checksum = checksum;
this.attributes = (attributes == null) ? Optional.empty() : attributes;
this.createTime = (createTime == null) ? Optional.empty() : createTime;
this.enableRemoteReplication = (enableRemoteReplication == null) ? Optional.empty() : enableRemoteReplication;
this.expirationReason = (expirationReason == null) ? Optional.empty() : expirationReason;
this.expirationTime = (expirationTime == null) ? Optional.empty() : expirationTime;
this.groupID = (groupID == null) ? Optional.empty() : groupID;
this.groupSnapshotUUID = (groupSnapshotUUID == null) ? Optional.empty() : groupSnapshotUUID;
this.name = (name == null) ? Optional.empty() : name;
this.remoteStatus = (remoteStatus == null) ? Optional.empty() : remoteStatus;
this.remoteStatuses = (remoteStatuses == null) ? Optional.empty() : remoteStatuses;
this.status = (status == null) ? Optional.empty() : status;
this.totalSize = (totalSize == null) ? Optional.empty() : totalSize;
this.virtualVolumeID = (virtualVolumeID == null) ? Optional.empty() : virtualVolumeID;
this.volumePairUUID = (volumePairUUID == null) ? Optional.empty() : volumePairUUID;
}
// parameterized constructor
@Since("8.0")
public GroupSnapshotMembers(
Long volumeID,
Long snapshotID,
java.util.UUID snapshotUUID,
String checksum,
Optional attributes,
Optional createTime,
Optional enableRemoteReplication,
Optional expirationReason,
Optional expirationTime,
Optional groupID,
Optional groupSnapshotUUID,
Optional name,
Optional remoteStatus,
Optional remoteStatuses,
Optional status,
Optional totalSize,
Optional virtualVolumeID,
Optional volumePairUUID
)
{
this.volumeID = volumeID;
this.snapshotID = snapshotID;
this.snapshotUUID = snapshotUUID;
this.checksum = checksum;
this.attributes = (attributes == null) ? Optional.empty() : attributes;
this.createTime = (createTime == null) ? Optional.empty() : createTime;
this.enableRemoteReplication = (enableRemoteReplication == null) ? Optional.empty() : enableRemoteReplication;
this.expirationReason = (expirationReason == null) ? Optional.empty() : expirationReason;
this.expirationTime = (expirationTime == null) ? Optional.empty() : expirationTime;
this.groupID = (groupID == null) ? Optional.empty() : groupID;
this.groupSnapshotUUID = (groupSnapshotUUID == null) ? Optional.empty() : groupSnapshotUUID;
this.name = (name == null) ? Optional.empty() : name;
this.remoteStatus = (remoteStatus == null) ? Optional.empty() : remoteStatus;
this.remoteStatuses = (remoteStatuses == null) ? Optional.empty() : remoteStatuses;
this.status = (status == null) ? Optional.empty() : status;
this.totalSize = (totalSize == null) ? Optional.empty() : totalSize;
this.virtualVolumeID = (virtualVolumeID == null) ? Optional.empty() : virtualVolumeID;
this.volumePairUUID = (volumePairUUID == null) ? Optional.empty() : volumePairUUID;
}
/**
* The source volume ID for the snapshot.
**/
public Long getVolumeID() { return this.volumeID; }
public void setVolumeID(Long volumeID) {
this.volumeID = volumeID;
}
/**
* Unique ID of a snapshot from which the new snapshot is made.
* The snapshotID passed must be a snapshot on the given volume.
**/
public Long getSnapshotID() { return this.snapshotID; }
public void setSnapshotID(Long snapshotID) {
this.snapshotID = snapshotID;
}
/**
* Universal Unique ID of an existing snapshot.
**/
public java.util.UUID getSnapshotUUID() { return this.snapshotUUID; }
public void setSnapshotUUID(java.util.UUID snapshotUUID) {
this.snapshotUUID = snapshotUUID;
}
/**
* A string that represents the correct digits in the stored snapshot.
* This checksum can be used later to compare other snapshots to detect errors in the data.
**/
public String getChecksum() { return this.checksum; }
public void setChecksum(String checksum) {
this.checksum = checksum;
}
/**
*
**/
public Optional getAttributes() { return this.attributes; }
public void setAttributes(Optional attributes) {
this.attributes = (attributes == null) ? Optional.empty() : attributes;
}
/**
*
**/
public Optional getCreateTime() { return this.createTime; }
public void setCreateTime(Optional createTime) {
this.createTime = (createTime == null) ? Optional.empty() : createTime;
}
/**
*
**/
public Optional getEnableRemoteReplication() { return this.enableRemoteReplication; }
public void setEnableRemoteReplication(Optional enableRemoteReplication) {
this.enableRemoteReplication = (enableRemoteReplication == null) ? Optional.empty() : enableRemoteReplication;
}
/**
*
**/
public Optional getExpirationReason() { return this.expirationReason; }
public void setExpirationReason(Optional expirationReason) {
this.expirationReason = (expirationReason == null) ? Optional.empty() : expirationReason;
}
/**
*
**/
public Optional getExpirationTime() { return this.expirationTime; }
public void setExpirationTime(Optional expirationTime) {
this.expirationTime = (expirationTime == null) ? Optional.empty() : expirationTime;
}
/**
*
**/
public Optional getGroupID() { return this.groupID; }
public void setGroupID(Optional groupID) {
this.groupID = (groupID == null) ? Optional.empty() : groupID;
}
/**
*
**/
public Optional getGroupSnapshotUUID() { return this.groupSnapshotUUID; }
public void setGroupSnapshotUUID(Optional groupSnapshotUUID) {
this.groupSnapshotUUID = (groupSnapshotUUID == null) ? Optional.empty() : groupSnapshotUUID;
}
/**
*
**/
public Optional getName() { return this.name; }
public void setName(Optional name) {
this.name = (name == null) ? Optional.empty() : name;
}
/**
*
**/
public Optional getRemoteStatus() { return this.remoteStatus; }
public void setRemoteStatus(Optional remoteStatus) {
this.remoteStatus = (remoteStatus == null) ? Optional.empty() : remoteStatus;
}
/**
*
**/
public Optional getRemoteStatuses() { return this.remoteStatuses; }
public void setRemoteStatuses(Optional remoteStatuses) {
this.remoteStatuses = (remoteStatuses == null) ? Optional.empty() : remoteStatuses;
}
/**
*
**/
public Optional getStatus() { return this.status; }
public void setStatus(Optional status) {
this.status = (status == null) ? Optional.empty() : status;
}
/**
*
**/
public Optional getTotalSize() { return this.totalSize; }
public void setTotalSize(Optional totalSize) {
this.totalSize = (totalSize == null) ? Optional.empty() : totalSize;
}
/**
*
**/
public Optional getVirtualVolumeID() { return this.virtualVolumeID; }
public void setVirtualVolumeID(Optional virtualVolumeID) {
this.virtualVolumeID = (virtualVolumeID == null) ? Optional.empty() : virtualVolumeID;
}
/**
*
**/
public Optional getVolumePairUUID() { return this.volumePairUUID; }
public void setVolumePairUUID(Optional volumePairUUID) {
this.volumePairUUID = (volumePairUUID == null) ? Optional.empty() : volumePairUUID;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
GroupSnapshotMembers that = (GroupSnapshotMembers) o;
return
Objects.equals(volumeID, that.volumeID) &&
Objects.equals(snapshotID, that.snapshotID) &&
Objects.equals(snapshotUUID, that.snapshotUUID) &&
Objects.equals(checksum, that.checksum) &&
Objects.equals(attributes, that.attributes) &&
Objects.equals(createTime, that.createTime) &&
Objects.equals(enableRemoteReplication, that.enableRemoteReplication) &&
Objects.equals(expirationReason, that.expirationReason) &&
Objects.equals(expirationTime, that.expirationTime) &&
Objects.equals(groupID, that.groupID) &&
Objects.equals(groupSnapshotUUID, that.groupSnapshotUUID) &&
Objects.equals(name, that.name) &&
Objects.equals(remoteStatus, that.remoteStatus) &&
Objects.equals(remoteStatuses, that.remoteStatuses) &&
Objects.equals(status, that.status) &&
Objects.equals(totalSize, that.totalSize) &&
Objects.equals(virtualVolumeID, that.virtualVolumeID) &&
Objects.equals(volumePairUUID, that.volumePairUUID);
}
@Override
public int hashCode() {
return Objects.hash( volumeID,snapshotID,snapshotUUID,checksum,attributes,createTime,enableRemoteReplication,expirationReason,expirationTime,groupID,groupSnapshotUUID,name,remoteStatus,remoteStatuses,status,totalSize,virtualVolumeID,volumePairUUID );
}
public java.util.Map toMap() {
java.util.Map map = new HashMap<>();
map.put("volumeID", volumeID);
map.put("snapshotID", snapshotID);
map.put("snapshotUUID", snapshotUUID);
map.put("checksum", checksum);
map.put("attributes", attributes);
map.put("createTime", createTime);
map.put("enableRemoteReplication", enableRemoteReplication);
map.put("expirationReason", expirationReason);
map.put("expirationTime", expirationTime);
map.put("groupID", groupID);
map.put("groupSnapshotUUID", groupSnapshotUUID);
map.put("name", name);
map.put("remoteStatus", remoteStatus);
map.put("remoteStatuses", remoteStatuses);
map.put("status", status);
map.put("totalSize", totalSize);
map.put("virtualVolumeID", virtualVolumeID);
map.put("volumePairUUID", volumePairUUID);
return map;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
Gson gson = new Gson();
sb.append( "{ " );
sb.append(" volumeID : ").append(gson.toJson(volumeID)).append(",");
sb.append(" snapshotID : ").append(gson.toJson(snapshotID)).append(",");
sb.append(" snapshotUUID : ").append(gson.toJson(snapshotUUID)).append(",");
sb.append(" checksum : ").append(gson.toJson(checksum)).append(",");
if(null != attributes && attributes.isPresent()){
sb.append(" attributes : ").append(gson.toJson(attributes)).append(",");
}
else{
sb.append(" attributes : ").append("null").append(",");
}
if(null != createTime && createTime.isPresent()){
sb.append(" createTime : ").append(gson.toJson(createTime)).append(",");
}
else{
sb.append(" createTime : ").append("null").append(",");
}
if(null != enableRemoteReplication && enableRemoteReplication.isPresent()){
sb.append(" enableRemoteReplication : ").append(gson.toJson(enableRemoteReplication)).append(",");
}
else{
sb.append(" enableRemoteReplication : ").append("null").append(",");
}
if(null != expirationReason && expirationReason.isPresent()){
sb.append(" expirationReason : ").append(gson.toJson(expirationReason)).append(",");
}
else{
sb.append(" expirationReason : ").append("null").append(",");
}
if(null != expirationTime && expirationTime.isPresent()){
sb.append(" expirationTime : ").append(gson.toJson(expirationTime)).append(",");
}
else{
sb.append(" expirationTime : ").append("null").append(",");
}
if(null != groupID && groupID.isPresent()){
sb.append(" groupID : ").append(gson.toJson(groupID)).append(",");
}
else{
sb.append(" groupID : ").append("null").append(",");
}
if(null != groupSnapshotUUID && groupSnapshotUUID.isPresent()){
sb.append(" groupSnapshotUUID : ").append(gson.toJson(groupSnapshotUUID)).append(",");
}
else{
sb.append(" groupSnapshotUUID : ").append("null").append(",");
}
if(null != name && name.isPresent()){
sb.append(" name : ").append(gson.toJson(name)).append(",");
}
else{
sb.append(" name : ").append("null").append(",");
}
if(null != remoteStatus && remoteStatus.isPresent()){
sb.append(" remoteStatus : ").append(gson.toJson(remoteStatus)).append(",");
}
else{
sb.append(" remoteStatus : ").append("null").append(",");
}
if(null != remoteStatuses && remoteStatuses.isPresent()){
sb.append(" remoteStatuses : ").append(gson.toJson(remoteStatuses)).append(",");
}
else{
sb.append(" remoteStatuses : ").append("null").append(",");
}
if(null != status && status.isPresent()){
sb.append(" status : ").append(gson.toJson(status)).append(",");
}
else{
sb.append(" status : ").append("null").append(",");
}
if(null != totalSize && totalSize.isPresent()){
sb.append(" totalSize : ").append(gson.toJson(totalSize)).append(",");
}
else{
sb.append(" totalSize : ").append("null").append(",");
}
if(null != virtualVolumeID && virtualVolumeID.isPresent()){
sb.append(" virtualVolumeID : ").append(gson.toJson(virtualVolumeID)).append(",");
}
else{
sb.append(" virtualVolumeID : ").append("null").append(",");
}
if(null != volumePairUUID && volumePairUUID.isPresent()){
sb.append(" volumePairUUID : ").append(gson.toJson(volumePairUUID)).append(",");
}
else{
sb.append(" volumePairUUID : ").append("null").append(",");
}
sb.append( " }" );
if(sb.lastIndexOf(", }") != -1)
sb.deleteCharAt(sb.lastIndexOf(", }"));
return sb.toString();
}
public static Builder builder() {
return new Builder();
}
public final Builder asBuilder() {
return new Builder().buildFrom(this);
}
public static class Builder {
private Long volumeID;
private Long snapshotID;
private java.util.UUID snapshotUUID;
private String checksum;
private Optional attributes;
private Optional createTime;
private Optional enableRemoteReplication;
private Optional expirationReason;
private Optional expirationTime;
private Optional groupID;
private Optional groupSnapshotUUID;
private Optional name;
private Optional remoteStatus;
private Optional remoteStatuses;
private Optional status;
private Optional totalSize;
private Optional virtualVolumeID;
private Optional volumePairUUID;
private Builder() { }
public GroupSnapshotMembers build() {
return new GroupSnapshotMembers (
this.volumeID,
this.snapshotID,
this.snapshotUUID,
this.checksum,
this.attributes,
this.createTime,
this.enableRemoteReplication,
this.expirationReason,
this.expirationTime,
this.groupID,
this.groupSnapshotUUID,
this.name,
this.remoteStatus,
this.remoteStatuses,
this.status,
this.totalSize,
this.virtualVolumeID,
this.volumePairUUID);
}
private GroupSnapshotMembers.Builder buildFrom(final GroupSnapshotMembers req) {
this.volumeID = req.volumeID;
this.snapshotID = req.snapshotID;
this.snapshotUUID = req.snapshotUUID;
this.checksum = req.checksum;
this.attributes = req.attributes;
this.createTime = req.createTime;
this.enableRemoteReplication = req.enableRemoteReplication;
this.expirationReason = req.expirationReason;
this.expirationTime = req.expirationTime;
this.groupID = req.groupID;
this.groupSnapshotUUID = req.groupSnapshotUUID;
this.name = req.name;
this.remoteStatus = req.remoteStatus;
this.remoteStatuses = req.remoteStatuses;
this.status = req.status;
this.totalSize = req.totalSize;
this.virtualVolumeID = req.virtualVolumeID;
this.volumePairUUID = req.volumePairUUID;
return this;
}
public GroupSnapshotMembers.Builder volumeID(final Long volumeID) {
this.volumeID = volumeID;
return this;
}
public GroupSnapshotMembers.Builder snapshotID(final Long snapshotID) {
this.snapshotID = snapshotID;
return this;
}
public GroupSnapshotMembers.Builder snapshotUUID(final java.util.UUID snapshotUUID) {
this.snapshotUUID = snapshotUUID;
return this;
}
public GroupSnapshotMembers.Builder checksum(final String checksum) {
this.checksum = checksum;
return this;
}
public GroupSnapshotMembers.Builder optionalAttributes(final Attributes attributes) {
this.attributes = (attributes == null) ? Optional.empty() : Optional.of(attributes);
return this;
}
public GroupSnapshotMembers.Builder optionalCreateTime(final String createTime) {
this.createTime = (createTime == null) ? Optional.empty() : Optional.of(createTime);
return this;
}
public GroupSnapshotMembers.Builder optionalEnableRemoteReplication(final Boolean enableRemoteReplication) {
this.enableRemoteReplication = (enableRemoteReplication == null) ? Optional.empty() : Optional.of(enableRemoteReplication);
return this;
}
public GroupSnapshotMembers.Builder optionalExpirationReason(final String expirationReason) {
this.expirationReason = (expirationReason == null) ? Optional.empty() : Optional.of(expirationReason);
return this;
}
public GroupSnapshotMembers.Builder optionalExpirationTime(final String expirationTime) {
this.expirationTime = (expirationTime == null) ? Optional.empty() : Optional.of(expirationTime);
return this;
}
public GroupSnapshotMembers.Builder optionalGroupID(final Long groupID) {
this.groupID = (groupID == null) ? Optional.empty() : Optional.of(groupID);
return this;
}
public GroupSnapshotMembers.Builder optionalGroupSnapshotUUID(final java.util.UUID groupSnapshotUUID) {
this.groupSnapshotUUID = (groupSnapshotUUID == null) ? Optional.empty() : Optional.of(groupSnapshotUUID);
return this;
}
public GroupSnapshotMembers.Builder optionalName(final String name) {
this.name = (name == null) ? Optional.empty() : Optional.of(name);
return this;
}
public GroupSnapshotMembers.Builder optionalRemoteStatus(final String remoteStatus) {
this.remoteStatus = (remoteStatus == null) ? Optional.empty() : Optional.of(remoteStatus);
return this;
}
public GroupSnapshotMembers.Builder optionalRemoteStatuses(final Attributes[] remoteStatuses) {
this.remoteStatuses = (remoteStatuses == null) ? Optional.empty() : Optional.of(remoteStatuses);
return this;
}
public GroupSnapshotMembers.Builder optionalStatus(final String status) {
this.status = (status == null) ? Optional.empty() : Optional.of(status);
return this;
}
public GroupSnapshotMembers.Builder optionalTotalSize(final Long totalSize) {
this.totalSize = (totalSize == null) ? Optional.empty() : Optional.of(totalSize);
return this;
}
public GroupSnapshotMembers.Builder optionalVirtualVolumeID(final Long virtualVolumeID) {
this.virtualVolumeID = (virtualVolumeID == null) ? Optional.empty() : Optional.of(virtualVolumeID);
return this;
}
public GroupSnapshotMembers.Builder optionalVolumePairUUID(final java.util.UUID volumePairUUID) {
this.volumePairUUID = (volumePairUUID == null) ? Optional.empty() : Optional.of(volumePairUUID);
return this;
}
}
}