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

org.meridor.perspective.beans.Subnet 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.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
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 subnet complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="subnet">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <all>
 *         <element name="id" type="{urn:beans.perspective.meridor.org}uuid"/>
 *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="cidr" type="{urn:beans.perspective.meridor.org}cidr"/>
 *         <element name="protocolVersion" type="{urn:beans.perspective.meridor.org}protocolVersion"/>
 *         <element name="gateway" type="{urn:beans.perspective.meridor.org}ipAddress"/>
 *         <element name="isDHCPEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *         <element name="maxSecurityGroups" type="{http://www.w3.org/2001/XMLSchema}double"/>
 *       </all>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "subnet", propOrder = { }) public class Subnet implements Serializable, Equals, HashCode, ToString { @XmlElement(required = true) protected String id; @XmlElement(required = true) protected String name; @XmlElement(required = true) protected Cidr cidr; @XmlElement(defaultValue = "4") protected int protocolVersion; @XmlElement(required = true) @XmlSchemaType(name = "anySimpleType") protected String gateway; protected boolean isDHCPEnabled; protected double maxSecurityGroups; /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the cidr property. * * @return * possible object is * {@link Cidr } * */ public Cidr getCidr() { return cidr; } /** * Sets the value of the cidr property. * * @param value * allowed object is * {@link Cidr } * */ public void setCidr(Cidr value) { this.cidr = value; } /** * Gets the value of the protocolVersion property. * */ public int getProtocolVersion() { return protocolVersion; } /** * Sets the value of the protocolVersion property. * */ public void setProtocolVersion(int value) { this.protocolVersion = value; } /** * Gets the value of the gateway property. * * @return * possible object is * {@link String } * */ public String getGateway() { return gateway; } /** * Sets the value of the gateway property. * * @param value * allowed object is * {@link String } * */ public void setGateway(String value) { this.gateway = value; } /** * Gets the value of the isDHCPEnabled property. * */ public boolean isIsDHCPEnabled() { return isDHCPEnabled; } /** * Sets the value of the isDHCPEnabled property. * */ public void setIsDHCPEnabled(boolean value) { this.isDHCPEnabled = value; } /** * Gets the value of the maxSecurityGroups property. * */ public double getMaxSecurityGroups() { return maxSecurityGroups; } /** * Sets the value of the maxSecurityGroups property. * */ public void setMaxSecurityGroups(double value) { this.maxSecurityGroups = value; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Subnet)) { return false; } if (this == object) { return true; } final Subnet that = ((Subnet) object); { String lhsId; lhsId = this.getId(); String rhsId; rhsId = that.getId(); if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) { return false; } } { String lhsName; lhsName = this.getName(); String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName)) { return false; } } { Cidr lhsCidr; lhsCidr = this.getCidr(); Cidr rhsCidr; rhsCidr = that.getCidr(); if (!strategy.equals(LocatorUtils.property(thisLocator, "cidr", lhsCidr), LocatorUtils.property(thatLocator, "cidr", rhsCidr), lhsCidr, rhsCidr)) { return false; } } { int lhsProtocolVersion; lhsProtocolVersion = this.getProtocolVersion(); int rhsProtocolVersion; rhsProtocolVersion = that.getProtocolVersion(); if (!strategy.equals(LocatorUtils.property(thisLocator, "protocolVersion", lhsProtocolVersion), LocatorUtils.property(thatLocator, "protocolVersion", rhsProtocolVersion), lhsProtocolVersion, rhsProtocolVersion)) { return false; } } { String lhsGateway; lhsGateway = this.getGateway(); String rhsGateway; rhsGateway = that.getGateway(); if (!strategy.equals(LocatorUtils.property(thisLocator, "gateway", lhsGateway), LocatorUtils.property(thatLocator, "gateway", rhsGateway), lhsGateway, rhsGateway)) { return false; } } { boolean lhsIsDHCPEnabled; lhsIsDHCPEnabled = this.isIsDHCPEnabled(); boolean rhsIsDHCPEnabled; rhsIsDHCPEnabled = that.isIsDHCPEnabled(); if (!strategy.equals(LocatorUtils.property(thisLocator, "isDHCPEnabled", lhsIsDHCPEnabled), LocatorUtils.property(thatLocator, "isDHCPEnabled", rhsIsDHCPEnabled), lhsIsDHCPEnabled, rhsIsDHCPEnabled)) { return false; } } { double lhsMaxSecurityGroups; lhsMaxSecurityGroups = this.getMaxSecurityGroups(); double rhsMaxSecurityGroups; rhsMaxSecurityGroups = that.getMaxSecurityGroups(); if (!strategy.equals(LocatorUtils.property(thisLocator, "maxSecurityGroups", lhsMaxSecurityGroups), LocatorUtils.property(thatLocator, "maxSecurityGroups", rhsMaxSecurityGroups), lhsMaxSecurityGroups, rhsMaxSecurityGroups)) { 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 theId; theId = this.getId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId); } { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName); } { Cidr theCidr; theCidr = this.getCidr(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "cidr", theCidr), currentHashCode, theCidr); } { int theProtocolVersion; theProtocolVersion = this.getProtocolVersion(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "protocolVersion", theProtocolVersion), currentHashCode, theProtocolVersion); } { String theGateway; theGateway = this.getGateway(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "gateway", theGateway), currentHashCode, theGateway); } { boolean theIsDHCPEnabled; theIsDHCPEnabled = this.isIsDHCPEnabled(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "isDHCPEnabled", theIsDHCPEnabled), currentHashCode, theIsDHCPEnabled); } { double theMaxSecurityGroups; theMaxSecurityGroups = this.getMaxSecurityGroups(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "maxSecurityGroups", theMaxSecurityGroups), currentHashCode, theMaxSecurityGroups); } 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 theId; theId = this.getId(); strategy.appendField(locator, this, "id", buffer, theId); } { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName); } { Cidr theCidr; theCidr = this.getCidr(); strategy.appendField(locator, this, "cidr", buffer, theCidr); } { int theProtocolVersion; theProtocolVersion = this.getProtocolVersion(); strategy.appendField(locator, this, "protocolVersion", buffer, theProtocolVersion); } { String theGateway; theGateway = this.getGateway(); strategy.appendField(locator, this, "gateway", buffer, theGateway); } { boolean theIsDHCPEnabled; theIsDHCPEnabled = this.isIsDHCPEnabled(); strategy.appendField(locator, this, "isDHCPEnabled", buffer, theIsDHCPEnabled); } { double theMaxSecurityGroups; theMaxSecurityGroups = this.getMaxSecurityGroups(); strategy.appendField(locator, this, "maxSecurityGroups", buffer, theMaxSecurityGroups); } return buffer; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy