Cumulocity API Services / com.softwareag.jc.cumulocity.services.models / Alarm

Alarm

data class Alarm : JsonSerializable

Represents an alarm associated with a device.

Formal definition is given in Cumulocity REST API Guide

Types

Severity

enum class Severity

Allowed values for Alarm Severity

Source

data class Source : JsonSerializable

Wraps id to identify associated device

Status

enum class Status

Allowed values for Alarm Status

Constructors

<init>

Alarm(o: JSONObject)

Alternative constructor used to parse Alarm fetched from Cumulocity. NOTE: You do not need to use this method. It is called implicitly when using the AlarmsService get method

Alarm(source: Alarm.Source, type: String, status: Alarm.Status, severity: Alarm.Severity, text: String)

Create a new alarm to be posted to Cumulocity

Properties

severity

val severity: Alarm.Severity

One of Critical, Major, Minor or Warning

source

val source: Alarm.Source

Identifies the device to which the alarm is associated

status

val status: Alarm.Status

Identifies if the alarm is active, acknowledged or has been resolved (cleared)

text

val text: String

arbitrary label describing reason for alarm

time

val time: Date

Date time when alarm was raised

type

val type: String

label identifying the type of alarm

Functions

toJSONString

fun toJSONString(): String

Ensures alarm can be transformed into a JSON String so that it can be sent to Cumulocity NOTE: You do not need to use this method. It is called implicitly when using the AlarmsService post or AlarmsService put method