JsonValue CreateGlobalSecondaryIndexAction::Jsonize() const { JsonValue payload; if(m_indexNameHasBeenSet) { payload.WithString("IndexName", m_indexName); } if(m_keySchemaHasBeenSet) { Array<JsonValue> keySchemaJsonList(m_keySchema.size()); for(unsigned keySchemaIndex = 0; keySchemaIndex < keySchemaJsonList.GetLength(); ++keySchemaIndex) { keySchemaJsonList[keySchemaIndex].AsObject(m_keySchema[keySchemaIndex].Jsonize()); } payload.WithArray("KeySchema", std::move(keySchemaJsonList)); } if(m_projectionHasBeenSet) { payload.WithObject("Projection", m_projection.Jsonize()); } if(m_provisionedThroughputHasBeenSet) { payload.WithObject("ProvisionedThroughput", m_provisionedThroughput.Jsonize()); } return payload; }
JsonValue LocalSecondaryIndexDescription::Jsonize() const { JsonValue payload; if(m_indexNameHasBeenSet) { payload.WithString("IndexName", m_indexName); } if(m_keySchemaHasBeenSet) { Array<JsonValue> keySchemaJsonList(m_keySchema.size()); for(unsigned keySchemaIndex = 0; keySchemaIndex < keySchemaJsonList.GetLength(); ++keySchemaIndex) { keySchemaJsonList[keySchemaIndex].AsObject(m_keySchema[keySchemaIndex].Jsonize()); } payload.WithArray("KeySchema", std::move(keySchemaJsonList)); } if(m_projectionHasBeenSet) { payload.WithObject("Projection", m_projection.Jsonize()); } if(m_indexSizeBytesHasBeenSet) { payload.WithInt64("IndexSizeBytes", m_indexSizeBytes); } if(m_itemCountHasBeenSet) { payload.WithInt64("ItemCount", m_itemCount); } if(m_indexArnHasBeenSet) { payload.WithString("IndexArn", m_indexArn); } return payload; }
JsonValue TableDescription::Jsonize() const { JsonValue payload; if(m_attributeDefinitionsHasBeenSet) { Array<JsonValue> attributeDefinitionsJsonList(m_attributeDefinitions.size()); for(unsigned attributeDefinitionsIndex = 0; attributeDefinitionsIndex < attributeDefinitionsJsonList.GetLength(); ++attributeDefinitionsIndex) { attributeDefinitionsJsonList[attributeDefinitionsIndex].AsObject(m_attributeDefinitions[attributeDefinitionsIndex].Jsonize()); } payload.WithArray("AttributeDefinitions", std::move(attributeDefinitionsJsonList)); } if(m_tableNameHasBeenSet) { payload.WithString("TableName", m_tableName); } if(m_keySchemaHasBeenSet) { Array<JsonValue> keySchemaJsonList(m_keySchema.size()); for(unsigned keySchemaIndex = 0; keySchemaIndex < keySchemaJsonList.GetLength(); ++keySchemaIndex) { keySchemaJsonList[keySchemaIndex].AsObject(m_keySchema[keySchemaIndex].Jsonize()); } payload.WithArray("KeySchema", std::move(keySchemaJsonList)); } if(m_tableStatusHasBeenSet) { payload.WithString("TableStatus", TableStatusMapper::GetNameForTableStatus(m_tableStatus)); } if(m_creationDateTimeHasBeenSet) { payload.WithDouble("CreationDateTime", m_creationDateTime.SecondsWithMSPrecision()); } if(m_provisionedThroughputHasBeenSet) { payload.WithObject("ProvisionedThroughput", m_provisionedThroughput.Jsonize()); } if(m_tableSizeBytesHasBeenSet) { payload.WithInt64("TableSizeBytes", m_tableSizeBytes); } if(m_itemCountHasBeenSet) { payload.WithInt64("ItemCount", m_itemCount); } if(m_tableArnHasBeenSet) { payload.WithString("TableArn", m_tableArn); } if(m_localSecondaryIndexesHasBeenSet) { Array<JsonValue> localSecondaryIndexesJsonList(m_localSecondaryIndexes.size()); for(unsigned localSecondaryIndexesIndex = 0; localSecondaryIndexesIndex < localSecondaryIndexesJsonList.GetLength(); ++localSecondaryIndexesIndex) { localSecondaryIndexesJsonList[localSecondaryIndexesIndex].AsObject(m_localSecondaryIndexes[localSecondaryIndexesIndex].Jsonize()); } payload.WithArray("LocalSecondaryIndexes", std::move(localSecondaryIndexesJsonList)); } if(m_globalSecondaryIndexesHasBeenSet) { Array<JsonValue> globalSecondaryIndexesJsonList(m_globalSecondaryIndexes.size()); for(unsigned globalSecondaryIndexesIndex = 0; globalSecondaryIndexesIndex < globalSecondaryIndexesJsonList.GetLength(); ++globalSecondaryIndexesIndex) { globalSecondaryIndexesJsonList[globalSecondaryIndexesIndex].AsObject(m_globalSecondaryIndexes[globalSecondaryIndexesIndex].Jsonize()); } payload.WithArray("GlobalSecondaryIndexes", std::move(globalSecondaryIndexesJsonList)); } if(m_streamSpecificationHasBeenSet) { payload.WithObject("StreamSpecification", m_streamSpecification.Jsonize()); } if(m_latestStreamLabelHasBeenSet) { payload.WithString("LatestStreamLabel", m_latestStreamLabel); } if(m_latestStreamArnHasBeenSet) { payload.WithString("LatestStreamArn", m_latestStreamArn); } return payload; }
JsonValue GlobalSecondaryIndexDescription::Jsonize() const { JsonValue payload; if(m_indexNameHasBeenSet) { payload.WithString("IndexName", m_indexName); } if(m_keySchemaHasBeenSet) { Array<JsonValue> keySchemaJsonList(m_keySchema.size()); for(unsigned keySchemaIndex = 0; keySchemaIndex < keySchemaJsonList.GetLength(); ++keySchemaIndex) { keySchemaJsonList[keySchemaIndex].AsObject(m_keySchema[keySchemaIndex].Jsonize()); } payload.WithArray("KeySchema", std::move(keySchemaJsonList)); } if(m_projectionHasBeenSet) { payload.WithObject("Projection", m_projection.Jsonize()); } if(m_indexStatusHasBeenSet) { payload.WithString("IndexStatus", IndexStatusMapper::GetNameForIndexStatus(m_indexStatus)); } if(m_backfillingHasBeenSet) { payload.WithBool("Backfilling", m_backfilling); } if(m_provisionedThroughputHasBeenSet) { payload.WithObject("ProvisionedThroughput", m_provisionedThroughput.Jsonize()); } if(m_indexSizeBytesHasBeenSet) { payload.WithInt64("IndexSizeBytes", m_indexSizeBytes); } if(m_itemCountHasBeenSet) { payload.WithInt64("ItemCount", m_itemCount); } if(m_indexArnHasBeenSet) { payload.WithString("IndexArn", m_indexArn); } return payload; }