/*
* 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 iot-2015-05-28.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.IoT.Model
{
///
/// Specifies MQTT Version 5.0 headers information. For more information, see
/// MQTT from Amazon Web Services IoT Core Developer Guide.
///
public partial class MqttHeaders
{
private string _contentType;
private string _correlationData;
private string _messageExpiry;
private string _payloadFormatIndicator;
private string _responseTopic;
private List _userProperties = new List();
///
/// Gets and sets the property ContentType.
///
/// A UTF-8 encoded string that describes the content of the publishing message.
///
///
///
/// For more information, see
/// Content Type from the MQTT Version 5.0 specification.
///
///
///
/// Supports substitution
/// templates.
///
///
[AWSProperty(Min=0, Max=1024)]
public string ContentType
{
get { return this._contentType; }
set { this._contentType = value; }
}
// Check to see if ContentType property is set
internal bool IsSetContentType()
{
return this._contentType != null;
}
///
/// Gets and sets the property CorrelationData.
///
/// 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.
///
///
///
/// For more information, see
/// Correlation Data from the MQTT Version 5.0 specification.
///
///
///
/// This binary data must be based64-encoded.
///
///
///
/// Supports substitution
/// templates.
///
///
[AWSProperty(Min=0, Max=1024)]
public string CorrelationData
{
get { return this._correlationData; }
set { this._correlationData = value; }
}
// Check to see if CorrelationData property is set
internal bool IsSetCorrelationData()
{
return this._correlationData != null;
}
///
/// Gets and sets the property MessageExpiry.
///
/// A user-defined integer value that will persist a message at the message broker for
/// a specified amount of time to ensure that the message will expire if it's no longer
/// relevant to the subscriber. The value of messageExpiry
represents the
/// number of seconds before it expires. 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.
///
///
///
/// Supports substitution
/// templates.
///
///
[AWSProperty(Min=0, Max=1024)]
public string MessageExpiry
{
get { return this._messageExpiry; }
set { this._messageExpiry = value; }
}
// Check to see if MessageExpiry property is set
internal bool IsSetMessageExpiry()
{
return this._messageExpiry != null;
}
///
/// Gets and sets the property PayloadFormatIndicator.
///
/// An Enum
string value that indicates whether the payload is formatted
/// as UTF-8.
///
///
///
/// Valid values are UNSPECIFIED_BYTES
and UTF8_DATA
.
///
///
///
/// For more information, see
/// Payload Format Indicator from the MQTT Version 5.0 specification.
///
///
///
/// Supports substitution
/// templates.
///
///
[AWSProperty(Min=0, Max=1024)]
public string PayloadFormatIndicator
{
get { return this._payloadFormatIndicator; }
set { this._payloadFormatIndicator = value; }
}
// Check to see if PayloadFormatIndicator property is set
internal bool IsSetPayloadFormatIndicator()
{
return this._payloadFormatIndicator != null;
}
///
/// Gets and sets the property ResponseTopic.
///
/// 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.
///
///
///
/// For more information, see
/// Response Topic from the MQTT Version 5.0 specification.
///
///
///
/// Supports substitution
/// templates.
///
///
[AWSProperty(Min=0, Max=1024)]
public string ResponseTopic
{
get { return this._responseTopic; }
set { this._responseTopic = value; }
}
// Check to see if ResponseTopic property is set
internal bool IsSetResponseTopic()
{
return this._responseTopic != null;
}
///
/// Gets and sets the property UserProperties.
///
/// An array of key-value pairs that you define in the MQTT5 header.
///
///
[AWSProperty(Min=1, Max=100)]
public List UserProperties
{
get { return this._userProperties; }
set { this._userProperties = value; }
}
// Check to see if UserProperties property is set
internal bool IsSetUserProperties()
{
return this._userProperties != null && this._userProperties.Count > 0;
}
}
}