Action Required! Starting November 21st, 2022, Nest Hubs opted into the Preview Program are being updated to support Matter 1.0 in anticipation of Google's general availability (GA) of Matter. All Matter devices being used with the Preview Program will need to be updated. See the Release Notes for more details.

SharedDeviceData.Builder

Stay organized with collections Save and categorize content based on your preferences.
public static final class SharedDeviceData.Builder extends Object

A builder for SharedDeviceData instances. Acquire an instance via SharedDeviceData.builder(String).

Public Method Summary

SharedDeviceData
build()
Constructs an instance of SharedDeviceData from this builder.
SharedDeviceData.Builder
setCommissioningWindowExpirationMillis(long commissioningWindowExpirationMillis)
Sets the expiration time of the opened commissioning window.
SharedDeviceData.Builder
setDeviceName(String deviceName)
Sets the user-facing name of this device.
SharedDeviceData.Builder
setDeviceType(int deviceType)
Sets the device's primary Matter device type.
SharedDeviceData.Builder
setProductId(int productId)
Sets the device's product ID.
SharedDeviceData.Builder
setRoomName(String roomName)
Sets the user-facing name of the room in which the device is located.
SharedDeviceData.Builder
setVendorId(int vendorId)
Sets the device's vendor ID.

Inherited Method Summary

Public Methods

public SharedDeviceData build ()

Constructs an instance of SharedDeviceData from this builder.

public SharedDeviceData.Builder setCommissioningWindowExpirationMillis (long commissioningWindowExpirationMillis)

Sets the expiration time of the opened commissioning window. The time basis must be SystemClock.elapsedRealtime().

Returns
  • this builder
Throws
IllegalArgumentException if the value is less than zero

public SharedDeviceData.Builder setDeviceName (String deviceName)

Sets the user-facing name of this device.

Returns
  • this builder
Throws
IllegalArgumentException if the device name is empty

public SharedDeviceData.Builder setDeviceType (int deviceType)

Sets the device's primary Matter device type.

Returns
  • this builder
Throws
IllegalArgumentException if the value is not in [0,FFFF]

public SharedDeviceData.Builder setProductId (int productId)

Sets the device's product ID.

Returns
  • this builder
Throws
IllegalArgumentException if the value is not in [0,FFFF]

public SharedDeviceData.Builder setRoomName (String roomName)

Sets the user-facing name of the room in which the device is located. This may be set to null if there is no room for the device.

Returns
  • this builder

public SharedDeviceData.Builder setVendorId (int vendorId)

Sets the device's vendor ID.

Returns
  • this builder
Throws
IllegalArgumentException if the value is not in [0,FFFF]