|
1 | 1 | note |
2 | | - description: "Summary description for {EG_DEVELOPER_METADATA}." |
| 2 | + description: "[ |
| 3 | + Developer metadata associated with a location or object in a spreadsheet. |
| 4 | + Developer metadata may be used to associate arbitrary data with various parts of a spreadsheet and will remain associated at those locations as they move around and the spreadsheet is edited. |
| 5 | + For example, if developer metadata is associated with row 5 and another row is then subsequently inserted above row 5, that original metadata will still be associated with the row |
| 6 | + it was first associated with (what is now row 6). If the associated object is deleted its metadata is deleted too. |
| 7 | +
|
| 8 | +
|
| 9 | + { |
| 10 | + "metadataId": integer, |
| 11 | + "metadataKey": string, |
| 12 | + "metadataValue": string, |
| 13 | + "location": { |
| 14 | + object (DeveloperMetadataLocation) |
| 15 | + }, |
| 16 | + "visibility": enum (DeveloperMetadataVisibility) |
| 17 | + } |
| 18 | +
|
| 19 | + ]" |
3 | 20 | date: "$Date$" |
4 | 21 | revision: "$Revision$" |
| 22 | + EIS: "name=Developer Metadata", "src=https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.developerMetadata#resource:-developermetadata", "protocol=uri" |
5 | 23 |
|
6 | 24 | class |
7 | 25 | EG_DEVELOPER_METADATA |
8 | 26 |
|
| 27 | +inherit |
| 28 | + ANY |
| 29 | + redefine |
| 30 | + default_create |
| 31 | + end |
| 32 | + |
| 33 | +create |
| 34 | + default_create |
| 35 | + |
| 36 | +feature {NONE} -- Initialize |
| 37 | + |
| 38 | + default_create |
| 39 | + do |
| 40 | + create metadata_key.make_empty |
| 41 | + create metadata_value.make_empty |
| 42 | + create location |
| 43 | + create visibility |
| 44 | + end |
| 45 | + |
| 46 | +feature -- Access |
| 47 | + |
| 48 | + metadata_id: INTEGER |
| 49 | + -- The spreadsheet-scoped unique ID that identifies the metadata. IDs may be specified when metadata is created, otherwise one will be randomly generated and assigned. Must be positive. |
| 50 | + |
| 51 | + metadata_key: STRING |
| 52 | + -- The metadata key. There may be multiple metadata in a spreadsheet with the same key. Developer metadata must always have a key specified. |
| 53 | + |
| 54 | + metadata_value: STRING |
| 55 | + -- Data associated with the metadata's key. |
| 56 | + |
| 57 | + location: EG_DEVELOPER_METADATA_LOCATION |
| 58 | + -- The location where the metadata is associated. |
| 59 | + |
| 60 | + visibility: EG_DEVELOPER_METADATA_VISIBILITY |
| 61 | + -- The metadata visibility. Developer metadata must always have a visibility specified. |
| 62 | + |
| 63 | + |
| 64 | +feature -- Element Change |
| 65 | + |
| 66 | + set_metadata_id (a_id: like metadata_id) |
| 67 | + do |
| 68 | + metadata_id := a_id |
| 69 | + ensure |
| 70 | + metadata_id_set: metadata_id = a_id |
| 71 | + end |
| 72 | + |
| 73 | + set_metadata_key (a_key: like metadata_key) |
| 74 | + do |
| 75 | + metadata_key := a_key |
| 76 | + ensure |
| 77 | + metadata_key_set: metadata_key = a_key |
| 78 | + end |
| 79 | + |
| 80 | + set_metadata_value (a_value: like metadata_value) |
| 81 | + do |
| 82 | + metadata_value := a_value |
| 83 | + ensure |
| 84 | + metadata_value_set: metadata_value = a_value |
| 85 | + end |
| 86 | + |
| 87 | + set_location (a_location: like location) |
| 88 | + do |
| 89 | + location := a_location |
| 90 | + ensure |
| 91 | + location_set: location = a_location |
| 92 | + end |
| 93 | + |
| 94 | + set_visibility (a_visibility: like visibility) |
| 95 | + do |
| 96 | + visibility := a_visibility |
| 97 | + ensure |
| 98 | + visibility_set: visibility = a_visibility |
| 99 | + end |
| 100 | + |
| 101 | + |
9 | 102 | end |
0 commit comments