Class: Google::Apis::ClassroomV1::Announcement

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

Announcement created by a teacher for students of the course

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

Returns a new instance of Announcement.


94
95
96
# File 'generated/google/apis/classroom_v1/classes.rb', line 94

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

Instance Attribute Details

Absolute link to this announcement in the Classroom web UI. This is only populated if state is PUBLISHED. Read-only. Corresponds to the JSON property alternateLink

Returns:

  • (String)

33
34
35
# File 'generated/google/apis/classroom_v1/classes.rb', line 33

def alternate_link
  @alternate_link
end

#assignee_modeString

Assignee mode of the announcement. If unspecified, the default value is ALL_STUDENTS. Corresponds to the JSON property assigneeMode

Returns:

  • (String)

39
40
41
# File 'generated/google/apis/classroom_v1/classes.rb', line 39

def assignee_mode
  @assignee_mode
end

#course_idString

Identifier of the course. Read-only. Corresponds to the JSON property courseId

Returns:

  • (String)

44
45
46
# File 'generated/google/apis/classroom_v1/classes.rb', line 44

def course_id
  @course_id
end

#creation_timeString

Timestamp when this announcement was created. Read-only. Corresponds to the JSON property creationTime

Returns:

  • (String)

49
50
51
# File 'generated/google/apis/classroom_v1/classes.rb', line 49

def creation_time
  @creation_time
end

#creator_user_idString

Identifier for the user that created the announcement. Read-only. Corresponds to the JSON property creatorUserId

Returns:

  • (String)

54
55
56
# File 'generated/google/apis/classroom_v1/classes.rb', line 54

def creator_user_id
  @creator_user_id
end

#idString

Classroom-assigned identifier of this announcement, unique per course. Read- only. Corresponds to the JSON property id

Returns:

  • (String)

60
61
62
# File 'generated/google/apis/classroom_v1/classes.rb', line 60

def id
  @id
end

#individual_students_optionsGoogle::Apis::ClassroomV1::IndividualStudentsOptions

Assignee details about a coursework/announcement. This field is set if and only if assigneeMode is INDIVIDUAL_STUDENTS. Corresponds to the JSON property individualStudentsOptions


66
67
68
# File 'generated/google/apis/classroom_v1/classes.rb', line 66

def individual_students_options
  @individual_students_options
end

#materialsArray<Google::Apis::ClassroomV1::Material>

Additional materials. Announcements must have no more than 20 material items. Corresponds to the JSON property materials


71
72
73
# File 'generated/google/apis/classroom_v1/classes.rb', line 71

def materials
  @materials
end

#scheduled_timeString

Optional timestamp when this announcement is scheduled to be published. Corresponds to the JSON property scheduledTime

Returns:

  • (String)

76
77
78
# File 'generated/google/apis/classroom_v1/classes.rb', line 76

def scheduled_time
  @scheduled_time
end

#stateString

Status of this announcement. If unspecified, the default state is DRAFT. Corresponds to the JSON property state

Returns:

  • (String)

81
82
83
# File 'generated/google/apis/classroom_v1/classes.rb', line 81

def state
  @state
end

#textString

Description of this announcement. The text must be a valid UTF-8 string containing no more than 30,000 characters. Corresponds to the JSON property text

Returns:

  • (String)

87
88
89
# File 'generated/google/apis/classroom_v1/classes.rb', line 87

def text
  @text
end

#update_timeString

Timestamp of the most recent change to this announcement. Read-only. Corresponds to the JSON property updateTime

Returns:

  • (String)

92
93
94
# File 'generated/google/apis/classroom_v1/classes.rb', line 92

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'generated/google/apis/classroom_v1/classes.rb', line 99

def update!(**args)
  @alternate_link = args[:alternate_link] if args.key?(:alternate_link)
  @assignee_mode = args[:assignee_mode] if args.key?(:assignee_mode)
  @course_id = args[:course_id] if args.key?(:course_id)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @creator_user_id = args[:creator_user_id] if args.key?(:creator_user_id)
  @id = args[:id] if args.key?(:id)
  @individual_students_options = args[:individual_students_options] if args.key?(:individual_students_options)
  @materials = args[:materials] if args.key?(:materials)
  @scheduled_time = args[:scheduled_time] if args.key?(:scheduled_time)
  @state = args[:state] if args.key?(:state)
  @text = args[:text] if args.key?(:text)
  @update_time = args[:update_time] if args.key?(:update_time)
end