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

org.finra.herd.model.api.xml.InstanceDefinition Maven / Gradle / Ivy

Go to download

This project contains the model API classes. This contains the herd XSD and generates Java POJO's from them. These classes are used for incoming and outgoing calls into the system (e.g. via REST).

There is a newer version: 0.160.0
Show newest version

package org.finra.herd.model.api.xml;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
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.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;


/**
 * 

Java class for instanceDefinition complex type. * *

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

 * <complexType name="instanceDefinition">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <all>
 *         <element name="instanceCount" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         <element name="instanceType" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="ebsConfiguration" type="{}emrClusterDefinitionEbsConfiguration" minOccurs="0"/>
 *         <element name="instanceSpotPrice" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *         <element name="instanceMaxSearchPrice" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *         <element name="instanceOnDemandThreshold" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
 *       </all>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "instanceDefinition", propOrder = { }) public class InstanceDefinition implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, ToString2 { private final static long serialVersionUID = -1L; protected int instanceCount; @XmlElement(required = true) protected String instanceType; protected EmrClusterDefinitionEbsConfiguration ebsConfiguration; protected BigDecimal instanceSpotPrice; protected BigDecimal instanceMaxSearchPrice; protected BigDecimal instanceOnDemandThreshold; /** * Default no-arg constructor * */ public InstanceDefinition() { super(); } /** * Fully-initialising value constructor * */ public InstanceDefinition(final int instanceCount, final String instanceType, final EmrClusterDefinitionEbsConfiguration ebsConfiguration, final BigDecimal instanceSpotPrice, final BigDecimal instanceMaxSearchPrice, final BigDecimal instanceOnDemandThreshold) { this.instanceCount = instanceCount; this.instanceType = instanceType; this.ebsConfiguration = ebsConfiguration; this.instanceSpotPrice = instanceSpotPrice; this.instanceMaxSearchPrice = instanceMaxSearchPrice; this.instanceOnDemandThreshold = instanceOnDemandThreshold; } /** * Gets the value of the instanceCount property. * */ public int getInstanceCount() { return instanceCount; } /** * Sets the value of the instanceCount property. * */ public void setInstanceCount(int value) { this.instanceCount = value; } /** * Gets the value of the instanceType property. * * @return * possible object is * {@link String } * */ public String getInstanceType() { return instanceType; } /** * Sets the value of the instanceType property. * * @param value * allowed object is * {@link String } * */ public void setInstanceType(String value) { this.instanceType = value; } /** * Gets the value of the ebsConfiguration property. * * @return * possible object is * {@link EmrClusterDefinitionEbsConfiguration } * */ public EmrClusterDefinitionEbsConfiguration getEbsConfiguration() { return ebsConfiguration; } /** * Sets the value of the ebsConfiguration property. * * @param value * allowed object is * {@link EmrClusterDefinitionEbsConfiguration } * */ public void setEbsConfiguration(EmrClusterDefinitionEbsConfiguration value) { this.ebsConfiguration = value; } /** * Gets the value of the instanceSpotPrice property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getInstanceSpotPrice() { return instanceSpotPrice; } /** * Sets the value of the instanceSpotPrice property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setInstanceSpotPrice(BigDecimal value) { this.instanceSpotPrice = value; } /** * Gets the value of the instanceMaxSearchPrice property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getInstanceMaxSearchPrice() { return instanceMaxSearchPrice; } /** * Sets the value of the instanceMaxSearchPrice property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setInstanceMaxSearchPrice(BigDecimal value) { this.instanceMaxSearchPrice = value; } /** * Gets the value of the instanceOnDemandThreshold property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getInstanceOnDemandThreshold() { return instanceOnDemandThreshold; } /** * Sets the value of the instanceOnDemandThreshold property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setInstanceOnDemandThreshold(BigDecimal value) { this.instanceOnDemandThreshold = value; } public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { int theInstanceCount; theInstanceCount = this.getInstanceCount(); strategy.appendField(locator, this, "instanceCount", buffer, theInstanceCount, true); } { String theInstanceType; theInstanceType = this.getInstanceType(); strategy.appendField(locator, this, "instanceType", buffer, theInstanceType, (this.instanceType!= null)); } { EmrClusterDefinitionEbsConfiguration theEbsConfiguration; theEbsConfiguration = this.getEbsConfiguration(); strategy.appendField(locator, this, "ebsConfiguration", buffer, theEbsConfiguration, (this.ebsConfiguration!= null)); } { BigDecimal theInstanceSpotPrice; theInstanceSpotPrice = this.getInstanceSpotPrice(); strategy.appendField(locator, this, "instanceSpotPrice", buffer, theInstanceSpotPrice, (this.instanceSpotPrice!= null)); } { BigDecimal theInstanceMaxSearchPrice; theInstanceMaxSearchPrice = this.getInstanceMaxSearchPrice(); strategy.appendField(locator, this, "instanceMaxSearchPrice", buffer, theInstanceMaxSearchPrice, (this.instanceMaxSearchPrice!= null)); } { BigDecimal theInstanceOnDemandThreshold; theInstanceOnDemandThreshold = this.getInstanceOnDemandThreshold(); strategy.appendField(locator, this, "instanceOnDemandThreshold", buffer, theInstanceOnDemandThreshold, (this.instanceOnDemandThreshold!= null)); } return buffer; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final InstanceDefinition that = ((InstanceDefinition) object); { int lhsInstanceCount; lhsInstanceCount = this.getInstanceCount(); int rhsInstanceCount; rhsInstanceCount = that.getInstanceCount(); if (!strategy.equals(LocatorUtils.property(thisLocator, "instanceCount", lhsInstanceCount), LocatorUtils.property(thatLocator, "instanceCount", rhsInstanceCount), lhsInstanceCount, rhsInstanceCount, true, true)) { return false; } } { String lhsInstanceType; lhsInstanceType = this.getInstanceType(); String rhsInstanceType; rhsInstanceType = that.getInstanceType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "instanceType", lhsInstanceType), LocatorUtils.property(thatLocator, "instanceType", rhsInstanceType), lhsInstanceType, rhsInstanceType, (this.instanceType!= null), (that.instanceType!= null))) { return false; } } { EmrClusterDefinitionEbsConfiguration lhsEbsConfiguration; lhsEbsConfiguration = this.getEbsConfiguration(); EmrClusterDefinitionEbsConfiguration rhsEbsConfiguration; rhsEbsConfiguration = that.getEbsConfiguration(); if (!strategy.equals(LocatorUtils.property(thisLocator, "ebsConfiguration", lhsEbsConfiguration), LocatorUtils.property(thatLocator, "ebsConfiguration", rhsEbsConfiguration), lhsEbsConfiguration, rhsEbsConfiguration, (this.ebsConfiguration!= null), (that.ebsConfiguration!= null))) { return false; } } { BigDecimal lhsInstanceSpotPrice; lhsInstanceSpotPrice = this.getInstanceSpotPrice(); BigDecimal rhsInstanceSpotPrice; rhsInstanceSpotPrice = that.getInstanceSpotPrice(); if (!strategy.equals(LocatorUtils.property(thisLocator, "instanceSpotPrice", lhsInstanceSpotPrice), LocatorUtils.property(thatLocator, "instanceSpotPrice", rhsInstanceSpotPrice), lhsInstanceSpotPrice, rhsInstanceSpotPrice, (this.instanceSpotPrice!= null), (that.instanceSpotPrice!= null))) { return false; } } { BigDecimal lhsInstanceMaxSearchPrice; lhsInstanceMaxSearchPrice = this.getInstanceMaxSearchPrice(); BigDecimal rhsInstanceMaxSearchPrice; rhsInstanceMaxSearchPrice = that.getInstanceMaxSearchPrice(); if (!strategy.equals(LocatorUtils.property(thisLocator, "instanceMaxSearchPrice", lhsInstanceMaxSearchPrice), LocatorUtils.property(thatLocator, "instanceMaxSearchPrice", rhsInstanceMaxSearchPrice), lhsInstanceMaxSearchPrice, rhsInstanceMaxSearchPrice, (this.instanceMaxSearchPrice!= null), (that.instanceMaxSearchPrice!= null))) { return false; } } { BigDecimal lhsInstanceOnDemandThreshold; lhsInstanceOnDemandThreshold = this.getInstanceOnDemandThreshold(); BigDecimal rhsInstanceOnDemandThreshold; rhsInstanceOnDemandThreshold = that.getInstanceOnDemandThreshold(); if (!strategy.equals(LocatorUtils.property(thisLocator, "instanceOnDemandThreshold", lhsInstanceOnDemandThreshold), LocatorUtils.property(thatLocator, "instanceOnDemandThreshold", rhsInstanceOnDemandThreshold), lhsInstanceOnDemandThreshold, rhsInstanceOnDemandThreshold, (this.instanceOnDemandThreshold!= null), (that.instanceOnDemandThreshold!= null))) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { int theInstanceCount; theInstanceCount = this.getInstanceCount(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instanceCount", theInstanceCount), currentHashCode, theInstanceCount, true); } { String theInstanceType; theInstanceType = this.getInstanceType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instanceType", theInstanceType), currentHashCode, theInstanceType, (this.instanceType!= null)); } { EmrClusterDefinitionEbsConfiguration theEbsConfiguration; theEbsConfiguration = this.getEbsConfiguration(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "ebsConfiguration", theEbsConfiguration), currentHashCode, theEbsConfiguration, (this.ebsConfiguration!= null)); } { BigDecimal theInstanceSpotPrice; theInstanceSpotPrice = this.getInstanceSpotPrice(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instanceSpotPrice", theInstanceSpotPrice), currentHashCode, theInstanceSpotPrice, (this.instanceSpotPrice!= null)); } { BigDecimal theInstanceMaxSearchPrice; theInstanceMaxSearchPrice = this.getInstanceMaxSearchPrice(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instanceMaxSearchPrice", theInstanceMaxSearchPrice), currentHashCode, theInstanceMaxSearchPrice, (this.instanceMaxSearchPrice!= null)); } { BigDecimal theInstanceOnDemandThreshold; theInstanceOnDemandThreshold = this.getInstanceOnDemandThreshold(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instanceOnDemandThreshold", theInstanceOnDemandThreshold), currentHashCode, theInstanceOnDemandThreshold, (this.instanceOnDemandThreshold!= null)); } return currentHashCode; } public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public Object clone() { return copyTo(createNewInstance()); } public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); } public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof InstanceDefinition) { final InstanceDefinition copy = ((InstanceDefinition) draftCopy); { Boolean instanceCountShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, true); if (instanceCountShouldBeCopiedAndSet == Boolean.TRUE) { int sourceInstanceCount; sourceInstanceCount = this.getInstanceCount(); int copyInstanceCount = strategy.copy(LocatorUtils.property(locator, "instanceCount", sourceInstanceCount), sourceInstanceCount, true); copy.setInstanceCount(copyInstanceCount); } else { if (instanceCountShouldBeCopiedAndSet == Boolean.FALSE) { } } } { Boolean instanceTypeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.instanceType!= null)); if (instanceTypeShouldBeCopiedAndSet == Boolean.TRUE) { String sourceInstanceType; sourceInstanceType = this.getInstanceType(); String copyInstanceType = ((String) strategy.copy(LocatorUtils.property(locator, "instanceType", sourceInstanceType), sourceInstanceType, (this.instanceType!= null))); copy.setInstanceType(copyInstanceType); } else { if (instanceTypeShouldBeCopiedAndSet == Boolean.FALSE) { copy.instanceType = null; } } } { Boolean ebsConfigurationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.ebsConfiguration!= null)); if (ebsConfigurationShouldBeCopiedAndSet == Boolean.TRUE) { EmrClusterDefinitionEbsConfiguration sourceEbsConfiguration; sourceEbsConfiguration = this.getEbsConfiguration(); EmrClusterDefinitionEbsConfiguration copyEbsConfiguration = ((EmrClusterDefinitionEbsConfiguration) strategy.copy(LocatorUtils.property(locator, "ebsConfiguration", sourceEbsConfiguration), sourceEbsConfiguration, (this.ebsConfiguration!= null))); copy.setEbsConfiguration(copyEbsConfiguration); } else { if (ebsConfigurationShouldBeCopiedAndSet == Boolean.FALSE) { copy.ebsConfiguration = null; } } } { Boolean instanceSpotPriceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.instanceSpotPrice!= null)); if (instanceSpotPriceShouldBeCopiedAndSet == Boolean.TRUE) { BigDecimal sourceInstanceSpotPrice; sourceInstanceSpotPrice = this.getInstanceSpotPrice(); BigDecimal copyInstanceSpotPrice = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "instanceSpotPrice", sourceInstanceSpotPrice), sourceInstanceSpotPrice, (this.instanceSpotPrice!= null))); copy.setInstanceSpotPrice(copyInstanceSpotPrice); } else { if (instanceSpotPriceShouldBeCopiedAndSet == Boolean.FALSE) { copy.instanceSpotPrice = null; } } } { Boolean instanceMaxSearchPriceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.instanceMaxSearchPrice!= null)); if (instanceMaxSearchPriceShouldBeCopiedAndSet == Boolean.TRUE) { BigDecimal sourceInstanceMaxSearchPrice; sourceInstanceMaxSearchPrice = this.getInstanceMaxSearchPrice(); BigDecimal copyInstanceMaxSearchPrice = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "instanceMaxSearchPrice", sourceInstanceMaxSearchPrice), sourceInstanceMaxSearchPrice, (this.instanceMaxSearchPrice!= null))); copy.setInstanceMaxSearchPrice(copyInstanceMaxSearchPrice); } else { if (instanceMaxSearchPriceShouldBeCopiedAndSet == Boolean.FALSE) { copy.instanceMaxSearchPrice = null; } } } { Boolean instanceOnDemandThresholdShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.instanceOnDemandThreshold!= null)); if (instanceOnDemandThresholdShouldBeCopiedAndSet == Boolean.TRUE) { BigDecimal sourceInstanceOnDemandThreshold; sourceInstanceOnDemandThreshold = this.getInstanceOnDemandThreshold(); BigDecimal copyInstanceOnDemandThreshold = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "instanceOnDemandThreshold", sourceInstanceOnDemandThreshold), sourceInstanceOnDemandThreshold, (this.instanceOnDemandThreshold!= null))); copy.setInstanceOnDemandThreshold(copyInstanceOnDemandThreshold); } else { if (instanceOnDemandThresholdShouldBeCopiedAndSet == Boolean.FALSE) { copy.instanceOnDemandThreshold = null; } } } } return draftCopy; } public Object createNewInstance() { return new InstanceDefinition(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy