@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; }
public InstanceGroup unmarshall(JsonUnmarshallerContext context) throws Exception { InstanceGroup instanceGroup = new InstanceGroup(); if (context.testExpression("Id", targetDepth)) { context.nextToken(); instanceGroup.setId(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setName(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setMarket(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setInstanceGroupType(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setBidPrice(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setInstanceType(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setRequestedInstanceCount(context.getUnmarshaller(Integer.class).unmarshall(context)); instanceGroup.setRunningInstanceCount(context.getUnmarshaller(Integer.class).unmarshall(context)); instanceGroup.setStatus(InstanceGroupStatusJsonUnmarshaller.getInstance().unmarshall(context)); instanceGroup.setConfigurations(new ListUnmarshaller<Configuration>(ConfigurationJsonUnmarshaller.getInstance()).unmarshall(context)); instanceGroup.setEbsBlockDevices(new ListUnmarshaller<EbsBlockDevice>(EbsBlockDeviceJsonUnmarshaller.getInstance()).unmarshall(context)); instanceGroup.setEbsOptimized(context.getUnmarshaller(Boolean.class).unmarshall(context)); instanceGroup.setShrinkPolicy(ShrinkPolicyJsonUnmarshaller.getInstance().unmarshall(context));
public InstanceGroup unmarshall(JsonUnmarshallerContext context) throws Exception { InstanceGroup instanceGroup = new InstanceGroup(); if (context.testExpression("Id", targetDepth)) { context.nextToken(); instanceGroup.setId(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setName(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setMarket(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setInstanceGroupType(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setBidPrice(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setInstanceType(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroup.setRequestedInstanceCount(context.getUnmarshaller(Integer.class).unmarshall(context)); instanceGroup.setRunningInstanceCount(context.getUnmarshaller(Integer.class).unmarshall(context)); instanceGroup.setStatus(InstanceGroupStatusJsonUnmarshaller.getInstance().unmarshall(context)); instanceGroup.setConfigurations(new ListUnmarshaller<Configuration>(ConfigurationJsonUnmarshaller.getInstance()).unmarshall(context)); instanceGroup.setEbsBlockDevices(new ListUnmarshaller<EbsBlockDevice>(EbsBlockDeviceJsonUnmarshaller.getInstance()).unmarshall(context)); instanceGroup.setEbsOptimized(context.getUnmarshaller(Boolean.class).unmarshall(context)); instanceGroup.setShrinkPolicy(ShrinkPolicyJsonUnmarshaller.getInstance().unmarshall(context));
return false; InstanceGroup other = (InstanceGroup) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getMarket() == null ^ this.getMarket() == null) return false; if (other.getMarket() != null && other.getMarket().equals(this.getMarket()) == false) return false; if (other.getInstanceGroupType() == null ^ this.getInstanceGroupType() == null) return false; if (other.getInstanceGroupType() != null && other.getInstanceGroupType().equals(this.getInstanceGroupType()) == false) return false; if (other.getBidPrice() == null ^ this.getBidPrice() == null) return false; if (other.getBidPrice() != null && other.getBidPrice().equals(this.getBidPrice()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; 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)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getMarket() != null) sb.append("Market: ").append(getMarket()).append(","); if (getInstanceGroupType() != null) sb.append("InstanceGroupType: ").append(getInstanceGroupType()).append(","); if (getBidPrice() != null) sb.append("BidPrice: ").append(getBidPrice()).append(","); 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(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getConfigurations() != null) sb.append("Configurations: ").append(getConfigurations()).append(","); if (getEbsBlockDevices() != null) sb.append("EbsBlockDevices: ").append(getEbsBlockDevices()).append(","); if (getEbsOptimized() != null) sb.append("EbsOptimized: ").append(getEbsOptimized()).append(","); if (getShrinkPolicy() != null) sb.append("ShrinkPolicy: ").append(getShrinkPolicy()).append(","); if (getAutoScalingPolicy() != 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); } }
@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; }
return false; InstanceGroup other = (InstanceGroup) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getMarket() == null ^ this.getMarket() == null) return false; if (other.getMarket() != null && other.getMarket().equals(this.getMarket()) == false) return false; if (other.getInstanceGroupType() == null ^ this.getInstanceGroupType() == null) return false; if (other.getInstanceGroupType() != null && other.getInstanceGroupType().equals(this.getInstanceGroupType()) == false) return false; if (other.getBidPrice() == null ^ this.getBidPrice() == null) return false; if (other.getBidPrice() != null && other.getBidPrice().equals(this.getBidPrice()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; 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)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getMarket() != null) sb.append("Market: ").append(getMarket()).append(","); if (getInstanceGroupType() != null) sb.append("InstanceGroupType: ").append(getInstanceGroupType()).append(","); if (getBidPrice() != null) sb.append("BidPrice: ").append(getBidPrice()).append(","); 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(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getConfigurations() != null) sb.append("Configurations: ").append(getConfigurations()).append(","); if (getEbsBlockDevices() != null) sb.append("EbsBlockDevices: ").append(getEbsBlockDevices()).append(","); if (getEbsOptimized() != null) sb.append("EbsOptimized: ").append(getEbsOptimized()).append(","); if (getShrinkPolicy() != null) sb.append("ShrinkPolicy: ").append(getShrinkPolicy()).append(","); if (getAutoScalingPolicy() != 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); } }