org.meridor.perspective.beans.Quota Maven / Gradle / Ivy
The newest version!
package org.meridor.perspective.beans;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for quota complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="quota">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="instances" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="vcpus" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="ram" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="disk" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="ips" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="securityGroups" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="volumes" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="keypairs" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "quota")
public class Quota implements Serializable, Equals, HashCode, ToString
{
@XmlAttribute(name = "instances")
protected String instances;
@XmlAttribute(name = "vcpus")
protected String vcpus;
@XmlAttribute(name = "ram")
protected String ram;
@XmlAttribute(name = "disk")
protected String disk;
@XmlAttribute(name = "ips")
protected String ips;
@XmlAttribute(name = "securityGroups")
protected String securityGroups;
@XmlAttribute(name = "volumes")
protected String volumes;
@XmlAttribute(name = "keypairs")
protected String keypairs;
/**
* Gets the value of the instances property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getInstances() {
return instances;
}
/**
* Sets the value of the instances property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInstances(String value) {
this.instances = value;
}
/**
* Gets the value of the vcpus property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVcpus() {
return vcpus;
}
/**
* Sets the value of the vcpus property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVcpus(String value) {
this.vcpus = value;
}
/**
* Gets the value of the ram property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRam() {
return ram;
}
/**
* Sets the value of the ram property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRam(String value) {
this.ram = value;
}
/**
* Gets the value of the disk property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDisk() {
return disk;
}
/**
* Sets the value of the disk property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDisk(String value) {
this.disk = value;
}
/**
* Gets the value of the ips property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIps() {
return ips;
}
/**
* Sets the value of the ips property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIps(String value) {
this.ips = value;
}
/**
* Gets the value of the securityGroups property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSecurityGroups() {
return securityGroups;
}
/**
* Sets the value of the securityGroups property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSecurityGroups(String value) {
this.securityGroups = value;
}
/**
* Gets the value of the volumes property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVolumes() {
return volumes;
}
/**
* Sets the value of the volumes property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVolumes(String value) {
this.volumes = value;
}
/**
* Gets the value of the keypairs property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getKeypairs() {
return keypairs;
}
/**
* Sets the value of the keypairs property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setKeypairs(String value) {
this.keypairs = value;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Quota)) {
return false;
}
if (this == object) {
return true;
}
final Quota that = ((Quota) object);
{
String lhsInstances;
lhsInstances = this.getInstances();
String rhsInstances;
rhsInstances = that.getInstances();
if (!strategy.equals(LocatorUtils.property(thisLocator, "instances", lhsInstances), LocatorUtils.property(thatLocator, "instances", rhsInstances), lhsInstances, rhsInstances)) {
return false;
}
}
{
String lhsVcpus;
lhsVcpus = this.getVcpus();
String rhsVcpus;
rhsVcpus = that.getVcpus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "vcpus", lhsVcpus), LocatorUtils.property(thatLocator, "vcpus", rhsVcpus), lhsVcpus, rhsVcpus)) {
return false;
}
}
{
String lhsRam;
lhsRam = this.getRam();
String rhsRam;
rhsRam = that.getRam();
if (!strategy.equals(LocatorUtils.property(thisLocator, "ram", lhsRam), LocatorUtils.property(thatLocator, "ram", rhsRam), lhsRam, rhsRam)) {
return false;
}
}
{
String lhsDisk;
lhsDisk = this.getDisk();
String rhsDisk;
rhsDisk = that.getDisk();
if (!strategy.equals(LocatorUtils.property(thisLocator, "disk", lhsDisk), LocatorUtils.property(thatLocator, "disk", rhsDisk), lhsDisk, rhsDisk)) {
return false;
}
}
{
String lhsIps;
lhsIps = this.getIps();
String rhsIps;
rhsIps = that.getIps();
if (!strategy.equals(LocatorUtils.property(thisLocator, "ips", lhsIps), LocatorUtils.property(thatLocator, "ips", rhsIps), lhsIps, rhsIps)) {
return false;
}
}
{
String lhsSecurityGroups;
lhsSecurityGroups = this.getSecurityGroups();
String rhsSecurityGroups;
rhsSecurityGroups = that.getSecurityGroups();
if (!strategy.equals(LocatorUtils.property(thisLocator, "securityGroups", lhsSecurityGroups), LocatorUtils.property(thatLocator, "securityGroups", rhsSecurityGroups), lhsSecurityGroups, rhsSecurityGroups)) {
return false;
}
}
{
String lhsVolumes;
lhsVolumes = this.getVolumes();
String rhsVolumes;
rhsVolumes = that.getVolumes();
if (!strategy.equals(LocatorUtils.property(thisLocator, "volumes", lhsVolumes), LocatorUtils.property(thatLocator, "volumes", rhsVolumes), lhsVolumes, rhsVolumes)) {
return false;
}
}
{
String lhsKeypairs;
lhsKeypairs = this.getKeypairs();
String rhsKeypairs;
rhsKeypairs = that.getKeypairs();
if (!strategy.equals(LocatorUtils.property(thisLocator, "keypairs", lhsKeypairs), LocatorUtils.property(thatLocator, "keypairs", rhsKeypairs), lhsKeypairs, rhsKeypairs)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
String theInstances;
theInstances = this.getInstances();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instances", theInstances), currentHashCode, theInstances);
}
{
String theVcpus;
theVcpus = this.getVcpus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "vcpus", theVcpus), currentHashCode, theVcpus);
}
{
String theRam;
theRam = this.getRam();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "ram", theRam), currentHashCode, theRam);
}
{
String theDisk;
theDisk = this.getDisk();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "disk", theDisk), currentHashCode, theDisk);
}
{
String theIps;
theIps = this.getIps();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "ips", theIps), currentHashCode, theIps);
}
{
String theSecurityGroups;
theSecurityGroups = this.getSecurityGroups();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "securityGroups", theSecurityGroups), currentHashCode, theSecurityGroups);
}
{
String theVolumes;
theVolumes = this.getVolumes();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "volumes", theVolumes), currentHashCode, theVolumes);
}
{
String theKeypairs;
theKeypairs = this.getKeypairs();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "keypairs", theKeypairs), currentHashCode, theKeypairs);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
String theInstances;
theInstances = this.getInstances();
strategy.appendField(locator, this, "instances", buffer, theInstances);
}
{
String theVcpus;
theVcpus = this.getVcpus();
strategy.appendField(locator, this, "vcpus", buffer, theVcpus);
}
{
String theRam;
theRam = this.getRam();
strategy.appendField(locator, this, "ram", buffer, theRam);
}
{
String theDisk;
theDisk = this.getDisk();
strategy.appendField(locator, this, "disk", buffer, theDisk);
}
{
String theIps;
theIps = this.getIps();
strategy.appendField(locator, this, "ips", buffer, theIps);
}
{
String theSecurityGroups;
theSecurityGroups = this.getSecurityGroups();
strategy.appendField(locator, this, "securityGroups", buffer, theSecurityGroups);
}
{
String theVolumes;
theVolumes = this.getVolumes();
strategy.appendField(locator, this, "volumes", buffer, theVolumes);
}
{
String theKeypairs;
theKeypairs = this.getKeypairs();
strategy.appendField(locator, this, "keypairs", buffer, theKeypairs);
}
return buffer;
}
}