The following declarations are provided by module GoogleHomeSDK.
-
A type-erased
Bitmap
Declaration
Swift
struct AnyBitmap
extension AnyBitmap : AutomationValue, Bitmap, Equatable, ExpressibleByArrayLiteral, Hashable, OptionSet, RawRepresentable, Sendable, SetAlgebra
-
A type-erased
Enum
Declaration
Swift
struct AnyEnum
extension AnyEnum : AutomationValue, Enum, Equatable, Hashable, RawRepresentable, Sendable
-
Struct holding information about a generic, encoded event that has yet to be parsed into its corresponding concrete type.
Declaration
Swift
struct AnyEvent
extension AnyEvent : Sendable
-
A type-erased
StructDataRepresentable
Declaration
Swift
struct AnyStruct
extension AnyStruct : AutomationValue, Equatable, Hashable, Sendable, StructDataRepresentable
-
Represents a constant value in the automation graph.
Declaration
Swift
enum AnyAutomationValue
extension AnyAutomationValue : Equatable, Hashable, Sendable
-
Supported automation value types.
Declaration
Swift
protocol AutomationValue : Sendable
-
Array of automation values.
Declaration
Swift
protocol AutomationValueArray : Collection where Self.Element : AutomationValue
-
Optional array of automation values.
Declaration
Swift
protocol OptionalAutomationValueArray
-
Optional-wrapped automation value.
Declaration
Swift
protocol OptionalAutomationValue
-
Optional-wrapped comparable type.
Declaration
Swift
protocol OptionalComparable
-
Optional-wrapped numeric type.
Declaration
Swift
protocol OptionalNumeric
-
Optional-wrapped signed integer type.
Declaration
Swift
protocol OptionalSignedInteger
-
Optional-wrapped unsigned integer type.
Declaration
Swift
protocol OptionalUnsignedInteger
-
Undocumented
Declaration
Swift
struct AnyNodeCandidate
extension AnyNodeCandidate : Equatable, Hashable, Sendable
-
Details about an attribute field.
Declaration
Swift
struct AttributeFieldDetails
extension AttributeFieldDetails : Equatable, FieldDetails, Hashable
-
A base protocol for all Automation instances.
Declaration
Swift
protocol BaseAutomation : Identifiable, Sendable
-
User-specifiable fields of the
Automation
. Used primarily for automation creation.Declaration
Swift
typealias DraftAutomation = BaseAutomation
-
The main representation of an automation, containing Metadata fields as well as the Automation Graph containing Automation nodes, including Starter instances, Condition instances, Action instances, and more.
Declaration
Swift
protocol Automation : BaseAutomation
-
Undocumented
Declaration
Swift
final class MutableAutomationData
-
A base protocol representing a ‘node’ for the automation graph. All parts of the automation graph must conform to the Node protocol.
Declaration
Swift
protocol Node : Hashable, Identifiable, Sendable where Self.ID == String
extension Node : Equatable
-
A base protocol for all ‘Flow’ Nodes.
Declaration
Swift
protocol Flow : Node
-
A starter that allows the user to manually activate an automation.
Declaration
Swift
struct ManualStarter
extension ManualStarter : Equatable, Hashable, Identifiable, Node, Sendable
-
A Node that will delay execution for a specified length of time.
Declaration
-
A Node that will terminates execution of all the following nodes if the automation is triggered again within the specified time range.
Declaration
-
Base protocol for all Starters in the automation graph.
Declaration
Swift
protocol Starter : NodeWithOutput
-
Struct for all Event based starters, relying on an event to trigger the automation.
Declaration
Swift
struct EventStarter
extension EventStarter : Equatable, Hashable, Identifiable, Node, NodeWithOutput, Sendable, Starter
-
Struct for all Attribute based starters relying on the value of a trait.
Declaration
Swift
struct AttributeStarter
extension AttributeStarter : Equatable, Hashable, Identifiable, Node, NodeWithOutput, Sendable, Starter
-
Base struct for all Conditions in the automation graph.
Declaration
Swift
struct Condition
extension Condition : Copyable, Equatable, Escapable, Hashable, Identifiable, Node, Sendable
-
Base struct for all Actions in the automation graph.
Declaration
-
Represents the behavior of an action.
Declaration
Swift
protocol ActionBehavior : Sendable
-
A trait command used in an automation action.
Declaration
Swift
struct AutomationCommand
extension AutomationCommand : ActionBehavior, Copyable, Equatable, Escapable, Sendable
-
Trait attribute update used in an automation action.
Declaration
-
A class that accesses a trait’s state, used for conditions.
Declaration
Swift
struct StateReader
extension StateReader : Equatable, Hashable, Identifiable, Node, NodeWithOutput, Sendable
-
A protocol that specifies when a node that can produce output, such as Starter or StateReader.
Declaration
Swift
protocol NodeWithOutput : Node
-
A Parameter contains the identifier and value of a parameter for a starter, command, or event.
Declaration
Swift
struct Parameter
extension Parameter : Equatable, Hashable, Sendable
-
Enum to define the ways of coordinating the execution of multiple concurrent operations in a ParallelFlow.
Declaration
Swift
enum JoinSemanticType
extension JoinSemanticType : Equatable, Hashable, Sendable
-
Build an automation.
Declaration
Swift
func automation(id: String = "", structureID: String = "", name: String = "UNSPECIFIED_NAME", description: String = "UNSPECIFIED_DESCRIPTION", isActive: Bool = true, @FlowBuilder _ sequentialNodes: () -> [any Node]) -> any DraftAutomation
Parameters
id
The ID of the automation. Defaults to empty string. If empty, the automation will be considered as a new automation.
structureID
The structure ID of the automation. Defaults to empty string. If empty, will be populated with the structure ID of the current structure on create/update.
description
The description of the automation.
isActive
Whether the automation is active; defaults to true.
-
Build a
SequentialFlow
from aFlowBuilder
.Declaration
Swift
func sequential(@FlowBuilder _ nodes: () -> [any Node]) -> SequentialFlow
-
Build a
ParallelFlow
from aFlowBuilder
.Declaration
Swift
func parallel(@FlowBuilder _ nodes: () -> [any Node]) -> ParallelFlow
-
Build a
SelectFlow
from aFlowBuilder
.Declaration
Swift
func select(@FlowBuilder _ nodes: () -> [any Node]) -> SelectFlow
-
Creates a
TypedReference
to a device-basedAttributeStarter
from the givendevice
,deviceType
, andtrait
.The
TypedReference
can be provided to aFlowBuilder
to add the underlyingAttributeStarter
to a flow and used to select the field to read from the corresponding trait.Declaration
Swift
func starter<T>(_ device: HomeDevice, _ deviceType: any DeviceType.Type, _ trait: T.Type) -> TypedReference<T, AttributeStarter> where T : Trait
-
Creates a
TypedReference
to a structure-basedAttributeStarter
from the givenstructure
andtrait
.The
TypedReference
can be provided to aFlowBuilder
to add the underlyingAttributeStarter
to a flow and used to select the field to read from the corresponding trait.Declaration
Swift
func starter<T>(_ structure: Structure, _ trait: T.Type) -> TypedReference<T, AttributeStarter> where T : Trait
-
Creates a device-based
EventStarter
from the givendevice
,deviceType
, andevent
.Declaration
Swift
func starter<T>(_ device: HomeDevice, _ deviceType: any DeviceType.Type, _ event: T.Type) -> TypedReference<T, EventStarter> where T : Event
-
Creates a structure-based
EventStarter
from the givenstructure
andevent
.Declaration
Swift
func starter<T>(_ structure: Structure, _ event: T.Type) -> TypedReference<T, EventStarter> where T : Event
-
Creates a device-based
EventStarter
from the givendevice
,deviceType
,event
, andparameters
.Declaration
Swift
func starter<T>(_ device: HomeDevice, _ deviceType: any DeviceType.Type, _ event: T.Type, @ParameterBuilder<T> _ parameters: () -> [Parameter]) -> TypedReference<T, EventStarter> where T : Event
-
Creates a structure-based
EventStarter
from the givenstructure
,event
, andparameters
.Declaration
Swift
func starter<T>(_ structure: Structure, _ event: T.Type, @ParameterBuilder<T> _ parameters: () -> [Parameter]) -> TypedReference<T, EventStarter> where T : Event
-
Creates a
TypedReference
to a device-basedStateReader
from the givendevice
,deviceType
, andtrait
.The
TypedReference
can be provided to aFlowBuilder
to add the underlyingStateReader
to a flow and used to select the field to read from the corresponding trait.Declaration
Swift
func stateReader<T>(_ device: HomeDevice, _ deviceType: any DeviceType.Type, _ trait: T.Type) -> TypedReference<T, StateReader> where T : Trait
-
Creates a
TypedReference
to a structure-basedStateReader
from the givenstructure
andtrait
.The
TypedReference
can be provided to aFlowBuilder
to add the underlyingStateReader
to a flow and used to select the field to read from the corresponding trait.Declaration
Swift
func stateReader<T>(_ structure: Structure, _ trait: T.Type) -> TypedReference<T, StateReader> where T : Trait
-
Creates a condition.
Declaration
Swift
func condition(for duration: Duration? = nil, _ expression: () -> TypedExpression<Bool>) -> Condition
Parameters
expression
Builder for the boolean
TypedExpression
of the condition.Return Value
The
Condition
node. -
Undocumented
Declaration
Swift
@_spi(Unknown) func fieldSelect<T, N, V>(from selectFrom: TypedReference<T, N>, selectedField: any Field) -> TypedExpression<V> where N : NodeWithOutput, V : AutomationValue
-
Undocumented
Declaration
Swift
@_spi(Unknown) func fieldSelect<V>(from selectFrom: any Expression, selectedField: any Field) -> TypedExpression<V> where V : AutomationValue
-
Build a
ManualStarter
node.Declaration
Swift
func manualStarter() -> ManualStarter
-
Build a
Suppression
node with the givenduration
.Declaration
Swift
func suppress(for duration: Duration) -> Suppression
-
Build a device-based action with the given
device
,deviceType
, andbehavior
.Declaration
Swift
func action(_ device: HomeDevice, _ deviceType: (any DeviceType.Type), _ behavior: () -> any ActionBehavior) -> Action
-
Build a structure-based action with the given
structure
andbehavior
.Declaration
Swift
func action(_ structure: Structure, _ behavior: () -> any ActionBehavior) -> Action
-
A builder for Trait attribute updates.
Methods will be surfaced, based on the associated Trait, to allow setting the writable attributes.
Declaration
Swift
final class Updater<T> where T : Trait
-
A result builder that builds a list of nodes for a flow.
Declaration
Swift
@resultBuilder struct FlowBuilder
-
A typed reference to a Starter or StateReader.
Declaration
-
Undocumented
Declaration
Swift
struct TypedParameter<Container>
-
Undocumented
Declaration
Swift
@resultBuilder struct ParameterBuilder<Container>
-
A protocol for handling Automation objects. This protocol will support the various CRUD operations that can be performed on an automation including lifecycle and management.
Declaration
Swift
@MainActor protocol AutomationManager
-
Validation issues that makes the automation invalid. A valid automation should have the following properties:
- Semantic correctness: The automation graph should follow some rules in order to be executed as expected,
- Valid expression tree : The expression should be compilable and evalable.
- Prevent abuse: Automation Platform Abuse Prevention. All operations should be supported by the entity capabilities.
Declaration
Swift
struct AutomationValidationIssue
extension AutomationValidationIssue : Equatable, Sendable
-
The ID of a behavior, which can be a command, event or trait.
Declaration
Swift
enum BehaviorID
extension BehaviorID : Equatable, Sendable
-
The identifier of a matter attribute.
Declaration
Swift
enum AttributeID
extension AttributeID : Equatable, Sendable
-
The severity of the validation issue.
Declaration
Swift
enum ValidationIssueSeverity
extension ValidationIssueSeverity : Equatable, Hashable, Sendable
-
The possible validation issues that may occur.
Declaration
Swift
enum ValidationIssueType
extension ValidationIssueType : Equatable, Sendable
-
The output variable has been defined in multiple nodes with different types.
Declaration
Swift
struct OutputTypeMismatch
extension OutputTypeMismatch : Equatable, Sendable
-
The output variable has been reinitialized in multiple nodes.
Declaration
Swift
struct OutputReinitialized
extension OutputReinitialized : Equatable, Sendable
-
The expression contains an invalid number of arguments.
Declaration
Swift
struct InvalidArgumentCount
extension InvalidArgumentCount : Equatable, Sendable
-
The expression uses an invalid operand.
Declaration
Swift
struct InvalidOperand
extension InvalidOperand : Equatable, Sendable
-
The arguments for the operator are not valid.
Declaration
Swift
struct InvalidArgumentsForOperator
extension InvalidArgumentsForOperator : Equatable, Sendable
-
The condition type is not valid.
Declaration
Swift
struct InvalidConditionType
extension InvalidConditionType : Equatable, Sendable
-
The entity expression type is not valid.
Declaration
Swift
struct InvalidEntityExpressionType
extension InvalidEntityExpressionType : Equatable, Sendable
-
The
FIELD_SELECT
expression uses an invalid field.Declaration
Swift
struct InvalidField
extension InvalidField : Equatable, Sendable
-
The “reference,” which refers to output produced by a preceding node, is unknown.
Declaration
Swift
struct InvalidReference
extension InvalidReference : Equatable, Sendable
-
Reasons why a candidate node is not supported.
Declaration
Swift
struct UnsupportedCandidateReason
extension UnsupportedCandidateReason : Equatable, Hashable, Sendable
-
The type of presence sensing setup that is missing.
Declaration
Swift
enum PresenceSensingSetupType
extension PresenceSensingSetupType : Equatable, Hashable, Sendable
-
Candidate is not supported due to missing presence sensing setup.
Declaration
Swift
enum UnsupportedCandidateReasonType
extension UnsupportedCandidateReasonType : Equatable, Hashable, Sendable
-
Represents automation candidate nodes corresponding to a command. These can be used in actions.
Declaration
Swift
struct CommandCandidate
extension CommandCandidate : ActionCandidate, Copyable, Equatable, Equatable, Escapable, Hashable, Hashable, NodeCandidate, NodeCandidate, Sendable, Sendable
-
Details about a command field.
Declaration
-
Constraints on a trait attribute, command parameter or event field. Represents the possible values that an attribute, parameter or field can have.
Declaration
Swift
enum Constraint
extension Constraint : Equatable, Hashable, Sendable
-
Represents a group of bits in a bitmap - with start and end positions along with a name.
Declaration
Swift
@_spi(Unknown) struct CombinedBitsDescriptor
extension CombinedBitsDescriptor : Equatable, Hashable, Sendable
-
Constraint for fields of the struct.
Declaration
Swift
struct StructFieldConstraint
extension StructFieldConstraint : Equatable, Hashable, Sendable
-
Represents the base unit of a measurement.
Declaration
Swift
enum BaseUnit
extension BaseUnit : Equatable, Hashable, RawRepresentable, Sendable
-
Represents a unit of measurement which consists of a base unit and a scale.
For example, if a field has the unit centi-celsius, the base unit would be Celsius and the multiplier would be 0.01.
Declaration
Swift
struct ConstraintUnit
extension ConstraintUnit : Equatable, Hashable, Sendable
-
Manages Discovery Candidates for all Structures in a User Account.
This protocol is used to manage the Discovery Candidates for all Structures in a User Account. This includes fetching, caching and freshing the candidates.
Note
This protocol exists to facilitate eventual SRL migration.Declaration
Swift
protocol DiscoveryController : Sendable
-
Represents automation candidate nodes corresponding to an event. These can be used in starters.
Declaration
Swift
struct EventCandidate
extension EventCandidate : Copyable, Equatable, Equatable, Escapable, Hashable, Hashable, NodeCandidate, NodeCandidate, Sendable, Sendable, StarterCandidate
-
Details about an event field.
Declaration
-
An expression which evaluates to a value.
Depending on the concrete type, it may represent:
- Simple literal expressions including a constant or a reference.
- Complex expressions with one operator and one or more operand(s), such as a logical expression, a comparison expression, a struct traversal expression.
Declaration
Swift
protocol Expression : Sendable
-
Typed-erased Expression.
Declaration
-
Represent a complex expression with one operator and one or more operand(s).
Depending on the operator type, it may represent:
- Arithmetic (plus, minus, etc.) expressions,
- Comparison (equals, greaterThan, etc.) expressions,
- Logical (and, or, etc.) expressions,
- Struct traversal (fieldSelect) expressions,
- List accessor (listSize, listContains, etc.) expressions,
- Comprehension (listAnyMatch, listFilter, etc.) expressions.
Declaration
Swift
protocol IdentifiableExpression : Expression, Identifiable where Self.ID == String
-
Represent a binary expression with two operands.
The full expression is represented as:
operand1
operator
operand2
.Declaration
Swift
protocol BinaryExpression : IdentifiableExpression
-
Represent a ternary expression with three operands.
Declaration
Swift
protocol TernaryExpression : IdentifiableExpression
-
Represent a unary expression with one operand.
The full expression is represented as:
operator
operand
.Declaration
Swift
protocol UnaryExpression : IdentifiableExpression
-
Represents a constant.
Constant is often used as the second operand in expressions. For instance: Equals(operand1: Reference() , operand2: Constant(true)).
Declaration
-
Represent a reference, to the previously defined node in the automation graph.
Reference is often used as the first operand in expressions. for instance: Equals(operand1: Reference() , operand2: Constant(true)).
Declaration
-
Represents a reference declaration. Only valid in a list comprehension expression.
Declaration
-
The plus operator, which evaluates to
operand1
+operand2
.Declaration
Swift
struct Plus
extension Plus : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The minus operator, which evaluates to
operand1
-operand2
.Declaration
Swift
struct Minus
extension Minus : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The multiply operator, which evaluates to
operand1
*operand2
.Declaration
Swift
struct Multiply
extension Multiply : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The divide operator, which evaluates to
operand1
/operand2
.Declaration
Swift
struct Divide
extension Divide : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The equality operator, which evaluates to
true
whenoperand1
equalsoperand2
.Declaration
Swift
struct Equals
extension Equals : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The equality operator, which evaluates to
true
whenoperand1
not equals tooperand2
.Declaration
Swift
struct NotEquals
extension NotEquals : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The between operator, which evaluates to
true
whenoperand1
is betweenoperand2
andoperand3
.Declaration
Swift
struct Between
extension Between : Equatable, Expression, Identifiable, IdentifiableExpression, Sendable, TernaryExpression
-
The between times operator, which evaluates to
true
whenoperand1
is betweenoperand2
andoperand3
.NOTE: Only valid for
TimeOfDay
-based expressions.Declaration
Swift
struct BetweenTimes
extension BetweenTimes : Equatable, Expression, Identifiable, IdentifiableExpression, Sendable, TernaryExpression
-
The comparison operator, which evaluates to
true
whenoperand1
>
operand2
.Declaration
Swift
struct GreaterThan
extension GreaterThan : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The comparison operator, which evaluates to
true
whenoperand1
<
operand2
.Declaration
Swift
struct LessThan
extension LessThan : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The comparison operator, which evaluates to
true
whenoperand1
>=
operand2
.Declaration
Swift
struct GreaterThanOrEquals
extension GreaterThanOrEquals : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The comparison operator, which evaluates to
true
whenoperand1
>=
operand2
.Declaration
Swift
struct LessThanOrEquals
extension LessThanOrEquals : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Selects an attribute, an event field or struct field(s) from a reference expression.
Declaration
Swift
struct FieldSelect
extension FieldSelect : Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The logical AND operator which evaluates to
true
when bothoperand1
andoperand2
aretrue
.Declaration
Swift
struct And
extension And : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The logical OR operator which evaluates to
true
when eitheroperand1
oroperand2
istrue
.Declaration
Swift
struct Or
extension Or : BinaryExpression, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
The logical NOT operator which evaluates to
true
whenoperand
isfalse
.Declaration
Swift
struct Not
extension Not : Equatable, Expression, Identifiable, IdentifiableExpression, Sendable, UnaryExpression
-
Represents the “size” operation on a list expression.
Declaration
Swift
struct ListSize
extension ListSize : Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Represents the “in” operation on a list expression. Returns
true
if the element is in the list.Declaration
Swift
struct ListIn
extension ListIn : Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Represents the “contains” operation on a list expression. Returns
true
if the element is in the list.Declaration
Swift
struct ListContains
extension ListContains : Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Represents the “get” operation on a list expression. Returns the element at the given index.
Declaration
Swift
struct ListGet
extension ListGet : Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Represents list comprehension expressions.
Declaration
Swift
protocol Comprehension : IdentifiableExpression
-
Represents the “all match” operation on a list expression.
Declaration
Swift
struct ListAllMatch
extension ListAllMatch : Comprehension, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Represents the “any match” operation on a list expression.
Declaration
Swift
struct ListAnyMatch
extension ListAnyMatch : Comprehension, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Represents the “none match” operation on a list expression.
Declaration
Swift
struct ListNoneMatch
extension ListNoneMatch : Comprehension, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Represents the map operation on a list expression.
Declaration
Swift
struct ListMap
extension ListMap : Comprehension, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Represents the “filter” operation on a list expression.
Declaration
Swift
struct ListFilter
extension ListFilter : Comprehension, Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Undocumented
Declaration
Swift
struct UnknownExpression
extension UnknownExpression : Equatable, Expression, Identifiable, IdentifiableExpression, Sendable
-
Undocumented
Declaration
Swift
func constant(_ timeOfDay: TimeOfDay) -> TypedExpression<TimeOfDay>
-
Undocumented
Declaration
Swift
func constant(_ duration: Duration) -> TypedExpression<Duration>
-
Basic information about a Trait field.
Declaration
Swift
protocol FieldDetails : Hashable
-
Represents a date.
This struct doesn’t include any time zone related information.
Declaration
Swift
struct LocalDate
extension LocalDate : AutomationValue, Copyable, Decodable, Encodable, Equatable, Escapable, Hashable, Sendable, Sendable, StructDataRepresentable
-
Represents month and day.
This struct doesn’t include any time zone related information.
Declaration
Swift
struct MonthDay
extension MonthDay : AutomationValue, Copyable, Decodable, Encodable, Equatable, Escapable, Hashable, Sendable, Sendable, StructDataRepresentable
-
Defines the common attributes of all Automations Discovery candidates.
Declaration
Swift
protocol NodeCandidate : Hashable, Sendable
-
Defines the common attributes of all Automations Discovery candidates that can be converted to a Starter.
Declaration
Swift
protocol StarterCandidate : NodeCandidate
-
Defines the common attributes of all Automations Discovery candidates that can be converted to a StateReader.
Declaration
Swift
protocol StateReaderCandidate : NodeCandidate
-
Defines the common attributes of all Automations Discovery candidates that can be converted to an Action.
Declaration
Swift
protocol ActionCandidate : NodeCandidate
-
The time of a daily solar event such as sunrise, noon, and sunset.
Declaration
Swift
struct SolarTime
extension SolarTime : AutomationValue, Copyable, Decodable, Encodable, Equatable, Escapable, Hashable, Sendable, Sendable, StructDataRepresentable
-
Represents a time of day. The date and time zone are either not significant or are specified elsewhere.
Declaration
Swift
struct TimeOfDay
extension TimeOfDay : AutomationValue, Copyable, Decodable, Encodable, Equatable, Escapable, Hashable, Sendable, Sendable, StructDataRepresentable
-
Represents automation candidate nodes corresponding to a trait’s attributes. These can be used in starters, state readers and actions.
Declaration
Swift
struct TraitAttributesCandidate
extension TraitAttributesCandidate : ActionCandidate, Copyable, Copyable, Copyable, Equatable, Equatable, Equatable, Equatable, Escapable, Escapable, Escapable, Hashable, Hashable, Hashable, Hashable, NodeCandidate, NodeCandidate, NodeCandidate, NodeCandidate, Sendable, Sendable, Sendable, Sendable, StarterCandidate, StateReaderCandidate
-
Wraps an
Expression
with an associated value type.Declaration
-
Represents an unknown node in the automation graph.
Declaration
-
Represents year and month.
This struct doesn’t include any time zone related information.
Declaration
Swift
struct YearMonth
extension YearMonth : AutomationValue, Copyable, Decodable, Encodable, Equatable, Escapable, Hashable, Sendable, Sendable, StructDataRepresentable
-
A structure that holds all the necessary parameters to send a command.
Declaration
Swift
struct BatchCommandRequestInfo
extension BatchCommandRequestInfo : Sendable
-
Represents a command that can be batched with other commands. It captures the request info and a closure to transform the response. ResponseType can be any type, including Void. It is typically a subtype of CommandResponse.
Declaration
Swift
struct BatchableCommand<ResponseType>
extension BatchableCommand : Sendable
-
Basic interface for Trait commands.
Declaration
Swift
protocol Command : Sendable
-
A class that batches commands and sends them. It serves as both a proxy and a transaction holder.
The API exposed by this class is experimental and is subject to change.
Declaration
Swift
@_spi(Unknown) class CommandBatcher
-
Suggested user actions to potentially resolve a commissioning failure.
Declaration
Swift
enum MatterSuggestedUserAction
extension MatterSuggestedUserAction : CaseIterable, Equatable, Hashable, RawRepresentable, Sendable
-
The result of a failed Matter Commissioning attempt.
Declaration
Swift
struct MatterUnsuccessfulCommissioningResult
extension MatterUnsuccessfulCommissioningResult : Sendable
-
Publicly-visible Configuration for GoogleHomeSDK.
Declaration
Swift
@MainActor struct HomeClientConfiguration
extension HomeClientConfiguration : Sendable
-
The list of traits and device types to be used by the Automations SDK.
Declaration
Swift
@MainActor final class ReferencedAutomationTypes
extension ReferencedAutomationTypes : Sendable
-
Undocumented
Declaration
Swift
enum ConnectivityState
extension ConnectivityState : Equatable, Hashable, Sendable
-
Protocol implemented by all the generated
DeviceType
structs.A device type represents a collection of traits with connected functionality.
Declaration
Swift
protocol DeviceType : CustomDebugStringConvertible, Hashable, Sendable
extension DeviceType : Equatable
-
A collection of already fetched
DeviceType
data.Provides subscript access to
DeviceType
s by their types.Declaration
Swift
final class DeviceTypeCollection
extension DeviceTypeCollection : Copyable, Equatable, Escapable, Hashable, Sendable
-
Controller to access concrete
DeviceType
s for aHomeDevice
.Declaration
Swift
final class DeviceTypeController
extension DeviceTypeController : Sendable
-
Additional information about a device type.
Declaration
Swift
struct DeviceTypeMetadata
extension DeviceTypeMetadata : Equatable, Hashable, Sendable
-
Basic interface for Trait events.
Events contain a record of past state transitions and other data that cannot easily be modeled by attributes.
Declaration
Swift
protocol Event : CustomDebugStringConvertible, Sendable
-
Controller for subscribing to events from a particular object.
Declaration
Swift
protocol EventController : Sendable
-
The reported importance level of an
Event
.These correspond to Matter event priority levels, with some additional levels providing extra granularity.
Declaration
Swift
enum EventImportance
extension EventImportance : Equatable, Hashable, Sendable
-
Describes a field of a Trait, Command, Event, etc.
Declaration
Swift
protocol Field : Hashable, RawRepresentable, Sendable where Self.RawValue == UInt32
-
The possible value types for a field.
Declaration
Swift
enum FieldType
extension FieldType : Equatable, Sendable
-
Undocumented
Declaration
Swift
protocol ForceReadableTrait : Trait
-
Top-level entry to the GoogleHomeSDK.
Declaration
Swift
final class Home
extension Home : Sendable
-
A single smart home device.
Declaration
Swift
struct HomeDevice
extension HomeDevice : Equatable, Hashable, HomeObject, HomeObjectImpl, Identifiable, ObjectDataRepresentable, Sendable
-
Base type for all errors thrown by the GoogleHomeSDK.
Declaration
Swift
struct HomeError
extension HomeError : Copyable, CustomNSError, Equatable, Error, Error, Escapable, Hashable, Sendable, Sendable
-
Undocumented
Declaration
Swift
struct MatterError
extension MatterError : Equatable, Hashable, Sendable
-
Discriminator for specific subclass of
HomeObject
.Declaration
Swift
enum HomeObjectType
extension HomeObjectType : Equatable, Hashable, Sendable
-
Base protocol for all entity classes returned from the GoogleHomeSDK.
Declaration
Swift
protocol HomeObject : Hashable, Identifiable, Sendable where Self.ID == String
extension HomeObject : Equatable
-
Type-erased
HomeObject
wrapper.Declaration
Swift
struct AnyHomeObject
extension AnyHomeObject : Equatable, Hashable, HomeObject, Identifiable, Sendable
-
Undocumented
Declaration
Swift
typealias ClusterID = String
-
Undocumented
Declaration
Swift
protocol NamespaceProvider
-
The GHP-specific trait id for a command within a cluster.
Example: home.matter.0000.clusters.0006.00000001
Declaration
-
The GHP-specific trait ID for an event within a cluster.
Matter Example: home.matter.0000.clusters.0045.00000000 –> The StateChange Event (ID 0x0000) of the Boolean State Cluster (ID 0x0045).
Non-Matter Example: home.platform.traits.TimeTrait.ScheduledEvent –> The ScheduledEvent Event (ID “ScheduledEvent”) of the TimeTrait (ID “TimeTrait”).
Declaration
-
A protocol for the request of a Matter command.
Declaration
Swift
protocol CommandRequest : Sendable
-
A protocol for the response of a Matter command.
Declaration
Swift
protocol CommandResponse : Sendable
-
Abstraction for the Interaction Client.
Declaration
Swift
protocol InteractionProxy : Sendable
-
Network locality of request.
Declaration
Swift
enum LocalityType
extension LocalityType : Equatable, Hashable, Sendable
-
Represents a query against the User’s home graph.
Declaration
Swift
protocol Query<Element> : Sendable
-
Represents individual object updates.
Declaration
Swift
enum HomeObjectUpdate<Element> where Element : Hashable, Element : Sendable
extension HomeObjectUpdate : Equatable, Hashable, Sendable
-
Represents a single room in the User’s home graph.
Declaration
Swift
struct Room
extension Room : Equatable, Hashable, HomeObject, HomeObjectImpl, Identifiable, ObjectDataRepresentable, Sendable
-
Connectivity metadata for a trait.
Declaration
Swift
struct SourceConnectivity
extension SourceConnectivity : Equatable, Hashable, Sendable
-
Represents a structure in the User’s home graph.
Declaration
Swift
struct Structure
extension Structure : AutomationManager, Copyable, Copyable, Equatable, Escapable, Escapable, Hashable, HomeObject, HomeObjectImpl, Identifiable, ObjectDataRepresentable, Sendable, Updatable
-
Undocumented
Declaration
Swift
protocol MutableStructureData : AnyObject
-
Errors that cause a subscription to fail.
Declaration
Swift
enum SubscriptionError
extension SubscriptionError : Equatable, Error, Hashable, Sendable
-
Basic interface for object Traits.
Declaration
Swift
protocol Trait : TraitEncodable, CustomStringConvertible, Hashable, Sendable
extension Trait : Equatable
-
Tag identifies the field for a single attribute. Both JSON and Protobuf encoding use UInt32 to identify the encoding fields.
Declaration
Swift
typealias TagID = UInt32
-
Supported Scalar types.
Declaration
Swift
protocol Scalar : Hashable, Sendable
-
Undocumented
Declaration
Swift
protocol DefaultConstructible
-
Supported Bitmap types.
Declaration
Swift
protocol BitmapStorage : DefaultConstructible, Scalar, UnsignedInteger
-
Undocumented
Declaration
Swift
protocol Bitmap : AutomationValue, Hashable, OptionSet where Self.RawValue : BitmapStorage
extension Bitmap : Equatable, ExpressibleByArrayLiteral, RawRepresentable, Sendable, SetAlgebra
-
Undocumented
Declaration
Swift
protocol Enum : AutomationValue, Hashable, RawRepresentable where Self.RawValue == UInt64
-
Undocumented
Declaration
Swift
protocol Enum8 : Enum
-
Undocumented
Declaration
Swift
protocol Enum16 : Enum
-
Undocumented
Declaration
Swift
protocol Enum32 : Enum
-
Interface for enumerations in Platform traits.
Declaration
Swift
protocol PlatformEnum : Enum32
-
Serializable abstraction for Structure data objects.
Declaration
Swift
protocol StructDataRepresentable : AutomationValue, Hashable
extension StructDataRepresentable : Equatable, Sendable
-
Property wrapper for trait attributes, which contains metadata about the attribute.
Declaration
Swift
@propertyWrapper struct TraitAttribute<Value> where Value : Sendable
extension TraitAttribute : Sendable
-
TraitCollection
is a collection of already-fetched trait data.Declaration
Swift
final class TraitCollection
extension TraitCollection : Copyable, Equatable, Escapable, Hashable, Sendable
-
Controller for accessing traits on an object.
Declaration
Swift
protocol TraitController : Sendable
-
Public interface for decoding Trait data.
Declaration
Swift
struct TraitDecoder
-
Basic interface for entities that can be encoded as Traits.
Declaration
Swift
protocol TraitEncodable
-
Public interface for encoding Trait data.
Declaration
Swift
final class TraitEncoder
-
General metadata about a
Trait
.Declaration
Swift
struct TraitMetadata
extension TraitMetadata : Equatable, Hashable, Sendable
-
Container representing an encoded trait payload.
Declaration
Swift
struct TraitPayload
extension TraitPayload : Equatable, Hashable, Sendable
-
Model representing a Commissionable Matter device, corresponding to the proto used by the MatterCommissionerTrait.
Declaration
Swift
struct MatterCommissionableDevice
extension MatterCommissionableDevice : AutomationValue, Decodable, Encodable, Equatable, Hashable, Sendable, StructDataRepresentable
-
An internal protocol to encapsulate logic shared across Matter cluster classes.
Declaration
Swift
protocol MatterTrait : Trait
extension MatterTrait : CustomStringConvertible, Equatable, Hashable, Sendable, TraitEncodable
-
Represents an unknown bitmap.
Declaration
Swift
struct UnknownBitmap
extension UnknownBitmap : AutomationValue, Bitmap, Equatable, ExpressibleByArrayLiteral, Hashable, OptionSet, RawRepresentable, Sendable, SetAlgebra
-
A struct that represents an unknown device type.
Declaration
Swift
struct UnknownDeviceType
extension UnknownDeviceType : CustomDebugStringConvertible, DeviceType, Equatable, Hashable, Sendable
-
Represents an unknown enum.
Declaration
Swift
struct UnknownEnum
extension UnknownEnum : AutomationValue, Enum, Equatable, Hashable, RawRepresentable, Sendable
-
Represents an unknown field.
Declaration
Swift
struct UnknownField
extension UnknownField : Equatable, Field, Hashable, RawRepresentable, Sendable
-
Represents an unknown
HomeObject
Declaration
Swift
struct UnknownHomeObject
extension UnknownHomeObject : Equatable, Hashable, HomeObject, Identifiable, Sendable
-
Represents an unknown struct.
Declaration
Swift
struct UnknownStruct
extension UnknownStruct : AutomationValue, Equatable, Hashable, Sendable, StructDataRepresentable
-
Represents an unknown
Trait
.Declaration
Swift
struct UnknownTrait
extension UnknownTrait : CustomStringConvertible, Equatable, Hashable, Sendable, Trait, TraitEncodable
-
Declaration
Swift
extension Data : AutomationValue, Copyable, Copyable, DefaultConstructible, Equatable, Escapable, Escapable, Hashable, Scalar, Sendable, Sendable
-
Declaration
Swift
extension Date : AutomationValue, Copyable, Equatable, Escapable, Hashable, Sendable, StructDataRepresentable
-
-
Declaration
Swift
extension UserDefaults : Sendable
-
Declaration
Swift
extension Array : AutomationValue, AutomationValueArray, Collection, Copyable, Copyable, Escapable, Escapable, Sendable, Sequence where Element : AutomationValue
-
Declaration
Swift
extension Bool : AutomationValue, Copyable, Copyable, DefaultConstructible, Equatable, Escapable, Escapable, Hashable, Scalar, Sendable, Sendable
-
Declaration
Swift
extension Double : AutomationValue, Copyable, Copyable, DefaultConstructible, Equatable, Escapable, Escapable, Hashable, Scalar, Sendable, Sendable
-
Declaration
Swift
extension Duration : AutomationValue, AutomationValue, Copyable, Copyable, Equatable, Escapable, Escapable, Hashable, Sendable, Sendable, StructDataRepresentable
-
Declaration
Swift
extension Float : AutomationValue, Copyable, Copyable, DefaultConstructible, Equatable, Escapable, Escapable, Hashable, Scalar, Sendable, Sendable
-
Declaration
Swift
extension Int : AutomationValue, Copyable, Escapable, Sendable
-
Declaration
Swift
extension Int16 : AutomationValue, Copyable, Copyable, DefaultConstructible, Equatable, Escapable, Escapable, Hashable, Scalar, Sendable, Sendable
-
Declaration
Swift
extension Int32 : AutomationValue, Copyable, Copyable, DefaultConstructible, Equatable, Escapable, Escapable, Hashable, Scalar, Sendable, Sendable
-
Declaration
Swift
extension Int64 : AutomationValue, Copyable, Copyable, DefaultConstructible, Equatable, Escapable, Escapable, Hashable, Scalar, Sendable, Sendable
-
Declaration
Swift
extension Int8 : AutomationValue, Copyable, Copyable, DefaultConstructible, Equatable, Escapable, Escapable, Hashable, Scalar, Sendable, Sendable
-
Declaration
Swift
extension Optional : AutomationValue, Copyable, Copyable, Escapable, Escapable, OptionalAutomationValue, Sendable where Wrapped : AutomationValue
extension Optional : Copyable, Escapable, OptionalAutomationValueArray where Wrapped : AutomationValueArray
extension Optional : Copyable, Escapable, OptionalComparable where Wrapped : Comparable
extension Optional : Copyable, Escapable, OptionalNumeric where Wrapped : Numeric
extension Optional : Copyable, Escapable, OptionalSignedInteger where Wrapped : SignedInteger
extension Optional : Copyable, Escapable, OptionalUnsignedInteger where Wrapped : UnsignedInteger
-
Declaration
Swift
extension String : AutomationValue, Copyable, Copyable, Copyable, DefaultConstructible, Equatable, Escapable, Escapable, Escapable, Hashable, NamespaceProvider, Scalar, Sendable, Sendable
-
Declaration
Swift
extension UInt : AutomationValue, Copyable, Escapable, Sendable
-
Declaration
Swift
extension UInt16 : AdditiveArithmetic, AutomationValue, BinaryInteger, BitmapStorage, Comparable, Copyable, Copyable, CustomStringConvertible, DefaultConstructible, Equatable, Escapable, Escapable, ExpressibleByIntegerLiteral, Hashable, Numeric, Scalar, Sendable, Sendable, Strideable, UnsignedInteger
-
Declaration
Swift
extension UInt32 : AdditiveArithmetic, AutomationValue, BinaryInteger, BitmapStorage, Comparable, Copyable, Copyable, CustomStringConvertible, DefaultConstructible, Equatable, Escapable, Escapable, ExpressibleByIntegerLiteral, Hashable, Numeric, Scalar, Sendable, Sendable, Strideable, UnsignedInteger
-
Declaration
Swift
extension UInt64 : AdditiveArithmetic, AutomationValue, BinaryInteger, BitmapStorage, Comparable, Copyable, Copyable, CustomStringConvertible, DefaultConstructible, Equatable, Escapable, Escapable, ExpressibleByIntegerLiteral, Hashable, Numeric, Scalar, Sendable, Sendable, Strideable, UnsignedInteger
-
Declaration
Swift
extension UInt8 : AdditiveArithmetic, AutomationValue, BinaryInteger, BitmapStorage, Comparable, Copyable, Copyable, CustomStringConvertible, DefaultConstructible, Equatable, Escapable, Escapable, ExpressibleByIntegerLiteral, Hashable, Numeric, Scalar, Sendable, Sendable, Strideable, UnsignedInteger