## com.baidubce.services.moladb.model
Class PutItemRequest

    java.lang.Object
      com.baidubce.model.AbstractBceRequest
          com.baidubce.services.moladb.model.PutItemRequest

    public class PutItemRequest

extends AbstractBceRequest

Represents the input of a PutItem operation.

Constructor Summary
`PutItemRequest()` Constructs a new PutItemRequest object.
`PutItemRequest(String name)` Constructs a new PutItemRequest object.

Method Summary
`Map<String,AttributeValue>` `getItem()` Get the Item objects to be put in in table.
`String` `getTableName()` Get the name of the table to contain the item.
`protected Map<String,Object>` `marshallerItem(Map<String,AttributeValue> item)`
`void` `setItem(Map<String,AttributeValue> item)` Set the Item object to be put in in table.
`void` `setTableName(String tableName)` Set the name of the table to contain the item.
`String` `toString()` Return a string representation of request information.
`PutItemRequest` `withItem(Map<String,AttributeValue> item)` Set the Item object to be put in in table.
`PutItemRequest` `withRequestCredentials(BceCredentials credentials)`
`PutItemRequest` `withTableName(String tableName)` Set the name of the table to contain the item.

Methods inherited from class com.baidubce.model.AbstractBceRequest
`getRequestCredentials, setRequestCredentials`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PutItemRequest

    public PutItemRequest()

  Constructs a new PutItemRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

### PutItemRequest

    public PutItemRequest(String name)

  Constructs a new PutItemRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

  Parameters:
    `name` - The name of the table to contain the item.

Method Detail

### getTableName

    public String getTableName()

  Get the name of the table to contain the item.

  Constraints:
  Length: 3 - 32
  Pattern: [a-zA-Z0-9_.-]+

  Returns:
    The name of the table to contain the item.

### setTableName

    public void setTableName(String tableName)

  Set the name of the table to contain the item.

  Constraints:
  Length: 3 - 32
  Pattern: [a-zA-Z0-9_.-]+

  Parameters:
    `tableName` - The name of the table to contain the item.

### withTableName

    public PutItemRequest withTableName(String tableName)

  Set the name of the table to contain the item.

  Constraints:
  Length: 3 - 32
  Pattern: [a-zA-Z0-9_.-]+

  Parameters:
    `tableName` - The name of the table to contain the item.
  Returns:
    Returns a reference to the object so that method calls can be chained together.

### withItem

    public PutItemRequest withItem(Map<String,AttributeValue> item)

  Set the Item object to be put in in table. Returns a reference to this object so that method calls can be chained together.

  Parameters:
    `item` - An container of attribute name/value pairs. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.

    You must provide all of the attributes for the primary key. For example, with a hash type primary key, you only need to provide the hash attribute. For a hash-and-range type primary key, you must provide both the hash attribute and the range attribute.

    If you specify any attributes that are part of an key, then the data types for those attributes must match those of the schema in the table's attribute definition.

  Returns:
    A reference to this updated object so that method calls can be chained together.

### setItem

    public void setItem(Map<String,AttributeValue> item)

  Set the Item object to be put in in table.

  Parameters:
    `item` - An container of attribute name/value pairs. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item.

    You must provide all of the attributes for the primary key. For example, with a hash type primary key, you only need to provide the hash attribute. For a hash-and-range type primary key, you must provide both the hash attribute and the range attribute.

    If you specify any attributes that are part of an key, then the data types for those attributes must match those of the schema in the table's attribute definition.

### getItem

    public Map<String,AttributeValue> getItem()

  Get the Item objects to be put in in table.

  Returns:
    An map container of attribute name/value pairs.

### toString

    public String toString()

  Return a string representation of request information.

  Overrides:
    `toString` in class `Object`
  Returns:
    A string representation of request information.

### marshallerItem

    protected Map<String,Object> marshallerItem(Map<String,AttributeValue> item)

### withRequestCredentials

    public PutItemRequest withRequestCredentials(BceCredentials credentials)

  Specified by:
    `withRequestCredentials` in class `AbstractBceRequest`

Copyright © 2016. All rights reserved.