    struct StructureScopedPermissionsController

    extension StructureScopedPermissionsController : Sendable, SendableMetatype

A controller for managing structure scoped permissions.
- `


  ### [Feature](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/Feature.html)


  ` A feature that can be consented to via the permissions controller.

  #### Declaration

  Swift

      enum Feature

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController.html.Feature : CaseIterable, Equatable, Hashable, Sendable, SendableMetatype

- `


  ### [ConsentStatus](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/ConsentStatus.html)


  ` The status of the consent.

  #### Declaration

  Swift

      enum ConsentStatus

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController.html.ConsentStatus : Equatable, Hashable, Sendable, SendableMetatype

- `


  ### [ConsentResponse](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/ConsentResponse.html)


  ` The response from the consent request.

  #### Declaration

  Swift

      enum ConsentResponse

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController.html.ConsentResponse : Sendable, SendableMetatype

- `


  ### [consentedFeatures()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController#/s:13GoogleHomeSDK36StructureScopedPermissionsControllerV17consentedFeaturesShyAC7FeatureOGyYaF)


  ` Returns a set of all features for which the user has granted consent.

  #### Declaration

  Swift

      func consentedFeatures() async -> Set<StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/Feature.html>

- `


  ### [featureConsentState(features:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController#/s:13GoogleHomeSDK36StructureScopedPermissionsControllerV19featureConsentState8featuresSDyAC7FeatureOAC0I6StatusOGSayAGG_tYaF)


  ` The consent status for the given features.

  #### Declaration

  Swift

      func featureConsentState(features: [StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/Feature.html]) async -> [StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/Feature.html : StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/ConsentStatus.html]

  #### Parameters

  |---|---|
  | ` features ` | The features to retrieve the consent status for. |

  #### Return Value

  A map of feature to consent status.
- `


  ### [featureConsentStateStream(features:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController#/s:13GoogleHomeSDK36StructureScopedPermissionsControllerV25featureConsentStateStream8featuresScsySDyAC7FeatureOAC0I6StatusOGs5Error_pGSayAGG_tF)


  ` Returns an asynchronous stream emitting consent states for the given features.

  #### Declaration

  Swift

      func featureConsentStateStream(features: [StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/Feature.html]) -> AsyncThrowingStream<[StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/Feature.html : StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/ConsentStatus.html], any Error>

  #### Parameters

  |---|---|
  | ` features ` | The features to retrieve the consent status stream for. |

  #### Return Value

  An asynchronous throwing stream emitting a map of feature to consent status
  whenever it updates.
- `


  ### [deviceTypeGrants()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController#/s:13GoogleHomeSDK36StructureScopedPermissionsControllerV16deviceTypeGrantsAA06DeviceiJ0VyYaF)


  ` Returns the device type permissions that have been granted to this app for the current
  structure.

  Note: Permissions are managed on a per-device-type basis. For sensitive devices, granting
  permission to a single device results in permission being granted for all devices of that
  same type within the structure.

  #### Declaration

  Swift

      func deviceTypeGrants() async -> https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/DeviceTypeGrants.html

- `


  ### [requestConsent(for:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController#/s:13GoogleHomeSDK36StructureScopedPermissionsControllerV14requestConsent3forAC0I8ResponseOSgSayAC7FeatureOG_tYaF)


  ` Presents a view for users to consent to the given features.

  #### Declaration

  Swift

      func requestConsent(for features: [StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/Feature.html]) async -> StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/ConsentResponse.html?

  #### Return Value

  The response from the consent request. Returns nil if the user has already consented
  to the features or an error occurred.
- `


  ### [UserMetadata](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/UserMetadata.html)


  ` Undocumented

  #### Declaration

  Swift

      struct UserMetadata

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController.html.UserMetadata : Equatable, Sendable, SendableMetatype

- `


  ### [currentUserMetadata()](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController#/s:13GoogleHomeSDK36StructureScopedPermissionsControllerV19currentUserMetadataAC0iJ0VyYaKF)


  ` Fetches the metadata for the currently signed-in user within the context of this structure.

  This includes information such as the user's ID, email, profile picture URL, and name.

  #### Declaration

  Swift

      func currentUserMetadata() async throws -> StructureScopedPermissionsController.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/StructureScopedPermissionsController/UserMetadata.html