struct Structureextension Structure : AutomationManager, Copyable, Copyable, Equatable, Escapable, Escapable, Hashable, HomeObject, HomeObjectImpl, Identifiable, ObjectDataRepresentable, Sendable, Sendable, UpdatableRepresents a structure in the User’s home graph.
- 
                  
                  Executes a create Automation command, expecting a result. DeclarationSwift @MainActor func createAutomation(_ automation: any DraftAutomation) async throws -> any AutomationParametersautomationThe Automation object. Return ValueAn Automation object. 
- 
                  
                  List automation instances by id. DeclarationSwift @MainActor func listAutomations() async throws -> [any Automation]Return ValueIf success, an array of Automation objects, else an empty array. 
- 
                  
                  Delete an automation instance by its ID. DeclarationSwift @MainActor func deleteAutomation(id: String) async throws
- 
                  
                  Delete an automation object. DeclarationSwift @MainActor func deleteAutomation(_ automation: any Automation) async throwsParametersautomationThe automation object to be deleted. 
- 
                  
                  Returns a list of Automation Candidate Nodes in this structure for creating an automation. Attention Initially the Discovery API is non streaming. The expected usage is: let candidates = try await structure.candidates(includeDescendants: false).first()DeclarationSwift @MainActor func candidates(includeDescendants: Bool = true) -> any Query<AnyNodeCandidate>ParametersincludeDescendantsWhether to include the full candidate tree for all members of this structure. Return ValueA Publisher of the list of candidates. 
- 
                  
                  Returns a list of Automation Candidate Nodes for the given device in this structure for creating an automation. Attention Initially the Discovery API is non streaming. The expected usage is: let candidates = try await structure.candidates(for: device).first()DeclarationSwift @MainActor func candidates(for device: HomeDevice) throws -> any Query<AnyNodeCandidate>Return ValueA Publisher of the list of candidates. 
- 
                  
                  Creates a room in the structure with the given name. If a room with the same name already exists, the existing room will be returned. DeclarationSwift func createRoom(name: String) async throws -> Room
- 
                  
                  Deletes the given room. Any devices assigned to the room will be unassigned but they will remain assigned to the structure. If the room does not exist, an error will be thrown. DeclarationSwift func deleteRoom(_ room: Room) async throws
- 
                  
                  Deletes the room with the given ID. Any devices assigned to the room will be unassigned but they will remain assigned to the structure. If the room does not exist, an error will be thrown. DeclarationSwift func deleteRoom(id: String) async throws
- 
                  
                  Moves the given device to the given room. Throws an error if the device is not found or if the room does not exist. DeclarationSwift func move(device: HomeDevice, to room: Room) async throws
- 
                  
                  Moves the device with the given ID to the room with given ID. Throws an error if the device is not found or if the room does not exist. DeclarationSwift func move(device deviceID: String, to roomID: String) async throws
- 
                  
                  Moves the given devices to the given room. Throws an error if none of the devices are found or if the room does not exist. DeclarationSwift func move(devices: any Collection<HomeDevice>, to room: Room) async throws
- 
                  
                  Moves the devices with given IDs to the room with given ID. Throws an error if none of the devices are found or if the room does not exist. DeclarationSwift func move(devices deviceIDs: any Collection<String>, to roomID: String) async throws
- 
                  
                  Prepares the SDK to accept inbound commissioning requests from the Matter App Extension. DeclarationSwift @MainActor func prepareForMatterCommissioning() async throws
- 
                  
                  Completes the Matter Commissioning attempt and returns the IDs of the commissioned devices. DeclarationSwift func completeMatterCommissioning() async throws -> Set<String>
- 
                  
                  Cancels any ongoing Matter Commissioning attempt before it has been completed. DeclarationSwift func cancelMatterCommissioning()
- 
                  
                  Marks the commissioning attempt as failed. This should be called if MatterSupport’s MatterAddDeviceRequest throws an error. DeclarationSwift func markMatterCommissioningFailed(error: any Error) -> MatterUnsuccessfulCommissioningResultParameterserrorThe error that caused the Matter Commissioning session to fail if any. Return ValueThe summary of the unsuccessful commissioning attempt. 
- 
                  
                  Instance-level accessor for an object’s HomeObjectType. DeclarationSwift let objectType: HomeObjectType
- 
                  
                  Per-Home-unique identifier for this object. DeclarationSwift let id: String
- 
                  
                  Undocumented DeclarationSwift var name: String { get }
- 
                  
                  Returns a Boolean value indicating whether two values are equal. Equality is the inverse of inequality. For any values aandb,a == bimplies thata != bisfalse.DeclarationSwift static func == (lhs: Structure, rhs: Structure) -> BoolParameterslhsA value to compare. rhsAnother value to compare. 
- 
                  
                  Hashes the essential components of this value by feeding them into the given hasher. Implement this method to conform to the Hashableprotocol. The components used for hashing must be the same as the components compared in your type’s==operator implementation. Callhasher.combine(_:)with each of these components.Important In your implementation of hash(into:), don’t callfinalize()on thehasherinstance provided, or replace it with a different instance. Doing so may become a compile-time error in the future.DeclarationSwift func hash(into hasher: inout Hasher)
- 
                  
                  Performs an update on this object. DeclarationSwift func update(_ block: (any MutableStructureData) -> Void) async throws -> StructureParametersblock- A closure that receives an instance to receive the desired updates.