All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.solidfire.element.api.CloneMultipleVolumeParams Maven / Gradle / Ivy

There is a newer version: 1.5.0.89
Show 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.google.gson.annotations.SerializedName;
import com.solidfire.jsvcgen.annotation.Since;
import com.solidfire.jsvcgen.client.ApiException;
import com.solidfire.jsvcgen.javautil.Optional;

import java.net.URL;

import java.io.Serializable;

import java.util.Arrays;
import java.util.Objects;
import java.util.TreeMap;

import static com.solidfire.jsvcgen.javautil.Optional.of;


/**
 * 
 **/
public class CloneMultipleVolumeParams  implements Serializable  {

    private static final long serialVersionUID = 80805354L;

    @SerializedName("volumeID") private final Long volumeID;
    @SerializedName("access") private final Optional access;
    @SerializedName("name") private final Optional name;
    @SerializedName("newAccountID") private final Optional newAccountID;
    @SerializedName("newSize") private final Optional newSize;
    @SerializedName("attributes") private final Optional> attributes;

    /**
     * 
     * @param volumeID [required] Required parameter for "volumes" array: volumeID.
     * @param access (optional) Access settings for the new volume.
     * @param name (optional) New name for the clone.
     * @param newAccountID (optional) Account ID for the new volume.
     * @param newSize (optional) New size Total size of the volume, in bytes. Size is rounded up to the nearest 1MB size.
     * @param attributes (optional) List of Name/Value pairs in JSON object format.
     * @since 7.0
     **/
    @Since("7.0")
    public CloneMultipleVolumeParams(Long volumeID, Optional access, Optional name, Optional newAccountID, Optional newSize, Optional> attributes) {
        this.name = (name == null) ? Optional.empty() : name;
        this.newSize = (newSize == null) ? Optional.empty() : newSize;
        this.newAccountID = (newAccountID == null) ? Optional.empty() : newAccountID;
        this.attributes = (attributes == null) ? Optional.>empty() : attributes;
        this.volumeID = volumeID;
        this.access = (access == null) ? Optional.empty() : access;
    }


    /**
     * Required parameter for "volumes" array: volumeID.
     **/
    public Long getVolumeID() {
        return this.volumeID;
    }

    /**
     * Access settings for the new volume.
     * 
readOnly: Only read operations are allowed. *
readWrite: Reads and writes are allowed. *
locked: No reads or writes are allowed. *
replicationTarget: Identify a volume as the target volume for a paired set of volumes. If the volume is not paired, the access status is locked. *

* If unspecified, the access settings of the clone will be the same as the source. **/ public Optional getAccess() { return this.access; } /** * New name for the clone. **/ public Optional getName() { return this.name; } /** * Account ID for the new volume. **/ public Optional getNewAccountID() { return this.newAccountID; } /** * New size Total size of the volume, in bytes. Size is rounded up to the nearest 1MB size. **/ public Optional getNewSize() { return this.newSize; } /** * List of Name/Value pairs in JSON object format. **/ public Optional> getAttributes() { return this.attributes; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CloneMultipleVolumeParams that = (CloneMultipleVolumeParams) o; return Objects.equals( volumeID , that.volumeID ) && Objects.equals( access , that.access ) && Objects.equals( name , that.name ) && Objects.equals( newAccountID , that.newAccountID ) && Objects.equals( newSize , that.newSize ) && Objects.equals( attributes , that.attributes ); } @Override public int hashCode() { return Objects.hash( volumeID, access, name, newAccountID, newSize, attributes ); } @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append( "{ " ); sb.append(" volumeID : ").append(volumeID).append(","); if(null != access && access.isPresent()) sb.append(" access : ").append(access.get()).append(","); if(null != name && name.isPresent()) sb.append(" name : ").append(name.get()).append(","); if(null != newAccountID && newAccountID.isPresent()) sb.append(" newAccountID : ").append(newAccountID.get()).append(","); if(null != newSize && newSize.isPresent()) sb.append(" newSize : ").append(newSize.get()).append(","); if(null != attributes && attributes.isPresent()) sb.append(" attributes : ").append(attributes.get()); 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 Optional access; private Optional name; private Optional newAccountID; private Optional newSize; private Optional> attributes; private Builder() { } public CloneMultipleVolumeParams build() { return new CloneMultipleVolumeParams ( this.volumeID, this.access, this.name, this.newAccountID, this.newSize, this.attributes ); } private CloneMultipleVolumeParams.Builder buildFrom(final CloneMultipleVolumeParams req) { this.volumeID = req.volumeID; this.access = req.access; this.name = req.name; this.newAccountID = req.newAccountID; this.newSize = req.newSize; this.attributes = req.attributes; return this; } public CloneMultipleVolumeParams.Builder volumeID(final Long volumeID) { this.volumeID = volumeID; return this; } public CloneMultipleVolumeParams.Builder optionalAccess(final String access) { this.access = (access == null) ? Optional.empty() : Optional.of(access); return this; } public CloneMultipleVolumeParams.Builder optionalName(final String name) { this.name = (name == null) ? Optional.empty() : Optional.of(name); return this; } public CloneMultipleVolumeParams.Builder optionalNewAccountID(final Long newAccountID) { this.newAccountID = (newAccountID == null) ? Optional.empty() : Optional.of(newAccountID); return this; } public CloneMultipleVolumeParams.Builder optionalNewSize(final Long newSize) { this.newSize = (newSize == null) ? Optional.empty() : Optional.of(newSize); return this; } public CloneMultipleVolumeParams.Builder optionalAttributes(final java.util.Map attributes) { this.attributes = (attributes == null) ? Optional.>empty() : Optional.of(attributes); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy