com.solidfire.element.api.ListVirtualVolumesRequest 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;
/**
* ListVirtualVolumesRequest
* ListVirtualVolumes enables you to list the virtual volumes currently in the system. You can use this method to list all virtual volumes,
* or only list a subset.
**/
public class ListVirtualVolumesRequest implements Serializable {
public static final long serialVersionUID = 464604941728324684L;
@SerializedName("details") private Optional details;
@SerializedName("limit") private Optional limit;
@SerializedName("recursive") private Optional recursive;
@SerializedName("startVirtualVolumeID") private Optional startVirtualVolumeID;
@SerializedName("virtualVolumeIDs") private Optional virtualVolumeIDs;
// empty constructor
@Since("7.0")
public ListVirtualVolumesRequest() {}
// parameterized constructor
@Since("7.0")
public ListVirtualVolumesRequest(
Optional details,
Optional limit,
Optional recursive,
Optional startVirtualVolumeID,
Optional virtualVolumeIDs
)
{
this.details = (details == null) ? Optional.empty() : details;
this.limit = (limit == null) ? Optional.empty() : limit;
this.recursive = (recursive == null) ? Optional.empty() : recursive;
this.startVirtualVolumeID = (startVirtualVolumeID == null) ? Optional.empty() : startVirtualVolumeID;
this.virtualVolumeIDs = (virtualVolumeIDs == null) ? Optional.empty() : virtualVolumeIDs;
}
/**
* Specifies the level of detail about each virtual volume that is returned. Possible values are:
* true: Include more details about each virtual volume in the response.
* false: Include the standard level of detail about each virtual volume in
* the response.
**/
public Optional getDetails() { return this.details; }
public void setDetails(Optional details) {
this.details = (details == null) ? Optional.empty() : details;
}
/**
* The maximum number of virtual volumes to list.
**/
public Optional getLimit() { return this.limit; }
public void setLimit(Optional limit) {
this.limit = (limit == null) ? Optional.empty() : limit;
}
/**
* Specifies whether to include information about the children of each virtual volume in the response.
* Possible values are:
* true: Include information about the children of each virtual volume in
* the response.
* false: Do not include information about the children of each
* virtual volume in the response.
**/
public Optional getRecursive() { return this.recursive; }
public void setRecursive(Optional recursive) {
this.recursive = (recursive == null) ? Optional.empty() : recursive;
}
/**
* The ID of the virtual volume at which to begin the list.
**/
public Optional getStartVirtualVolumeID() { return this.startVirtualVolumeID; }
public void setStartVirtualVolumeID(Optional startVirtualVolumeID) {
this.startVirtualVolumeID = (startVirtualVolumeID == null) ? Optional.empty() : startVirtualVolumeID;
}
/**
* A list of virtual volume IDs for which to retrieve information. If
* you specify this parameter, the method returns information
* about only these virtual volumes.
**/
public Optional getVirtualVolumeIDs() { return this.virtualVolumeIDs; }
public void setVirtualVolumeIDs(Optional virtualVolumeIDs) {
this.virtualVolumeIDs = (virtualVolumeIDs == null) ? Optional.empty() : virtualVolumeIDs;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ListVirtualVolumesRequest that = (ListVirtualVolumesRequest) o;
return
Objects.equals(details, that.details) &&
Objects.equals(limit, that.limit) &&
Objects.equals(recursive, that.recursive) &&
Objects.equals(startVirtualVolumeID, that.startVirtualVolumeID) &&
Objects.equals(virtualVolumeIDs, that.virtualVolumeIDs);
}
@Override
public int hashCode() {
return Objects.hash( details,limit,recursive,startVirtualVolumeID,virtualVolumeIDs );
}
public java.util.Map toMap() {
java.util.Map map = new HashMap<>();
map.put("details", details);
map.put("limit", limit);
map.put("recursive", recursive);
map.put("startVirtualVolumeID", startVirtualVolumeID);
map.put("virtualVolumeIDs", virtualVolumeIDs);
return map;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
Gson gson = new Gson();
sb.append( "{ " );
if(null != details && details.isPresent()){
sb.append(" details : ").append(gson.toJson(details)).append(",");
}
else{
sb.append(" details : ").append("null").append(",");
}
if(null != limit && limit.isPresent()){
sb.append(" limit : ").append(gson.toJson(limit)).append(",");
}
else{
sb.append(" limit : ").append("null").append(",");
}
if(null != recursive && recursive.isPresent()){
sb.append(" recursive : ").append(gson.toJson(recursive)).append(",");
}
else{
sb.append(" recursive : ").append("null").append(",");
}
if(null != startVirtualVolumeID && startVirtualVolumeID.isPresent()){
sb.append(" startVirtualVolumeID : ").append(gson.toJson(startVirtualVolumeID)).append(",");
}
else{
sb.append(" startVirtualVolumeID : ").append("null").append(",");
}
if(null != virtualVolumeIDs && virtualVolumeIDs.isPresent()){
sb.append(" virtualVolumeIDs : ").append(gson.toJson(virtualVolumeIDs)).append(",");
}
else{
sb.append(" virtualVolumeIDs : ").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 Optional details;
private Optional limit;
private Optional recursive;
private Optional startVirtualVolumeID;
private Optional virtualVolumeIDs;
private Builder() { }
public ListVirtualVolumesRequest build() {
return new ListVirtualVolumesRequest (
this.details,
this.limit,
this.recursive,
this.startVirtualVolumeID,
this.virtualVolumeIDs);
}
private ListVirtualVolumesRequest.Builder buildFrom(final ListVirtualVolumesRequest req) {
this.details = req.details;
this.limit = req.limit;
this.recursive = req.recursive;
this.startVirtualVolumeID = req.startVirtualVolumeID;
this.virtualVolumeIDs = req.virtualVolumeIDs;
return this;
}
public ListVirtualVolumesRequest.Builder optionalDetails(final Boolean details) {
this.details = (details == null) ? Optional.empty() : Optional.of(details);
return this;
}
public ListVirtualVolumesRequest.Builder optionalLimit(final Long limit) {
this.limit = (limit == null) ? Optional.empty() : Optional.of(limit);
return this;
}
public ListVirtualVolumesRequest.Builder optionalRecursive(final Boolean recursive) {
this.recursive = (recursive == null) ? Optional.empty() : Optional.of(recursive);
return this;
}
public ListVirtualVolumesRequest.Builder optionalStartVirtualVolumeID(final java.util.UUID startVirtualVolumeID) {
this.startVirtualVolumeID = (startVirtualVolumeID == null) ? Optional.empty() : Optional.of(startVirtualVolumeID);
return this;
}
public ListVirtualVolumesRequest.Builder optionalVirtualVolumeIDs(final java.util.UUID[] virtualVolumeIDs) {
this.virtualVolumeIDs = (virtualVolumeIDs == null) ? Optional.empty() : Optional.of(virtualVolumeIDs);
return this;
}
}
}