Class: Google::Apis::SheetsV4::DeveloperMetadata

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/sheets_v4/classes.rb,
generated/google/apis/sheets_v4/representations.rb,
generated/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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ DeveloperMetadata

Returns a new instance of DeveloperMetadata.



4471
4472
4473
# File 'generated/google/apis/sheets_v4/classes.rb', line 4471

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#locationGoogle::Apis::SheetsV4::DeveloperMetadataLocation

A location where metadata may be associated in a spreadsheet. Corresponds to the JSON property location



4445
4446
4447
# File 'generated/google/apis/sheets_v4/classes.rb', line 4445

def location
  @location
end

#metadata_idFixnum

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

Returns:

  • (Fixnum)


4452
4453
4454
# File 'generated/google/apis/sheets_v4/classes.rb', line 4452

def 
  @metadata_id
end

#metadata_keyString

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

Returns:

  • (String)


4458
4459
4460
# File 'generated/google/apis/sheets_v4/classes.rb', line 4458

def 
  @metadata_key
end

#metadata_valueString

Data associated with the metadata's key. Corresponds to the JSON property metadataValue

Returns:

  • (String)


4463
4464
4465
# File 'generated/google/apis/sheets_v4/classes.rb', line 4463

def 
  @metadata_value
end

#visibilityString

The metadata visibility. Developer metadata must always have a visibility specified. Corresponds to the JSON property visibility

Returns:

  • (String)


4469
4470
4471
# File 'generated/google/apis/sheets_v4/classes.rb', line 4469

def visibility
  @visibility
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4476
4477
4478
4479
4480
4481
4482
# File 'generated/google/apis/sheets_v4/classes.rb', line 4476

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