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

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

Constructor Details

#initialize(**args) ⇒ Property

Returns a new instance of Property.



3882
3883
3884
# File 'lib/google/apis/drive_v2/classes.rb', line 3882

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

Instance Attribute Details

#etagString

Output only. ETag of the property. Corresponds to the JSON property etag

Returns:

  • (String)


3852
3853
3854
# File 'lib/google/apis/drive_v2/classes.rb', line 3852

def etag
  @etag
end

#keyString

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

Returns:

  • (String)


3857
3858
3859
# File 'lib/google/apis/drive_v2/classes.rb', line 3857

def key
  @key
end

#kindString

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

Returns:

  • (String)


3862
3863
3864
# File 'lib/google/apis/drive_v2/classes.rb', line 3862

def kind
  @kind
end

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

Returns:

  • (String)


3867
3868
3869
# File 'lib/google/apis/drive_v2/classes.rb', line 3867

def self_link
  @self_link
end

#valueString

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

Returns:

  • (String)


3872
3873
3874
# File 'lib/google/apis/drive_v2/classes.rb', line 3872

def value
  @value
end

#visibilityString

The visibility of this property. Allowed values are PRIVATE (default) and PUBLIC. Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. Corresponds to the JSON property visibility

Returns:

  • (String)


3880
3881
3882
# File 'lib/google/apis/drive_v2/classes.rb', line 3880

def visibility
  @visibility
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3887
3888
3889
3890
3891
3892
3893
3894
# File 'lib/google/apis/drive_v2/classes.rb', line 3887

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