Class: Google::Apis::ClassroomV1beta1::Course

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

Overview

A Course in Classroom.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Course

Returns a new instance of Course.



110
111
112
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 110

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

Instance Attribute Details

#course_stateString

State of the course. If unspecified, the default state will be PROVISIONED. Corresponds to the JSON property courseState

Returns:

  • (String)


103
104
105
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 103

def course_state
  @course_state
end

#creation_timeString

Creation time of the course. Specifying this field in a course update mask will result in an error. Read-only. Corresponds to the JSON property creationTime

Returns:

  • (String)


86
87
88
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 86

def creation_time
  @creation_time
end

#descriptionString

Optional description. For example, "We'll be learning about about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters. Corresponds to the JSON property description

Returns:

  • (String)


63
64
65
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 63

def description
  @description
end

#description_headingString

Optional heading for the description. For example, "Welcome to 10th Grade Biology" If set, this field must be a valid UTF-8 string and no longer than 3600 characters. Corresponds to the JSON property descriptionHeading

Returns:

  • (String)


55
56
57
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 55

def description_heading
  @description_heading
end

#enrollment_codeString

Enrollment code to use when joining this course. Specifying this field in a course update mask will result in an error. Read-only. Corresponds to the JSON property enrollmentCode

Returns:

  • (String)


98
99
100
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 98

def enrollment_code
  @enrollment_code
end

#idString

Unique identifier for this course assigned by Classroom. You may optionally set this to an [alias string][google.classroom.v1beta1.CourseAlias] as part of [creating a course][google.classroom.v1beta1.Courses.CreateCourse], creating a corresponding alias. The ID cannot be updated after a course is created. Specifying this field in a course update mask will result in an error. Corresponds to the JSON property id

Returns:

  • (String)


36
37
38
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 36

def id
  @id
end

#nameString

Name of the course. For example, "10th Grade Biology". This is required and must be between 1 and 750 characters and a valid UTF-8 string. Corresponds to the JSON property name

Returns:

  • (String)


42
43
44
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 42

def name
  @name
end

#primary_teacher_idString

The identifier of the primary teacher of a course. When specified as a parameter of CreateCourseRequest, this field is required. It may be the numeric identifier for the user, or an alias that identifies the teacher. The following aliases are supported: * the e-mail address of the user * the string literal "me", indicating that the requesting user This must be set in a CreateRequest; specifying this field in a course update mask will result in an error. Corresponds to the JSON property primaryTeacherId

Returns:

  • (String)


80
81
82
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 80

def primary_teacher_id
  @primary_teacher_id
end

#roomString

Optional room location. For example, "301" If set, this field must be a valid UTF-8 string and no longer than 650 characters. Corresponds to the JSON property room

Returns:

  • (String)


69
70
71
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 69

def room
  @room
end

#sectionString

Section of the course For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters. Corresponds to the JSON property section

Returns:

  • (String)


48
49
50
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 48

def section
  @section
end

#update_timeString

Time of the most recent update to this course. Specifying this field in a course update mask will result in an error. Read-only. Corresponds to the JSON property updateTime

Returns:

  • (String)


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

def update_time
  @update_time
end

Absolute link to this course in the Classroom web UI. Read-only. Corresponds to the JSON property webLink

Returns:

  • (String)


108
109
110
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 108

def web_link
  @web_link
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'generated/google/apis/classroom_v1beta1/classes.rb', line 115

def update!(**args)
  @id = args[:id] unless args[:id].nil?
  @name = args[:name] unless args[:name].nil?
  @section = args[:section] unless args[:section].nil?
  @description_heading = args[:description_heading] unless args[:description_heading].nil?
  @description = args[:description] unless args[:description].nil?
  @room = args[:room] unless args[:room].nil?
  @primary_teacher_id = args[:primary_teacher_id] unless args[:primary_teacher_id].nil?
  @creation_time = args[:creation_time] unless args[:creation_time].nil?
  @update_time = args[:update_time] unless args[:update_time].nil?
  @enrollment_code = args[:enrollment_code] unless args[:enrollment_code].nil?
  @course_state = args[:course_state] unless args[:course_state].nil?
  @web_link = args[:web_link] unless args[:web_link].nil?
end