AnyC8yObject
public struct AnyC8yObject : Identifiable, Equatable, Hashable
Wrapper to allow objects deviced from C8yObject
to managed as a collection.
Swift does not allow Arrays or Dictionaries to reference protocol types, hence why this is needed.
This class is used by C8yAssetCollection
to allow both C8yDevice
and C8yGroup
objects to managed together.
-
Local id reference for wrapped object
Declaration
Swift
public let id: String
-
Cumulocity internal id from wrapped object
Declaration
Swift
public let c8yId: String?
-
Declaration
Swift
public let type: WrappedType
-
The name attributed to the wrapped object
Declaration
Swift
public var name: String { get }
-
Constructor for a wrapper containing the given object
Declaration
Swift
public init<T>(_ obj: T) where T : C8yObject
-
The wrapped object
Declaration
Swift
public func wrappedValue<T>() -> T where T : C8yObject
-
Declaration
Swift
public static func == (lhs: AnyC8yObject, rhs: AnyC8yObject) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Enumerator type for possoble content types
See moreDeclaration
Swift
public enum WrappedType : String