com.huawei.openstack4j.openstack.storage.block.domain.CinderVolume Maven / Gradle / Ivy
/*******************************************************************************
* Copyright 2016 ContainX and OpenStack4j
*
* 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.
*******************************************************************************/
/*******************************************************************************
* Huawei has modified this source file.
* Copyright 2019 Huawei Technologies Co.,Ltd.
*
* 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.
* *******************************************************************************/
package com.huawei.openstack4j.openstack.storage.block.domain;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.google.common.base.MoreObjects;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.huawei.openstack4j.model.storage.block.Volume;
import com.huawei.openstack4j.model.storage.block.VolumeAttachment;
import com.huawei.openstack4j.model.storage.block.builder.VolumeBuilder;
import com.huawei.openstack4j.openstack.common.ListResult;
/**
* An OpenStack Volume
*
* @author Jeremy Unruh
*/
@JsonRootName("volume")
public class CinderVolume implements Volume {
private static final long serialVersionUID = 1L;
private String id;
@JsonProperty("name")
private String name;
@JsonProperty("description")
private String description;
private Status status;
@JsonInclude(Include.NON_DEFAULT)
@JsonProperty("size")
private Integer size;
@JsonProperty("availability_zone")
private String zone;
@JsonProperty("created_at")
private Date created;
@JsonProperty("volume_type")
private String volumeType;
@JsonProperty("imageRef")
private String imageRef;
@JsonProperty("source_volid")
private String sourceVolid;
@JsonProperty("snapshot_id")
private String snapshotId;
@JsonProperty("metadata")
private Map metadata;
@JsonProperty("bootable")
private Boolean bootable;
@JsonProperty("attachments")
private List attachments;
@JsonProperty("image_id")
private String imageId;
@JsonProperty("volume_image_metadata")
private Map imageMetadata;
@JsonProperty("os-vol-mig-status-attr:migstat")
private MigrationStatus migrateStatus;
@JsonProperty("os-vol-tenant-attr:tenant_id")
private String tenantId;
@JsonProperty("encrypted")
private Boolean encrypted;
@JsonProperty("os-vol-host-attr:host")
private String host;
@JsonProperty("backup_id")
private String backupId;
@JsonProperty("multiattach")
private Boolean multiattach;
@JsonProperty("links")
private List