com.cisco.oss.foundation.configuration.xml.jaxb.Operation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of configuration-api Show documentation
Show all versions of configuration-api Show documentation
This project is the api library for configuration in the cisco vss foundation runtime
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.11.05 at 02:12:08 AM EST
//
package com.cisco.oss.foundation.configuration.xml.jaxb;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy;
import org.jvnet.jaxb2_commons.lang.CopyTo;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
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 Operation complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Operation">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <choice>
* <element name="Update" type="{}Update"/>
* <element name="Add" type="{}Add"/>
* <element name="Delete" type="{}Delete"/>
* </choice>
* </sequence>
* <attribute name="index" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Operation", propOrder = {
"delete",
"add",
"update"
})
public class Operation
implements Cloneable, CopyTo, Equals, ToString
{
@XmlElement(name = "Delete")
protected Delete delete;
@XmlElement(name = "Add")
protected Add add;
@XmlElement(name = "Update")
protected Update update;
@XmlAttribute(name = "index", required = true)
protected int index;
/**
* Gets the value of the delete property.
*
* @return
* possible object is
* {@link Delete }
*
*/
public Delete getDelete() {
return delete;
}
/**
* Sets the value of the delete property.
*
* @param value
* allowed object is
* {@link Delete }
*
*/
public void setDelete(Delete value) {
this.delete = value;
}
/**
* Gets the value of the add property.
*
* @return
* possible object is
* {@link Add }
*
*/
public Add getAdd() {
return add;
}
/**
* Sets the value of the add property.
*
* @param value
* allowed object is
* {@link Add }
*
*/
public void setAdd(Add value) {
this.add = value;
}
/**
* Gets the value of the update property.
*
* @return
* possible object is
* {@link Update }
*
*/
public Update getUpdate() {
return update;
}
/**
* Sets the value of the update property.
*
* @param value
* allowed object is
* {@link Update }
*
*/
public void setUpdate(Update value) {
this.update = value;
}
/**
* Gets the value of the index property.
*
*/
public int getIndex() {
return index;
}
/**
* Sets the value of the index property.
*
*/
public void setIndex(int value) {
this.index = value;
}
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) {
{
Delete theDelete;
theDelete = this.getDelete();
strategy.appendField(locator, this, "delete", buffer, theDelete);
}
{
Add theAdd;
theAdd = this.getAdd();
strategy.appendField(locator, this, "add", buffer, theAdd);
}
{
Update theUpdate;
theUpdate = this.getUpdate();
strategy.appendField(locator, this, "update", buffer, theUpdate);
}
{
int theIndex;
theIndex = (true?this.getIndex(): 0);
strategy.appendField(locator, this, "index", buffer, theIndex);
}
return buffer;
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof Operation) {
final Operation copy = ((Operation) draftCopy);
if (this.delete!= null) {
Delete sourceDelete;
sourceDelete = this.getDelete();
Delete copyDelete = ((Delete) strategy.copy(LocatorUtils.property(locator, "delete", sourceDelete), sourceDelete));
copy.setDelete(copyDelete);
} else {
copy.delete = null;
}
if (this.add!= null) {
Add sourceAdd;
sourceAdd = this.getAdd();
Add copyAdd = ((Add) strategy.copy(LocatorUtils.property(locator, "add", sourceAdd), sourceAdd));
copy.setAdd(copyAdd);
} else {
copy.add = null;
}
if (this.update!= null) {
Update sourceUpdate;
sourceUpdate = this.getUpdate();
Update copyUpdate = ((Update) strategy.copy(LocatorUtils.property(locator, "update", sourceUpdate), sourceUpdate));
copy.setUpdate(copyUpdate);
} else {
copy.update = null;
}
int sourceIndex;
sourceIndex = (true?this.getIndex(): 0);
int copyIndex = strategy.copy(LocatorUtils.property(locator, "index", sourceIndex), sourceIndex);
copy.setIndex(copyIndex);
}
return draftCopy;
}
public Object createNewInstance() {
return new Operation();
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Operation)) {
return false;
}
if (this == object) {
return true;
}
final Operation that = ((Operation) object);
{
Delete lhsDelete;
lhsDelete = this.getDelete();
Delete rhsDelete;
rhsDelete = that.getDelete();
if (!strategy.equals(LocatorUtils.property(thisLocator, "delete", lhsDelete), LocatorUtils.property(thatLocator, "delete", rhsDelete), lhsDelete, rhsDelete)) {
return false;
}
}
{
Add lhsAdd;
lhsAdd = this.getAdd();
Add rhsAdd;
rhsAdd = that.getAdd();
if (!strategy.equals(LocatorUtils.property(thisLocator, "add", lhsAdd), LocatorUtils.property(thatLocator, "add", rhsAdd), lhsAdd, rhsAdd)) {
return false;
}
}
{
Update lhsUpdate;
lhsUpdate = this.getUpdate();
Update rhsUpdate;
rhsUpdate = that.getUpdate();
if (!strategy.equals(LocatorUtils.property(thisLocator, "update", lhsUpdate), LocatorUtils.property(thatLocator, "update", rhsUpdate), lhsUpdate, rhsUpdate)) {
return false;
}
}
{
int lhsIndex;
lhsIndex = (true?this.getIndex(): 0);
int rhsIndex;
rhsIndex = (true?that.getIndex(): 0);
if (!strategy.equals(LocatorUtils.property(thisLocator, "index", lhsIndex), LocatorUtils.property(thatLocator, "index", rhsIndex), lhsIndex, rhsIndex)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
}