Class: Google::Apis::SheetsV4::DeveloperMetadata
- Inherits:
-
Object
- Object
- Google::Apis::SheetsV4::DeveloperMetadata
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/sheets_v4/classes.rb,
lib/google/apis/sheets_v4/representations.rb,
lib/google/apis/sheets_v4/representations.rb
Overview
Developer metadata associated with a location or object in a spreadsheet. 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. 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 it was first associated with (what is now row 6). If the associated object is deleted its metadata is deleted too.
Instance Attribute Summary collapse
-
#location ⇒ Google::Apis::SheetsV4::DeveloperMetadataLocation
A location where metadata may be associated in a spreadsheet.
-
#metadata_id ⇒ Fixnum
The spreadsheet-scoped unique ID that identifies the metadata.
-
#metadata_key ⇒ String
The metadata key.
-
#metadata_value ⇒ String
Data associated with the metadata's key.
-
#visibility ⇒ String
The metadata visibility.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DeveloperMetadata
constructor
A new instance of DeveloperMetadata.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DeveloperMetadata
Returns a new instance of DeveloperMetadata.
5048 5049 5050 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 5048 def initialize(**args) update!(**args) end |
Instance Attribute Details
#location ⇒ Google::Apis::SheetsV4::DeveloperMetadataLocation
A location where metadata may be associated in a spreadsheet.
Corresponds to the JSON property location
5022 5023 5024 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 5022 def location @location end |
#metadata_id ⇒ Fixnum
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.
Corresponds to the JSON property metadataId
5029 5030 5031 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 5029 def @metadata_id end |
#metadata_key ⇒ String
The metadata key. There may be multiple metadata in a spreadsheet with the
same key. Developer metadata must always have a key specified.
Corresponds to the JSON property metadataKey
5035 5036 5037 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 5035 def @metadata_key end |
#metadata_value ⇒ String
Data associated with the metadata's key.
Corresponds to the JSON property metadataValue
5040 5041 5042 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 5040 def @metadata_value end |
#visibility ⇒ String
The metadata visibility. Developer metadata must always have a visibility
specified.
Corresponds to the JSON property visibility
5046 5047 5048 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 5046 def visibility @visibility end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5053 5054 5055 5056 5057 5058 5059 |
# File 'lib/google/apis/sheets_v4/classes.rb', line 5053 def update!(**args) @location = args[:location] if args.key?(:location) @metadata_id = args[:metadata_id] if args.key?(:metadata_id) @metadata_key = args[:metadata_key] if args.key?(:metadata_key) @metadata_value = args[:metadata_value] if args.key?(:metadata_value) @visibility = args[:visibility] if args.key?(:visibility) end |