@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAssociatePublicIpAddress() == null) ? 0 : getAssociatePublicIpAddress().hashCode()); hashCode = prime * hashCode + ((getDisableAutomatedBackup() == null) ? 0 : getDisableAutomatedBackup().hashCode()); hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); hashCode = prime * hashCode + ((getEngineModel() == null) ? 0 : getEngineModel().hashCode()); hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); hashCode = prime * hashCode + ((getEngineAttributes() == null) ? 0 : getEngineAttributes().hashCode()); hashCode = prime * hashCode + ((getBackupRetentionCount() == null) ? 0 : getBackupRetentionCount().hashCode()); hashCode = prime * hashCode + ((getServerName() == null) ? 0 : getServerName().hashCode()); hashCode = prime * hashCode + ((getInstanceProfileArn() == null) ? 0 : getInstanceProfileArn().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getKeyPair() == null) ? 0 : getKeyPair().hashCode()); hashCode = prime * hashCode + ((getPreferredMaintenanceWindow() == null) ? 0 : getPreferredMaintenanceWindow().hashCode()); hashCode = prime * hashCode + ((getPreferredBackupWindow() == null) ? 0 : getPreferredBackupWindow().hashCode()); hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getServiceRoleArn() == null) ? 0 : getServiceRoleArn().hashCode()); hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode()); hashCode = prime * hashCode + ((getBackupId() == null) ? 0 : getBackupId().hashCode()); return hashCode; }
return false; CreateServerRequest other = (CreateServerRequest) obj; if (other.getAssociatePublicIpAddress() == null ^ this.getAssociatePublicIpAddress() == null) return false; if (other.getAssociatePublicIpAddress() != null && other.getAssociatePublicIpAddress().equals(this.getAssociatePublicIpAddress()) == false) return false; if (other.getDisableAutomatedBackup() == null ^ this.getDisableAutomatedBackup() == null) return false; if (other.getDisableAutomatedBackup() != null && other.getDisableAutomatedBackup().equals(this.getDisableAutomatedBackup()) == false) return false; if (other.getEngine() == null ^ this.getEngine() == null) return false; if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == false) return false; if (other.getEngineModel() == null ^ this.getEngineModel() == null) return false; if (other.getEngineModel() != null && other.getEngineModel().equals(this.getEngineModel()) == false) return false; if (other.getEngineVersion() == null ^ this.getEngineVersion() == null) return false; if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false) return false; if (other.getEngineAttributes() == null ^ this.getEngineAttributes() == null) return false; if (other.getEngineAttributes() != null && other.getEngineAttributes().equals(this.getEngineAttributes()) == false) return false; if (other.getBackupRetentionCount() == null ^ this.getBackupRetentionCount() == null) return false; if (other.getBackupRetentionCount() != null && other.getBackupRetentionCount().equals(this.getBackupRetentionCount()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAssociatePublicIpAddress() != null) sb.append("AssociatePublicIpAddress: ").append(getAssociatePublicIpAddress()).append(","); if (getDisableAutomatedBackup() != null) sb.append("DisableAutomatedBackup: ").append(getDisableAutomatedBackup()).append(","); if (getEngine() != null) sb.append("Engine: ").append(getEngine()).append(","); if (getEngineModel() != null) sb.append("EngineModel: ").append(getEngineModel()).append(","); if (getEngineVersion() != null) sb.append("EngineVersion: ").append(getEngineVersion()).append(","); if (getEngineAttributes() != null) sb.append("EngineAttributes: ").append(getEngineAttributes()).append(","); if (getBackupRetentionCount() != null) sb.append("BackupRetentionCount: ").append(getBackupRetentionCount()).append(","); if (getServerName() != null) sb.append("ServerName: ").append(getServerName()).append(","); if (getInstanceProfileArn() != null) sb.append("InstanceProfileArn: ").append(getInstanceProfileArn()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getKeyPair() != null) sb.append("KeyPair: ").append(getKeyPair()).append(","); if (getPreferredMaintenanceWindow() != null) sb.append("PreferredMaintenanceWindow: ").append(getPreferredMaintenanceWindow()).append(","); if (getPreferredBackupWindow() != null) sb.append("PreferredBackupWindow: ").append(getPreferredBackupWindow()).append(","); if (getSecurityGroupIds() != null)
/** * Marshall the given parameter object. */ public void marshall(CreateServerRequest createServerRequest, ProtocolMarshaller protocolMarshaller) { if (createServerRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createServerRequest.getAssociatePublicIpAddress(), ASSOCIATEPUBLICIPADDRESS_BINDING); protocolMarshaller.marshall(createServerRequest.getDisableAutomatedBackup(), DISABLEAUTOMATEDBACKUP_BINDING); protocolMarshaller.marshall(createServerRequest.getEngine(), ENGINE_BINDING); protocolMarshaller.marshall(createServerRequest.getEngineModel(), ENGINEMODEL_BINDING); protocolMarshaller.marshall(createServerRequest.getEngineVersion(), ENGINEVERSION_BINDING); protocolMarshaller.marshall(createServerRequest.getEngineAttributes(), ENGINEATTRIBUTES_BINDING); protocolMarshaller.marshall(createServerRequest.getBackupRetentionCount(), BACKUPRETENTIONCOUNT_BINDING); protocolMarshaller.marshall(createServerRequest.getServerName(), SERVERNAME_BINDING); protocolMarshaller.marshall(createServerRequest.getInstanceProfileArn(), INSTANCEPROFILEARN_BINDING); protocolMarshaller.marshall(createServerRequest.getInstanceType(), INSTANCETYPE_BINDING); protocolMarshaller.marshall(createServerRequest.getKeyPair(), KEYPAIR_BINDING); protocolMarshaller.marshall(createServerRequest.getPreferredMaintenanceWindow(), PREFERREDMAINTENANCEWINDOW_BINDING); protocolMarshaller.marshall(createServerRequest.getPreferredBackupWindow(), PREFERREDBACKUPWINDOW_BINDING); protocolMarshaller.marshall(createServerRequest.getSecurityGroupIds(), SECURITYGROUPIDS_BINDING); protocolMarshaller.marshall(createServerRequest.getServiceRoleArn(), SERVICEROLEARN_BINDING); protocolMarshaller.marshall(createServerRequest.getSubnetIds(), SUBNETIDS_BINDING); protocolMarshaller.marshall(createServerRequest.getBackupId(), BACKUPID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }