-
Notifications
You must be signed in to change notification settings - Fork 187
/
Message.yml
242 lines (241 loc) · 7.33 KB
/
Message.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
### YamlMime:TSType
name: Message
uid: azure-iot-device.Message
package: azure-iot-device
summary: >-
The <xref:azure-iot-common.Message> object is used for telemetry
(device-to-cloud) and commands (cloud-to-device) asynchronous
messaging between the device and the IoT Hub service. It is
transport-agnostic, meaning it works the same way over AMQP, MQTT and HTTP.
fullName: Message
remarks: ''
isDeprecated: false
type: class
constructors:
- name: Message(BufferConvertible)
uid: azure-iot-device.Message.constructor
package: azure-iot-device
summary: Creates a new <xref:azure-iot-common.Message> object
remarks: ''
isDeprecated: false
syntax:
content: 'new Message(data: BufferConvertible)'
parameters:
- id: data
type: <xref uid="azure-iot-device.Message.BufferConvertible" />
description: >-
a Node
[Buffer](https://nodejs.org/api/globals.html#globals_class_buffer)
object or anything that can be passed to the [Buffer](https://nodejs.org/api/globals.html#globals_class_buffer) constructor
to construct a [Buffer](https://nodejs.org/api/globals.html#globals_class_buffer) from.
properties:
- name: ack
uid: azure-iot-device.Message.ack
package: azure-iot-device
summary: Type of feedback requested (in case of cloud-to-device command)
fullName: ack
remarks: ''
isDeprecated: false
syntax:
content: 'ack: string'
return:
description: ''
type: string
- name: contentEncoding
uid: azure-iot-device.Message.contentEncoding
package: azure-iot-device
summary: >-
Content encoding of the message body. can be 'utf-8', 'utf-16' or
'utf-32'.
fullName: contentEncoding
remarks: ''
isDeprecated: false
syntax:
content: 'contentEncoding: undefined | "utf-8" | "utf-16" | "utf-32"'
return:
description: ''
type: undefined | "utf-8" | "utf-16" | "utf-32"
- name: contentType
uid: azure-iot-device.Message.contentType
package: azure-iot-device
summary: >-
Content type property used to routes with the message body. Should be
'application/json'.
fullName: contentType
remarks: ''
isDeprecated: false
syntax:
content: 'contentType: undefined | "application/json"'
return:
description: ''
type: undefined | "application/json"
- name: correlationId
uid: azure-iot-device.Message.correlationId
package: azure-iot-device
summary: Used in message responses and feedback
fullName: correlationId
remarks: ''
isDeprecated: false
syntax:
content: 'correlationId: string'
return:
description: ''
type: string
- name: data
uid: azure-iot-device.Message.data
package: azure-iot-device
summary: ''
fullName: data
remarks: ''
isDeprecated: false
syntax:
content: 'data: any'
return:
description: ''
type: any
- name: expiryTimeUtc
uid: azure-iot-device.Message.expiryTimeUtc
package: azure-iot-device
summary: >-
Expiry time in UTC interpreted by hub on C2D messages. Ignored in other
cases.
fullName: expiryTimeUtc
remarks: ''
isDeprecated: false
syntax:
content: 'expiryTimeUtc: any'
return:
description: ''
type: any
- name: interfaceId
uid: azure-iot-device.Message.interfaceId
package: azure-iot-device
summary: Is this message a security message
fullName: interfaceId
remarks: ''
isDeprecated: false
syntax:
content: 'interfaceId: string'
return:
description: ''
type: string
- name: lockToken
uid: azure-iot-device.Message.lockToken
package: azure-iot-device
summary: Used to Abandon, Reject or Accept the message
fullName: lockToken
remarks: ''
isDeprecated: false
syntax:
content: 'lockToken: string'
return:
description: ''
type: string
- name: messageId
uid: azure-iot-device.Message.messageId
package: azure-iot-device
summary: >-
Used to correlate two-way communication. Format: A case-sensitive string
(up to 128 char long) of ASCII 7-bit alphanumeric chars and the following
special symbols: <br/>`- : . + % _ # * ? ! ( ) , = @ ; $ '`.
fullName: messageId
remarks: ''
isDeprecated: false
syntax:
content: 'messageId: string'
return:
description: ''
type: string
- name: properties
uid: azure-iot-device.Message.properties
package: azure-iot-device
summary: >-
A map containing string keys and values for storing custom message
properties.
fullName: properties
remarks: ''
isDeprecated: false
syntax:
content: 'properties: Properties'
return:
description: ''
type: Properties
- name: to
uid: azure-iot-device.Message.to
package: azure-iot-device
summary: Destination of the message.
fullName: to
remarks: ''
isDeprecated: false
syntax:
content: 'to: string'
return:
description: ''
type: string
- name: userId
uid: azure-iot-device.Message.userId
package: azure-iot-device
summary: Used to specify the entity creating the message
fullName: userId
remarks: ''
isDeprecated: false
syntax:
content: 'userId: string'
return:
description: ''
type: string
methods:
- name: getBytes()
uid: azure-iot-device.Message.getBytes
package: azure-iot-device
summary: >-
Gets the data passed to the constructor as a
[Buffer](https://nodejs.org/api/globals.html#globals_class_buffer)
remarks: ''
isDeprecated: false
syntax:
content: 'function getBytes(): Buffer'
return:
description: ''
type: Buffer
- name: getData()
uid: azure-iot-device.Message.getData
package: azure-iot-device
summary: Gets the content (body) of the <xref:azure-iot-common.Message>.
remarks: ''
isDeprecated: false
syntax:
content: 'function getData(): BufferConvertible'
return:
description: The content of the <xref:azure-iot-common.Message>.
type: <xref uid="azure-iot-device.Message.BufferConvertible" />
- name: isBufferConvertible(any)
uid: azure-iot-device.Message.isBufferConvertible
package: azure-iot-device
summary: >-
Returns true if the given object is of type
[BufferConvertible](xref:azure-iot-device.Message.BufferConvertible).
Objects of type
[BufferConvertible](xref:azure-iot-device.Message.BufferConvertible) can
be passed into the [Message](xref:azure-iot-device.Message) constructor.
remarks: ''
isDeprecated: false
syntax:
content: 'static function isBufferConvertible(obj: any): boolean'
parameters:
- id: obj
type: any
description: object instance to check
return:
description: >-
True if the object is of type
[BufferConvertible](xref:azure-iot-device.Message.BufferConvertible)
type: boolean
- name: setAsSecurityMessage()
uid: azure-iot-device.Message.setAsSecurityMessage
package: azure-iot-device
summary: Sets this message as a security message
remarks: ''
isDeprecated: false
syntax:
content: function setAsSecurityMessage()