Class: Google::Apis::ClassroomV1::Attachment

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

Overview

Attachment added to student assignment work. When creating attachments, only the Link field may be specified.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Attachment

Returns a new instance of Attachment.



1428
1429
1430
# File 'generated/google/apis/classroom_v1/classes.rb', line 1428

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

Instance Attribute Details

#drive_fileGoogle::Apis::ClassroomV1::DriveFile

Representation of a Google Drive file. Corresponds to the JSON property driveFile



1411
1412
1413
# File 'generated/google/apis/classroom_v1/classes.rb', line 1411

def drive_file
  @drive_file
end

#formGoogle::Apis::ClassroomV1::Form

Google Forms item. Corresponds to the JSON property form



1426
1427
1428
# File 'generated/google/apis/classroom_v1/classes.rb', line 1426

def form
  @form
end

URL item. Corresponds to the JSON property link



1421
1422
1423
# File 'generated/google/apis/classroom_v1/classes.rb', line 1421

def link
  @link
end

#you_tube_videoGoogle::Apis::ClassroomV1::YouTubeVideo

YouTube video item. Corresponds to the JSON property youTubeVideo



1416
1417
1418
# File 'generated/google/apis/classroom_v1/classes.rb', line 1416

def you_tube_video
  @you_tube_video
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1433
1434
1435
1436
1437
1438
# File 'generated/google/apis/classroom_v1/classes.rb', line 1433

def update!(**args)
  @drive_file = args[:drive_file] if args.key?(:drive_file)
  @you_tube_video = args[:you_tube_video] if args.key?(:you_tube_video)
  @link = args[:link] if args.key?(:link)
  @form = args[:form] if args.key?(:form)
end