Properties

This service allows scripts to store strings as key-value pairs scoped to
one script, one user of a script, or one document in which an
[editor add-on](https://developers.google.com/gsuite/add-ons/concepts/types#editor_add-ons) is used.
For more information about when to use each type of property, see the
[guide to the Properties service](https://developers.google.com/apps-script/guides/properties).

## Classes

| Name | Brief description |
|---|---|
| `https://developers.google.com/apps-script/reference/properties/properties` | The properties object acts as the interface to access user, document, or script properties. |
| `https://developers.google.com/apps-script/reference/properties/properties-service` | Allows scripts to store simple data in key-value pairs scoped to one script, one user of a script, or one document in which an add-on is used. |
| `https://developers.google.com/apps-script/reference/properties/script-properties` | Script Properties are key-value pairs stored by a script in a persistent store. |
| `https://developers.google.com/apps-script/reference/properties/user-properties` | User Properties are key-value pairs unique to a user. |

## `https://developers.google.com/apps-script/reference/properties/properties`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/properties/properties#deleteAllProperties()` | `https://developers.google.com/apps-script/reference/properties/properties` | Deletes all properties in the current `Properties` store. |
| `https://developers.google.com/apps-script/reference/properties/properties#deleteProperty(String)` | `https://developers.google.com/apps-script/reference/properties/properties` | Deletes the property with the given key in the current `Properties` store. |
| `https://developers.google.com/apps-script/reference/properties/properties#getKeys()` | `String[]` | Gets all keys in the current `Properties` store. |
| `https://developers.google.com/apps-script/reference/properties/properties#getProperties()` | `Object` | Gets a copy of all key-value pairs in the current `Properties` store. |
| `https://developers.google.com/apps-script/reference/properties/properties#getProperty(String)` | `String` | Gets the value associated with the given key in the current `Properties` store, or `null` if no such key exists. |
| `https://developers.google.com/apps-script/reference/properties/properties#setProperties(Object)` | `https://developers.google.com/apps-script/reference/properties/properties` | Sets all key-value pairs from the given object in the current `Properties` store. |
| `https://developers.google.com/apps-script/reference/properties/properties#setProperties(Object,Boolean)` | `https://developers.google.com/apps-script/reference/properties/properties` | Sets all key-value pairs from the given object in the current `Properties` store, optionally deleting all other properties in the store. |
| `https://developers.google.com/apps-script/reference/properties/properties#setProperty(String,String)` | `https://developers.google.com/apps-script/reference/properties/properties` | Sets the given key-value pair in the current `Properties` store. |

## `https://developers.google.com/apps-script/reference/properties/properties-service`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/properties/properties-service#getDocumentProperties()` | `https://developers.google.com/apps-script/reference/properties/properties` | Gets a property store (for this script only) that all users can access within the open document, spreadsheet, or form. |
| `https://developers.google.com/apps-script/reference/properties/properties-service#getScriptProperties()` | `https://developers.google.com/apps-script/reference/properties/properties` | Gets a property store that all users can access, but only within this script. |
| `https://developers.google.com/apps-script/reference/properties/properties-service#getUserProperties()` | `https://developers.google.com/apps-script/reference/properties/properties` | Gets a property store that only the current or effective user can access, and only within this script. |

## `https://developers.google.com/apps-script/reference/properties/script-properties`

## `https://developers.google.com/apps-script/reference/properties/user-properties`