public class KeySchemaElement extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
HASH_KEY_TYPE |
static String |
RANGE_KEY_TYPE |
| Constructor and Description |
|---|
KeySchemaElement()
Constructs a new KeySchemaElement object.
|
KeySchemaElement(String attributeName,
String keyType)
Constructs a new KeySchemaElement object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAttributeName()
Get the attribute name for the key schema.
|
String |
getKeyType()
Get the key type for the key schema.
|
void |
setAttributeName(String name)
Set the attribute name for the key schema.
|
void |
setKeyType(String type)
Set the key type for the key schema.
|
protected Object |
toJsonObj() |
String |
toString()
Return a string representation of the object.
|
KeySchemaElement |
withAttributeName(String name)
Set the attribute name for the key schema.
|
KeySchemaElement |
withKeyType(String type)
Set the key type for the key schema.
|
public static final String HASH_KEY_TYPE
public static final String RANGE_KEY_TYPE
public KeySchemaElement()
public KeySchemaElement(String attributeName, String keyType)
attributeName - The attribute name for a key.keyType - The type of the key, it is hashKey or rangeKey.public void setAttributeName(String name)
name - The attribute name for a key to be set.public KeySchemaElement withAttributeName(String name)
name - The attribute name for a key to be set.public String getAttributeName()
public void setKeyType(String type)
type - The key type name for the key schema.IllegalArgumentException - if the key type is not HASH_KEY_TYPE or RANGE_KEY_TYPE.public KeySchemaElement withKeyType(String type)
type - The key type name for the key schema.public String getKeyType()
protected Object toJsonObj()
Copyright © 2023. All rights reserved.