StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAttributeDefinitions() != null) sb.append("AttributeDefinitions: ").append(getAttributeDefinitions()).append(","); if (getTableName() != null) sb.append("TableName: ").append(getTableName()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttributeDefinitions() == null) ? 0 : getAttributeDefinitions().hashCode()); hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode()); hashCode = prime * hashCode + ((getLocalSecondaryIndexes() == null) ? 0 : getLocalSecondaryIndexes().hashCode()); hashCode = prime * hashCode + ((getGlobalSecondaryIndexes() == null) ? 0 : getGlobalSecondaryIndexes().hashCode()); hashCode = prime * hashCode + ((getBillingMode() == null) ? 0 : getBillingMode().hashCode()); hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode()); hashCode = prime * hashCode + ((getStreamSpecification() == null) ? 0 : getStreamSpecification().hashCode()); hashCode = prime * hashCode + ((getSSESpecification() == null) ? 0 : getSSESpecification().hashCode()); return hashCode; }
/** * Marshall the given parameter object. */ public void marshall(CreateTableRequest createTableRequest, ProtocolMarshaller protocolMarshaller) { if (createTableRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createTableRequest.getAttributeDefinitions(), ATTRIBUTEDEFINITIONS_BINDING); protocolMarshaller.marshall(createTableRequest.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(createTableRequest.getKeySchema(), KEYSCHEMA_BINDING); protocolMarshaller.marshall(createTableRequest.getLocalSecondaryIndexes(), LOCALSECONDARYINDEXES_BINDING); protocolMarshaller.marshall(createTableRequest.getGlobalSecondaryIndexes(), GLOBALSECONDARYINDEXES_BINDING); protocolMarshaller.marshall(createTableRequest.getBillingMode(), BILLINGMODE_BINDING); protocolMarshaller.marshall(createTableRequest.getProvisionedThroughput(), PROVISIONEDTHROUGHPUT_BINDING); protocolMarshaller.marshall(createTableRequest.getStreamSpecification(), STREAMSPECIFICATION_BINDING); protocolMarshaller.marshall(createTableRequest.getSSESpecification(), SSESPECIFICATION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
return false; CreateTableRequest other = (CreateTableRequest) obj; if (other.getAttributeDefinitions() == null ^ this.getAttributeDefinitions() == null) return false; if (other.getAttributeDefinitions() != null && other.getAttributeDefinitions().equals(this.getAttributeDefinitions()) == false) return false; if (other.getTableName() == null ^ this.getTableName() == null)
/** * <p> * An array of attributes that describe the key schema for the table and * indexes. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param attributeDefinitions <p> * An array of attributes that describe the key schema for the * table and indexes. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public CreateTableRequest withAttributeDefinitions(AttributeDefinition... attributeDefinitions) { if (getAttributeDefinitions() == null) { this.attributeDefinitions = new java.util.ArrayList<AttributeDefinition>( attributeDefinitions.length); } for (AttributeDefinition value : attributeDefinitions) { this.attributeDefinitions.add(value); } return this; }
/** * 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 (getAttributeDefinitions() != null) sb.append("AttributeDefinitions: " + getAttributeDefinitions() + ","); if (getTableName() != null) sb.append("TableName: " + getTableName() + ","); if (getKeySchema() != null) sb.append("KeySchema: " + getKeySchema() + ","); if (getLocalSecondaryIndexes() != null) sb.append("LocalSecondaryIndexes: " + getLocalSecondaryIndexes() + ","); if (getGlobalSecondaryIndexes() != null) sb.append("GlobalSecondaryIndexes: " + getGlobalSecondaryIndexes() + ","); if (getProvisionedThroughput() != null) sb.append("ProvisionedThroughput: " + getProvisionedThroughput() + ","); if (getStreamSpecification() != null) sb.append("StreamSpecification: " + getStreamSpecification() + ","); if (getSSESpecification() != null) sb.append("SSESpecification: " + getSSESpecification()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttributeDefinitions() == null) ? 0 : getAttributeDefinitions().hashCode()); hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode()); hashCode = prime * hashCode + ((getLocalSecondaryIndexes() == null) ? 0 : getLocalSecondaryIndexes().hashCode()); hashCode = prime * hashCode + ((getGlobalSecondaryIndexes() == null) ? 0 : getGlobalSecondaryIndexes() .hashCode()); hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode()); hashCode = prime * hashCode + ((getStreamSpecification() == null) ? 0 : getStreamSpecification().hashCode()); hashCode = prime * hashCode + ((getSSESpecification() == null) ? 0 : getSSESpecification().hashCode()); return hashCode; }
CreateTableRequest other = (CreateTableRequest) obj; if (other.getAttributeDefinitions() == null ^ this.getAttributeDefinitions() == null) return false; if (other.getAttributeDefinitions() != null && other.getAttributeDefinitions().equals(this.getAttributeDefinitions()) == false) return false; if (other.getTableName() == null ^ this.getTableName() == null)
jsonWriter.beginObject(); if (createTableRequest.getAttributeDefinitions() != null) { java.util.List<AttributeDefinition> attributeDefinitions = createTableRequest .getAttributeDefinitions(); jsonWriter.name("AttributeDefinitions"); jsonWriter.beginArray();
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAttributeDefinitions() != null) sb.append("AttributeDefinitions: ").append(getAttributeDefinitions()).append(","); if (getTableName() != null) sb.append("TableName: ").append(getTableName()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttributeDefinitions() == null) ? 0 : getAttributeDefinitions().hashCode()); hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode()); hashCode = prime * hashCode + ((getLocalSecondaryIndexes() == null) ? 0 : getLocalSecondaryIndexes().hashCode()); hashCode = prime * hashCode + ((getGlobalSecondaryIndexes() == null) ? 0 : getGlobalSecondaryIndexes().hashCode()); hashCode = prime * hashCode + ((getBillingMode() == null) ? 0 : getBillingMode().hashCode()); hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode()); hashCode = prime * hashCode + ((getStreamSpecification() == null) ? 0 : getStreamSpecification().hashCode()); hashCode = prime * hashCode + ((getSSESpecification() == null) ? 0 : getSSESpecification().hashCode()); return hashCode; }
/** * Marshall the given parameter object. */ public void marshall(CreateTableRequest createTableRequest, ProtocolMarshaller protocolMarshaller) { if (createTableRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createTableRequest.getAttributeDefinitions(), ATTRIBUTEDEFINITIONS_BINDING); protocolMarshaller.marshall(createTableRequest.getTableName(), TABLENAME_BINDING); protocolMarshaller.marshall(createTableRequest.getKeySchema(), KEYSCHEMA_BINDING); protocolMarshaller.marshall(createTableRequest.getLocalSecondaryIndexes(), LOCALSECONDARYINDEXES_BINDING); protocolMarshaller.marshall(createTableRequest.getGlobalSecondaryIndexes(), GLOBALSECONDARYINDEXES_BINDING); protocolMarshaller.marshall(createTableRequest.getBillingMode(), BILLINGMODE_BINDING); protocolMarshaller.marshall(createTableRequest.getProvisionedThroughput(), PROVISIONEDTHROUGHPUT_BINDING); protocolMarshaller.marshall(createTableRequest.getStreamSpecification(), STREAMSPECIFICATION_BINDING); protocolMarshaller.marshall(createTableRequest.getSSESpecification(), SSESPECIFICATION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
return false; CreateTableRequest other = (CreateTableRequest) obj; if (other.getAttributeDefinitions() == null ^ this.getAttributeDefinitions() == null) return false; if (other.getAttributeDefinitions() != null && other.getAttributeDefinitions().equals(this.getAttributeDefinitions()) == false) return false; if (other.getTableName() == null ^ this.getTableName() == null)