# DevicePatchBody

## Metadata

### displayName
- **Type:** string  
- **Description:** A human-readable name for the resource.  
- **Optional:** Yes  
- **Character Limit:** 1-255 characters

### labels  
- **Type:** map from strings to string  
- **Description:** A dictionary of labels associated with the resource.  
- **Optional:** Yes  
- **Maximum Number of Labels:** 32  
- **Maximum Length of a Label or Value:** 256 characters  
- **Label:** alphanumeric, hyphens and underscores.
- **Value:** alphanumeric, hyphens, underscores and spaces.

## spec

### autoPreloadLatestSoftware  
- **Type:** boolean  
- **Description:** Whether the device should automatically preload the latest available software version.  
- **Optional:** Yes  
- **Default:** false

### availableNetworks  
- **Type:** list of objects  
- **Description:** The list of networks available to the device and, optionally, the interfaces they are connected to. Leave the available networks list empty to give the device access to all of the networks with routes to the device's site.  
- **Optional:** Yes

#### Properties of availableNetworks

- **interfaceName**  
  - **Type:** string  
  - **Required:** Yes  
  - **Pattern:** ^[^\s\/]{1,16}$  
  - **Description:** The name of the device interface that will be connected to the network. 
- **networkName**  
  - **Type:** string  
  - **Required:** Yes  
  - **Pattern:** ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$  
  - **Description:** The name of the network that will be made available to this device.

### desiredSoftwareVersion  
- **Type:** string  
- **Description:** The desired version of software that should be running on the device.  
- **Optional:** Yes  
- **Character Limit:** <=255 characters

### geolocation  
- **Type:** object  
- **Description:** Optional geolocation data for the device.  
- **Optional:** Yes

#### Properties of geolocation

- **coordinates**  
  - **Type:** list of doubles  
  - **Required:** Yes  
  - **Description:** Co-ordinates that describe the geolocation (ISO 6709), an array of two floating point numbers [latitude(North - South), longitude(East - West)]. Set an empty array to clear the geolocation.  
- **locationId**  
  - **Type:** string  
  - **Optional:** Yes  
  - **Pattern:** ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$  
  - **Description:** The location id is the identity of the actual device that will be associated with this record.

### preloadSoftwareVersion  
- **Type:** string  
- **Description:** A version string.  
- **Optional:** Yes  
- **Character Limit:** <=255 characters

### shortCode  
- **Type:** string  
- **Description:** The short code from a device's web user interface, used to on-board the device. The short code expires quickly, so it should be used immediately after it is generated.  
- **Optional:** Yes  
- **Character Limit:** 8

### siteName
- **Type:** string  
- **Optional:** Yes  
- **Pattern:** ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$  
- **Description:** The name of the site where the device is located.
