// // Copyright 2010-2023 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. // #import #import #import NS_ASSUME_NONNULL_BEGIN FOUNDATION_EXPORT NSString *const AWSIoTDataErrorDomain; typedef NS_ENUM(NSInteger, AWSIoTDataErrorType) { AWSIoTDataErrorUnknown, AWSIoTDataErrorConflict, AWSIoTDataErrorInternalFailure, AWSIoTDataErrorInvalidRequest, AWSIoTDataErrorMethodNotAllowed, AWSIoTDataErrorRequestEntityTooLarge, AWSIoTDataErrorResourceNotFound, AWSIoTDataErrorServiceUnavailable, AWSIoTDataErrorThrottling, AWSIoTDataErrorUnauthorized, AWSIoTDataErrorUnsupportedDocumentEncoding, }; typedef NS_ENUM(NSInteger, AWSIoTDataPayloadFormatIndicator) { AWSIoTDataPayloadFormatIndicatorUnknown, AWSIoTDataPayloadFormatIndicatorUnspecifiedBytes, AWSIoTDataPayloadFormatIndicatorUtf8Data, }; @class AWSIoTDataDeleteThingShadowRequest; @class AWSIoTDataDeleteThingShadowResponse; @class AWSIoTDataGetRetainedMessageRequest; @class AWSIoTDataGetRetainedMessageResponse; @class AWSIoTDataGetThingShadowRequest; @class AWSIoTDataGetThingShadowResponse; @class AWSIoTDataListNamedShadowsForThingRequest; @class AWSIoTDataListNamedShadowsForThingResponse; @class AWSIoTDataListRetainedMessagesRequest; @class AWSIoTDataListRetainedMessagesResponse; @class AWSIoTDataPublishRequest; @class AWSIoTDataRetainedMessageSummary; @class AWSIoTDataUpdateThingShadowRequest; @class AWSIoTDataUpdateThingShadowResponse; /**

The input for the DeleteThingShadow operation.

Required parameters: [thingName] */ @interface AWSIoTDataDeleteThingShadowRequest : AWSRequest /**

The name of the shadow.

*/ @property (nonatomic, strong) NSString * _Nullable shadowName; /**

The name of the thing.

*/ @property (nonatomic, strong) NSString * _Nullable thingName; @end /**

The output from the DeleteThingShadow operation.

Required parameters: [payload] */ @interface AWSIoTDataDeleteThingShadowResponse : AWSModel /**

The state information, in JSON format.

*/ @property (nonatomic, strong) id _Nullable payload; @end /**

The input for the GetRetainedMessage operation.

Required parameters: [topic] */ @interface AWSIoTDataGetRetainedMessageRequest : AWSRequest /**

The topic name of the retained message to retrieve.

*/ @property (nonatomic, strong) NSString * _Nullable topic; @end /**

The output from the GetRetainedMessage operation.

*/ @interface AWSIoTDataGetRetainedMessageResponse : AWSModel /**

The Epoch date and time, in milliseconds, when the retained message was stored by IoT.

*/ @property (nonatomic, strong) NSNumber * _Nullable lastModifiedTime; /**

The Base64-encoded message payload of the retained message body.

*/ @property (nonatomic, strong) id _Nullable payload; /**

The quality of service (QoS) level used to publish the retained message.

*/ @property (nonatomic, strong) NSNumber * _Nullable qos; /**

The topic name to which the retained message was published.

*/ @property (nonatomic, strong) NSString * _Nullable topic; /**

A base64-encoded JSON string that includes an array of JSON objects, or null if the retained message doesn't include any user properties.

The following example userProperties parameter is a JSON string that represents two user properties. Note that it will be base64-encoded:

[{"deviceName": "alpha"}, {"deviceCnt": "45"}]

*/ @property (nonatomic, strong) NSData * _Nullable userProperties; @end /**

The input for the GetThingShadow operation.

Required parameters: [thingName] */ @interface AWSIoTDataGetThingShadowRequest : AWSRequest /**

The name of the shadow.

*/ @property (nonatomic, strong) NSString * _Nullable shadowName; /**

The name of the thing.

*/ @property (nonatomic, strong) NSString * _Nullable thingName; @end /**

The output from the GetThingShadow operation.

*/ @interface AWSIoTDataGetThingShadowResponse : AWSModel /**

The state information, in JSON format.

*/ @property (nonatomic, strong) id _Nullable payload; @end /** */ @interface AWSIoTDataListNamedShadowsForThingRequest : AWSRequest /**

The token to retrieve the next set of results.

*/ @property (nonatomic, strong) NSString * _Nullable nextToken; /**

The result page size.

*/ @property (nonatomic, strong) NSNumber * _Nullable pageSize; /**

The name of the thing.

*/ @property (nonatomic, strong) NSString * _Nullable thingName; @end /** */ @interface AWSIoTDataListNamedShadowsForThingResponse : AWSModel /**

The token to use to get the next set of results, or null if there are no additional results.

*/ @property (nonatomic, strong) NSString * _Nullable nextToken; /**

The list of shadows for the specified thing.

*/ @property (nonatomic, strong) NSArray * _Nullable results; /**

The Epoch date and time the response was generated by IoT.

*/ @property (nonatomic, strong) NSNumber * _Nullable timestamp; @end /** */ @interface AWSIoTDataListRetainedMessagesRequest : AWSRequest /**

The maximum number of results to return at one time.

*/ @property (nonatomic, strong) NSNumber * _Nullable maxResults; /**

To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

*/ @property (nonatomic, strong) NSString * _Nullable nextToken; @end /** */ @interface AWSIoTDataListRetainedMessagesResponse : AWSModel /**

The token for the next set of results, or null if there are no additional results.

*/ @property (nonatomic, strong) NSString * _Nullable nextToken; /**

A summary list the account's retained messages. The information returned doesn't include the message payloads of the retained messages.

*/ @property (nonatomic, strong) NSArray * _Nullable retainedTopics; @end /**

The input for the Publish operation.

Required parameters: [topic] */ @interface AWSIoTDataPublishRequest : AWSRequest /**

A UTF-8 encoded string that describes the content of the publishing message.

*/ @property (nonatomic, strong) NSString * _Nullable contentType; /**

The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received. correlationData is an HTTP header value in the API.

*/ @property (nonatomic, strong) NSString * _Nullable correlationData; /**

A user-defined integer value that represents the message expiry interval in seconds. If absent, the message doesn't expire. For more information about the limits of messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and quotas from the Amazon Web Services Reference Guide.

*/ @property (nonatomic, strong) NSNumber * _Nullable messageExpiry; /**

The message body. MQTT accepts text, binary, and empty (null) message payloads.

Publishing an empty (null) payload with retain = true deletes the retained message identified by topic from Amazon Web Services IoT Core.

*/ @property (nonatomic, strong) id _Nullable payload; /**

An Enum string value that indicates whether the payload is formatted as UTF-8. payloadFormatIndicator is an HTTP header value in the API.

*/ @property (nonatomic, assign) AWSIoTDataPayloadFormatIndicator payloadFormatIndicator; /**

The Quality of Service (QoS) level. The default QoS level is 0.

*/ @property (nonatomic, strong) NSNumber * _Nullable qos; /**

A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters.

*/ @property (nonatomic, strong) NSString * _Nullable responseTopic; /**

A Boolean value that determines whether to set the RETAIN flag when the message is published.

Setting the RETAIN flag causes the message to be retained and sent to new subscribers to the topic.

Valid values: true | false

Default value: false

*/ @property (nonatomic, strong) NSNumber * _Nullable retainValue; /**

The name of the MQTT topic.

*/ @property (nonatomic, strong) NSString * _Nullable topic; /**

A JSON string that contains an array of JSON objects. If you don’t use Amazon Web Services SDK or CLI, you must encode the JSON string to base64 format before adding it to the HTTP header. userProperties is an HTTP header value in the API.

The following example userProperties parameter is a JSON string which represents two User Properties. Note that it needs to be base64-encoded:

[{"deviceName": "alpha"}, {"deviceCnt": "45"}]

*/ @property (nonatomic, strong) NSString * _Nullable userProperties; @end /**

Information about a single retained message.

*/ @interface AWSIoTDataRetainedMessageSummary : AWSModel /**

The Epoch date and time, in milliseconds, when the retained message was stored by IoT.

*/ @property (nonatomic, strong) NSNumber * _Nullable lastModifiedTime; /**

The size of the retained message's payload in bytes.

*/ @property (nonatomic, strong) NSNumber * _Nullable payloadSize; /**

The quality of service (QoS) level used to publish the retained message.

*/ @property (nonatomic, strong) NSNumber * _Nullable qos; /**

The topic name to which the retained message was published.

*/ @property (nonatomic, strong) NSString * _Nullable topic; @end /**

The input for the UpdateThingShadow operation.

Required parameters: [thingName, payload] */ @interface AWSIoTDataUpdateThingShadowRequest : AWSRequest /**

The state information, in JSON format.

*/ @property (nonatomic, strong) id _Nullable payload; /**

The name of the shadow.

*/ @property (nonatomic, strong) NSString * _Nullable shadowName; /**

The name of the thing.

*/ @property (nonatomic, strong) NSString * _Nullable thingName; @end /**

The output from the UpdateThingShadow operation.

*/ @interface AWSIoTDataUpdateThingShadowResponse : AWSModel /**

The state information, in JSON format.

*/ @property (nonatomic, strong) id _Nullable payload; @end NS_ASSUME_NONNULL_END