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.



197
198
199
# File 'lib/google/apis/classroom_v1/classes.rb', line 197

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

Instance Attribute Details

#course_idString

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

Returns:

  • (String)


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

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)


173
174
175
# File 'lib/google/apis/classroom_v1/classes.rb', line 173

def item_id
  @item_id
end

#post_idString

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

Returns:

  • (String)


178
179
180
# File 'lib/google/apis/classroom_v1/classes.rb', line 178

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



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

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)


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

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



195
196
197
# File 'lib/google/apis/classroom_v1/classes.rb', line 195

def teacher_context
  @teacher_context
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



202
203
204
205
206
207
208
209
# File 'lib/google/apis/classroom_v1/classes.rb', line 202

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