if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getRequestedInstanceCount() != null) sb.append("RequestedInstanceCount: ").append(getRequestedInstanceCount()).append(","); if (getRunningInstanceCount() != null) sb.append("RunningInstanceCount: ").append(getRunningInstanceCount()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getMarket() == null) ? 0 : getMarket().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupType() == null) ? 0 : getInstanceGroupType().hashCode()); hashCode = prime * hashCode + ((getBidPrice() == null) ? 0 : getBidPrice().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getRequestedInstanceCount() == null) ? 0 : getRequestedInstanceCount().hashCode()); hashCode = prime * hashCode + ((getRunningInstanceCount() == null) ? 0 : getRunningInstanceCount().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getEbsBlockDevices() == null) ? 0 : getEbsBlockDevices().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode()); hashCode = prime * hashCode + ((getShrinkPolicy() == null) ? 0 : getShrinkPolicy().hashCode()); hashCode = prime * hashCode + ((getAutoScalingPolicy() == null) ? 0 : getAutoScalingPolicy().hashCode()); return hashCode; }
if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getRequestedInstanceCount() == null ^ this.getRequestedInstanceCount() == null) return false; if (other.getRequestedInstanceCount() != null && other.getRequestedInstanceCount().equals(this.getRequestedInstanceCount()) == false) return false; if (other.getRunningInstanceCount() == null ^ this.getRunningInstanceCount() == null)
/** * Marshall the given parameter object. */ public void marshall(InstanceGroup instanceGroup, ProtocolMarshaller protocolMarshaller) { if (instanceGroup == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(instanceGroup.getId(), ID_BINDING); protocolMarshaller.marshall(instanceGroup.getName(), NAME_BINDING); protocolMarshaller.marshall(instanceGroup.getMarket(), MARKET_BINDING); protocolMarshaller.marshall(instanceGroup.getInstanceGroupType(), INSTANCEGROUPTYPE_BINDING); protocolMarshaller.marshall(instanceGroup.getBidPrice(), BIDPRICE_BINDING); protocolMarshaller.marshall(instanceGroup.getInstanceType(), INSTANCETYPE_BINDING); protocolMarshaller.marshall(instanceGroup.getRequestedInstanceCount(), REQUESTEDINSTANCECOUNT_BINDING); protocolMarshaller.marshall(instanceGroup.getRunningInstanceCount(), RUNNINGINSTANCECOUNT_BINDING); protocolMarshaller.marshall(instanceGroup.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(instanceGroup.getConfigurations(), CONFIGURATIONS_BINDING); protocolMarshaller.marshall(instanceGroup.getEbsBlockDevices(), EBSBLOCKDEVICES_BINDING); protocolMarshaller.marshall(instanceGroup.getEbsOptimized(), EBSOPTIMIZED_BINDING); protocolMarshaller.marshall(instanceGroup.getShrinkPolicy(), SHRINKPOLICY_BINDING); protocolMarshaller.marshall(instanceGroup.getAutoScalingPolicy(), AUTOSCALINGPOLICY_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getRequestedInstanceCount() != null) sb.append("RequestedInstanceCount: ").append(getRequestedInstanceCount()).append(","); if (getRunningInstanceCount() != null) sb.append("RunningInstanceCount: ").append(getRunningInstanceCount()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getMarket() == null) ? 0 : getMarket().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupType() == null) ? 0 : getInstanceGroupType().hashCode()); hashCode = prime * hashCode + ((getBidPrice() == null) ? 0 : getBidPrice().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getRequestedInstanceCount() == null) ? 0 : getRequestedInstanceCount().hashCode()); hashCode = prime * hashCode + ((getRunningInstanceCount() == null) ? 0 : getRunningInstanceCount().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getEbsBlockDevices() == null) ? 0 : getEbsBlockDevices().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode()); hashCode = prime * hashCode + ((getShrinkPolicy() == null) ? 0 : getShrinkPolicy().hashCode()); hashCode = prime * hashCode + ((getAutoScalingPolicy() == null) ? 0 : getAutoScalingPolicy().hashCode()); return hashCode; }
if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getRequestedInstanceCount() == null ^ this.getRequestedInstanceCount() == null) return false; if (other.getRequestedInstanceCount() != null && other.getRequestedInstanceCount().equals(this.getRequestedInstanceCount()) == false) return false; if (other.getRunningInstanceCount() == null ^ this.getRunningInstanceCount() == null)
/** * Marshall the given parameter object. */ public void marshall(InstanceGroup instanceGroup, ProtocolMarshaller protocolMarshaller) { if (instanceGroup == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(instanceGroup.getId(), ID_BINDING); protocolMarshaller.marshall(instanceGroup.getName(), NAME_BINDING); protocolMarshaller.marshall(instanceGroup.getMarket(), MARKET_BINDING); protocolMarshaller.marshall(instanceGroup.getInstanceGroupType(), INSTANCEGROUPTYPE_BINDING); protocolMarshaller.marshall(instanceGroup.getBidPrice(), BIDPRICE_BINDING); protocolMarshaller.marshall(instanceGroup.getInstanceType(), INSTANCETYPE_BINDING); protocolMarshaller.marshall(instanceGroup.getRequestedInstanceCount(), REQUESTEDINSTANCECOUNT_BINDING); protocolMarshaller.marshall(instanceGroup.getRunningInstanceCount(), RUNNINGINSTANCECOUNT_BINDING); protocolMarshaller.marshall(instanceGroup.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(instanceGroup.getConfigurations(), CONFIGURATIONS_BINDING); protocolMarshaller.marshall(instanceGroup.getEbsBlockDevices(), EBSBLOCKDEVICES_BINDING); protocolMarshaller.marshall(instanceGroup.getEbsOptimized(), EBSOPTIMIZED_BINDING); protocolMarshaller.marshall(instanceGroup.getShrinkPolicy(), SHRINKPOLICY_BINDING); protocolMarshaller.marshall(instanceGroup.getAutoScalingPolicy(), AUTOSCALINGPOLICY_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }