Class DeveloperMetadata  |  Apps Script  |  Google for Developers (original) (raw)

Class DeveloperMetadata

Stay organized with collections Save and categorize content based on your preferences.

Methods

Method Return type Brief description
getId() Integer Returns the unique ID associated with this developer metadata.
getKey() String Returns the key associated with this developer metadata.
getLocation() DeveloperMetadataLocation Returns the location of this developer metadata.
getValue() String Returns the value associated with this developer metadata, or null if this metadata has no value.
getVisibility() DeveloperMetadataVisibility Returns the visibility of this developer metadata.
moveToColumn(column) DeveloperMetadata Moves this developer metadata to the specified column.
moveToRow(row) DeveloperMetadata Moves this developer metadata to the specified row.
moveToSheet(sheet) DeveloperMetadata Moves this developer metadata to the specified sheet.
moveToSpreadsheet() DeveloperMetadata Moves this developer metadata to the top-level spreadsheet.
remove() void Deletes this metadata.
setKey(key) DeveloperMetadata Sets the key of this developer metadata to the specified value.
setValue(value) DeveloperMetadata Sets the value associated with this developer metadata to the specified value.
setVisibility(visibility) DeveloperMetadata 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.

Scripts that use this method require authorization with one or more of the following scopes:


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:


getLocation()

Returns the location of this developer metadata.

Return

[DeveloperMetadataLocation](/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:


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:


getVisibility()

Returns the visibility of this developer metadata.

Return

[DeveloperMetadataVisibility](/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:


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 Range The range representing the column that is the new location for this developer metadata.

Return

[DeveloperMetadata](#) — The developer metadata, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:


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 Range The range representing the row that is the new location for this developer metadata.

Return

[DeveloperMetadata](#) — The developer metadata, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:


moveToSheet(sheet)

Moves this developer metadata to the specified sheet.

Parameters

Name Type Description
sheet Sheet The sheet that is the new location for this developer metata.

Return

[DeveloperMetadata](#) — The developer metadata, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:


moveToSpreadsheet()

Moves this developer metadata to the top-level spreadsheet.

Return

[DeveloperMetadata](#) — The developer metadata, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:


remove()

Deletes this metadata.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:


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

[DeveloperMetadata](#) — The developer metadata, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:


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

[DeveloperMetadata](#) — The developer metadata, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:


Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-12-03 UTC.