Class: Google::Apis::DriveactivityV2::DriveActivity

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

Overview

A single Drive activity comprising one or more Actions by one or more Actors on one or more Targets. Some Action groupings occur spontaneously, such as moving an item into a shared folder triggering a permission change. Other groupings of related Actions, such as multiple Actors editing one item or moving multiple files into a new folder, are controlled by the selection of a ConsolidationStrategy in the QueryDriveActivityRequest.

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

Returns a new instance of DriveActivity



507
508
509
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 507

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

Instance Attribute Details

#actionsArray<Google::Apis::DriveactivityV2::Action>

Details on all actions in this activity. Corresponds to the JSON property actions



478
479
480
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 478

def actions
  @actions
end

#actorsArray<Google::Apis::DriveactivityV2::Actor>

All actor(s) responsible for the activity. Corresponds to the JSON property actors



483
484
485
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 483

def actors
  @actors
end

#primary_action_detailGoogle::Apis::DriveactivityV2::ActionDetail

Data describing the type and additional information of an action. Corresponds to the JSON property primaryActionDetail



488
489
490
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 488

def primary_action_detail
  @primary_action_detail
end

#targetsArray<Google::Apis::DriveactivityV2::Target>

All Drive objects this activity is about (e.g. file, folder, Team Drive). This represents the state of the target immediately after the actions occurred. Corresponds to the JSON property targets



495
496
497
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 495

def targets
  @targets
end

#time_rangeGoogle::Apis::DriveactivityV2::TimeRange

Information about time ranges. Corresponds to the JSON property timeRange



500
501
502
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 500

def time_range
  @time_range
end

#timestampString

The activity occurred at this specific time. Corresponds to the JSON property timestamp

Returns:

  • (String)


505
506
507
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 505

def timestamp
  @timestamp
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



512
513
514
515
516
517
518
519
# File 'generated/google/apis/driveactivity_v2/classes.rb', line 512

def update!(**args)
  @actions = args[:actions] if args.key?(:actions)
  @actors = args[:actors] if args.key?(:actors)
  @primary_action_detail = args[:primary_action_detail] if args.key?(:primary_action_detail)
  @targets = args[:targets] if args.key?(:targets)
  @time_range = args[:time_range] if args.key?(:time_range)
  @timestamp = args[:timestamp] if args.key?(:timestamp)
end