Class: Google::Apis::ClassroomV1::AddOnContext

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

Overview

Attachment-relevant metadata for Classroom add-ons in the context of a specific post.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AddOnContext

Returns a new instance of AddOnContext.



190
191
192
# File 'lib/google/apis/classroom_v1/classes.rb', line 190

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

Instance Attribute Details

#course_idString

Immutable. Identifier of the course. Corresponds to the JSON property courseId

Returns:

  • (String)


160
161
162
# File 'lib/google/apis/classroom_v1/classes.rb', line 160

def course_id
  @course_id
end

#item_idString

Immutable. Identifier of the Announcement, CourseWork, or CourseWorkMaterial under which the attachment is attached. Corresponds to the JSON property itemId

Returns:

  • (String)


166
167
168
# File 'lib/google/apis/classroom_v1/classes.rb', line 166

def item_id
  @item_id
end

#post_idString

Immutable. Deprecated, use item_id instead. Corresponds to the JSON property postId

Returns:

  • (String)


171
172
173
# File 'lib/google/apis/classroom_v1/classes.rb', line 171

def post_id
  @post_id
end

#student_contextGoogle::Apis::ClassroomV1::StudentContext

Role-specific context if the requesting user is a student. Corresponds to the JSON property studentContext



176
177
178
# File 'lib/google/apis/classroom_v1/classes.rb', line 176

def student_context
  @student_context
end

#supports_student_workBoolean Also known as: supports_student_work?

Optional. Whether the post allows the teacher to see student work and passback grades. Corresponds to the JSON property supportsStudentWork

Returns:

  • (Boolean)


182
183
184
# File 'lib/google/apis/classroom_v1/classes.rb', line 182

def supports_student_work
  @supports_student_work
end

#teacher_contextGoogle::Apis::ClassroomV1::TeacherContext

Role-specific context if the requesting user is a teacher. Corresponds to the JSON property teacherContext



188
189
190
# File 'lib/google/apis/classroom_v1/classes.rb', line 188

def teacher_context
  @teacher_context
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



195
196
197
198
199
200
201
202
# File 'lib/google/apis/classroom_v1/classes.rb', line 195

def update!(**args)
  @course_id = args[:course_id] if args.key?(:course_id)
  @item_id = args[:item_id] if args.key?(:item_id)
  @post_id = args[:post_id] if args.key?(:post_id)
  @student_context = args[:student_context] if args.key?(:student_context)
  @supports_student_work = args[:supports_student_work] if args.key?(:supports_student_work)
  @teacher_context = args[:teacher_context] if args.key?(:teacher_context)
end