@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBackupArn() == null) ? 0 : getBackupArn().hashCode()); hashCode = prime * hashCode + ((getBackupId() == null) ? 0 : getBackupId().hashCode()); hashCode = prime * hashCode + ((getBackupType() == null) ? 0 : getBackupType().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().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 + ((getInstanceProfileArn() == null) ? 0 : getInstanceProfileArn().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getKeyPair() == null) ? 0 : getKeyPair().hashCode()); hashCode = prime * hashCode + ((getPreferredBackupWindow() == null) ? 0 : getPreferredBackupWindow().hashCode()); hashCode = prime * hashCode + ((getPreferredMaintenanceWindow() == null) ? 0 : getPreferredMaintenanceWindow().hashCode()); hashCode = prime * hashCode + ((getS3DataSize() == null) ? 0 : getS3DataSize().hashCode()); hashCode = prime * hashCode + ((getS3DataUrl() == null) ? 0 : getS3DataUrl().hashCode()); hashCode = prime * hashCode + ((getS3LogUrl() == null) ? 0 : getS3LogUrl().hashCode()); hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getServerName() == null) ? 0 : getServerName().hashCode()); hashCode = prime * hashCode + ((getServiceRoleArn() == null) ? 0 : getServiceRoleArn().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusDescription() == null) ? 0 : getStatusDescription().hashCode()); hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode()); hashCode = prime * hashCode + ((getToolsVersion() == null) ? 0 : getToolsVersion().hashCode()); hashCode = prime * hashCode + ((getUserArn() == null) ? 0 : getUserArn().hashCode()); return hashCode; }
public Backup unmarshall(JsonUnmarshallerContext context) throws Exception { Backup backup = new Backup(); if (context.testExpression("BackupArn", targetDepth)) { context.nextToken(); backup.setBackupArn(context.getUnmarshaller(String.class).unmarshall(context)); backup.setBackupId(context.getUnmarshaller(String.class).unmarshall(context)); backup.setBackupType(context.getUnmarshaller(String.class).unmarshall(context)); backup.setCreatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); backup.setDescription(context.getUnmarshaller(String.class).unmarshall(context)); backup.setEngine(context.getUnmarshaller(String.class).unmarshall(context)); backup.setEngineModel(context.getUnmarshaller(String.class).unmarshall(context)); backup.setEngineVersion(context.getUnmarshaller(String.class).unmarshall(context)); backup.setInstanceProfileArn(context.getUnmarshaller(String.class).unmarshall(context)); backup.setInstanceType(context.getUnmarshaller(String.class).unmarshall(context)); backup.setKeyPair(context.getUnmarshaller(String.class).unmarshall(context)); backup.setPreferredBackupWindow(context.getUnmarshaller(String.class).unmarshall(context)); backup.setPreferredMaintenanceWindow(context.getUnmarshaller(String.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateBackupResult == false) return false; CreateBackupResult other = (CreateBackupResult) obj; if (other.getBackup() == null ^ this.getBackup() == null) return false; if (other.getBackup() != null && other.getBackup().equals(this.getBackup()) == false) return false; return true; }
return false; Backup other = (Backup) obj; if (other.getBackupArn() == null ^ this.getBackupArn() == null) return false; if (other.getBackupArn() != null && other.getBackupArn().equals(this.getBackupArn()) == false) return false; if (other.getBackupId() == null ^ this.getBackupId() == null) return false; if (other.getBackupId() != null && other.getBackupId().equals(this.getBackupId()) == false) return false; if (other.getBackupType() == null ^ this.getBackupType() == null) return false; if (other.getBackupType() != null && other.getBackupType().equals(this.getBackupType()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBackupArn() != null) sb.append("BackupArn: ").append(getBackupArn()).append(","); if (getBackupId() != null) sb.append("BackupId: ").append(getBackupId()).append(","); if (getBackupType() != null) sb.append("BackupType: ").append(getBackupType()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).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 (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 (getPreferredBackupWindow() != null) sb.append("PreferredBackupWindow: ").append(getPreferredBackupWindow()).append(","); if (getPreferredMaintenanceWindow() != null) sb.append("PreferredMaintenanceWindow: ").append(getPreferredMaintenanceWindow()).append(","); if (getS3DataSize() != null)
protocolMarshaller.marshall(backup.getBackupArn(), BACKUPARN_BINDING); protocolMarshaller.marshall(backup.getBackupId(), BACKUPID_BINDING); protocolMarshaller.marshall(backup.getBackupType(), BACKUPTYPE_BINDING); protocolMarshaller.marshall(backup.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(backup.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(backup.getEngine(), ENGINE_BINDING); protocolMarshaller.marshall(backup.getEngineModel(), ENGINEMODEL_BINDING); protocolMarshaller.marshall(backup.getEngineVersion(), ENGINEVERSION_BINDING); protocolMarshaller.marshall(backup.getInstanceProfileArn(), INSTANCEPROFILEARN_BINDING); protocolMarshaller.marshall(backup.getInstanceType(), INSTANCETYPE_BINDING); protocolMarshaller.marshall(backup.getKeyPair(), KEYPAIR_BINDING); protocolMarshaller.marshall(backup.getPreferredBackupWindow(), PREFERREDBACKUPWINDOW_BINDING); protocolMarshaller.marshall(backup.getPreferredMaintenanceWindow(), PREFERREDMAINTENANCEWINDOW_BINDING); protocolMarshaller.marshall(backup.getS3DataSize(), S3DATASIZE_BINDING); protocolMarshaller.marshall(backup.getS3DataUrl(), S3DATAURL_BINDING); protocolMarshaller.marshall(backup.getS3LogUrl(), S3LOGURL_BINDING); protocolMarshaller.marshall(backup.getSecurityGroupIds(), SECURITYGROUPIDS_BINDING); protocolMarshaller.marshall(backup.getServerName(), SERVERNAME_BINDING); protocolMarshaller.marshall(backup.getServiceRoleArn(), SERVICEROLEARN_BINDING); protocolMarshaller.marshall(backup.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(backup.getStatusDescription(), STATUSDESCRIPTION_BINDING); protocolMarshaller.marshall(backup.getSubnetIds(), SUBNETIDS_BINDING); protocolMarshaller.marshall(backup.getToolsVersion(), TOOLSVERSION_BINDING); protocolMarshaller.marshall(backup.getUserArn(), USERARN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);