/** * Create an instance of {@link Ec2OnDemandPricing } * */ public Ec2OnDemandPricing createEc2OnDemandPricing() { return new Ec2OnDemandPricing(); }
public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public static Ec2OnDemandPricing.Builder<Void> copyExcept(final Ec2OnDemandPricing _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.EXCLUDE); }
public Object clone() { return copyTo(createNewInstance()); }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof Ec2OnDemandPricing) { final Ec2OnDemandPricing copy = ((Ec2OnDemandPricing) draftCopy); if (ec2OnDemandPricingKeyShouldBeCopiedAndSet == Boolean.TRUE) { Ec2OnDemandPricingKey sourceEc2OnDemandPricingKey; sourceEc2OnDemandPricingKey = this.getEc2OnDemandPricingKey(); Ec2OnDemandPricingKey copyEc2OnDemandPricingKey = ((Ec2OnDemandPricingKey) strategy.copy(LocatorUtils.property(locator, "ec2OnDemandPricingKey", sourceEc2OnDemandPricingKey), sourceEc2OnDemandPricingKey, (this.ec2OnDemandPricingKey!= null))); copy.setEc2OnDemandPricingKey(copyEc2OnDemandPricingKey); } else { if (ec2OnDemandPricingKeyShouldBeCopiedAndSet == Boolean.FALSE) { if (pricePerHourShouldBeCopiedAndSet == Boolean.TRUE) { BigDecimal sourcePricePerHour; sourcePricePerHour = this.getPricePerHour(); BigDecimal copyPricePerHour = ((BigDecimal) strategy.copy(LocatorUtils.property(locator, "pricePerHour", sourcePricePerHour), sourcePricePerHour, (this.pricePerHour!= null))); copy.setPricePerHour(copyPricePerHour); } else { if (pricePerHourShouldBeCopiedAndSet == Boolean.FALSE) { if (skuShouldBeCopiedAndSet == Boolean.TRUE) { String sourceSku; sourceSku = this.getSku(); String copySku = ((String) strategy.copy(LocatorUtils.property(locator, "sku", sourceSku), sourceSku, (this.sku!= null))); copy.setSku(copySku); } else { if (skuShouldBeCopiedAndSet == Boolean.FALSE) {
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { Ec2OnDemandPricingKey theEc2OnDemandPricingKey; theEc2OnDemandPricingKey = this.getEc2OnDemandPricingKey(); strategy.appendField(locator, this, "ec2OnDemandPricingKey", buffer, theEc2OnDemandPricingKey, (this.ec2OnDemandPricingKey!= null)); } { BigDecimal thePricePerHour; thePricePerHour = this.getPricePerHour(); strategy.appendField(locator, this, "pricePerHour", buffer, thePricePerHour, (this.pricePerHour!= null)); } { String theSku; theSku = this.getSku(); strategy.appendField(locator, this, "sku", buffer, theSku, (this.sku!= null)); } return buffer; }
Ec2OnDemandPricingKey ec2OnDemandPricingKey = ec2OnDemandPricing.getEc2OnDemandPricingKey(); String sku = ec2OnDemandPricing.getSku(); JSONObject current = jsonHelper.getKeyValue(onDemand, sku, JSONObject.class); JSONObject pricingWrapper = jsonHelper.getKeyValue(current, sku + JSON_SKU_WRAPPER_SUFFIX, JSONObject.class); ec2OnDemandPricing.setPricePerHour(new BigDecimal(pricePerUnitValue));
Ec2OnDemandPricingKey ec2OnDemandPricingKey = ec2OnDemandPricing.getEc2OnDemandPricingKey(); if (!ec2OnDemandPricing.getPricePerHour().equals(ec2OnDemandPricingEntity.getHourlyPrice())) ec2OnDemandPricingEntity.setHourlyPrice(ec2OnDemandPricing.getPricePerHour()); ec2OnDemandPricingDao.saveAndRefresh(ec2OnDemandPricingEntity); ec2OnDemandPricingKey.getRegionName(), ec2OnDemandPricingKey.getInstanceType(), ec2OnDemandPricing.getPricePerHour().toPlainString(), oldHourlyPriceAsString); ec2OnDemandPricingEntity.setRegionName(ec2OnDemandPricingKey.getRegionName()); ec2OnDemandPricingEntity.setInstanceType(ec2OnDemandPricingKey.getInstanceType()); ec2OnDemandPricingEntity.setHourlyPrice(ec2OnDemandPricing.getPricePerHour()); ec2OnDemandPricingDao.saveAndRefresh(ec2OnDemandPricingEntity); ec2OnDemandPricingKey.getInstanceType(), ec2OnDemandPricing.getPricePerHour().toPlainString());
public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); }
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 int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { Ec2OnDemandPricingKey theEc2OnDemandPricingKey; theEc2OnDemandPricingKey = this.getEc2OnDemandPricingKey(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "ec2OnDemandPricingKey", theEc2OnDemandPricingKey), currentHashCode, theEc2OnDemandPricingKey, (this.ec2OnDemandPricingKey!= null)); } { BigDecimal thePricePerHour; thePricePerHour = this.getPricePerHour(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "pricePerHour", thePricePerHour), currentHashCode, thePricePerHour, (this.pricePerHour!= null)); } { String theSku; theSku = this.getSku(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sku", theSku), currentHashCode, theSku, (this.sku!= null)); } return currentHashCode; }
Ec2OnDemandPricingKey ec2OnDemandPricingKey = ec2OnDemandPricing.getEc2OnDemandPricingKey(); String sku = ec2OnDemandPricing.getSku(); JSONObject current = jsonHelper.getKeyValue(onDemand, sku, JSONObject.class); JSONObject pricingWrapper = jsonHelper.getKeyValue(current, sku + JSON_SKU_WRAPPER_SUFFIX, JSONObject.class); ec2OnDemandPricing.setPricePerHour(new BigDecimal(pricePerUnitValue));
Ec2OnDemandPricingKey ec2OnDemandPricingKey = ec2OnDemandPricing.getEc2OnDemandPricingKey(); if (!ec2OnDemandPricing.getPricePerHour().equals(ec2OnDemandPricingEntity.getHourlyPrice())) ec2OnDemandPricingEntity.setHourlyPrice(ec2OnDemandPricing.getPricePerHour()); ec2OnDemandPricingDao.saveAndRefresh(ec2OnDemandPricingEntity); ec2OnDemandPricingKey.getRegionName(), ec2OnDemandPricingKey.getInstanceType(), ec2OnDemandPricing.getPricePerHour().toPlainString(), oldHourlyPriceAsString); ec2OnDemandPricingEntity.setRegionName(ec2OnDemandPricingKey.getRegionName()); ec2OnDemandPricingEntity.setInstanceType(ec2OnDemandPricingKey.getInstanceType()); ec2OnDemandPricingEntity.setHourlyPrice(ec2OnDemandPricing.getPricePerHour()); ec2OnDemandPricingDao.saveAndRefresh(ec2OnDemandPricingEntity); ec2OnDemandPricingKey.getInstanceType(), ec2OnDemandPricing.getPricePerHour().toPlainString());
public static<_B >Ec2OnDemandPricing.Builder<_B> copyOf(final Ec2OnDemandPricing _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final Ec2OnDemandPricing.Builder<_B> _newBuilder = new Ec2OnDemandPricing.Builder<_B>(null, null, false); _other.copyTo(_newBuilder, _propertyTree, _propertyTreeUse); return _newBuilder; }
lhsEc2OnDemandPricingKey = this.getEc2OnDemandPricingKey(); Ec2OnDemandPricingKey rhsEc2OnDemandPricingKey; rhsEc2OnDemandPricingKey = that.getEc2OnDemandPricingKey(); if (!strategy.equals(LocatorUtils.property(thisLocator, "ec2OnDemandPricingKey", lhsEc2OnDemandPricingKey), LocatorUtils.property(thatLocator, "ec2OnDemandPricingKey", rhsEc2OnDemandPricingKey), lhsEc2OnDemandPricingKey, rhsEc2OnDemandPricingKey, (this.ec2OnDemandPricingKey!= null), (that.ec2OnDemandPricingKey!= null))) { return false; lhsPricePerHour = this.getPricePerHour(); BigDecimal rhsPricePerHour; rhsPricePerHour = that.getPricePerHour(); if (!strategy.equals(LocatorUtils.property(thisLocator, "pricePerHour", lhsPricePerHour), LocatorUtils.property(thatLocator, "pricePerHour", rhsPricePerHour), lhsPricePerHour, rhsPricePerHour, (this.pricePerHour!= null), (that.pricePerHour!= null))) { return false; lhsSku = this.getSku(); String rhsSku; rhsSku = that.getSku(); if (!strategy.equals(LocatorUtils.property(thisLocator, "sku", lhsSku), LocatorUtils.property(thatLocator, "sku", rhsSku), lhsSku, rhsSku, (this.sku!= null), (that.sku!= null))) { return false;
public Object createNewInstance() { return new Ec2OnDemandPricing(); }
public static<_B >Ec2OnDemandPricing.Builder<_B> copyOf(final Ec2OnDemandPricing _other) { final Ec2OnDemandPricing.Builder<_B> _newBuilder = new Ec2OnDemandPricing.Builder<_B>(null, null, false); _other.copyTo(_newBuilder); return _newBuilder; }
public static Ec2OnDemandPricing.Builder<Void> copyOnly(final Ec2OnDemandPricing _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.INCLUDE); }
@Override public Ec2OnDemandPricing build() { if (_storedValue == null) { return this.init(new Ec2OnDemandPricing()); } else { return ((Ec2OnDemandPricing) _storedValue); } }
preInstalledSoftware.toString().equalsIgnoreCase(JSON_ATTRIBUTE_VALUE_PRE_INSTALLED_SOFTWARE)) result = new Ec2OnDemandPricing(new Ec2OnDemandPricingKey(convertLocationToRegionName(location.toString()), instanceType.toString()), null, sku);