@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Payload extends Object implements Serializable, Cloneable, StructuredPojo
Information needed to configure the payload.
By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all
attribute-value pairs that have the information about the detector model instance and the event triggered the action.
To configure the action payload, you can use contentExpression
.
Constructor and Description |
---|
Payload() |
Modifier and Type | Method and Description |
---|---|
Payload |
clone() |
boolean |
equals(Object obj) |
String |
getContentExpression()
The content of the payload.
|
String |
getType()
The value of the payload type can be either
STRING or JSON . |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setContentExpression(String contentExpression)
The content of the payload.
|
void |
setType(String type)
The value of the payload type can be either
STRING or JSON . |
String |
toString()
Returns a string representation of this object.
|
Payload |
withContentExpression(String contentExpression)
The content of the payload.
|
Payload |
withType(PayloadType type)
The value of the payload type can be either
STRING or JSON . |
Payload |
withType(String type)
The value of the payload type can be either
STRING or JSON . |
public void setContentExpression(String contentExpression)
The content of the payload. You can use a string expression that includes quoted strings (
'<string>'
), variables ($variable.<variable-name>
), input values (
$input.<input-name>.<path-to-datum>
), string concatenations, and quoted strings that
contain ${}
as the content. The recommended maximum size of a content expression is 1 KB.
contentExpression
- The content of the payload. You can use a string expression that includes quoted strings (
'<string>'
), variables ($variable.<variable-name>
), input values (
$input.<input-name>.<path-to-datum>
), string concatenations, and quoted strings
that contain ${}
as the content. The recommended maximum size of a content expression is 1
KB.public String getContentExpression()
The content of the payload. You can use a string expression that includes quoted strings (
'<string>'
), variables ($variable.<variable-name>
), input values (
$input.<input-name>.<path-to-datum>
), string concatenations, and quoted strings that
contain ${}
as the content. The recommended maximum size of a content expression is 1 KB.
'<string>'
), variables ($variable.<variable-name>
), input values (
$input.<input-name>.<path-to-datum>
), string concatenations, and quoted strings
that contain ${}
as the content. The recommended maximum size of a content expression is 1
KB.public Payload withContentExpression(String contentExpression)
The content of the payload. You can use a string expression that includes quoted strings (
'<string>'
), variables ($variable.<variable-name>
), input values (
$input.<input-name>.<path-to-datum>
), string concatenations, and quoted strings that
contain ${}
as the content. The recommended maximum size of a content expression is 1 KB.
contentExpression
- The content of the payload. You can use a string expression that includes quoted strings (
'<string>'
), variables ($variable.<variable-name>
), input values (
$input.<input-name>.<path-to-datum>
), string concatenations, and quoted strings
that contain ${}
as the content. The recommended maximum size of a content expression is 1
KB.public void setType(String type)
The value of the payload type can be either STRING
or JSON
.
type
- The value of the payload type can be either STRING
or JSON
.PayloadType
public String getType()
The value of the payload type can be either STRING
or JSON
.
STRING
or JSON
.PayloadType
public Payload withType(String type)
The value of the payload type can be either STRING
or JSON
.
type
- The value of the payload type can be either STRING
or JSON
.PayloadType
public Payload withType(PayloadType type)
The value of the payload type can be either STRING
or JSON
.
type
- The value of the payload type can be either STRING
or JSON
.PayloadType
public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.