# - [smarthome](https://developers.home.google.com/reference/local-home/modules/smarthome.html).
- [Execute](https://developers.home.google.com/reference/local-home/modules/smarthome.execute.html).
- [Response](https://developers.home.google.com/reference/local-home/modules/smarthome.execute.response.html).
- Builder

Use this class to build an instance of [ExecuteResponse](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#executeresponse).

## Index

### Methods

- [build](https://developers.home.google.com/reference/local-home/classes/smarthome.execute.response.builder#build)
- [setErrorState](https://developers.home.google.com/reference/local-home/classes/smarthome.execute.response.builder#seterrorstate)
- [setRequestId](https://developers.home.google.com/reference/local-home/classes/smarthome.execute.response.builder#setrequestid)
- [setSuccessState](https://developers.home.google.com/reference/local-home/classes/smarthome.execute.response.builder#setsuccessstate)

## Methods

### build

- build ( ) : [ExecuteResponse](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#executeresponse)
-

  #### Returns [ExecuteResponse](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#executeresponse)

  a new `ExecuteResponse` instance initialized with
  the parameters set by this Builder.

### setErrorState

- setErrorState ( deviceId : string , errorCode : [ExecuteErrors](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#executeerrors) ) : this
-

  #### Parameters

  -

    ##### deviceId: string

    Device ID of the device.
  -

    ##### errorCode: [ExecuteErrors](https://developers.home.google.com/reference/local-home/modules/smarthome.intentflow.html#executeerrors)

    If execution failed, provide the errorCode.

  #### Returns this

### setRequestId

- setRequestId ( requestId : string ) : this
-

  #### Parameters

  -

    ##### requestId: string

    Request ID of the Execute intent.

  #### Returns this

### setSuccessState

- setSuccessState ( deviceId : string , deviceState : unknown ) : this
-

  #### Parameters

  -

    ##### deviceId: string

    Device ID of the device.
  -

    ##### deviceState: unknown

    If execution was successful, provide new state of
    the device.

  #### Returns this