Data Models
Classes that represent the standard c8y data models that are used by the API.
-
Wraps a c8y UserProfile, refer to c8y API Reference guid for more info
See moreDeclaration
Swift
public struct C8yCumulocityUser : Codable
-
Wraps a c8y ManagedObject, refer to c8y API Reference guid for more info
# Notes: #
Represent nearly all assets that can be stored in c8y such as devices, groups etc. Can be enriched with custom attributes, incidentally these can be accessed here through the dictionary property
properties
, keyed by the name of the attribute in c8y, but ONLY if they are prefixed with ‘#x#’If the custom property is not a String, then it will be flatted into constitute parts e.g.
"c8y_LoRaDevice": { "id" : "1234" ... }
would be accessible via
var loRaId = obj.properties["c8y_LoRaDevice.id"]
If you cannot prefix your custom property with ‘x’ or you don’t want flattened Strings then you will need to the custom processor to identify a class of your own to encode/decode the custom structure, refer to
See moreC8yCustomAssetProcessor
class for more informationDeclaration
Swift
public struct C8yManagedObject : JcEncodableContent
-
Wrapper for external id’s that are used to reference
See moreC8yManagedObject
Declaration
Swift
public struct C8yExternalIds : JcEncodableContent
-
Represents an external id for a
See moreC8yManagedObject
e.g. ‘c8y_Serial’ or ‘c8y_LoRa_DevEUI’Declaration
Swift
public struct C8yExternalId : JcEncodableContent, Identifiable
-
Defines a type of Measurement that will send from the associated Managed Object
See moreDeclaration
Swift
public struct C8yDataPoints : Codable
-
Represents an c8y alarm, refer to c8y API Reference Guide for more info
See moreDeclaration
Swift
public struct C8yAlarm : JcEncodableContent, Identifiable
-
Represents an c8y event, refer to c8y API Reference Guide for more info
See moreDeclaration
Swift
public struct C8yEvent : JcEncodableContent, Identifiable
-
Represents a collection of c8y measurements, refer to c8y API Reference Guide for more info
See moreDeclaration
Swift
public struct C8yMeasurement : Codable
-
Collated list of measurement for a specific series c8y API Reference Guide
See moreDeclaration
Swift
public struct C8yMeasurementSeries : JcEncodableContent
-
Represents an c8y operation, that can be posted to a remote device c8y API Reference Guide for more info
See moreDeclaration
Swift
public struct C8yOperation : JcEncodableContent, Identifiable
-
Results from
See moreC8yManagedObjectService
requestDeclaration
Swift
public struct C8yPagedManagedObjects : Codable
-
Results from
See moreC8yAlarmsService
requestDeclaration
Swift
public struct C8yPagedAlarms : Codable
-
Results from
See moreC8yEventsService
requestDeclaration
Swift
public struct C8yPagedEvents : Codable
-
List of paged measurements returned from
See moreC8yMeasurementsService
Declaration
Swift
public struct C8yPagedMeasurements : JcEncodableContent
-
Undocumented
See moreDeclaration
Swift
public struct C8yPagedOperations : Codable
-
Used when fetching assets from c8y to ensure that client is not overloaded. All services have a ‘pageSize’ attribute to limit the number of rows returned for any request. Each response is also provided withh an instance of this class to ensure that the caller can determine if there are more assets to fetch. They can retrieve the next page by calling the original function, incrementing the pageNum
See moreDeclaration
Swift
public struct C8yPageStatistics : Codable