All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.dynamodb.model.KeySchemaElement Maven / Gradle / Ivy

Go to download

The Amazon Web Services SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

The newest version!
/*
 * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 * 
 *  http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
package com.amazonaws.services.dynamodb.model;
import java.io.Serializable;

/**
 * 

* KeySchemaElement is the primary key (hash or hash-and-range) structure for the table. *

* @deprecated Use {@link com.amazonaws.services.dynamodbv2.model.KeySchemaElement} instead. */ @Deprecated public class KeySchemaElement implements Serializable { /** * The AttributeName of the KeySchemaElement. *

* Constraints:
* Length: 1 - 255
*/ private String attributeName; /** * The AttributeType of the KeySchemaElement * which can be a String or a Number. *

* Constraints:
* Allowed Values: S, N, B */ private String attributeType; /** * Default constructor for a new KeySchemaElement object. Callers should use the * setter or fluent setter (with...) methods to initialize this object after creating it. */ public KeySchemaElement() {} /** * The AttributeName of the KeySchemaElement. *

* Constraints:
* Length: 1 - 255
* * @return The AttributeName of the KeySchemaElement. */ public String getAttributeName() { return attributeName; } /** * The AttributeName of the KeySchemaElement. *

* Constraints:
* Length: 1 - 255
* * @param attributeName The AttributeName of the KeySchemaElement. */ public void setAttributeName(String attributeName) { this.attributeName = attributeName; } /** * The AttributeName of the KeySchemaElement. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Length: 1 - 255
* * @param attributeName The AttributeName of the KeySchemaElement. * * @return A reference to this updated object so that method calls can be chained * together. */ public KeySchemaElement withAttributeName(String attributeName) { this.attributeName = attributeName; return this; } /** * The AttributeType of the KeySchemaElement * which can be a String or a Number. *

* Constraints:
* Allowed Values: S, N, B * * @return The AttributeType of the KeySchemaElement * which can be a String or a Number. * * @see ScalarAttributeType */ public String getAttributeType() { return attributeType; } /** * The AttributeType of the KeySchemaElement * which can be a String or a Number. *

* Constraints:
* Allowed Values: S, N, B * * @param attributeType The AttributeType of the KeySchemaElement * which can be a String or a Number. * * @see ScalarAttributeType */ public void setAttributeType(String attributeType) { this.attributeType = attributeType; } /** * The AttributeType of the KeySchemaElement * which can be a String or a Number. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Allowed Values: S, N, B * * @param attributeType The AttributeType of the KeySchemaElement * which can be a String or a Number. * * @return A reference to this updated object so that method calls can be chained * together. * * @see ScalarAttributeType */ public KeySchemaElement withAttributeType(String attributeType) { this.attributeType = attributeType; return this; } /** * The AttributeType of the KeySchemaElement * which can be a String or a Number. *

* Constraints:
* Allowed Values: S, N, B * * @param attributeType The AttributeType of the KeySchemaElement * which can be a String or a Number. * * @see ScalarAttributeType */ public void setAttributeType(ScalarAttributeType attributeType) { this.attributeType = attributeType.toString(); } /** * The AttributeType of the KeySchemaElement * which can be a String or a Number. *

* Returns a reference to this object so that method calls can be chained together. *

* Constraints:
* Allowed Values: S, N, B * * @param attributeType The AttributeType of the KeySchemaElement * which can be a String or a Number. * * @return A reference to this updated object so that method calls can be chained * together. * * @see ScalarAttributeType */ public KeySchemaElement withAttributeType(ScalarAttributeType attributeType) { this.attributeType = attributeType.toString(); 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 (getAttributeName() != null) sb.append("AttributeName: " + getAttributeName() + ", "); if (getAttributeType() != null) sb.append("AttributeType: " + getAttributeType() + ", "); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttributeName() == null) ? 0 : getAttributeName().hashCode()); hashCode = prime * hashCode + ((getAttributeType() == null) ? 0 : getAttributeType().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof KeySchemaElement == false) return false; KeySchemaElement other = (KeySchemaElement)obj; if (other.getAttributeName() == null ^ this.getAttributeName() == null) return false; if (other.getAttributeName() != null && other.getAttributeName().equals(this.getAttributeName()) == false) return false; if (other.getAttributeType() == null ^ this.getAttributeType() == null) return false; if (other.getAttributeType() != null && other.getAttributeType().equals(this.getAttributeType()) == false) return false; return true; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy