Class: Google::Apis::DriveV2::Property

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/drive_v2/classes.rb,
generated/google/apis/drive_v2/representations.rb,
generated/google/apis/drive_v2/representations.rb

Overview

A key-value pair attached to a file that is either public or private to an application. The following limits apply to file properties:

  • Maximum of 100 properties total per file
  • Maximum of 30 private properties per app
  • Maximum of 30 public properties
  • Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.

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) ⇒ Property

Returns a new instance of Property



2676
2677
2678
# File 'generated/google/apis/drive_v2/classes.rb', line 2676

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

Instance Attribute Details

#etagString

ETag of the property. Corresponds to the JSON property etag

Returns:

  • (String)


2649
2650
2651
# File 'generated/google/apis/drive_v2/classes.rb', line 2649

def etag
  @etag
end

#keyString

The key of this property. Corresponds to the JSON property key

Returns:

  • (String)


2654
2655
2656
# File 'generated/google/apis/drive_v2/classes.rb', line 2654

def key
  @key
end

#kindString

This is always drive#property. Corresponds to the JSON property kind

Returns:

  • (String)


2659
2660
2661
# File 'generated/google/apis/drive_v2/classes.rb', line 2659

def kind
  @kind
end

The link back to this property. Corresponds to the JSON property selfLink

Returns:

  • (String)


2664
2665
2666
# File 'generated/google/apis/drive_v2/classes.rb', line 2664

def self_link
  @self_link
end

#valueString

The value of this property. Corresponds to the JSON property value

Returns:

  • (String)


2669
2670
2671
# File 'generated/google/apis/drive_v2/classes.rb', line 2669

def value
  @value
end

#visibilityString

The visibility of this property. Corresponds to the JSON property visibility

Returns:

  • (String)


2674
2675
2676
# File 'generated/google/apis/drive_v2/classes.rb', line 2674

def visibility
  @visibility
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2681
2682
2683
2684
2685
2686
2687
2688
# File 'generated/google/apis/drive_v2/classes.rb', line 2681

def update!(**args)
  @etag = args[:etag] if args.key?(:etag)
  @key = args[:key] if args.key?(:key)
  @kind = args[:kind] if args.key?(:kind)
  @self_link = args[:self_link] if args.key?(:self_link)
  @value = args[:value] if args.key?(:value)
  @visibility = args[:visibility] if args.key?(:visibility)
end