Disruptive Documentation

Enumeration Object​Present​Event.​State

public enum State: Codable, Equatable  

The proximity state of a sensor.

%309 ObjectPresentEvent.State ObjectPresentEvent.State Codable Codable ObjectPresentEvent.State->Codable Equatable Equatable ObjectPresentEvent.State->Equatable

Member Of

ObjectPresentEvent

An event that is sent whenever an object is close to a proximity sensor or not.

Conforms To

Codable
Equatable

Initializers

init(from:​)

public init(from decoder: Decoder) throws  

Enumeration Cases

object​Present

case objectPresent

An object is close to the sensor.

object​Not​Present

case objectNotPresent

No objects are close to the sensor.

unknown

case unknown(value: String) 

Used for backward compatibility in case a new state is added on the backend before being added to this client library.

Methods

encode(to:​)

public func encode(to encoder: Encoder) throws