    class CommandBatcher

A class that batches commands and sends them. It serves as both a proxy and a transaction
holder.
- `


  ### [add(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/CommandBatcher#/s:13GoogleHomeSDK14CommandBatcherC3addyAC14ResultProviderVy_ytGAA09BatchableD0VyytGF)


  ` Adds a batchable command with a void response type to the current batch.

  #### Declaration

  Swift

      @discardableResult
      func add(_ batchable: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/BatchableCommand.html<Void>) -> CommandBatcher.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/CommandBatcher/ResultProvider.html<Void>

  #### Parameters

  |---|---|
  | ` batchable ` | The batchable command to add. |

  #### Return Value

  A ResultProvider that can be used to get the result of the command.
- `


  ### [add(_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/CommandBatcher#/s:13GoogleHomeSDK14CommandBatcherC3addyAC14ResultProviderVy_xGAA09BatchableD0VyxGAA0D8ResponseRzlF)


  ` This adds a batchable command to the current batch. It should only be called from the
  closure passed to sendBatched.

  Parameters:
  - batchable: The batchable command to add.

  Returns:
  - A ResultProvider that can be used to get the result of the command. The result is guaranteed to be available after this async function completes.

  #### Declaration

  Swift

      func add<T>(_ batchable: https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/BatchableCommand.html<T>) -> CommandBatcher.https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/CommandBatcher/ResultProvider.html<T> where T : https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/CommandResponse.html

  #### Parameters

  |---|---|
  | ` batchable ` | The batchable command to add. |

- `


  ### [CommandBatcherError](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/CommandBatcher/CommandBatcherError.html)


  ` Errors that can be thrown by the command batcher.

  #### Declaration

  Swift

      enum CommandBatcherError

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/CommandBatcher.html.CommandBatcherError : Equatable, Error, Hashable, Sendable, SendableMetatype

- `


  ### [ResultProvider](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/CommandBatcher/ResultProvider.html)


  ` A structure that offers the ability to get the result of a command, once the batch request
  completes. It captures the result state, the response index and the
  ability to transform the result into a strongly typed response.

  #### Declaration

  Swift

      struct ResultProvider<ResponseType> where ResponseType : Sendable

      extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Classes/CommandBatcher.html.ResultProvider : Sendable, SendableMetatype