|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. The ASF licenses this file |
| 6 | + * to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | + |
| 20 | +package org.apache.cloudstack.storage.feign.model; |
| 21 | + |
| 22 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 23 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 24 | + |
| 25 | +import java.util.List; |
| 26 | +import java.util.Objects; |
| 27 | + |
| 28 | +@JsonInclude(JsonInclude.Include.NON_NULL) |
| 29 | +public class Igroup { |
| 30 | + @JsonProperty("delete_on_unmap") |
| 31 | + private Boolean deleteOnUnmap = null; |
| 32 | + @JsonProperty("initiators") |
| 33 | + private List<Initiator> initiators = null; |
| 34 | + @JsonProperty("lun_maps") |
| 35 | + private List<LunMap> lunMaps = null; |
| 36 | + @JsonProperty("os_type") |
| 37 | + private OsTypeEnum osType = null; |
| 38 | + |
| 39 | + @JsonProperty("parent_igroups") |
| 40 | + private List<Igroup> parentIgroups = null; |
| 41 | + |
| 42 | + @JsonProperty("igroups") |
| 43 | + private List<Igroup> igroups = null; |
| 44 | + |
| 45 | + @JsonProperty("name") |
| 46 | + private String name = null; |
| 47 | + |
| 48 | + @JsonProperty("protocol") |
| 49 | + private ProtocolEnum protocol = ProtocolEnum.mixed; |
| 50 | + @JsonProperty("svm") |
| 51 | + private Svm svm = null; |
| 52 | + @JsonProperty("uuid") |
| 53 | + private String uuid = null; |
| 54 | + |
| 55 | + public enum OsTypeEnum { |
| 56 | + hyper_v("hyper_v"), |
| 57 | + |
| 58 | + linux("linux"), |
| 59 | + |
| 60 | + vmware("vmware"), |
| 61 | + |
| 62 | + windows("windows"), |
| 63 | + |
| 64 | + xen("xen"); |
| 65 | + |
| 66 | + private String value; |
| 67 | + |
| 68 | + OsTypeEnum(String value) { |
| 69 | + this.value = value; |
| 70 | + } |
| 71 | + |
| 72 | + public String getValue() { |
| 73 | + return value; |
| 74 | + } |
| 75 | + |
| 76 | + @Override |
| 77 | + public String toString() { |
| 78 | + return String.valueOf(value); |
| 79 | + } |
| 80 | + |
| 81 | + public static OsTypeEnum fromValue(String text) { |
| 82 | + for (OsTypeEnum b : OsTypeEnum.values()) { |
| 83 | + if (String.valueOf(b.value).equals(text)) { |
| 84 | + return b; |
| 85 | + } |
| 86 | + } |
| 87 | + return null; |
| 88 | + } |
| 89 | + } |
| 90 | + |
| 91 | + public List<Igroup> getParentIgroups() { |
| 92 | + return parentIgroups; |
| 93 | + } |
| 94 | + |
| 95 | + public void setParentIgroups(List<Igroup> parentIgroups) { |
| 96 | + this.parentIgroups = parentIgroups; |
| 97 | + } |
| 98 | + |
| 99 | + public Igroup igroups(List<Igroup> igroups) { |
| 100 | + this.igroups = igroups; |
| 101 | + return this; |
| 102 | + } |
| 103 | + |
| 104 | + public List<Igroup> getIgroups() { |
| 105 | + return igroups; |
| 106 | + } |
| 107 | + |
| 108 | + public void setIgroups(List<Igroup> igroups) { |
| 109 | + this.igroups = igroups; |
| 110 | + } |
| 111 | + |
| 112 | + public enum ProtocolEnum { |
| 113 | + iscsi("iscsi"), |
| 114 | + |
| 115 | + mixed("mixed"); |
| 116 | + |
| 117 | + private String value; |
| 118 | + |
| 119 | + ProtocolEnum(String value) { |
| 120 | + this.value = value; |
| 121 | + } |
| 122 | + |
| 123 | + public String getValue() { |
| 124 | + return value; |
| 125 | + } |
| 126 | + |
| 127 | + @Override |
| 128 | + public String toString() { |
| 129 | + return String.valueOf(value); |
| 130 | + } |
| 131 | + |
| 132 | + public static ProtocolEnum fromValue(String text) { |
| 133 | + for (ProtocolEnum b : ProtocolEnum.values()) { |
| 134 | + if (String.valueOf(b.value).equals(text)) { |
| 135 | + return b; |
| 136 | + } |
| 137 | + } |
| 138 | + return null; |
| 139 | + } |
| 140 | + } |
| 141 | + public Igroup deleteOnUnmap(Boolean deleteOnUnmap) { |
| 142 | + this.deleteOnUnmap = deleteOnUnmap; |
| 143 | + return this; |
| 144 | + } |
| 145 | + |
| 146 | + public Boolean isDeleteOnUnmap() { |
| 147 | + return deleteOnUnmap; |
| 148 | + } |
| 149 | + |
| 150 | + public void setDeleteOnUnmap(Boolean deleteOnUnmap) { |
| 151 | + this.deleteOnUnmap = deleteOnUnmap; |
| 152 | + } |
| 153 | + |
| 154 | + public Igroup initiators(List<Initiator> initiators) { |
| 155 | + this.initiators = initiators; |
| 156 | + return this; |
| 157 | + } |
| 158 | + public List<Initiator> getInitiators() { |
| 159 | + return initiators; |
| 160 | + } |
| 161 | + |
| 162 | + public void setInitiators(List<Initiator> initiators) { |
| 163 | + this.initiators = initiators; |
| 164 | + } |
| 165 | + |
| 166 | + public Igroup lunMaps(List<LunMap> lunMaps) { |
| 167 | + this.lunMaps = lunMaps; |
| 168 | + return this; |
| 169 | + } |
| 170 | + public List<LunMap> getLunMaps() { |
| 171 | + return lunMaps; |
| 172 | + } |
| 173 | + |
| 174 | + public void setLunMaps(List<LunMap> lunMaps) { |
| 175 | + this.lunMaps = lunMaps; |
| 176 | + } |
| 177 | + |
| 178 | + public Igroup name(String name) { |
| 179 | + this.name = name; |
| 180 | + return this; |
| 181 | + } |
| 182 | + |
| 183 | + public String getName() { |
| 184 | + return name; |
| 185 | + } |
| 186 | + public void setName(String name) { |
| 187 | + this.name = name; |
| 188 | + } |
| 189 | + |
| 190 | + public Igroup osType(OsTypeEnum osType) { |
| 191 | + this.osType = osType; |
| 192 | + return this; |
| 193 | + } |
| 194 | + public OsTypeEnum getOsType() { |
| 195 | + return osType; |
| 196 | + } |
| 197 | + |
| 198 | + public void setOsType(OsTypeEnum osType) { |
| 199 | + this.osType = osType; |
| 200 | + } |
| 201 | + |
| 202 | + public Igroup protocol(ProtocolEnum protocol) { |
| 203 | + this.protocol = protocol; |
| 204 | + return this; |
| 205 | + } |
| 206 | + |
| 207 | + public ProtocolEnum getProtocol() { |
| 208 | + return protocol; |
| 209 | + } |
| 210 | + |
| 211 | + public void setProtocol(ProtocolEnum protocol) { |
| 212 | + this.protocol = protocol; |
| 213 | + } |
| 214 | + |
| 215 | + public Igroup svm(Svm svm) { |
| 216 | + this.svm = svm; |
| 217 | + return this; |
| 218 | + } |
| 219 | + public Svm getSvm() { |
| 220 | + return svm; |
| 221 | + } |
| 222 | + |
| 223 | + public void setSvm(Svm svm) { |
| 224 | + this.svm = svm; |
| 225 | + } |
| 226 | + |
| 227 | + public String getUuid() { |
| 228 | + return uuid; |
| 229 | + } |
| 230 | + |
| 231 | + @Override |
| 232 | + public int hashCode() { |
| 233 | + return Objects.hash(name, uuid); |
| 234 | + } |
| 235 | + |
| 236 | + @Override |
| 237 | + public boolean equals(Object obj) { |
| 238 | + if (this == obj) |
| 239 | + return true; |
| 240 | + if (obj == null) |
| 241 | + return false; |
| 242 | + if (getClass() != obj.getClass()) |
| 243 | + return false; |
| 244 | + Igroup other = (Igroup) obj; |
| 245 | + return Objects.equals(name, other.name) && Objects.equals(uuid, other.uuid); |
| 246 | + } |
| 247 | + |
| 248 | + @Override |
| 249 | + public String toString() { |
| 250 | + return "Igroup [deleteOnUnmap=" + deleteOnUnmap + ", initiators=" + initiators + ", lunMaps=" + lunMaps |
| 251 | + + ", name=" + name + ", replication=" + ", osType=" + osType + ", parentIgroups=" |
| 252 | + + parentIgroups + ", igroups=" + igroups + ", protocol=" + protocol + ", svm=" + svm + ", uuid=" + uuid |
| 253 | + + ", portset=" + "]"; |
| 254 | + } |
| 255 | +} |
0 commit comments