public class GlobalSecondaryIndex extends Object implements Serializable, Cloneable
Represents the properties of a global secondary index.
Constructor and Description |
---|
GlobalSecondaryIndex() |
Modifier and Type | Method and Description |
---|---|
GlobalSecondaryIndex |
clone() |
boolean |
equals(Object obj) |
String |
getIndexName()
The name of the global secondary index.
|
List<KeySchemaElement> |
getKeySchema()
The complete key schema for a global secondary index, which consists of
one or more pairs of attribute names and key types (
HASH or
RANGE ). |
Projection |
getProjection()
Returns the value of the Projection property for this object.
|
ProvisionedThroughput |
getProvisionedThroughput()
Returns the value of the ProvisionedThroughput property for this object.
|
int |
hashCode() |
void |
setIndexName(String indexName)
The name of the global secondary index.
|
void |
setKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for a global secondary index, which consists of
one or more pairs of attribute names and key types (
HASH or
RANGE ). |
void |
setProjection(Projection projection)
Sets the value of the Projection property for this object.
|
void |
setProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
Sets the value of the ProvisionedThroughput property for this object.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GlobalSecondaryIndex |
withIndexName(String indexName)
The name of the global secondary index.
|
GlobalSecondaryIndex |
withKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for a global secondary index, which consists of
one or more pairs of attribute names and key types (
HASH or
RANGE ). |
GlobalSecondaryIndex |
withKeySchema(KeySchemaElement... keySchema)
The complete key schema for a global secondary index, which consists of
one or more pairs of attribute names and key types (
HASH or
RANGE ). |
GlobalSecondaryIndex |
withProjection(Projection projection)
Sets the value of the Projection property for this object.
|
GlobalSecondaryIndex |
withProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
Sets the value of the ProvisionedThroughput property for this object.
|
public void setIndexName(String indexName)
The name of the global secondary index. The name must be unique among all other indexes on this table.
indexName
- The name of the global secondary index. The name must be unique
among all other indexes on this table.public String getIndexName()
The name of the global secondary index. The name must be unique among all other indexes on this table.
public GlobalSecondaryIndex withIndexName(String indexName)
The name of the global secondary index. The name must be unique among all other indexes on this table.
indexName
- The name of the global secondary index. The name must be unique
among all other indexes on this table.public List<KeySchemaElement> getKeySchema()
The complete key schema for a global secondary index, which consists of
one or more pairs of attribute names and key types (HASH
or
RANGE
).
HASH
or RANGE
).public void setKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for a global secondary index, which consists of
one or more pairs of attribute names and key types (HASH
or
RANGE
).
keySchema
- The complete key schema for a global secondary index, which
consists of one or more pairs of attribute names and key types (
HASH
or RANGE
).public GlobalSecondaryIndex withKeySchema(KeySchemaElement... keySchema)
The complete key schema for a global secondary index, which consists of
one or more pairs of attribute names and key types (HASH
or
RANGE
).
NOTE: This method appends the values to the existing list (if
any). Use setKeySchema(java.util.Collection)
or
withKeySchema(java.util.Collection)
if you want to override the
existing values.
keySchema
- The complete key schema for a global secondary index, which
consists of one or more pairs of attribute names and key types (
HASH
or RANGE
).public GlobalSecondaryIndex withKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for a global secondary index, which consists of
one or more pairs of attribute names and key types (HASH
or
RANGE
).
keySchema
- The complete key schema for a global secondary index, which
consists of one or more pairs of attribute names and key types (
HASH
or RANGE
).public void setProjection(Projection projection)
projection
- The new value for the Projection property for this object.public Projection getProjection()
public GlobalSecondaryIndex withProjection(Projection projection)
projection
- The new value for the Projection property for this object.public void setProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
provisionedThroughput
- The new value for the ProvisionedThroughput property for this
object.public ProvisionedThroughput getProvisionedThroughput()
public GlobalSecondaryIndex withProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
provisionedThroughput
- The new value for the ProvisionedThroughput property for this
object.public String toString()
toString
in class Object
Object.toString()
public GlobalSecondaryIndex clone()
Copyright © 2015. All rights reserved.