KiiCloudStorageSDK : KiiCorp.Cloud.Storage Namespace

KiiPushMessage.Builder Class

Builder of the message.

Syntax

public class KiiPushMessage.Builder

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Members

See Also: Inherited members from object.

Public Methods

Build () : KiiPushMessage
Build and return KiiPushMessage.
EnableAPNS (bool) : KiiPushMessage.Builder
Set flag of APNS delivery If omit calling this method, APNS delivery is enabled. Overwrite APNS delivery flag in the JSON message if already set by KiiCorp.Cloud.Storage.KiiPushMessage.Builder.WithAPNSMessage(APNSMessage)
EnableGCM (bool) : KiiPushMessage.Builder
Set flag of GCM delivery If omit calling this method, GCM delivery is enabled. Overwrite the GCM delivery flag in the message JSON if already set by KiiCorp.Cloud.Storage.KiiPushMessage.Builder.WithGCMMessage(GCMMessage) method, GCM delivery flag will be
EnableMqtt (bool) : KiiPushMessage.Builder
Set flag of MQTT delivery If omit calling this method, MQTT delivery is enabled. Overwrite the MQTT delivery flag in the message JSON if already set by KiiCorp.Cloud.Storage.KiiPushMessage.Builder.WithMqttMessage(MqttMessage) method, MQTT delivery flag will be
SendAppID (bool) : KiiPushMessage.Builder
Flags indicates whether "appId" field will be send or not.
SendObjectScope (bool) : KiiPushMessage.Builder
Flags indicates whether "objectScope" field will be send or not.
SendOrigin (bool) : KiiPushMessage.Builder
Flags indicates whether "sendOrigin" field will be send or not.
SendSender (bool) : KiiPushMessage.Builder
Flags indicates whether "sender" field will be send or not.
SendToDevelopment (bool) : KiiPushMessage.Builder
Flag indicates whether send to Development installations or not. Development installations are instantiated by calling KiiUser.PushInstallation(bool) with true. If omit calling this method, default value is true.
SendTopicId (bool) : KiiPushMessage.Builder
Flags indicates whether "topicID" field will be send or not.
SendToProduction (bool) : KiiPushMessage.Builder
Flag indicates whether send to Production installations or not. Production installations are instantiated by calling KiiUser.PushInstallation or KiiUser.PushInstallation(bool) with false. If omit calling this method, default value is true.
SendWhen (bool) : KiiPushMessage.Builder
Flags indicates whether "when" field will be send or not.
WithAPNSMessage (APNSMessage) : KiiPushMessage.Builder
Build with APNS specific message that will be delivered through APNS. Override the APNS delivery flag if already set by KiiCorp.Cloud.Storage.KiiPushMessage.Builder.EnableAPNS(bool)
WithGCMMessage (GCMMessage) : KiiPushMessage.Builder
Build with GCM specific message that will be delivered through GCM. Override the GCM delivery flag if already set by KiiCorp.Cloud.Storage.GCMMessage
WithMqttMessage (MqttMessage) : KiiPushMessage.Builder
Build with MQTT specific message that will be delivered through MQTT. Override the MQTT delivery flag if already set by KiiCorp.Cloud.Storage.MqttMessage
WithPushMessageType (string) : KiiPushMessage.Builder
Set the message type field with the provided value.

Member Details

Build Method

Build and return KiiPushMessage.

Syntax

public KiiPushMessage Build ()

Returns

KiiPushMessage

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

EnableAPNS Method

Set flag of APNS delivery If omit calling this method, APNS delivery is enabled. Overwrite APNS delivery flag in the JSON message if already set by KiiCorp.Cloud.Storage.KiiPushMessage.Builder.WithAPNSMessage(APNSMessage)

Syntax

public KiiPushMessage.Builder EnableAPNS (bool apnsEnabled)

Parameters

apnsEnabled
if true message would be delivered via APNS. If false, this message would not delivered thru APNS.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

EnableGCM Method

Set flag of GCM delivery If omit calling this method, GCM delivery is enabled. Overwrite the GCM delivery flag in the message JSON if already set by KiiCorp.Cloud.Storage.KiiPushMessage.Builder.WithGCMMessage(GCMMessage) method, GCM delivery flag will be

Syntax

public KiiPushMessage.Builder EnableGCM (bool gcmEnabled)

Parameters

gcmEnabled
if true message would be delivered via GCM. If false, this message would not delivered thru GCM.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

EnableMqtt Method

Set flag of MQTT delivery If omit calling this method, MQTT delivery is enabled. Overwrite the MQTT delivery flag in the message JSON if already set by KiiCorp.Cloud.Storage.KiiPushMessage.Builder.WithMqttMessage(MqttMessage) method, MQTT delivery flag will be

Syntax

public KiiPushMessage.Builder EnableMqtt (bool mqttEnabled)

Parameters

mqttEnabled
if true message would be delivered via MQTT. If false, this message would not delivered thru MQTT.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SendAppID Method

Flags indicates whether "appId" field will be send or not.

Syntax

public KiiPushMessage.Builder SendAppID (bool isSendAppId)

Parameters

isSendAppId
If true, the appID field will also be sent. Default is false.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SendObjectScope Method

Flags indicates whether "objectScope" field will be send or not.

Syntax

public KiiPushMessage.Builder SendObjectScope (bool sendObjectScope)

Parameters

sendObjectScope
If true, send the “objectScope”-related fields that contain the topic that is the source of this notification. Default is true.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SendOrigin Method

Flags indicates whether "sendOrigin" field will be send or not.

Syntax

public KiiPushMessage.Builder SendOrigin (bool sendOrigin)

Parameters

sendOrigin
If true, send the “origin” field that indicates if the message is the result of an event or sended explicitly by someone. Default is false.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SendSender Method

Flags indicates whether "sender" field will be send or not.

Syntax

public KiiPushMessage.Builder SendSender (bool sendSender)

Parameters

sendSender
If true, send the “sender” field which is userID of the user that triggered the notification. Default is true.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SendToDevelopment Method

Flag indicates whether send to Development installations or not. Development installations are instantiated by calling KiiUser.PushInstallation(bool) with true. If omit calling this method, default value is true.

Syntax

public KiiPushMessage.Builder SendToDevelopment (bool sendToDevelopment)

Parameters

sendToDevelopment
If set to true send to development.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SendTopicId Method

Flags indicates whether "topicID" field will be send or not.

Syntax

public KiiPushMessage.Builder SendTopicId (bool sendTopicId)

Parameters

sendTopicId
If true, send the “topicID” field, which contains the topicID that is the source of this notification. Default is true.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SendToProduction Method

Flag indicates whether send to Production installations or not. Production installations are instantiated by calling KiiUser.PushInstallation or KiiUser.PushInstallation(bool) with false. If omit calling this method, default value is true.

Syntax

public KiiPushMessage.Builder SendToProduction (bool sendToProduction)

Parameters

sendToProduction
If set to true send to production.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SendWhen Method

Flags indicates whether "when" field will be send or not.

Syntax

public KiiPushMessage.Builder SendWhen (bool sendWhen)

Parameters

sendWhen
If true, send the “when” field which denotes the time of push message was sent. Default is false.

Returns

Builder of the message.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithAPNSMessage Method

Build with APNS specific message that will be delivered through APNS. Override the APNS delivery flag if already set by KiiCorp.Cloud.Storage.KiiPushMessage.Builder.EnableAPNS(bool)

Syntax

public KiiPushMessage.Builder WithAPNSMessage (APNSMessage message)

Parameters

message
Message.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithGCMMessage Method

Build with GCM specific message that will be delivered through GCM. Override the GCM delivery flag if already set by KiiCorp.Cloud.Storage.GCMMessage

Syntax

public KiiPushMessage.Builder WithGCMMessage (GCMMessage message)

Parameters

message
Message.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithMqttMessage Method

Build with MQTT specific message that will be delivered through MQTT. Override the MQTT delivery flag if already set by KiiCorp.Cloud.Storage.MqttMessage

Syntax

public KiiPushMessage.Builder WithMqttMessage (MqttMessage message)

Parameters

message
Message.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

WithPushMessageType Method

Set the message type field with the provided value.

Syntax

public KiiPushMessage.Builder WithPushMessageType (string pushMessageType)

Parameters

pushMessageType
Type of the push message.

Returns

Builder of the message.

Exceptions

Type Reason
ArgumentNullException Is thrown when an argument is null.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0