struct DispensableItemThe available dispensible items.
-
Internal name for the dispensed item. This can be non-user-friendly, and is shared across all languages.
Declaration
Swift
let itemName: String -
Synonym names for the dispensed item in each supported language.
Declaration
Swift
let itemNameSynonyms: [Google.DispenseTrait.ItemNameSynonym] -
Set of units the device supports for that item.
Declaration
Swift
let supportedUnits: [Google.DispenseTrait.Unit] -
Typical amount of the item that may be dispensed.
Declaration
Swift
let defaultPortion: Google.DispenseTrait.Amount -
Creates a new Struct instance using data read from the given
TraitDecoder.Throws
HomeError.parseErrorwhen parsing fails.Declaration
Swift
init(decoder: TraitDecoder) throwsParameters
decoderThe raw data representing this Struct.
-
Writes this Struct to the given
TraitEncoder. ThrowsHomeError.parseErrorif the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Returns the field corresponding to the given field ID.
Declaration
Swift
static func structField(id: UInt32) -> (any Field)?