/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the iotevents-2018-07-27.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.IoTEvents.Model
{
///
/// Defines an action to write to the Amazon DynamoDB table that you created. The standard
/// action payload contains all the information about the detector model instance and
/// the event that triggered the action. You can customize the payload.
/// One column of the DynamoDB table receives all attribute-value pairs in the payload
/// that you specify.
///
///
///
/// You must use expressions for all parameters in DynamoDBAction
. The expressions
/// accept literals, operators, functions, references, and substitution templates.
///
/// Examples
///
///
-
///
/// For literal values, the expressions must contain single quotes. For example, the value
/// for the
hashKeyType
parameter can be 'STRING'
.
///
/// -
///
/// For references, you must specify either variables or input values. For example, the
/// value for the
hashKeyField
parameter can be $input.GreenhouseInput.name
.
///
/// -
///
/// For a substitution template, you must use
${}
, and the template must
/// be in single quotes. A substitution template can also contain a combination of literals,
/// operators, functions, references, and substitution templates.
///
///
///
/// In the following example, the value for the hashKeyValue
parameter uses
/// a substitution template.
///
///
///
/// '${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'
///
/// -
///
/// For a string concatenation, you must use
+
. A string concatenation can
/// also contain a combination of literals, operators, functions, references, and substitution
/// templates.
///
///
///
/// In the following example, the value for the tableName
parameter uses
/// a string concatenation.
///
///
///
/// 'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
///
///
///
/// For more information, see Expressions
/// in the AWS IoT Events Developer Guide.
///
///
///
/// If the defined payload type is a string, DynamoDBAction
writes non-JSON
/// data to the DynamoDB table as binary data. The DynamoDB console displays the data
/// as Base64-encoded text. The value for the payloadField
parameter is <payload-field>_raw
.
///
///
public partial class DynamoDBAction
{
private string _hashKeyField;
private string _hashKeyType;
private string _hashKeyValue;
private string _operation;
private Payload _payload;
private string _payloadField;
private string _rangeKeyField;
private string _rangeKeyType;
private string _rangeKeyValue;
private string _tableName;
///
/// Gets and sets the property HashKeyField.
///
/// The name of the hash key (also called the partition key). The hashKeyField
/// value must match the partition key of the target DynamoDB table.
///
///
[AWSProperty(Required=true)]
public string HashKeyField
{
get { return this._hashKeyField; }
set { this._hashKeyField = value; }
}
// Check to see if HashKeyField property is set
internal bool IsSetHashKeyField()
{
return this._hashKeyField != null;
}
///
/// Gets and sets the property HashKeyType.
///
/// The data type for the hash key (also called the partition key). You can specify the
/// following values:
///
/// -
///
///
'STRING'
- The hash key is a string.
///
/// -
///
///
'NUMBER'
- The hash key is a number.
///
///
///
/// If you don't specify hashKeyType
, the default value is 'STRING'
.
///
///
public string HashKeyType
{
get { return this._hashKeyType; }
set { this._hashKeyType = value; }
}
// Check to see if HashKeyType property is set
internal bool IsSetHashKeyType()
{
return this._hashKeyType != null;
}
///
/// Gets and sets the property HashKeyValue.
///
/// The value of the hash key (also called the partition key).
///
///
[AWSProperty(Required=true)]
public string HashKeyValue
{
get { return this._hashKeyValue; }
set { this._hashKeyValue = value; }
}
// Check to see if HashKeyValue property is set
internal bool IsSetHashKeyValue()
{
return this._hashKeyValue != null;
}
///
/// Gets and sets the property Operation.
///
/// The type of operation to perform. You can specify the following values:
///
/// -
///
///
'INSERT'
- Insert data as a new item into the DynamoDB table. This item
/// uses the specified hash key as a partition key. If you specified a range key, the
/// item uses the range key as a sort key.
///
/// -
///
///
'UPDATE'
- Update an existing item of the DynamoDB table with new data.
/// This item's partition key must match the specified hash key. If you specified a range
/// key, the range key must match the item's sort key.
///
/// -
///
///
'DELETE'
- Delete an existing item of the DynamoDB table. This item's
/// partition key must match the specified hash key. If you specified a range key, the
/// range key must match the item's sort key.
///
///
///
/// If you don't specify this parameter, AWS IoT Events triggers the 'INSERT'
/// operation.
///
///
public string Operation
{
get { return this._operation; }
set { this._operation = value; }
}
// Check to see if Operation property is set
internal bool IsSetOperation()
{
return this._operation != null;
}
///
/// Gets and sets the property Payload.
///
public Payload Payload
{
get { return this._payload; }
set { this._payload = value; }
}
// Check to see if Payload property is set
internal bool IsSetPayload()
{
return this._payload != null;
}
///
/// Gets and sets the property PayloadField.
///
/// The name of the DynamoDB column that receives the action payload.
///
///
///
/// If you don't specify this parameter, the name of the DynamoDB column is payload
.
///
///
public string PayloadField
{
get { return this._payloadField; }
set { this._payloadField = value; }
}
// Check to see if PayloadField property is set
internal bool IsSetPayloadField()
{
return this._payloadField != null;
}
///
/// Gets and sets the property RangeKeyField.
///
/// The name of the range key (also called the sort key). The rangeKeyField
/// value must match the sort key of the target DynamoDB table.
///
///
public string RangeKeyField
{
get { return this._rangeKeyField; }
set { this._rangeKeyField = value; }
}
// Check to see if RangeKeyField property is set
internal bool IsSetRangeKeyField()
{
return this._rangeKeyField != null;
}
///
/// Gets and sets the property RangeKeyType.
///
/// The data type for the range key (also called the sort key), You can specify the following
/// values:
///
/// -
///
///
'STRING'
- The range key is a string.
///
/// -
///
///
'NUMBER'
- The range key is number.
///
///
///
/// If you don't specify rangeKeyField
, the default value is 'STRING'
.
///
///
public string RangeKeyType
{
get { return this._rangeKeyType; }
set { this._rangeKeyType = value; }
}
// Check to see if RangeKeyType property is set
internal bool IsSetRangeKeyType()
{
return this._rangeKeyType != null;
}
///
/// Gets and sets the property RangeKeyValue.
///
/// The value of the range key (also called the sort key).
///
///
public string RangeKeyValue
{
get { return this._rangeKeyValue; }
set { this._rangeKeyValue = value; }
}
// Check to see if RangeKeyValue property is set
internal bool IsSetRangeKeyValue()
{
return this._rangeKeyValue != null;
}
///
/// Gets and sets the property TableName.
///
/// The name of the DynamoDB table. The tableName
value must match the table
/// name of the target DynamoDB table.
///
///
[AWSProperty(Required=true)]
public string TableName
{
get { return this._tableName; }
set { this._tableName = value; }
}
// Check to see if TableName property is set
internal bool IsSetTableName()
{
return this._tableName != null;
}
}
}