Class: Google::Apis::DriveV2::Drive

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

Representation of a shared drive. Some resource methods (such as drives. update) require a driveId. Use the drives.list method to retrieve the ID for a shared drive.

Defined Under Namespace

Classes: BackgroundImageFile, Capabilities, Restrictions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Drive

Returns a new instance of Drive.



1496
1497
1498
# File 'lib/google/apis/drive_v2/classes.rb', line 1496

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

Instance Attribute Details

#background_image_fileGoogle::Apis::DriveV2::Drive::BackgroundImageFile

An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on drive. drives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set. Corresponds to the JSON property backgroundImageFile



1428
1429
1430
# File 'lib/google/apis/drive_v2/classes.rb', line 1428

def background_image_file
  @background_image_file
end

Output only. A short-lived link to this shared drive's background image. Corresponds to the JSON property backgroundImageLink

Returns:

  • (String)


1433
1434
1435
# File 'lib/google/apis/drive_v2/classes.rb', line 1433

def background_image_link
  @background_image_link
end

#capabilitiesGoogle::Apis::DriveV2::Drive::Capabilities

Output only. Capabilities the current user has on this shared drive. Corresponds to the JSON property capabilities



1438
1439
1440
# File 'lib/google/apis/drive_v2/classes.rb', line 1438

def capabilities
  @capabilities
end

#color_rgbString

The color of this shared drive as an RGB hex string. It can only be set on a drive.drives.update request that does not set themeId. Corresponds to the JSON property colorRgb

Returns:

  • (String)


1444
1445
1446
# File 'lib/google/apis/drive_v2/classes.rb', line 1444

def color_rgb
  @color_rgb
end

#created_dateDateTime

The time at which the shared drive was created (RFC 3339 date-time). Corresponds to the JSON property createdDate

Returns:

  • (DateTime)


1449
1450
1451
# File 'lib/google/apis/drive_v2/classes.rb', line 1449

def created_date
  @created_date
end

#hiddenBoolean Also known as: hidden?

Whether the shared drive is hidden from default view. Corresponds to the JSON property hidden

Returns:

  • (Boolean)


1454
1455
1456
# File 'lib/google/apis/drive_v2/classes.rb', line 1454

def hidden
  @hidden
end

#idString

Output only. The ID of this shared drive which is also the ID of the top level folder of this shared drive. Corresponds to the JSON property id

Returns:

  • (String)


1461
1462
1463
# File 'lib/google/apis/drive_v2/classes.rb', line 1461

def id
  @id
end

#kindString

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

Returns:

  • (String)


1466
1467
1468
# File 'lib/google/apis/drive_v2/classes.rb', line 1466

def kind
  @kind
end

#nameString

The name of this shared drive. Corresponds to the JSON property name

Returns:

  • (String)


1471
1472
1473
# File 'lib/google/apis/drive_v2/classes.rb', line 1471

def name
  @name
end

#org_unit_idString

Output only. The organizational unit of this shared drive. This field is only populated on drives.list responses when the useDomainAdminAccess parameter is set to true. Corresponds to the JSON property orgUnitId

Returns:

  • (String)


1478
1479
1480
# File 'lib/google/apis/drive_v2/classes.rb', line 1478

def org_unit_id
  @org_unit_id
end

#restrictionsGoogle::Apis::DriveV2::Drive::Restrictions

A set of restrictions that apply to this shared drive or items inside this shared drive. Corresponds to the JSON property restrictions



1484
1485
1486
# File 'lib/google/apis/drive_v2/classes.rb', line 1484

def restrictions
  @restrictions
end

#theme_idString

The ID of the theme from which the background image and color will be set. The set of possible driveThemes can be retrieved from a drive.about.get response. When not specified on a drive.drives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. Corresponds to the JSON property themeId

Returns:

  • (String)


1494
1495
1496
# File 'lib/google/apis/drive_v2/classes.rb', line 1494

def theme_id
  @theme_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
# File 'lib/google/apis/drive_v2/classes.rb', line 1501

def update!(**args)
  @background_image_file = args[:background_image_file] if args.key?(:background_image_file)
  @background_image_link = args[:background_image_link] if args.key?(:background_image_link)
  @capabilities = args[:capabilities] if args.key?(:capabilities)
  @color_rgb = args[:color_rgb] if args.key?(:color_rgb)
  @created_date = args[:created_date] if args.key?(:created_date)
  @hidden = args[:hidden] if args.key?(:hidden)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @org_unit_id = args[:org_unit_id] if args.key?(:org_unit_id)
  @restrictions = args[:restrictions] if args.key?(:restrictions)
  @theme_id = args[:theme_id] if args.key?(:theme_id)
end