public function populateFromDynamoDB(array $data)
    {
        $this->tableName        = $data['TableName'];
        $this->tableStatus      = $data['TableStatus'];
        $this->creationDateTime = $data['CreationDateTime'];

        $this->itemCount        = (isset($data['ItemCount'])?$data['ItemCount']:0);
        $this->tableSizeBytes   = (isset($data['TableSizeBytes'])?$data['TableSizeBytes']:0);

        $keySchema = $data['KeySchema'];
        $hash = new KeySchemaElement(
            $keySchema['HashKeyElement']['AttributeName'],
            $keySchema['HashKeyElement']['AttributeType']
        );
        if (isset($keySchema['RangeKeyElement'])) {
            $range = new KeySchemaElement(
                $keySchema['RangeKeyElement']['AttributeName'],
                $keySchema['RangeKeyElement']['AttributeType']
            );
        } else {
            $range = null;
        }

        $this->keySchema = new KeySchema($hash, $range);

        $provisionedThroughput = $data['ProvisionedThroughput'];
        $this->provisionedThroughput = new ProvisionedThroughput(
            $provisionedThroughput['ReadCapacityUnits'],
            $provisionedThroughput['WriteCapacityUnits'],
            (isset($provisionedThroughput['LastIncreaseDateTime'])?$provisionedThroughput['LastIncreaseDateTime']:null),
            (isset($provisionedThroughput['LastDecreaseDateTime'])?$provisionedThroughput['LastDecreaseDateTime']:null)
        );
    }
public function populateFromDynamoDB(array $data)
    {
        $this->tableName        = $data['TableName'];
        $this->tableStatus      = $data['TableStatus'];
        $this->creationDateTime = $data['CreationDateTime'];

        $this->itemCount        = (isset($data['ItemCount'])?$data['ItemCount']:0);
        $this->tableSizeBytes   = (isset($data['TableSizeBytes'])?$data['TableSizeBytes']:0);

        $keySchema = $data['KeySchema'];
        $hash = new KeySchemaElement(
            $keySchema['HashKeyElement']['AttributeName'],
            $keySchema['HashKeyElement']['AttributeType']
        );
        if (isset($keySchema['RangeKeyElement'])) {
            $range = new KeySchemaElement(
                $keySchema['RangeKeyElement']['AttributeName'],
                $keySchema['RangeKeyElement']['AttributeType']
            );
        } else {
            $range = null;
        }

        $this->keySchema = new KeySchema($hash, $range);

        $provisionedThroughput = $data['ProvisionedThroughput'];
        $this->provisionedThroughput = new ProvisionedThroughput(
            $provisionedThroughput['ReadCapacityUnits'],
            $provisionedThroughput['WriteCapacityUnits'],
            (isset($provisionedThroughput['LastIncreaseDateTime'])?$provisionedThroughput['LastIncreaseDateTime']:null),
            (isset($provisionedThroughput['LastDecreaseDateTime'])?$provisionedThroughput['LastDecreaseDateTime']:null)
        );
    }
public function populateFromDynamoDB ( array $ data ) { $ this -> tableName = $ data [ 'TableName' ] ; $ this -> tableStatus = $ data [ 'TableStatus' ] ; $ this -> creationDateTime = $ data [ 'CreationDateTime' ] ; $ this -> itemCount = ( isset ( $ data [ 'ItemCount' ] ) ? $ data [ 'ItemCount' ] : 0 ) ; $ this -> tableSizeBytes = ( isset ( $ data [ 'TableSizeBytes' ] ) ? $ data [ 'TableSizeBytes' ] : 0 ) ; $ keySchema = $ data [ 'KeySchema' ] ; $ hash = new KeySchemaElement ( $ keySchema [ 'HashKeyElement' ] [ 'AttributeName' ] , $ keySchema [ 'HashKeyElement' ] [ 'AttributeType' ] ) ; if ( isset ( $ keySchema [ 'RangeKeyElement' ] ) ) { $ range = new KeySchemaElement ( $ keySchema [ 'RangeKeyElement' ] [ 'AttributeName' ] , $ keySchema [ 'RangeKeyElement' ] [ 'AttributeType' ] ) ; } else { $ range = null ; } $ this -> keySchema = new KeySchema ( $ hash , $ range ) ; $ provisionedThroughput = $ data [ 'ProvisionedThroughput' ] ; $ this -> provisionedThroughput = new ProvisionedThroughput ( $ provisionedThroughput [ 'ReadCapacityUnits' ] , $ provisionedThroughput [ 'WriteCapacityUnits' ] , ( isset ( $ provisionedThroughput [ 'LastIncreaseDateTime' ] ) ? $ provisionedThroughput [ 'LastIncreaseDateTime' ] : null ) , ( isset ( $ provisionedThroughput [ 'LastDecreaseDateTime' ] ) ? $ provisionedThroughput [ 'LastDecreaseDateTime' ] : null ) ) ; }
Populate table description from the raw DynamoDB response
@param array $data
Populate table description from the raw DynamoDB response