blob: 295e94646c36d12cf1dae1e006d8df39f23e9504 [file] [log] [blame]
// Copyright 2018 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package classroom provides access to the Google Classroom API.
//
// See https://developers.google.com/classroom/
//
// Usage example:
//
// import "google.golang.org/api/classroom/v1"
// ...
// classroomService, err := classroom.New(oauthHttpClient)
package classroom // import "google.golang.org/api/classroom/v1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
const apiId = "classroom:v1"
const apiName = "classroom"
const apiVersion = "v1"
const basePath = "https://classroom.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage announcements in Google Classroom
ClassroomAnnouncementsScope = "https://www.googleapis.com/auth/classroom.announcements"
// View announcements in Google Classroom
ClassroomAnnouncementsReadonlyScope = "https://www.googleapis.com/auth/classroom.announcements.readonly"
// Manage your Google Classroom classes
ClassroomCoursesScope = "https://www.googleapis.com/auth/classroom.courses"
// View your Google Classroom classes
ClassroomCoursesReadonlyScope = "https://www.googleapis.com/auth/classroom.courses.readonly"
// Manage your course work and view your grades in Google Classroom
ClassroomCourseworkMeScope = "https://www.googleapis.com/auth/classroom.coursework.me"
// View your course work and grades in Google Classroom
ClassroomCourseworkMeReadonlyScope = "https://www.googleapis.com/auth/classroom.coursework.me.readonly"
// Manage course work and grades for students in the Google Classroom
// classes you teach and view the course work and grades for classes you
// administer
ClassroomCourseworkStudentsScope = "https://www.googleapis.com/auth/classroom.coursework.students"
// View course work and grades for students in the Google Classroom
// classes you teach or administer
ClassroomCourseworkStudentsReadonlyScope = "https://www.googleapis.com/auth/classroom.coursework.students.readonly"
// View your Google Classroom guardians
ClassroomGuardianlinksMeReadonlyScope = "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly"
// View and manage guardians for students in your Google Classroom
// classes
ClassroomGuardianlinksStudentsScope = "https://www.googleapis.com/auth/classroom.guardianlinks.students"
// View guardians for students in your Google Classroom classes
ClassroomGuardianlinksStudentsReadonlyScope = "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly"
// View the email addresses of people in your classes
ClassroomProfileEmailsScope = "https://www.googleapis.com/auth/classroom.profile.emails"
// View the profile photos of people in your classes
ClassroomProfilePhotosScope = "https://www.googleapis.com/auth/classroom.profile.photos"
// Receive notifications about your Google Classroom data
ClassroomPushNotificationsScope = "https://www.googleapis.com/auth/classroom.push-notifications"
// Manage your Google Classroom class rosters
ClassroomRostersScope = "https://www.googleapis.com/auth/classroom.rosters"
// View your Google Classroom class rosters
ClassroomRostersReadonlyScope = "https://www.googleapis.com/auth/classroom.rosters.readonly"
// View your course work and grades in Google Classroom
ClassroomStudentSubmissionsMeReadonlyScope = "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly"
// View course work and grades for students in the Google Classroom
// classes you teach or administer
ClassroomStudentSubmissionsStudentsReadonlyScope = "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Courses = NewCoursesService(s)
s.Invitations = NewInvitationsService(s)
s.Registrations = NewRegistrationsService(s)
s.UserProfiles = NewUserProfilesService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Courses *CoursesService
Invitations *InvitationsService
Registrations *RegistrationsService
UserProfiles *UserProfilesService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewCoursesService(s *Service) *CoursesService {
rs := &CoursesService{s: s}
rs.Aliases = NewCoursesAliasesService(s)
rs.Announcements = NewCoursesAnnouncementsService(s)
rs.CourseWork = NewCoursesCourseWorkService(s)
rs.Students = NewCoursesStudentsService(s)
rs.Teachers = NewCoursesTeachersService(s)
return rs
}
type CoursesService struct {
s *Service
Aliases *CoursesAliasesService
Announcements *CoursesAnnouncementsService
CourseWork *CoursesCourseWorkService
Students *CoursesStudentsService
Teachers *CoursesTeachersService
}
func NewCoursesAliasesService(s *Service) *CoursesAliasesService {
rs := &CoursesAliasesService{s: s}
return rs
}
type CoursesAliasesService struct {
s *Service
}
func NewCoursesAnnouncementsService(s *Service) *CoursesAnnouncementsService {
rs := &CoursesAnnouncementsService{s: s}
return rs
}
type CoursesAnnouncementsService struct {
s *Service
}
func NewCoursesCourseWorkService(s *Service) *CoursesCourseWorkService {
rs := &CoursesCourseWorkService{s: s}
rs.StudentSubmissions = NewCoursesCourseWorkStudentSubmissionsService(s)
return rs
}
type CoursesCourseWorkService struct {
s *Service
StudentSubmissions *CoursesCourseWorkStudentSubmissionsService
}
func NewCoursesCourseWorkStudentSubmissionsService(s *Service) *CoursesCourseWorkStudentSubmissionsService {
rs := &CoursesCourseWorkStudentSubmissionsService{s: s}
return rs
}
type CoursesCourseWorkStudentSubmissionsService struct {
s *Service
}
func NewCoursesStudentsService(s *Service) *CoursesStudentsService {
rs := &CoursesStudentsService{s: s}
return rs
}
type CoursesStudentsService struct {
s *Service
}
func NewCoursesTeachersService(s *Service) *CoursesTeachersService {
rs := &CoursesTeachersService{s: s}
return rs
}
type CoursesTeachersService struct {
s *Service
}
func NewInvitationsService(s *Service) *InvitationsService {
rs := &InvitationsService{s: s}
return rs
}
type InvitationsService struct {
s *Service
}
func NewRegistrationsService(s *Service) *RegistrationsService {
rs := &RegistrationsService{s: s}
return rs
}
type RegistrationsService struct {
s *Service
}
func NewUserProfilesService(s *Service) *UserProfilesService {
rs := &UserProfilesService{s: s}
rs.GuardianInvitations = NewUserProfilesGuardianInvitationsService(s)
rs.Guardians = NewUserProfilesGuardiansService(s)
return rs
}
type UserProfilesService struct {
s *Service
GuardianInvitations *UserProfilesGuardianInvitationsService
Guardians *UserProfilesGuardiansService
}
func NewUserProfilesGuardianInvitationsService(s *Service) *UserProfilesGuardianInvitationsService {
rs := &UserProfilesGuardianInvitationsService{s: s}
return rs
}
type UserProfilesGuardianInvitationsService struct {
s *Service
}
func NewUserProfilesGuardiansService(s *Service) *UserProfilesGuardiansService {
rs := &UserProfilesGuardiansService{s: s}
return rs
}
type UserProfilesGuardiansService struct {
s *Service
}
// Announcement: Announcement created by a teacher for students of the
// course
type Announcement struct {
// AlternateLink: Absolute link to this announcement in the Classroom
// web UI.
// This is only populated if `state` is `PUBLISHED`.
//
// Read-only.
AlternateLink string `json:"alternateLink,omitempty"`
// AssigneeMode: Assignee mode of the announcement.
// If unspecified, the default value is `ALL_STUDENTS`.
//
// Possible values:
// "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never
// returned.
// "ALL_STUDENTS" - All students can see the item.
// This is the default state.
// "INDIVIDUAL_STUDENTS" - A subset of the students can see the item.
AssigneeMode string `json:"assigneeMode,omitempty"`
// CourseId: Identifier of the course.
//
// Read-only.
CourseId string `json:"courseId,omitempty"`
// CreationTime: Timestamp when this announcement was
// created.
//
// Read-only.
CreationTime string `json:"creationTime,omitempty"`
// CreatorUserId: Identifier for the user that created the
// announcement.
//
// Read-only.
CreatorUserId string `json:"creatorUserId,omitempty"`
// Id: Classroom-assigned identifier of this announcement, unique per
// course.
//
// Read-only.
Id string `json:"id,omitempty"`
// IndividualStudentsOptions: Identifiers of students with access to the
// announcement.
// This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
// If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students
// specified in this
// field will be able to see the announcement.
IndividualStudentsOptions *IndividualStudentsOptions `json:"individualStudentsOptions,omitempty"`
// Materials: Additional materials.
//
// Announcements must have no more than 20 material items.
Materials []*Material `json:"materials,omitempty"`
// ScheduledTime: Optional timestamp when this announcement is scheduled
// to be published.
ScheduledTime string `json:"scheduledTime,omitempty"`
// State: Status of this announcement.
// If unspecified, the default state is `DRAFT`.
//
// Possible values:
// "ANNOUNCEMENT_STATE_UNSPECIFIED" - No state specified. This is
// never returned.
// "PUBLISHED" - Status for announcement that has been published.
// This is the default state.
// "DRAFT" - Status for an announcement that is not yet
// published.
// Announcement in this state is visible only to course teachers and
// domain
// administrators.
// "DELETED" - Status for announcement that was published but is now
// deleted.
// Announcement in this state is visible only to course teachers and
// domain
// administrators.
// Announcement in this state is deleted after some time.
State string `json:"state,omitempty"`
// Text: Description of this announcement.
// The text must be a valid UTF-8 string containing no more
// than 30,000 characters.
Text string `json:"text,omitempty"`
// UpdateTime: Timestamp of the most recent change to this
// announcement.
//
// Read-only.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AlternateLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternateLink") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Announcement) MarshalJSON() ([]byte, error) {
type NoMethod Announcement
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Assignment: Additional details for assignments.
type Assignment struct {
// StudentWorkFolder: Drive folder where attachments from student
// submissions are placed.
// This is only populated for course teachers and administrators.
StudentWorkFolder *DriveFolder `json:"studentWorkFolder,omitempty"`
// ForceSendFields is a list of field names (e.g. "StudentWorkFolder")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "StudentWorkFolder") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Assignment) MarshalJSON() ([]byte, error) {
type NoMethod Assignment
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// AssignmentSubmission: Student work for an assignment.
type AssignmentSubmission struct {
// Attachments: Attachments added by the student.
// Drive files that correspond to materials with a share mode
// of
// STUDENT_COPY may not exist yet if the student has not accessed
// the
// assignment in Classroom.
//
// Some attachment metadata is only populated if the requesting user
// has
// permission to access it. Identifier and alternate_link fields are
// always
// available, but others (e.g. title) may not be.
Attachments []*Attachment `json:"attachments,omitempty"`
// ForceSendFields is a list of field names (e.g. "Attachments") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Attachments") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AssignmentSubmission) MarshalJSON() ([]byte, error) {
type NoMethod AssignmentSubmission
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Attachment: Attachment added to student assignment work.
//
// When creating attachments, setting the `form` field is not supported.
type Attachment struct {
// DriveFile: Google Drive file attachment.
DriveFile *DriveFile `json:"driveFile,omitempty"`
// Form: Google Forms attachment.
Form *Form `json:"form,omitempty"`
// Link: Link attachment.
Link *Link `json:"link,omitempty"`
// YouTubeVideo: Youtube video attachment.
YouTubeVideo *YouTubeVideo `json:"youTubeVideo,omitempty"`
// ForceSendFields is a list of field names (e.g. "DriveFile") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DriveFile") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Attachment) MarshalJSON() ([]byte, error) {
type NoMethod Attachment
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CloudPubsubTopic: A reference to a Cloud Pub/Sub topic.
//
// To register for notifications, the owner of the topic must
// grant
// `classroom-notifications@system.gserviceaccount.com` the
// `projects.topics.publish` permission.
type CloudPubsubTopic struct {
// TopicName: The `name` field of a Cloud
// Pub/Sub
// [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1
// /projects.topics#Topic).
TopicName string `json:"topicName,omitempty"`
// ForceSendFields is a list of field names (e.g. "TopicName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "TopicName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CloudPubsubTopic) MarshalJSON() ([]byte, error) {
type NoMethod CloudPubsubTopic
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Course: A Course in Classroom.
type Course struct {
// AlternateLink: Absolute link to this course in the Classroom web
// UI.
//
// Read-only.
AlternateLink string `json:"alternateLink,omitempty"`
// CalendarId: The Calendar ID for a calendar that all course members
// can see, to which
// Classroom adds events for course work and announcements in the
// course.
//
// Read-only.
CalendarId string `json:"calendarId,omitempty"`
// CourseGroupEmail: The email address of a Google group containing all
// members of the course.
// This group does not accept email and can only be used for
// permissions.
//
// Read-only.
CourseGroupEmail string `json:"courseGroupEmail,omitempty"`
// CourseMaterialSets: Sets of materials that appear on the "about" page
// of this course.
//
// Read-only.
CourseMaterialSets []*CourseMaterialSet `json:"courseMaterialSets,omitempty"`
// CourseState: State of the course.
// If unspecified, the default state is `PROVISIONED`.
//
// Possible values:
// "COURSE_STATE_UNSPECIFIED" - No course state. No returned Course
// message will use this value.
// "ACTIVE" - The course is active.
// "ARCHIVED" - The course has been archived. You cannot modify it
// except to change it
// to a different state.
// "PROVISIONED" - The course has been created, but not yet activated.
// It is accessible by
// the primary teacher and domain administrators, who may modify it
// or
// change it to the `ACTIVE` or `DECLINED` states.
// A course may only be changed to `PROVISIONED` if it is in the
// `DECLINED`
// state.
// "DECLINED" - The course has been created, but declined. It is
// accessible by the
// course owner and domain administrators, though it will not
// be
// displayed in the web UI. You cannot modify the course except to
// change it
// to the `PROVISIONED` state.
// A course may only be changed to `DECLINED` if it is in the
// `PROVISIONED`
// state.
// "SUSPENDED" - The course has been suspended. You cannot modify the
// course, and only the
// user identified by the `owner_id` can view the course.
// A course may be placed in this state if it potentially violates
// the
// Terms of Service.
CourseState string `json:"courseState,omitempty"`
// CreationTime: Creation time of the course.
// Specifying this field in a course update mask results in an
// error.
//
// Read-only.
CreationTime string `json:"creationTime,omitempty"`
// Description: Optional description.
// For example, "We'll be learning 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.
Description string `json:"description,omitempty"`
// DescriptionHeading: 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.
DescriptionHeading string `json:"descriptionHeading,omitempty"`
// EnrollmentCode: Enrollment code to use when joining this
// course.
// Specifying this field in a course update mask results in an
// error.
//
// Read-only.
EnrollmentCode string `json:"enrollmentCode,omitempty"`
// GuardiansEnabled: Whether or not guardian notifications are enabled
// for this course.
//
// Read-only.
GuardiansEnabled bool `json:"guardiansEnabled,omitempty"`
// Id: Identifier for this course assigned by Classroom.
//
// When
// creating a course,
// you may optionally set this identifier to an
// alias string in the
// request to create a corresponding alias. The `id` is still assigned
// by
// Classroom and cannot be updated after the course is
// created.
//
// Specifying this field in a course update mask results in an error.
Id string `json:"id,omitempty"`
// Name: Name of the course.
// For example, "10th Grade Biology".
// The name is required. It must be between 1 and 750 characters and a
// valid
// UTF-8 string.
Name string `json:"name,omitempty"`
// OwnerId: The identifier of the owner of a course.
//
// When specified as a parameter of a
// create course request, this
// field is required.
// The identifier can be one of the following:
//
// * the numeric identifier for the user
// * the email address of the user
// * the string literal "me", indicating the requesting user
//
// This must be set in a create request. Admins can also specify this
// field
// in a patch course request to
// transfer ownership. In other contexts, it is read-only.
OwnerId string `json:"ownerId,omitempty"`
// Room: Optional room location.
// For example, "301".
// If set, this field must be a valid UTF-8 string and no longer than
// 650
// characters.
Room string `json:"room,omitempty"`
// Section: 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.
Section string `json:"section,omitempty"`
// TeacherFolder: Information about a Drive Folder that is shared with
// all teachers of the
// course.
//
// This field will only be set for teachers of the course and domain
// administrators.
//
// Read-only.
TeacherFolder *DriveFolder `json:"teacherFolder,omitempty"`
// TeacherGroupEmail: The email address of a Google group containing all
// teachers of the course.
// This group does not accept email and can only be used for
// permissions.
//
// Read-only.
TeacherGroupEmail string `json:"teacherGroupEmail,omitempty"`
// UpdateTime: Time of the most recent update to this course.
// Specifying this field in a course update mask results in an
// error.
//
// Read-only.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AlternateLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternateLink") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Course) MarshalJSON() ([]byte, error) {
type NoMethod Course
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CourseAlias: Alternative identifier for a course.
//
// An alias uniquely identifies a course. It must be unique within one
// of the
// following scopes:
//
// * domain: A domain-scoped alias is visible to all users within the
// alias
// creator's domain and can be created only by a domain admin. A
// domain-scoped
// alias is often used when a course has an identifier external to
// Classroom.
//
// * project: A project-scoped alias is visible to any request from
// an
// application using the Developer Console project ID that created the
// alias
// and can be created by any project. A project-scoped alias is often
// used when
// an application has alternative identifiers. A random value can also
// be used
// to avoid duplicate courses in the event of transmission failures, as
// retrying
// a request will return `ALREADY_EXISTS` if a previous one has
// succeeded.
type CourseAlias struct {
// Alias: Alias string. The format of the string indicates the desired
// alias scoping.
//
// * `d:<name>` indicates a domain-scoped alias.
// Example: `d:math_101`
// * `p:<name>` indicates a project-scoped alias.
// Example: `p:abc123`
//
// This field has a maximum length of 256 characters.
Alias string `json:"alias,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Alias") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Alias") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CourseAlias) MarshalJSON() ([]byte, error) {
type NoMethod CourseAlias
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CourseMaterial: A material attached to a course as part of a material
// set.
type CourseMaterial struct {
// DriveFile: Google Drive file attachment.
DriveFile *DriveFile `json:"driveFile,omitempty"`
// Form: Google Forms attachment.
Form *Form `json:"form,omitempty"`
// Link: Link atatchment.
Link *Link `json:"link,omitempty"`
// YouTubeVideo: Youtube video attachment.
YouTubeVideo *YouTubeVideo `json:"youTubeVideo,omitempty"`
// ForceSendFields is a list of field names (e.g. "DriveFile") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DriveFile") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CourseMaterial) MarshalJSON() ([]byte, error) {
type NoMethod CourseMaterial
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CourseMaterialSet: A set of materials that appears on the "About"
// page of the course.
// These materials might include a syllabus, schedule, or other
// background
// information relating to the course as a whole.
type CourseMaterialSet struct {
// Materials: Materials attached to this set.
Materials []*CourseMaterial `json:"materials,omitempty"`
// Title: Title for this set.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "Materials") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Materials") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CourseMaterialSet) MarshalJSON() ([]byte, error) {
type NoMethod CourseMaterialSet
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CourseRosterChangesInfo: Information about a `Feed` with a
// `feed_type` of `COURSE_ROSTER_CHANGES`.
type CourseRosterChangesInfo struct {
// CourseId: The `course_id` of the course to subscribe to roster
// changes for.
CourseId string `json:"courseId,omitempty"`
// ForceSendFields is a list of field names (e.g. "CourseId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CourseId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CourseRosterChangesInfo) MarshalJSON() ([]byte, error) {
type NoMethod CourseRosterChangesInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CourseWork: Course work created by a teacher for students of the
// course.
type CourseWork struct {
// AlternateLink: Absolute link to this course work in the Classroom web
// UI.
// This is only populated if `state` is `PUBLISHED`.
//
// Read-only.
AlternateLink string `json:"alternateLink,omitempty"`
// AssigneeMode: Assignee mode of the coursework.
// If unspecified, the default value is `ALL_STUDENTS`.
//
// Possible values:
// "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never
// returned.
// "ALL_STUDENTS" - All students can see the item.
// This is the default state.
// "INDIVIDUAL_STUDENTS" - A subset of the students can see the item.
AssigneeMode string `json:"assigneeMode,omitempty"`
// Assignment: Assignment details.
// This is populated only when `work_type` is `ASSIGNMENT`.
//
// Read-only.
Assignment *Assignment `json:"assignment,omitempty"`
// AssociatedWithDeveloper: Whether this course work item is associated
// with the Developer Console
// project making the request.
//
// See google.classroom.Work.CreateCourseWork for
// more
// details.
//
// Read-only.
AssociatedWithDeveloper bool `json:"associatedWithDeveloper,omitempty"`
// CourseId: Identifier of the course.
//
// Read-only.
CourseId string `json:"courseId,omitempty"`
// CreationTime: Timestamp when this course work was
// created.
//
// Read-only.
CreationTime string `json:"creationTime,omitempty"`
// CreatorUserId: Identifier for the user that created the
// coursework.
//
// Read-only.
CreatorUserId string `json:"creatorUserId,omitempty"`
// Description: Optional description of this course work.
// If set, the description must be a valid UTF-8 string containing no
// more
// than 30,000 characters.
Description string `json:"description,omitempty"`
// DueDate: Optional date, in UTC, that submissions for this course work
// are due.
// This must be specified if `due_time` is specified.
DueDate *Date `json:"dueDate,omitempty"`
// DueTime: Optional time of day, in UTC, that submissions for this
// course work
// are due.
// This must be specified if `due_date` is specified.
DueTime *TimeOfDay `json:"dueTime,omitempty"`
// Id: Classroom-assigned identifier of this course work, unique per
// course.
//
// Read-only.
Id string `json:"id,omitempty"`
// IndividualStudentsOptions: Identifiers of students with access to the
// coursework.
// This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.
// If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only
// students
// specified in this field will be assigned the coursework.
IndividualStudentsOptions *IndividualStudentsOptions `json:"individualStudentsOptions,omitempty"`
// Materials: Additional materials.
//
// CourseWork must have no more than 20 material items.
Materials []*Material `json:"materials,omitempty"`
// MaxPoints: Maximum grade for this course work.
// If zero or unspecified, this assignment is considered ungraded.
// This must be a non-negative integer value.
MaxPoints float64 `json:"maxPoints,omitempty"`
// MultipleChoiceQuestion: Multiple choice question details.
// For read operations, this field is populated only when `work_type`
// is
// `MULTIPLE_CHOICE_QUESTION`.
// For write operations, this field must be specified when creating
// course
// work with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must
// not be
// set otherwise.
MultipleChoiceQuestion *MultipleChoiceQuestion `json:"multipleChoiceQuestion,omitempty"`
// ScheduledTime: Optional timestamp when this course work is scheduled
// to be published.
ScheduledTime string `json:"scheduledTime,omitempty"`
// State: Status of this course work.
// If unspecified, the default state is `DRAFT`.
//
// Possible values:
// "COURSE_WORK_STATE_UNSPECIFIED" - No state specified. This is never
// returned.
// "PUBLISHED" - Status for work that has been published.
// This is the default state.
// "DRAFT" - Status for work that is not yet published.
// Work in this state is visible only to course teachers and
// domain
// administrators.
// "DELETED" - Status for work that was published but is now
// deleted.
// Work in this state is visible only to course teachers and
// domain
// administrators.
// Work in this state is deleted after some time.
State string `json:"state,omitempty"`
// SubmissionModificationMode: Setting to determine when students are
// allowed to modify submissions.
// If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.
//
// Possible values:
// "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED" - No modification mode
// specified. This is never returned.
// "MODIFIABLE_UNTIL_TURNED_IN" - Submissions can be modified before
// being turned in.
// "MODIFIABLE" - Submissions can be modified at any time.
SubmissionModificationMode string `json:"submissionModificationMode,omitempty"`
// Title: Title of this course work.
// The title must be a valid UTF-8 string containing between 1 and
// 3000
// characters.
Title string `json:"title,omitempty"`
// UpdateTime: Timestamp of the most recent change to this course
// work.
//
// Read-only.
UpdateTime string `json:"updateTime,omitempty"`
// WorkType: Type of this course work.
//
// The type is set when the course work is created and cannot be
// changed.
//
// Possible values:
// "COURSE_WORK_TYPE_UNSPECIFIED" - No work type specified. This is
// never returned.
// "ASSIGNMENT" - An assignment.
// "SHORT_ANSWER_QUESTION" - A short answer question.
// "MULTIPLE_CHOICE_QUESTION" - A multiple-choice question.
WorkType string `json:"workType,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AlternateLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternateLink") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CourseWork) MarshalJSON() ([]byte, error) {
type NoMethod CourseWork
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *CourseWork) UnmarshalJSON(data []byte) error {
type NoMethod CourseWork
var s1 struct {
MaxPoints gensupport.JSONFloat64 `json:"maxPoints"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.MaxPoints = float64(s1.MaxPoints)
return nil
}
// CourseWorkChangesInfo: Information about a `Feed` with a `feed_type`
// of `COURSE_WORK_CHANGES`.
type CourseWorkChangesInfo struct {
// CourseId: The `course_id` of the course to subscribe to work changes
// for.
CourseId string `json:"courseId,omitempty"`
// ForceSendFields is a list of field names (e.g. "CourseId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CourseId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CourseWorkChangesInfo) MarshalJSON() ([]byte, error) {
type NoMethod CourseWorkChangesInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Date: Represents a whole or partial calendar date, e.g. a birthday.
// The time of day
// and time zone are either specified elsewhere or are not significant.
// The date
// is relative to the Proleptic Gregorian Calendar. This can
// represent:
//
// * A full date, with non-zero year, month and day values
// * A month and day value, with a zero year, e.g. an anniversary
// * A year on its own, with zero month and day values
// * A year and month value, with a zero day, e.g. a credit card
// expiration date
//
// Related types are google.type.TimeOfDay and
// `google.protobuf.Timestamp`.
type Date struct {
// Day: Day of month. Must be from 1 to 31 and valid for the year and
// month, or 0
// if specifying a year by itself or a year and month where the day is
// not
// significant.
Day int64 `json:"day,omitempty"`
// Month: Month of year. Must be from 1 to 12, or 0 if specifying a year
// without a
// month and day.
Month int64 `json:"month,omitempty"`
// Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
// without
// a year.
Year int64 `json:"year,omitempty"`
// ForceSendFields is a list of field names (e.g. "Day") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Day") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Date) MarshalJSON() ([]byte, error) {
type NoMethod Date
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DriveFile: Representation of a Google Drive file.
type DriveFile struct {
// AlternateLink: URL that can be used to access the Drive
// item.
//
// Read-only.
AlternateLink string `json:"alternateLink,omitempty"`
// Id: Drive API resource ID.
Id string `json:"id,omitempty"`
// ThumbnailUrl: URL of a thumbnail image of the Drive item.
//
// Read-only.
ThumbnailUrl string `json:"thumbnailUrl,omitempty"`
// Title: Title of the Drive item.
//
// Read-only.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "AlternateLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternateLink") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DriveFile) MarshalJSON() ([]byte, error) {
type NoMethod DriveFile
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DriveFolder: Representation of a Google Drive folder.
type DriveFolder struct {
// AlternateLink: URL that can be used to access the Drive
// folder.
//
// Read-only.
AlternateLink string `json:"alternateLink,omitempty"`
// Id: Drive API resource ID.
Id string `json:"id,omitempty"`
// Title: Title of the Drive folder.
//
// Read-only.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "AlternateLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternateLink") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DriveFolder) MarshalJSON() ([]byte, error) {
type NoMethod DriveFolder
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Empty: A generic empty message that you can re-use to avoid defining
// duplicated
// empty messages in your APIs. A typical example is to use it as the
// request
// or the response type of an API method. For instance:
//
// service Foo {
// rpc Bar(google.protobuf.Empty) returns
// (google.protobuf.Empty);
// }
//
// The JSON representation for `Empty` is empty JSON object `{}`.
type Empty struct {
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
}
// Feed: A class of notifications that an application can register to
// receive.
// For example: "all roster changes for a domain".
type Feed struct {
// CourseRosterChangesInfo: Information about a `Feed` with a
// `feed_type` of `COURSE_ROSTER_CHANGES`.
// This field must be specified if `feed_type` is
// `COURSE_ROSTER_CHANGES`.
CourseRosterChangesInfo *CourseRosterChangesInfo `json:"courseRosterChangesInfo,omitempty"`
// CourseWorkChangesInfo: Information about a `Feed` with a `feed_type`
// of `COURSE_WORK_CHANGES`.
// This field must be specified if `feed_type` is `COURSE_WORK_CHANGES`.
CourseWorkChangesInfo *CourseWorkChangesInfo `json:"courseWorkChangesInfo,omitempty"`
// FeedType: The type of feed.
//
// Possible values:
// "FEED_TYPE_UNSPECIFIED" - Should never be returned or provided.
// "DOMAIN_ROSTER_CHANGES" - All roster changes for a particular
// domain.
//
// Notifications will be generated whenever a user joins or leaves a
// course.
//
// No notifications will be generated when an invitation is created
// or
// deleted, but notifications will be generated when a user joins a
// course
// by accepting an invitation.
// "COURSE_ROSTER_CHANGES" - All roster changes for a particular
// course.
//
// Notifications will be generated whenever a user joins or leaves a
// course.
//
// No notifications will be generated when an invitation is created
// or
// deleted, but notifications will be generated when a user joins a
// course
// by accepting an invitation.
// "COURSE_WORK_CHANGES" - All course work activity for a particular
// course.
//
// Notifications will be generated when a CourseWork
// or
// StudentSubmission object is created or modified. No notification will
// be
// generated when a StudentSubmission object is created in connection
// with
// the creation or modification of its parent CourseWork object (but
// a
// notification will be generated for that CourseWork object's creation
// or
// modification).
FeedType string `json:"feedType,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "CourseRosterChangesInfo") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CourseRosterChangesInfo")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Feed) MarshalJSON() ([]byte, error) {
type NoMethod Feed
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Form: Google Forms item.
type Form struct {
// FormUrl: URL of the form.
FormUrl string `json:"formUrl,omitempty"`
// ResponseUrl: URL of the form responses document.
// Only set if respsonses have been recorded and only when
// the
// requesting user is an editor of the form.
//
// Read-only.
ResponseUrl string `json:"responseUrl,omitempty"`
// ThumbnailUrl: URL of a thumbnail image of the Form.
//
// Read-only.
ThumbnailUrl string `json:"thumbnailUrl,omitempty"`
// Title: Title of the Form.
//
// Read-only.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "FormUrl") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FormUrl") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Form) MarshalJSON() ([]byte, error) {
type NoMethod Form
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GlobalPermission: Global user permission description.
type GlobalPermission struct {
// Permission: Permission value.
//
// Possible values:
// "PERMISSION_UNSPECIFIED" - No permission is specified. This is not
// returned and is not a
// valid value.
// "CREATE_COURSE" - User is permitted to create a course.
Permission string `json:"permission,omitempty"`
// ForceSendFields is a list of field names (e.g. "Permission") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Permission") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GlobalPermission) MarshalJSON() ([]byte, error) {
type NoMethod GlobalPermission
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GradeHistory: The history of each grade on this submission.
type GradeHistory struct {
// ActorUserId: The teacher who made the grade change.
ActorUserId string `json:"actorUserId,omitempty"`
// GradeChangeType: The type of grade change at this time in the
// submission grade history.
//
// Possible values:
// "UNKNOWN_GRADE_CHANGE_TYPE" - No grade change type specified. This
// should never be returned.
// "DRAFT_GRADE_POINTS_EARNED_CHANGE" - A change in the numerator of
// the draft grade.
// "ASSIGNED_GRADE_POINTS_EARNED_CHANGE" - A change in the numerator
// of the assigned grade.
// "MAX_POINTS_CHANGE" - A change in the denominator of the grade.
GradeChangeType string `json:"gradeChangeType,omitempty"`
// GradeTimestamp: When the grade of the submission was changed.
GradeTimestamp string `json:"gradeTimestamp,omitempty"`
// MaxPoints: The denominator of the grade at this time in the
// submission grade
// history.
MaxPoints float64 `json:"maxPoints,omitempty"`
// PointsEarned: The numerator of the grade at this time in the
// submission grade history.
PointsEarned float64 `json:"pointsEarned,omitempty"`
// ForceSendFields is a list of field names (e.g. "ActorUserId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ActorUserId") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GradeHistory) MarshalJSON() ([]byte, error) {
type NoMethod GradeHistory
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GradeHistory) UnmarshalJSON(data []byte) error {
type NoMethod GradeHistory
var s1 struct {
MaxPoints gensupport.JSONFloat64 `json:"maxPoints"`
PointsEarned gensupport.JSONFloat64 `json:"pointsEarned"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.MaxPoints = float64(s1.MaxPoints)
s.PointsEarned = float64(s1.PointsEarned)
return nil
}
// Guardian: Association between a student and a guardian of that
// student. The guardian
// may receive information about the student's course work.
type Guardian struct {
// GuardianId: Identifier for the guardian.
GuardianId string `json:"guardianId,omitempty"`
// GuardianProfile: User profile for the guardian.
GuardianProfile *UserProfile `json:"guardianProfile,omitempty"`
// InvitedEmailAddress: The email address to which the initial guardian
// invitation was sent.
// This field is only visible to domain administrators.
InvitedEmailAddress string `json:"invitedEmailAddress,omitempty"`
// StudentId: Identifier for the student to whom the guardian
// relationship applies.
StudentId string `json:"studentId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "GuardianId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "GuardianId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Guardian) MarshalJSON() ([]byte, error) {
type NoMethod Guardian
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GuardianInvitation: An invitation to become the guardian of a
// specified user, sent to a specified
// email address.
type GuardianInvitation struct {
// CreationTime: The time that this invitation was created.
//
// Read-only.
CreationTime string `json:"creationTime,omitempty"`
// InvitationId: Unique identifier for this invitation.
//
// Read-only.
InvitationId string `json:"invitationId,omitempty"`
// InvitedEmailAddress: Email address that the invitation was sent
// to.
// This field is only visible to domain administrators.
InvitedEmailAddress string `json:"invitedEmailAddress,omitempty"`
// State: The state that this invitation is in.
//
// Possible values:
// "GUARDIAN_INVITATION_STATE_UNSPECIFIED" - Should never be returned.
// "PENDING" - The invitation is active and awaiting a response.
// "COMPLETE" - The invitation is no longer active. It may have been
// accepted, declined,
// withdrawn or it may have expired.
State string `json:"state,omitempty"`
// StudentId: ID of the student (in standard format)
StudentId string `json:"studentId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CreationTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreationTime") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GuardianInvitation) MarshalJSON() ([]byte, error) {
type NoMethod GuardianInvitation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// IndividualStudentsOptions: Assignee details about a
// coursework/announcement.
// This field is set if and only if `assigneeMode` is
// `INDIVIDUAL_STUDENTS`.
type IndividualStudentsOptions struct {
// StudentIds: Identifiers for the students that have access to
// the
// coursework/announcement.
StudentIds []string `json:"studentIds,omitempty"`
// ForceSendFields is a list of field names (e.g. "StudentIds") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "StudentIds") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *IndividualStudentsOptions) MarshalJSON() ([]byte, error) {
type NoMethod IndividualStudentsOptions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Invitation: An invitation to join a course.
type Invitation struct {
// CourseId: Identifier of the course to invite the user to.
CourseId string `json:"courseId,omitempty"`
// Id: Identifier assigned by Classroom.
//
// Read-only.
Id string `json:"id,omitempty"`
// Role: Role to invite the user to have.
// Must not be `COURSE_ROLE_UNSPECIFIED`.
//
// Possible values:
// "COURSE_ROLE_UNSPECIFIED" - No course role.
// "STUDENT" - Student in the course.
// "TEACHER" - Teacher of the course.
// "OWNER" - Owner of the course.
Role string `json:"role,omitempty"`
// UserId: Identifier of the invited user.
//
// When specified as a parameter of a request, this identifier can be
// set to
// one of the following:
//
// * the numeric identifier for the user
// * the email address of the user
// * the string literal "me", indicating the requesting user
UserId string `json:"userId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CourseId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CourseId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Invitation) MarshalJSON() ([]byte, error) {
type NoMethod Invitation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Link: URL item.
type Link struct {
// ThumbnailUrl: URL of a thumbnail image of the target URL.
//
// Read-only.
ThumbnailUrl string `json:"thumbnailUrl,omitempty"`
// Title: Title of the target of the URL.
//
// Read-only.
Title string `json:"title,omitempty"`
// Url: URL to link to.
// This must be a valid UTF-8 string containing between 1 and 2024
// characters.
Url string `json:"url,omitempty"`
// ForceSendFields is a list of field names (e.g. "ThumbnailUrl") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ThumbnailUrl") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Link) MarshalJSON() ([]byte, error) {
type NoMethod Link
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListAnnouncementsResponse: Response when listing course work.
type ListAnnouncementsResponse struct {
// Announcements: Announcement items that match the request.
Announcements []*Announcement `json:"announcements,omitempty"`
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Announcements") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Announcements") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListAnnouncementsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListAnnouncementsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListCourseAliasesResponse: Response when listing course aliases.
type ListCourseAliasesResponse struct {
// Aliases: The course aliases.
Aliases []*CourseAlias `json:"aliases,omitempty"`
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Aliases") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Aliases") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListCourseAliasesResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListCourseAliasesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListCourseWorkResponse: Response when listing course work.
type ListCourseWorkResponse struct {
// CourseWork: Course work items that match the request.
CourseWork []*CourseWork `json:"courseWork,omitempty"`
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CourseWork") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CourseWork") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListCourseWorkResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListCourseWorkResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListCoursesResponse: Response when listing courses.
type ListCoursesResponse struct {
// Courses: Courses that match the list request.
Courses []*Course `json:"courses,omitempty"`
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Courses") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Courses") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListCoursesResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListCoursesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListGuardianInvitationsResponse: Response when listing guardian
// invitations.
type ListGuardianInvitationsResponse struct {
// GuardianInvitations: Guardian invitations that matched the list
// request.
GuardianInvitations []*GuardianInvitation `json:"guardianInvitations,omitempty"`
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "GuardianInvitations")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "GuardianInvitations") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ListGuardianInvitationsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListGuardianInvitationsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListGuardiansResponse: Response when listing guardians.
type ListGuardiansResponse struct {
// Guardians: Guardians on this page of results that met the criteria
// specified in
// the request.
Guardians []*Guardian `json:"guardians,omitempty"`
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Guardians") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Guardians") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListGuardiansResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListGuardiansResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListInvitationsResponse: Response when listing invitations.
type ListInvitationsResponse struct {
// Invitations: Invitations that match the list request.
Invitations []*Invitation `json:"invitations,omitempty"`
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Invitations") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Invitations") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListInvitationsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListInvitationsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListStudentSubmissionsResponse: Response when listing student
// submissions.
type ListStudentSubmissionsResponse struct {
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// StudentSubmissions: Student work that matches the request.
StudentSubmissions []*StudentSubmission `json:"studentSubmissions,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListStudentSubmissionsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListStudentSubmissionsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListStudentsResponse: Response when listing students.
type ListStudentsResponse struct {
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// Students: Students who match the list request.
Students []*Student `json:"students,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListStudentsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListStudentsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListTeachersResponse: Response when listing teachers.
type ListTeachersResponse struct {
// NextPageToken: Token identifying the next page of results to return.
// If empty, no further
// results are available.
NextPageToken string `json:"nextPageToken,omitempty"`
// Teachers: Teachers who match the list request.
Teachers []*Teacher `json:"teachers,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListTeachersResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListTeachersResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Material: Material attached to course work.
//
// When creating attachments, setting the `form` field is not supported.
type Material struct {
// DriveFile: Google Drive file material.
DriveFile *SharedDriveFile `json:"driveFile,omitempty"`
// Form: Google Forms material.
Form *Form `json:"form,omitempty"`
// Link: Link material. On creation, will be upgraded to a more
// appropriate type
// if possible, and this will be reflected in the response.
Link *Link `json:"link,omitempty"`
// YoutubeVideo: YouTube video material.
YoutubeVideo *YouTubeVideo `json:"youtubeVideo,omitempty"`
// ForceSendFields is a list of field names (e.g. "DriveFile") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DriveFile") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Material) MarshalJSON() ([]byte, error) {
type NoMethod Material
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ModifyAnnouncementAssigneesRequest: Request to modify assignee mode
// and options of an announcement.
type ModifyAnnouncementAssigneesRequest struct {
// AssigneeMode: Mode of the announcement describing whether it will be
// accessible by all
// students or specified individual students.
//
// Possible values:
// "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never
// returned.
// "ALL_STUDENTS" - All students can see the item.
// This is the default state.
// "INDIVIDUAL_STUDENTS" - A subset of the students can see the item.
AssigneeMode string `json:"assigneeMode,omitempty"`
// ModifyIndividualStudentsOptions: Set which students can view or
// cannot view the announcement.
// Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`.
ModifyIndividualStudentsOptions *ModifyIndividualStudentsOptions `json:"modifyIndividualStudentsOptions,omitempty"`
// ForceSendFields is a list of field names (e.g. "AssigneeMode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AssigneeMode") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ModifyAnnouncementAssigneesRequest) MarshalJSON() ([]byte, error) {
type NoMethod ModifyAnnouncementAssigneesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ModifyAttachmentsRequest: Request to modify the attachments of a
// student submission.
type ModifyAttachmentsRequest struct {
// AddAttachments: Attachments to add.
// A student submission may not have more than 20 attachments.
//
// Form attachments are not supported.
AddAttachments []*Attachment `json:"addAttachments,omitempty"`
// ForceSendFields is a list of field names (e.g. "AddAttachments") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AddAttachments") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ModifyAttachmentsRequest) MarshalJSON() ([]byte, error) {
type NoMethod ModifyAttachmentsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ModifyCourseWorkAssigneesRequest: Request to modify assignee mode and
// options of a coursework.
type ModifyCourseWorkAssigneesRequest struct {
// AssigneeMode: Mode of the coursework describing whether it will be
// assigned to all
// students or specified individual students.
//
// Possible values:
// "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never
// returned.
// "ALL_STUDENTS" - All students can see the item.
// This is the default state.
// "INDIVIDUAL_STUDENTS" - A subset of the students can see the item.
AssigneeMode string `json:"assigneeMode,omitempty"`
// ModifyIndividualStudentsOptions: Set which students are assigned or
// not assigned to the coursework.
// Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`.
ModifyIndividualStudentsOptions *ModifyIndividualStudentsOptions `json:"modifyIndividualStudentsOptions,omitempty"`
// ForceSendFields is a list of field names (e.g. "AssigneeMode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AssigneeMode") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ModifyCourseWorkAssigneesRequest) MarshalJSON() ([]byte, error) {
type NoMethod ModifyCourseWorkAssigneesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ModifyIndividualStudentsOptions: Contains fields to add or remove
// students from a course work or announcement
// where the `assigneeMode` is set to `INDIVIDUAL_STUDENTS`.
type ModifyIndividualStudentsOptions struct {
// AddStudentIds: Ids of students to be added as having access to
// this
// coursework/announcement.
AddStudentIds []string `json:"addStudentIds,omitempty"`
// RemoveStudentIds: Ids of students to be removed from having access to
// this
// coursework/announcement.
RemoveStudentIds []string `json:"removeStudentIds,omitempty"`
// ForceSendFields is a list of field names (e.g. "AddStudentIds") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AddStudentIds") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ModifyIndividualStudentsOptions) MarshalJSON() ([]byte, error) {
type NoMethod ModifyIndividualStudentsOptions
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MultipleChoiceQuestion: Additional details for multiple-choice
// questions.
type MultipleChoiceQuestion struct {
// Choices: Possible choices.
Choices []string `json:"choices,omitempty"`
// ForceSendFields is a list of field names (e.g. "Choices") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Choices") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MultipleChoiceQuestion) MarshalJSON() ([]byte, error) {
type NoMethod MultipleChoiceQuestion
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MultipleChoiceSubmission: Student work for a multiple-choice
// question.
type MultipleChoiceSubmission struct {
// Answer: Student's select choice.
Answer string `json:"answer,omitempty"`
// ForceSendFields is a list of field names (e.g. "Answer") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Answer") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *MultipleChoiceSubmission) MarshalJSON() ([]byte, error) {
type NoMethod MultipleChoiceSubmission
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Name: Details of the user's name.
type Name struct {
// FamilyName: The user's last name.
//
// Read-only.
FamilyName string `json:"familyName,omitempty"`
// FullName: The user's full name formed by concatenating the first and
// last name
// values.
//
// Read-only.
FullName string `json:"fullName,omitempty"`
// GivenName: The user's first name.
//
// Read-only.
GivenName string `json:"givenName,omitempty"`
// ForceSendFields is a list of field names (e.g. "FamilyName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FamilyName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Name) MarshalJSON() ([]byte, error) {
type NoMethod Name
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ReclaimStudentSubmissionRequest: Request to reclaim a student
// submission.
type ReclaimStudentSubmissionRequest struct {
}
// Registration: An instruction to Classroom to send notifications from
// the `feed` to the
// provided destination.
type Registration struct {
// CloudPubsubTopic: The Cloud Pub/Sub topic that notifications are to
// be sent to.
CloudPubsubTopic *CloudPubsubTopic `json:"cloudPubsubTopic,omitempty"`
// ExpiryTime: The time until which the `Registration` is
// effective.
//
// This is a read-only field assigned by the server.
ExpiryTime string `json:"expiryTime,omitempty"`
// Feed: Specification for the class of notifications that Classroom
// should deliver
// to the destination.
Feed *Feed `json:"feed,omitempty"`
// RegistrationId: A server-generated unique identifier for this
// `Registration`.
//
// Read-only.
RegistrationId string `json:"registrationId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CloudPubsubTopic") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CloudPubsubTopic") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Registration) MarshalJSON() ([]byte, error) {
type NoMethod Registration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ReturnStudentSubmissionRequest: Request to return a student
// submission.
type ReturnStudentSubmissionRequest struct {
}
// SharedDriveFile: Drive file that is used as material for course work.
type SharedDriveFile struct {
// DriveFile: Drive file details.
DriveFile *DriveFile `json:"driveFile,omitempty"`
// ShareMode: Mechanism by which students access the Drive item.
//
// Possible values:
// "UNKNOWN_SHARE_MODE" - No sharing mode specified. This should never
// be returned.
// "VIEW" - Students can view the shared file.
// "EDIT" - Students can edit the shared file.
// "STUDENT_COPY" - Students have a personal copy of the shared file.
ShareMode string `json:"shareMode,omitempty"`
// ForceSendFields is a list of field names (e.g. "DriveFile") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DriveFile") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SharedDriveFile) MarshalJSON() ([]byte, error) {
type NoMethod SharedDriveFile
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ShortAnswerSubmission: Student work for a short answer question.
type ShortAnswerSubmission struct {
// Answer: Student response to a short-answer question.
Answer string `json:"answer,omitempty"`
// ForceSendFields is a list of field names (e.g. "Answer") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Answer") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ShortAnswerSubmission) MarshalJSON() ([]byte, error) {
type NoMethod ShortAnswerSubmission
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// StateHistory: The history of each state this submission has been in.
type StateHistory struct {
// ActorUserId: The teacher or student who made the change
ActorUserId string `json:"actorUserId,omitempty"`
// State: The workflow pipeline stage.
//
// Possible values:
// "STATE_UNSPECIFIED" - No state specified. This should never be
// returned.
// "CREATED" - The Submission has been created.
// "TURNED_IN" - The student has turned in an assigned document, which
// may or may not be
// a template.
// "RETURNED" - The teacher has returned the assigned document to the
// student.
// "RECLAIMED_BY_STUDENT" - The student turned in the assigned
// document, and then chose to
// "unsubmit" the assignment, giving the student control again as
// the
// owner.
// "STUDENT_EDITED_AFTER_TURN_IN" - The student edited their
// submission after turning it in. Currently,
// only used by Questions, when the student edits their answer.
State string `json:"state,omitempty"`
// StateTimestamp: When the submission entered this state.
StateTimestamp string `json:"stateTimestamp,omitempty"`
// ForceSendFields is a list of field names (e.g. "ActorUserId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ActorUserId") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *StateHistory) MarshalJSON() ([]byte, error) {
type NoMethod StateHistory
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Student: Student in a course.
type Student struct {
// CourseId: Identifier of the course.
//
// Read-only.
CourseId string `json:"courseId,omitempty"`
// Profile: Global user information for the student.
//
// Read-only.
Profile *UserProfile `json:"profile,omitempty"`
// StudentWorkFolder: Information about a Drive Folder for this
// student's work in this course.
// Only visible to the student and domain administrators.
//
// Read-only.
StudentWorkFolder *DriveFolder `json:"studentWorkFolder,omitempty"`
// UserId: Identifier of the user.
//
// When specified as a parameter of a request, this identifier can be
// one of
// the following:
//
// * the numeric identifier for the user
// * the email address of the user
// * the string literal "me", indicating the requesting user
UserId string `json:"userId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CourseId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CourseId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Student) MarshalJSON() ([]byte, error) {
type NoMethod Student
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// StudentSubmission: Student submission for course
// work.
//
// StudentSubmission items are generated when a CourseWork item is
// created.
//
// StudentSubmissions that have never been accessed (i.e. with `state` =
// NEW)
// may not have a creation time or update time.
type StudentSubmission struct {
// AlternateLink: Absolute link to the submission in the Classroom web
// UI.
//
// Read-only.
AlternateLink string `json:"alternateLink,omitempty"`
// AssignedGrade: Optional grade. If unset, no grade was set.
// This value must be non-negative. Decimal (i.e. non-integer) values
// are
// allowed, but will be rounded to two decimal places.
//
// This may be modified only by course teachers.
AssignedGrade float64 `json:"assignedGrade,omitempty"`
// AssignmentSubmission: Submission content when course_work_type is
// ASSIGNMENT.
//
// Students can modify this content
// using
// google.classroom.Work.ModifyAttachments.
AssignmentSubmission *AssignmentSubmission `json:"assignmentSubmission,omitempty"`
// AssociatedWithDeveloper: Whether this student submission is
// associated with the Developer Console
// project making the request.
//
// See google.classroom.Work.CreateCourseWork for
// more
// details.
//
// Read-only.
AssociatedWithDeveloper bool `json:"associatedWithDeveloper,omitempty"`
// CourseId: Identifier of the course.
//
// Read-only.
CourseId string `json:"courseId,omitempty"`
// CourseWorkId: Identifier for the course work this corresponds
// to.
//
// Read-only.
CourseWorkId string `json:"courseWorkId,omitempty"`
// CourseWorkType: Type of course work this submission is
// for.
//
// Read-only.
//
// Possible values:
// "COURSE_WORK_TYPE_UNSPECIFIED" - No work type specified. This is
// never returned.
// "ASSIGNMENT" - An assignment.
// "SHORT_ANSWER_QUESTION" - A short answer question.
// "MULTIPLE_CHOICE_QUESTION" - A multiple-choice question.
CourseWorkType string `json:"courseWorkType,omitempty"`
// CreationTime: Creation time of this submission.
// This may be unset if the student has not accessed this
// item.
//
// Read-only.
CreationTime string `json:"creationTime,omitempty"`
// DraftGrade: Optional pending grade. If unset, no grade was set.
// This value must be non-negative. Decimal (i.e. non-integer) values
// are
// allowed, but will be rounded to two decimal places.
//
// This is only visible to and modifiable by course teachers.
DraftGrade float64 `json:"draftGrade,omitempty"`
// Id: Classroom-assigned Identifier for the student submission.
// This is unique among submissions for the relevant course
// work.
//
// Read-only.
Id string `json:"id,omitempty"`
// Late: Whether this submission is late.
//
// Read-only.
Late bool `json:"late,omitempty"`
// MultipleChoiceSubmission: Submission content when course_work_type is
// MULTIPLE_CHOICE_QUESTION.
MultipleChoiceSubmission *MultipleChoiceSubmission `json:"multipleChoiceSubmission,omitempty"`
// ShortAnswerSubmission: Submission content when course_work_type is
// SHORT_ANSWER_QUESTION.
ShortAnswerSubmission *ShortAnswerSubmission `json:"shortAnswerSubmission,omitempty"`
// State: State of this submission.
//
// Read-only.
//
// Possible values:
// "SUBMISSION_STATE_UNSPECIFIED" - No state specified. This should
// never be returned.
// "NEW" - The student has never accessed this submission. Attachments
// are not
// returned and timestamps is not set.
// "CREATED" - Has been created.
// "TURNED_IN" - Has been turned in to the teacher.
// "RETURNED" - Has been returned to the student.
// "RECLAIMED_BY_STUDENT" - Student chose to "unsubmit" the
// assignment.
State string `json:"state,omitempty"`
// SubmissionHistory: The history of the submission (includes state and
// grade histories).
//
// Read-only.
SubmissionHistory []*SubmissionHistory `json:"submissionHistory,omitempty"`
// UpdateTime: Last update time of this submission.
// This may be unset if the student has not accessed this
// item.
//
// Read-only.
UpdateTime string `json:"updateTime,omitempty"`
// UserId: Identifier for the student that owns this
// submission.
//
// Read-only.
UserId string `json:"userId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AlternateLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternateLink") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *StudentSubmission) MarshalJSON() ([]byte, error) {
type NoMethod StudentSubmission
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *StudentSubmission) UnmarshalJSON(data []byte) error {
type NoMethod StudentSubmission
var s1 struct {
AssignedGrade gensupport.JSONFloat64 `json:"assignedGrade"`
DraftGrade gensupport.JSONFloat64 `json:"draftGrade"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.AssignedGrade = float64(s1.AssignedGrade)
s.DraftGrade = float64(s1.DraftGrade)
return nil
}
// SubmissionHistory: The history of the submission. This currently
// includes state and grade
// histories.
type SubmissionHistory struct {
// GradeHistory: The grade history information of the submission, if
// present.
GradeHistory *GradeHistory `json:"gradeHistory,omitempty"`
// StateHistory: The state history information of the submission, if
// present.
StateHistory *StateHistory `json:"stateHistory,omitempty"`
// ForceSendFields is a list of field names (e.g. "GradeHistory") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "GradeHistory") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *SubmissionHistory) MarshalJSON() ([]byte, error) {
type NoMethod SubmissionHistory
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Teacher: Teacher of a course.
type Teacher struct {
// CourseId: Identifier of the course.
//
// Read-only.
CourseId string `json:"courseId,omitempty"`
// Profile: Global user information for the teacher.
//
// Read-only.
Profile *UserProfile `json:"profile,omitempty"`
// UserId: Identifier of the user.
//
// When specified as a parameter of a request, this identifier can be
// one of
// the following:
//
// * the numeric identifier for the user
// * the email address of the user
// * the string literal "me", indicating the requesting user
UserId string `json:"userId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CourseId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CourseId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Teacher) MarshalJSON() ([]byte, error) {
type NoMethod Teacher
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TimeOfDay: Represents a time of day. The date and time zone are
// either not significant
// or are specified elsewhere. An API may choose to allow leap seconds.
// Related
// types are google.type.Date and `google.protobuf.Timestamp`.
type TimeOfDay struct {
// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API
// may choose
// to allow the value "24:00:00" for scenarios like business closing
// time.
Hours int64 `json:"hours,omitempty"`
// Minutes: Minutes of hour of day. Must be from 0 to 59.
Minutes int64 `json:"minutes,omitempty"`
// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to
// 999,999,999.
Nanos int64 `json:"nanos,omitempty"`
// Seconds: Seconds of minutes of the time. Must normally be from 0 to
// 59. An API may
// allow the value 60 if it allows leap-seconds.
Seconds int64 `json:"seconds,omitempty"`
// ForceSendFields is a list of field names (e.g. "Hours") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Hours") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
type NoMethod TimeOfDay
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TurnInStudentSubmissionRequest: Request to turn in a student
// submission.
type TurnInStudentSubmissionRequest struct {
}
// UserProfile: Global information for a user.
type UserProfile struct {
// EmailAddress: Email address of the user.
//
// Read-only.
EmailAddress string `json:"emailAddress,omitempty"`
// Id: Identifier of the user.
//
// Read-only.
Id string `json:"id,omitempty"`
// Name: Name of the user.
//
// Read-only.
Name *Name `json:"name,omitempty"`
// Permissions: Global permissions of the user.
//
// Read-only.
Permissions []*GlobalPermission `json:"permissions,omitempty"`
// PhotoUrl: URL of user's profile photo.
//
// Read-only.
PhotoUrl string `json:"photoUrl,omitempty"`
// VerifiedTeacher: Represents whether a G Suite for Education user's
// domain administrator has
// explicitly verified them as being a teacher. If the user is not a
// member of
// a G Suite for Education domain, than this field will always be
// false.
//
// Read-only
VerifiedTeacher bool `json:"verifiedTeacher,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "EmailAddress") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EmailAddress") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *UserProfile) MarshalJSON() ([]byte, error) {
type NoMethod UserProfile
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// YouTubeVideo: YouTube video item.
type YouTubeVideo struct {
// AlternateLink: URL that can be used to view the YouTube
// video.
//
// Read-only.
AlternateLink string `json:"alternateLink,omitempty"`
// Id: YouTube API resource ID.
Id string `json:"id,omitempty"`
// ThumbnailUrl: URL of a thumbnail image of the YouTube
// video.
//
// Read-only.
ThumbnailUrl string `json:"thumbnailUrl,omitempty"`
// Title: Title of the YouTube video.
//
// Read-only.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "AlternateLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternateLink") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *YouTubeVideo) MarshalJSON() ([]byte, error) {
type NoMethod YouTubeVideo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// method id "classroom.courses.create":
type CoursesCreateCall struct {
s *Service
course *Course
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Create: Creates a course.
//
// The user specified in `ownerId` is the owner of the created
// course
// and added as a teacher.
//
// This method returns the following error codes:
//
// * `PERMISSION_DENIED` if the requesting user is not permitted to
// create
// courses or for access errors.
// * `NOT_FOUND` if the primary teacher is not a valid user.
// * `FAILED_PRECONDITION` if the course owner's account is disabled or
// for
// the following request errors:
// * UserGroupsMembershipLimitReached
// * `ALREADY_EXISTS` if an alias was specified in the `id` and
// already exists.
func (r *CoursesService) Create(course *Course) *CoursesCreateCall {
c := &CoursesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.course = course
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *CoursesCreateCall) Fields(s ...googleapi.Field) *CoursesCreateCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *CoursesCreateCall) Context(ctx context.Context) *CoursesCreateCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *CoursesCreateCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *CoursesCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.course)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "classroom.courses.create" call.
// Exactly one of *Course or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *Course.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *CoursesCreateCall) Do(opts ...googleapi.CallOption) (*Course, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Course{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Creates a course.\n\nThe user specified in `ownerId` is the owner of the created course\nand added as a teacher.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ncourses or for access errors.\n* `NOT_FOUND` if the primary teacher is not a valid user.\n* `FAILED_PRECONDITION` if the course owner's account is disabled or for\nthe following request errors:\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if an alias was specified in the `id` and\nalready exists.",
// "flatPath": "v1/courses",
// "httpMethod": "POST",
// "id": "classroom.courses.create",
// "parameterOrder": [],
// "parameters": {},
// "path": "v1/courses",
// "request": {
// "$ref": "Course"
// },
// "response": {
// "$ref": "Course"
// },
// "scopes": [
// "https://www.googleapis.com/auth/classroom.courses"
// ]
// }
}
// method id "classroom.courses.delete":
type CoursesDeleteCall struct {
s *Service
id string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Delete: Deletes a course.
//
// This method returns the following error codes:
//
// * `PERMISSION_DENIED` if the requesting user is not permitted to
// delete the
// requested course or for access errors.
// * `NOT_FOUND` if no course exists with the requested ID.
func (r *CoursesService) Delete(id string) *CoursesDeleteCall {
c := &CoursesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.id = id
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *CoursesDeleteCall) Fields(s ...googleapi.Field) *CoursesDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *CoursesDeleteCall) Context(ctx context.Context) *CoursesDeleteCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *CoursesDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *CoursesDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses/{id}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("DELETE", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"id": c.id,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "classroom.courses.delete" call.
// Exactly one of *Empty or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *Empty.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *CoursesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Empty{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Deletes a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.",
// "flatPath": "v1/courses/{id}",
// "httpMethod": "DELETE",
// "id": "classroom.courses.delete",
// "parameterOrder": [
// "id"
// ],
// "parameters": {
// "id": {
// "description": "Identifier of the course to delete.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/courses/{id}",
// "response": {
// "$ref": "Empty"
// },
// "scopes": [
// "https://www.googleapis.com/auth/classroom.courses"
// ]
// }
}
// method id "classroom.courses.get":
type CoursesGetCall struct {
s *Service
id string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Returns a course.
//
// This method returns the following error codes:
//
// * `PERMISSION_DENIED` if the requesting user is not permitted to
// access the
// requested course or for access errors.
// * `NOT_FOUND` if no course exists with the requested ID.
func (r *CoursesService) Get(id string) *CoursesGetCall {
c := &CoursesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.id = id
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *CoursesGetCall) Fields(s ...googleapi.Field) *CoursesGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *CoursesGetCall) IfNoneMatch(entityTag string) *CoursesGetCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *CoursesGetCall) Context(ctx context.Context) *CoursesGetCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *CoursesGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *CoursesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses/{id}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"id": c.id,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "classroom.courses.get" call.
// Exactly one of *Course or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *Course.ServerResponse.Header or (if a response was returned at all)
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
// check whether the returned error was because http.StatusNotModified
// was returned.
func (c *CoursesGetCall) Do(opts ...googleapi.CallOption) (*Course, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Course{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Returns a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.",
// "flatPath": "v1/courses/{id}",
// "httpMethod": "GET",
// "id": "classroom.courses.get",
// "parameterOrder": [
// "id"
// ],
// "parameters": {
// "id": {
// "description": "Identifier of the course to return.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/courses/{id}",
// "response": {
// "$ref": "Course"
// },
// "scopes": [
// "https://www.googleapis.com/auth/classroom.courses",
// "https://www.googleapis.com/auth/classroom.courses.readonly"
// ]
// }
}
// method id "classroom.courses.list":
type CoursesListCall struct {
s *Service
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Returns a list of courses that the requesting user is permitted
// to view,
// restricted to those that match the request. Returned courses are
// ordered by
// creation time, with the most recently created coming first.
//
// This method returns the following error codes:
//
// * `PERMISSION_DENIED` for access errors.
// * `INVALID_ARGUMENT` if the query argument is malformed.
// * `NOT_FOUND` if any users specified in the query arguments do not
// exist.
func (r *CoursesService) List() *CoursesListCall {
c := &CoursesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
return c
}
// CourseStates sets the optional parameter "courseStates": Restricts
// returned courses to those in one of the specified states
// The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.
//
// Possible values:
// "COURSE_STATE_UNSPECIFIED"
// "ACTIVE"
// "ARCHIVED"
// "PROVISIONED"
// "DECLINED"
// "SUSPENDED"
func (c *CoursesListCall) CourseStates(courseStates ...string) *CoursesListCall {
c.urlParams_.SetMulti("courseStates", append([]string{}, courseStates...))
return c
}
// PageSize sets the optional parameter "pageSize": Maximum number of
// items to return. Zero or unspecified indicates that the
// server may assign a maximum.
//
// The server may return fewer than the specified number of results.
func (c *CoursesListCall) PageSize(pageSize int64) *CoursesListCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
}
// PageToken sets the optional parameter "pageToken":
// nextPageToken
// value returned from a previous
// list call,
// indicating that the subsequent page of results should be
// returned.
//
// The list request must be
// otherwise identical to the one that resulted in this token.
func (c *CoursesListCall) PageToken(pageToken string) *CoursesListCall {
c.urlParams_.Set("pageToken", pageToken)
return c
}
// StudentId sets the optional parameter "studentId": Restricts returned
// courses to those having a student with the specified
// identifier. The identifier can be one of the following:
//
// * the numeric identifier for the user
// * the email address of the user
// * the string literal "me", indicating the requesting user
func (c *CoursesListCall) StudentId(studentId string) *CoursesListCall {
c.urlParams_.Set("studentId", studentId)
return c
}
// TeacherId sets the optional parameter "teacherId": Restricts returned
// courses to those having a teacher with the specified
// identifier. The identifier can be one of the following:
//
// * the numeric identifier for the user
// * the email address of the user
// * the string literal "me", indicating the requesting user
func (c *CoursesListCall) TeacherId(teacherId string) *CoursesListCall {
c.urlParams_.Set("teacherId", teacherId)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *CoursesListCall) Fields(s ...googleapi.Field) *CoursesListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}