DeveloperMetadata

Access and modify developer metadata. To create new developer metadata use `https://developers.google.com/apps-script/reference/spreadsheet/range#addDeveloperMetadata(String)`, `https://developers.google.com/apps-script/reference/spreadsheet/sheet#addDeveloperMetadata(String)`, or `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet#addDeveloperMetadata(String)`.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#getId()` | `Integer` | Returns the unique ID associated with this developer metadata. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#getKey()` | `String` | Returns the key associated with this developer metadata. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#getLocation()` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata-location` | Returns the location of this developer metadata. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#getValue()` | `String` | Returns the value associated with this developer metadata, or `null` if this metadata has no value. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#getVisibility()` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata-visibility` | Returns the visibility of this developer metadata. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#moveToColumn(Range)` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` | Moves this developer metadata to the specified column. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#moveToRow(Range)` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` | Moves this developer metadata to the specified row. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#moveToSheet(Sheet)` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` | Moves this developer metadata to the specified sheet. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#moveToSpreadsheet()` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` | Moves this developer metadata to the top-level spreadsheet. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#remove()` | `void` | Deletes this metadata. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#setKey(String)` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` | Sets the key of this developer metadata to the specified value. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#setValue(String)` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` | Sets the value associated with this developer metadata to the specified value. |
| `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#setVisibility(DeveloperMetadataVisibility)` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` | Sets the visibility of this developer metadata to the specified visibility. |

## Detailed documentation

### `getId()`

Returns the unique ID associated with this developer metadata.

#### Return


`Integer` --- The unique ID associated with this developer metadata.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `getKey()`

Returns the key associated with this developer metadata.

#### Return


`String` --- The key associated with this developer metadata.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `getLocation()`

Returns the location of this developer metadata.

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata-location` --- The location of this developer metadata.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `getValue()`

Returns the value associated with this developer metadata, or `null` if this metadata has
no value.

#### Return


`String` --- The value associated with this developer metadata, or `null` if this metadata has
no value.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `getVisibility()`

Returns the visibility of this developer metadata.

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata-visibility` --- The visibility of this developer metadata.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `moveToColumn(column)`

Moves this developer metadata to the specified column. If the specified range does not
represent a single column this throws an exception.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `column` | `https://developers.google.com/apps-script/reference/spreadsheet/range` | The range representing the column that is the new location for this developer metadata. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` --- The developer metadata, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `moveToRow(row)`

Moves this developer metadata to the specified row. If the specified range does not represent a
single row this throws an exception.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `row` | `https://developers.google.com/apps-script/reference/spreadsheet/range` | The range representing the row that is the new location for this developer metadata. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` --- The developer metadata, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `moveToSheet(sheet)`

Moves this developer metadata to the specified sheet.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `sheet` | `https://developers.google.com/apps-script/reference/spreadsheet/sheet` | The sheet that is the new location for this developer metata. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` --- The developer metadata, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `moveToSpreadsheet()`

Moves this developer metadata to the top-level spreadsheet.

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` --- The developer metadata, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `remove()`

Deletes this metadata.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `setKey(key)`

Sets the key of this developer metadata to the specified value.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `key` | `String` | The new key to set for this metadata. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` --- The developer metadata, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `setValue(value)`

Sets the value associated with this developer metadata to the specified value.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `value` | `String` | The new value to set for this metadata. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` --- The developer metadata, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `setVisibility(visibility)`

Sets the visibility of this developer metadata to the specified visibility.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `visibility` | `https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata-visibility` | The new visibility to set for this metadata. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/developer-metadata#` --- The developer metadata, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`