@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getTableId() == null) ? 0 : getTableId().hashCode()); hashCode = prime * hashCode + ((getTableArn() == null) ? 0 : getTableArn().hashCode()); hashCode = prime * hashCode + ((getTableSizeBytes() == null) ? 0 : getTableSizeBytes().hashCode()); hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode()); hashCode = prime * hashCode + ((getTableCreationDateTime() == null) ? 0 : getTableCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode()); hashCode = prime * hashCode + ((getItemCount() == null) ? 0 : getItemCount().hashCode()); hashCode = prime * hashCode + ((getBillingMode() == null) ? 0 : getBillingMode().hashCode()); return hashCode; }
public SourceTableDetails unmarshall(JsonUnmarshallerContext context) throws Exception { SourceTableDetails sourceTableDetails = new SourceTableDetails(); if (context.testExpression("TableName", targetDepth)) { context.nextToken(); sourceTableDetails.setTableName(context.getUnmarshaller(String.class).unmarshall(context)); sourceTableDetails.setTableId(context.getUnmarshaller(String.class).unmarshall(context)); sourceTableDetails.setTableArn(context.getUnmarshaller(String.class).unmarshall(context)); sourceTableDetails.setTableSizeBytes(context.getUnmarshaller(Long.class).unmarshall(context)); sourceTableDetails.setKeySchema(new ListUnmarshaller<KeySchemaElement>(KeySchemaElementJsonUnmarshaller.getInstance()).unmarshall(context)); sourceTableDetails.setTableCreationDateTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); sourceTableDetails.setProvisionedThroughput(ProvisionedThroughputJsonUnmarshaller.getInstance().unmarshall(context)); sourceTableDetails.setItemCount(context.getUnmarshaller(Long.class).unmarshall(context)); sourceTableDetails.setBillingMode(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 BackupDescription == false) return false; BackupDescription other = (BackupDescription) obj; if (other.getBackupDetails() == null ^ this.getBackupDetails() == null) return false; if (other.getBackupDetails() != null && other.getBackupDetails().equals(this.getBackupDetails()) == false) return false; if (other.getSourceTableDetails() == null ^ this.getSourceTableDetails() == null) return false; if (other.getSourceTableDetails() != null && other.getSourceTableDetails().equals(this.getSourceTableDetails()) == false) return false; if (other.getSourceTableFeatureDetails() == null ^ this.getSourceTableFeatureDetails() == null) return false; if (other.getSourceTableFeatureDetails() != null && other.getSourceTableFeatureDetails().equals(this.getSourceTableFeatureDetails()) == false) return false; return true; }
/** * <p> * Schema of the table. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param keySchema <p> * Schema of the table. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withKeySchema(KeySchemaElement... keySchema) { if (getKeySchema() == null) { this.keySchema = new java.util.ArrayList<KeySchemaElement>(keySchema.length); } for (KeySchemaElement value : keySchema) { this.keySchema.add(value); } return this; }
SourceTableDetails sourceTableDetails = new SourceTableDetails(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("TableName")) { sourceTableDetails.setTableName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("TableId")) { sourceTableDetails.setTableId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("TableArn")) { sourceTableDetails.setTableArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("TableSizeBytes")) { sourceTableDetails.setTableSizeBytes(LongJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("KeySchema")) { sourceTableDetails.setKeySchema(new ListUnmarshaller<KeySchemaElement>( KeySchemaElementJsonUnmarshaller.getInstance() sourceTableDetails.setTableCreationDateTime(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ProvisionedThroughput")) { sourceTableDetails.setProvisionedThroughput(ProvisionedThroughputJsonUnmarshaller .getInstance() .unmarshall(context)); } else if (name.equals("ItemCount")) { sourceTableDetails.setItemCount(LongJsonUnmarshaller.getInstance() .unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BackupDescription == false) return false; BackupDescription other = (BackupDescription) obj; if (other.getBackupDetails() == null ^ this.getBackupDetails() == null) return false; if (other.getBackupDetails() != null && other.getBackupDetails().equals(this.getBackupDetails()) == false) return false; if (other.getSourceTableDetails() == null ^ this.getSourceTableDetails() == null) return false; if (other.getSourceTableDetails() != null && other.getSourceTableDetails().equals(this.getSourceTableDetails()) == false) return false; if (other.getSourceTableFeatureDetails() == null ^ this.getSourceTableFeatureDetails() == null) return false; if (other.getSourceTableFeatureDetails() != null && other.getSourceTableFeatureDetails().equals(this.getSourceTableFeatureDetails()) == false) return false; return true; } }
return false; SourceTableDetails other = (SourceTableDetails) obj; if (other.getTableName() == null ^ this.getTableName() == null) return false; if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false) return false; if (other.getTableId() == null ^ this.getTableId() == null) return false; if (other.getTableId() != null && other.getTableId().equals(this.getTableId()) == false) return false; if (other.getTableArn() == null ^ this.getTableArn() == null) return false; if (other.getTableArn() != null && other.getTableArn().equals(this.getTableArn()) == false) return false; if (other.getTableSizeBytes() == null ^ this.getTableSizeBytes() == null) return false; if (other.getTableSizeBytes() != null && other.getTableSizeBytes().equals(this.getTableSizeBytes()) == false) return false; if (other.getKeySchema() == null ^ this.getKeySchema() == null) return false; if (other.getKeySchema() != null && other.getKeySchema().equals(this.getKeySchema()) == false) return false; if (other.getTableCreationDateTime() == null ^ this.getTableCreationDateTime() == null) return false; if (other.getTableCreationDateTime() != null && other.getTableCreationDateTime().equals(this.getTableCreationDateTime()) == false) return false; if (other.getProvisionedThroughput() == null ^ this.getProvisionedThroughput() == null) return false; if (other.getProvisionedThroughput() != null && other.getProvisionedThroughput().equals(this.getProvisionedThroughput()) == false)
public SourceTableDetails unmarshall(JsonUnmarshallerContext context) throws Exception { SourceTableDetails sourceTableDetails = new SourceTableDetails(); if (context.testExpression("TableName", targetDepth)) { context.nextToken(); sourceTableDetails.setTableName(context.getUnmarshaller(String.class).unmarshall(context)); sourceTableDetails.setTableId(context.getUnmarshaller(String.class).unmarshall(context)); sourceTableDetails.setTableArn(context.getUnmarshaller(String.class).unmarshall(context)); sourceTableDetails.setTableSizeBytes(context.getUnmarshaller(Long.class).unmarshall(context)); sourceTableDetails.setKeySchema(new ListUnmarshaller<KeySchemaElement>(KeySchemaElementJsonUnmarshaller.getInstance()).unmarshall(context)); sourceTableDetails.setTableCreationDateTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); sourceTableDetails.setProvisionedThroughput(ProvisionedThroughputJsonUnmarshaller.getInstance().unmarshall(context)); sourceTableDetails.setItemCount(context.getUnmarshaller(Long.class).unmarshall(context)); sourceTableDetails.setBillingMode(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 BackupDescription == false) return false; BackupDescription other = (BackupDescription) obj; if (other.getBackupDetails() == null ^ this.getBackupDetails() == null) return false; if (other.getBackupDetails() != null && other.getBackupDetails().equals(this.getBackupDetails()) == false) return false; if (other.getSourceTableDetails() == null ^ this.getSourceTableDetails() == null) return false; if (other.getSourceTableDetails() != null && other.getSourceTableDetails().equals(this.getSourceTableDetails()) == false) return false; if (other.getSourceTableFeatureDetails() == null ^ this.getSourceTableFeatureDetails() == null) return false; if (other.getSourceTableFeatureDetails() != null && other.getSourceTableFeatureDetails().equals(this.getSourceTableFeatureDetails()) == false) return false; return true; }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTableName() != null) sb.append("TableName: ").append(getTableName()).append(","); if (getTableId() != null) sb.append("TableId: ").append(getTableId()).append(","); if (getTableArn() != null) sb.append("TableArn: ").append(getTableArn()).append(","); if (getTableSizeBytes() != null) sb.append("TableSizeBytes: ").append(getTableSizeBytes()).append(","); if (getKeySchema() != null) sb.append("KeySchema: ").append(getKeySchema()).append(","); if (getTableCreationDateTime() != null) sb.append("TableCreationDateTime: ").append(getTableCreationDateTime()).append(","); if (getProvisionedThroughput() != null) sb.append("ProvisionedThroughput: ").append(getProvisionedThroughput()).append(","); if (getItemCount() != null) sb.append("ItemCount: ").append(getItemCount()).append(","); if (getBillingMode() != null) sb.append("BillingMode: ").append(getBillingMode()); sb.append("}"); return sb.toString();
/** * Marshall the given parameter object. */ public void marshall(SourceTableDetails sourceTableDetails, ProtocolMarshaller protocolMarshaller) { if (sourceTableDetails == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(sourceTableDetails.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(sourceTableDetails.getTableId(), TABLEID_BINDING); protocolMarshaller.marshall(sourceTableDetails.getTableArn(), TABLEARN_BINDING); protocolMarshaller.marshall(sourceTableDetails.getTableSizeBytes(), TABLESIZEBYTES_BINDING); protocolMarshaller.marshall(sourceTableDetails.getKeySchema(), KEYSCHEMA_BINDING); protocolMarshaller.marshall(sourceTableDetails.getTableCreationDateTime(), TABLECREATIONDATETIME_BINDING); protocolMarshaller.marshall(sourceTableDetails.getProvisionedThroughput(), PROVISIONEDTHROUGHPUT_BINDING); protocolMarshaller.marshall(sourceTableDetails.getItemCount(), ITEMCOUNT_BINDING); protocolMarshaller.marshall(sourceTableDetails.getBillingMode(), BILLINGMODE_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 + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getTableId() == null) ? 0 : getTableId().hashCode()); hashCode = prime * hashCode + ((getTableArn() == null) ? 0 : getTableArn().hashCode()); hashCode = prime * hashCode + ((getTableSizeBytes() == null) ? 0 : getTableSizeBytes().hashCode()); hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode()); hashCode = prime * hashCode + ((getTableCreationDateTime() == null) ? 0 : getTableCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode()); hashCode = prime * hashCode + ((getItemCount() == null) ? 0 : getItemCount().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTableName() != null) sb.append("TableName: " + getTableName() + ","); if (getTableId() != null) sb.append("TableId: " + getTableId() + ","); if (getTableArn() != null) sb.append("TableArn: " + getTableArn() + ","); if (getTableSizeBytes() != null) sb.append("TableSizeBytes: " + getTableSizeBytes() + ","); if (getKeySchema() != null) sb.append("KeySchema: " + getKeySchema() + ","); if (getTableCreationDateTime() != null) sb.append("TableCreationDateTime: " + getTableCreationDateTime() + ","); if (getProvisionedThroughput() != null) sb.append("ProvisionedThroughput: " + getProvisionedThroughput() + ","); if (getItemCount() != null) sb.append("ItemCount: " + getItemCount()); sb.append("}"); return sb.toString(); }
if (other.getTableName() == null ^ this.getTableName() == null) return false; if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false) return false; if (other.getTableId() == null ^ this.getTableId() == null) return false; if (other.getTableId() != null && other.getTableId().equals(this.getTableId()) == false) return false; if (other.getTableArn() == null ^ this.getTableArn() == null) return false; if (other.getTableArn() != null && other.getTableArn().equals(this.getTableArn()) == false) return false; if (other.getTableSizeBytes() == null ^ this.getTableSizeBytes() == null) return false; if (other.getTableSizeBytes() != null && other.getTableSizeBytes().equals(this.getTableSizeBytes()) == false) return false; if (other.getKeySchema() == null ^ this.getKeySchema() == null) return false; if (other.getKeySchema() != null && other.getKeySchema().equals(this.getKeySchema()) == false) return false; if (other.getTableCreationDateTime() == null ^ this.getTableCreationDateTime() == null) return false; if (other.getTableCreationDateTime() != null && other.getTableCreationDateTime().equals(this.getTableCreationDateTime()) == false) return false; if (other.getProvisionedThroughput() == null ^ this.getProvisionedThroughput() == null)
public void marshall(SourceTableDetails sourceTableDetails, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (sourceTableDetails.getTableName() != null) { String tableName = sourceTableDetails.getTableName(); jsonWriter.name("TableName"); jsonWriter.value(tableName); if (sourceTableDetails.getTableId() != null) { String tableId = sourceTableDetails.getTableId(); jsonWriter.name("TableId"); jsonWriter.value(tableId); if (sourceTableDetails.getTableArn() != null) { String tableArn = sourceTableDetails.getTableArn(); jsonWriter.name("TableArn"); jsonWriter.value(tableArn); if (sourceTableDetails.getTableSizeBytes() != null) { Long tableSizeBytes = sourceTableDetails.getTableSizeBytes(); jsonWriter.name("TableSizeBytes"); jsonWriter.value(tableSizeBytes); if (sourceTableDetails.getKeySchema() != null) { java.util.List<KeySchemaElement> keySchema = sourceTableDetails.getKeySchema(); jsonWriter.name("KeySchema"); jsonWriter.beginArray(); if (sourceTableDetails.getTableCreationDateTime() != null) { java.util.Date tableCreationDateTime = sourceTableDetails.getTableCreationDateTime();
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getTableId() == null) ? 0 : getTableId().hashCode()); hashCode = prime * hashCode + ((getTableArn() == null) ? 0 : getTableArn().hashCode()); hashCode = prime * hashCode + ((getTableSizeBytes() == null) ? 0 : getTableSizeBytes().hashCode()); hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode()); hashCode = prime * hashCode + ((getTableCreationDateTime() == null) ? 0 : getTableCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode()); hashCode = prime * hashCode + ((getItemCount() == null) ? 0 : getItemCount().hashCode()); hashCode = prime * hashCode + ((getBillingMode() == null) ? 0 : getBillingMode().hashCode()); return hashCode; }
return false; SourceTableDetails other = (SourceTableDetails) obj; if (other.getTableName() == null ^ this.getTableName() == null) return false; if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false) return false; if (other.getTableId() == null ^ this.getTableId() == null) return false; if (other.getTableId() != null && other.getTableId().equals(this.getTableId()) == false) return false; if (other.getTableArn() == null ^ this.getTableArn() == null) return false; if (other.getTableArn() != null && other.getTableArn().equals(this.getTableArn()) == false) return false; if (other.getTableSizeBytes() == null ^ this.getTableSizeBytes() == null) return false; if (other.getTableSizeBytes() != null && other.getTableSizeBytes().equals(this.getTableSizeBytes()) == false) return false; if (other.getKeySchema() == null ^ this.getKeySchema() == null) return false; if (other.getKeySchema() != null && other.getKeySchema().equals(this.getKeySchema()) == false) return false; if (other.getTableCreationDateTime() == null ^ this.getTableCreationDateTime() == null) return false; if (other.getTableCreationDateTime() != null && other.getTableCreationDateTime().equals(this.getTableCreationDateTime()) == false) return false; if (other.getProvisionedThroughput() == null ^ this.getProvisionedThroughput() == null) return false; if (other.getProvisionedThroughput() != null && other.getProvisionedThroughput().equals(this.getProvisionedThroughput()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTableName() != null) sb.append("TableName: ").append(getTableName()).append(","); if (getTableId() != null) sb.append("TableId: ").append(getTableId()).append(","); if (getTableArn() != null) sb.append("TableArn: ").append(getTableArn()).append(","); if (getTableSizeBytes() != null) sb.append("TableSizeBytes: ").append(getTableSizeBytes()).append(","); if (getKeySchema() != null) sb.append("KeySchema: ").append(getKeySchema()).append(","); if (getTableCreationDateTime() != null) sb.append("TableCreationDateTime: ").append(getTableCreationDateTime()).append(","); if (getProvisionedThroughput() != null) sb.append("ProvisionedThroughput: ").append(getProvisionedThroughput()).append(","); if (getItemCount() != null) sb.append("ItemCount: ").append(getItemCount()).append(","); if (getBillingMode() != null) sb.append("BillingMode: ").append(getBillingMode()); sb.append("}"); return sb.toString();
/** * Marshall the given parameter object. */ public void marshall(SourceTableDetails sourceTableDetails, ProtocolMarshaller protocolMarshaller) { if (sourceTableDetails == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(sourceTableDetails.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(sourceTableDetails.getTableId(), TABLEID_BINDING); protocolMarshaller.marshall(sourceTableDetails.getTableArn(), TABLEARN_BINDING); protocolMarshaller.marshall(sourceTableDetails.getTableSizeBytes(), TABLESIZEBYTES_BINDING); protocolMarshaller.marshall(sourceTableDetails.getKeySchema(), KEYSCHEMA_BINDING); protocolMarshaller.marshall(sourceTableDetails.getTableCreationDateTime(), TABLECREATIONDATETIME_BINDING); protocolMarshaller.marshall(sourceTableDetails.getProvisionedThroughput(), PROVISIONEDTHROUGHPUT_BINDING); protocolMarshaller.marshall(sourceTableDetails.getItemCount(), ITEMCOUNT_BINDING); protocolMarshaller.marshall(sourceTableDetails.getBillingMode(), BILLINGMODE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }