Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions

View File

@@ -0,0 +1,222 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class AddOnAttachment extends \Google\Collection
{
protected $collection_key = 'copyHistory';
protected $copyHistoryType = CopyHistory::class;
protected $copyHistoryDataType = 'array';
/**
* @var string
*/
public $courseId;
protected $dueDateType = Date::class;
protected $dueDateDataType = '';
protected $dueTimeType = TimeOfDay::class;
protected $dueTimeDataType = '';
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $itemId;
public $maxPoints;
/**
* @var string
*/
public $postId;
protected $studentViewUriType = EmbedUri::class;
protected $studentViewUriDataType = '';
protected $studentWorkReviewUriType = EmbedUri::class;
protected $studentWorkReviewUriDataType = '';
protected $teacherViewUriType = EmbedUri::class;
protected $teacherViewUriDataType = '';
/**
* @var string
*/
public $title;
/**
* @param CopyHistory[]
*/
public function setCopyHistory($copyHistory)
{
$this->copyHistory = $copyHistory;
}
/**
* @return CopyHistory[]
*/
public function getCopyHistory()
{
return $this->copyHistory;
}
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param Date
*/
public function setDueDate(Date $dueDate)
{
$this->dueDate = $dueDate;
}
/**
* @return Date
*/
public function getDueDate()
{
return $this->dueDate;
}
/**
* @param TimeOfDay
*/
public function setDueTime(TimeOfDay $dueTime)
{
$this->dueTime = $dueTime;
}
/**
* @return TimeOfDay
*/
public function getDueTime()
{
return $this->dueTime;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setItemId($itemId)
{
$this->itemId = $itemId;
}
/**
* @return string
*/
public function getItemId()
{
return $this->itemId;
}
public function setMaxPoints($maxPoints)
{
$this->maxPoints = $maxPoints;
}
public function getMaxPoints()
{
return $this->maxPoints;
}
/**
* @param string
*/
public function setPostId($postId)
{
$this->postId = $postId;
}
/**
* @return string
*/
public function getPostId()
{
return $this->postId;
}
/**
* @param EmbedUri
*/
public function setStudentViewUri(EmbedUri $studentViewUri)
{
$this->studentViewUri = $studentViewUri;
}
/**
* @return EmbedUri
*/
public function getStudentViewUri()
{
return $this->studentViewUri;
}
/**
* @param EmbedUri
*/
public function setStudentWorkReviewUri(EmbedUri $studentWorkReviewUri)
{
$this->studentWorkReviewUri = $studentWorkReviewUri;
}
/**
* @return EmbedUri
*/
public function getStudentWorkReviewUri()
{
return $this->studentWorkReviewUri;
}
/**
* @param EmbedUri
*/
public function setTeacherViewUri(EmbedUri $teacherViewUri)
{
$this->teacherViewUri = $teacherViewUri;
}
/**
* @return EmbedUri
*/
public function getTeacherViewUri()
{
return $this->teacherViewUri;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AddOnAttachment::class, 'Google_Service_Classroom_AddOnAttachment');

View File

@@ -0,0 +1,53 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class AddOnAttachmentStudentSubmission extends \Google\Model
{
public $pointsEarned;
/**
* @var string
*/
public $postSubmissionState;
public function setPointsEarned($pointsEarned)
{
$this->pointsEarned = $pointsEarned;
}
public function getPointsEarned()
{
return $this->pointsEarned;
}
/**
* @param string
*/
public function setPostSubmissionState($postSubmissionState)
{
$this->postSubmissionState = $postSubmissionState;
}
/**
* @return string
*/
public function getPostSubmissionState()
{
return $this->postSubmissionState;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AddOnAttachmentStudentSubmission::class, 'Google_Service_Classroom_AddOnAttachmentStudentSubmission');

View File

@@ -0,0 +1,130 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class AddOnContext extends \Google\Model
{
/**
* @var string
*/
public $courseId;
/**
* @var string
*/
public $itemId;
/**
* @var string
*/
public $postId;
protected $studentContextType = StudentContext::class;
protected $studentContextDataType = '';
/**
* @var bool
*/
public $supportsStudentWork;
protected $teacherContextType = TeacherContext::class;
protected $teacherContextDataType = '';
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param string
*/
public function setItemId($itemId)
{
$this->itemId = $itemId;
}
/**
* @return string
*/
public function getItemId()
{
return $this->itemId;
}
/**
* @param string
*/
public function setPostId($postId)
{
$this->postId = $postId;
}
/**
* @return string
*/
public function getPostId()
{
return $this->postId;
}
/**
* @param StudentContext
*/
public function setStudentContext(StudentContext $studentContext)
{
$this->studentContext = $studentContext;
}
/**
* @return StudentContext
*/
public function getStudentContext()
{
return $this->studentContext;
}
/**
* @param bool
*/
public function setSupportsStudentWork($supportsStudentWork)
{
$this->supportsStudentWork = $supportsStudentWork;
}
/**
* @return bool
*/
public function getSupportsStudentWork()
{
return $this->supportsStudentWork;
}
/**
* @param TeacherContext
*/
public function setTeacherContext(TeacherContext $teacherContext)
{
$this->teacherContext = $teacherContext;
}
/**
* @return TeacherContext
*/
public function getTeacherContext()
{
return $this->teacherContext;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AddOnContext::class, 'Google_Service_Classroom_AddOnContext');

View File

@@ -0,0 +1,239 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Announcement extends \Google\Collection
{
protected $collection_key = 'materials';
/**
* @var string
*/
public $alternateLink;
/**
* @var string
*/
public $assigneeMode;
/**
* @var string
*/
public $courseId;
/**
* @var string
*/
public $creationTime;
/**
* @var string
*/
public $creatorUserId;
/**
* @var string
*/
public $id;
protected $individualStudentsOptionsType = IndividualStudentsOptions::class;
protected $individualStudentsOptionsDataType = '';
protected $materialsType = Material::class;
protected $materialsDataType = 'array';
/**
* @var string
*/
public $scheduledTime;
/**
* @var string
*/
public $state;
/**
* @var string
*/
public $text;
/**
* @var string
*/
public $updateTime;
/**
* @param string
*/
public function setAlternateLink($alternateLink)
{
$this->alternateLink = $alternateLink;
}
/**
* @return string
*/
public function getAlternateLink()
{
return $this->alternateLink;
}
/**
* @param string
*/
public function setAssigneeMode($assigneeMode)
{
$this->assigneeMode = $assigneeMode;
}
/**
* @return string
*/
public function getAssigneeMode()
{
return $this->assigneeMode;
}
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param string
*/
public function setCreationTime($creationTime)
{
$this->creationTime = $creationTime;
}
/**
* @return string
*/
public function getCreationTime()
{
return $this->creationTime;
}
/**
* @param string
*/
public function setCreatorUserId($creatorUserId)
{
$this->creatorUserId = $creatorUserId;
}
/**
* @return string
*/
public function getCreatorUserId()
{
return $this->creatorUserId;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param IndividualStudentsOptions
*/
public function setIndividualStudentsOptions(IndividualStudentsOptions $individualStudentsOptions)
{
$this->individualStudentsOptions = $individualStudentsOptions;
}
/**
* @return IndividualStudentsOptions
*/
public function getIndividualStudentsOptions()
{
return $this->individualStudentsOptions;
}
/**
* @param Material[]
*/
public function setMaterials($materials)
{
$this->materials = $materials;
}
/**
* @return Material[]
*/
public function getMaterials()
{
return $this->materials;
}
/**
* @param string
*/
public function setScheduledTime($scheduledTime)
{
$this->scheduledTime = $scheduledTime;
}
/**
* @return string
*/
public function getScheduledTime()
{
return $this->scheduledTime;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* @param string
*/
public function setText($text)
{
$this->text = $text;
}
/**
* @return string
*/
public function getText()
{
return $this->text;
}
/**
* @param string
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Announcement::class, 'Google_Service_Classroom_Announcement');

View File

@@ -0,0 +1,42 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Assignment extends \Google\Model
{
protected $studentWorkFolderType = DriveFolder::class;
protected $studentWorkFolderDataType = '';
/**
* @param DriveFolder
*/
public function setStudentWorkFolder(DriveFolder $studentWorkFolder)
{
$this->studentWorkFolder = $studentWorkFolder;
}
/**
* @return DriveFolder
*/
public function getStudentWorkFolder()
{
return $this->studentWorkFolder;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Assignment::class, 'Google_Service_Classroom_Assignment');

View File

@@ -0,0 +1,43 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class AssignmentSubmission extends \Google\Collection
{
protected $collection_key = 'attachments';
protected $attachmentsType = Attachment::class;
protected $attachmentsDataType = 'array';
/**
* @param Attachment[]
*/
public function setAttachments($attachments)
{
$this->attachments = $attachments;
}
/**
* @return Attachment[]
*/
public function getAttachments()
{
return $this->attachments;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AssignmentSubmission::class, 'Google_Service_Classroom_AssignmentSubmission');

View File

@@ -0,0 +1,90 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Attachment extends \Google\Model
{
protected $driveFileType = DriveFile::class;
protected $driveFileDataType = '';
protected $formType = Form::class;
protected $formDataType = '';
protected $linkType = Link::class;
protected $linkDataType = '';
protected $youTubeVideoType = YouTubeVideo::class;
protected $youTubeVideoDataType = '';
/**
* @param DriveFile
*/
public function setDriveFile(DriveFile $driveFile)
{
$this->driveFile = $driveFile;
}
/**
* @return DriveFile
*/
public function getDriveFile()
{
return $this->driveFile;
}
/**
* @param Form
*/
public function setForm(Form $form)
{
$this->form = $form;
}
/**
* @return Form
*/
public function getForm()
{
return $this->form;
}
/**
* @param Link
*/
public function setLink(Link $link)
{
$this->link = $link;
}
/**
* @return Link
*/
public function getLink()
{
return $this->link;
}
/**
* @param YouTubeVideo
*/
public function setYouTubeVideo(YouTubeVideo $youTubeVideo)
{
$this->youTubeVideo = $youTubeVideo;
}
/**
* @return YouTubeVideo
*/
public function getYouTubeVideo()
{
return $this->youTubeVideo;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Attachment::class, 'Google_Service_Classroom_Attachment');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ClassroomEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ClassroomEmpty::class, 'Google_Service_Classroom_ClassroomEmpty');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class CloudPubsubTopic extends \Google\Model
{
/**
* @var string
*/
public $topicName;
/**
* @param string
*/
public function setTopicName($topicName)
{
$this->topicName = $topicName;
}
/**
* @return string
*/
public function getTopicName()
{
return $this->topicName;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CloudPubsubTopic::class, 'Google_Service_Classroom_CloudPubsubTopic');

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class CopyHistory extends \Google\Model
{
/**
* @var string
*/
public $attachmentId;
/**
* @var string
*/
public $courseId;
/**
* @var string
*/
public $itemId;
/**
* @var string
*/
public $postId;
/**
* @param string
*/
public function setAttachmentId($attachmentId)
{
$this->attachmentId = $attachmentId;
}
/**
* @return string
*/
public function getAttachmentId()
{
return $this->attachmentId;
}
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param string
*/
public function setItemId($itemId)
{
$this->itemId = $itemId;
}
/**
* @return string
*/
public function getItemId()
{
return $this->itemId;
}
/**
* @param string
*/
public function setPostId($postId)
{
$this->postId = $postId;
}
/**
* @return string
*/
public function getPostId()
{
return $this->postId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CopyHistory::class, 'Google_Service_Classroom_CopyHistory');

View File

@@ -0,0 +1,363 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Course extends \Google\Collection
{
protected $collection_key = 'courseMaterialSets';
/**
* @var string
*/
public $alternateLink;
/**
* @var string
*/
public $calendarId;
/**
* @var string
*/
public $courseGroupEmail;
protected $courseMaterialSetsType = CourseMaterialSet::class;
protected $courseMaterialSetsDataType = 'array';
/**
* @var string
*/
public $courseState;
/**
* @var string
*/
public $creationTime;
/**
* @var string
*/
public $description;
/**
* @var string
*/
public $descriptionHeading;
/**
* @var string
*/
public $enrollmentCode;
protected $gradebookSettingsType = GradebookSettings::class;
protected $gradebookSettingsDataType = '';
/**
* @var bool
*/
public $guardiansEnabled;
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $ownerId;
/**
* @var string
*/
public $room;
/**
* @var string
*/
public $section;
protected $teacherFolderType = DriveFolder::class;
protected $teacherFolderDataType = '';
/**
* @var string
*/
public $teacherGroupEmail;
/**
* @var string
*/
public $updateTime;
/**
* @param string
*/
public function setAlternateLink($alternateLink)
{
$this->alternateLink = $alternateLink;
}
/**
* @return string
*/
public function getAlternateLink()
{
return $this->alternateLink;
}
/**
* @param string
*/
public function setCalendarId($calendarId)
{
$this->calendarId = $calendarId;
}
/**
* @return string
*/
public function getCalendarId()
{
return $this->calendarId;
}
/**
* @param string
*/
public function setCourseGroupEmail($courseGroupEmail)
{
$this->courseGroupEmail = $courseGroupEmail;
}
/**
* @return string
*/
public function getCourseGroupEmail()
{
return $this->courseGroupEmail;
}
/**
* @param CourseMaterialSet[]
*/
public function setCourseMaterialSets($courseMaterialSets)
{
$this->courseMaterialSets = $courseMaterialSets;
}
/**
* @return CourseMaterialSet[]
*/
public function getCourseMaterialSets()
{
return $this->courseMaterialSets;
}
/**
* @param string
*/
public function setCourseState($courseState)
{
$this->courseState = $courseState;
}
/**
* @return string
*/
public function getCourseState()
{
return $this->courseState;
}
/**
* @param string
*/
public function setCreationTime($creationTime)
{
$this->creationTime = $creationTime;
}
/**
* @return string
*/
public function getCreationTime()
{
return $this->creationTime;
}
/**
* @param string
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string
*/
public function setDescriptionHeading($descriptionHeading)
{
$this->descriptionHeading = $descriptionHeading;
}
/**
* @return string
*/
public function getDescriptionHeading()
{
return $this->descriptionHeading;
}
/**
* @param string
*/
public function setEnrollmentCode($enrollmentCode)
{
$this->enrollmentCode = $enrollmentCode;
}
/**
* @return string
*/
public function getEnrollmentCode()
{
return $this->enrollmentCode;
}
/**
* @param GradebookSettings
*/
public function setGradebookSettings(GradebookSettings $gradebookSettings)
{
$this->gradebookSettings = $gradebookSettings;
}
/**
* @return GradebookSettings
*/
public function getGradebookSettings()
{
return $this->gradebookSettings;
}
/**
* @param bool
*/
public function setGuardiansEnabled($guardiansEnabled)
{
$this->guardiansEnabled = $guardiansEnabled;
}
/**
* @return bool
*/
public function getGuardiansEnabled()
{
return $this->guardiansEnabled;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setOwnerId($ownerId)
{
$this->ownerId = $ownerId;
}
/**
* @return string
*/
public function getOwnerId()
{
return $this->ownerId;
}
/**
* @param string
*/
public function setRoom($room)
{
$this->room = $room;
}
/**
* @return string
*/
public function getRoom()
{
return $this->room;
}
/**
* @param string
*/
public function setSection($section)
{
$this->section = $section;
}
/**
* @return string
*/
public function getSection()
{
return $this->section;
}
/**
* @param DriveFolder
*/
public function setTeacherFolder(DriveFolder $teacherFolder)
{
$this->teacherFolder = $teacherFolder;
}
/**
* @return DriveFolder
*/
public function getTeacherFolder()
{
return $this->teacherFolder;
}
/**
* @param string
*/
public function setTeacherGroupEmail($teacherGroupEmail)
{
$this->teacherGroupEmail = $teacherGroupEmail;
}
/**
* @return string
*/
public function getTeacherGroupEmail()
{
return $this->teacherGroupEmail;
}
/**
* @param string
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Course::class, 'Google_Service_Classroom_Course');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class CourseAlias extends \Google\Model
{
/**
* @var string
*/
public $alias;
/**
* @param string
*/
public function setAlias($alias)
{
$this->alias = $alias;
}
/**
* @return string
*/
public function getAlias()
{
return $this->alias;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CourseAlias::class, 'Google_Service_Classroom_CourseAlias');

View File

@@ -0,0 +1,90 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class CourseMaterial extends \Google\Model
{
protected $driveFileType = DriveFile::class;
protected $driveFileDataType = '';
protected $formType = Form::class;
protected $formDataType = '';
protected $linkType = Link::class;
protected $linkDataType = '';
protected $youTubeVideoType = YouTubeVideo::class;
protected $youTubeVideoDataType = '';
/**
* @param DriveFile
*/
public function setDriveFile(DriveFile $driveFile)
{
$this->driveFile = $driveFile;
}
/**
* @return DriveFile
*/
public function getDriveFile()
{
return $this->driveFile;
}
/**
* @param Form
*/
public function setForm(Form $form)
{
$this->form = $form;
}
/**
* @return Form
*/
public function getForm()
{
return $this->form;
}
/**
* @param Link
*/
public function setLink(Link $link)
{
$this->link = $link;
}
/**
* @return Link
*/
public function getLink()
{
return $this->link;
}
/**
* @param YouTubeVideo
*/
public function setYouTubeVideo(YouTubeVideo $youTubeVideo)
{
$this->youTubeVideo = $youTubeVideo;
}
/**
* @return YouTubeVideo
*/
public function getYouTubeVideo()
{
return $this->youTubeVideo;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CourseMaterial::class, 'Google_Service_Classroom_CourseMaterial');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class CourseMaterialSet extends \Google\Collection
{
protected $collection_key = 'materials';
protected $materialsType = CourseMaterial::class;
protected $materialsDataType = 'array';
/**
* @var string
*/
public $title;
/**
* @param CourseMaterial[]
*/
public function setMaterials($materials)
{
$this->materials = $materials;
}
/**
* @return CourseMaterial[]
*/
public function getMaterials()
{
return $this->materials;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CourseMaterialSet::class, 'Google_Service_Classroom_CourseMaterialSet');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class CourseRosterChangesInfo extends \Google\Model
{
/**
* @var string
*/
public $courseId;
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CourseRosterChangesInfo::class, 'Google_Service_Classroom_CourseRosterChangesInfo');

View File

@@ -0,0 +1,418 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class CourseWork extends \Google\Collection
{
protected $collection_key = 'materials';
/**
* @var string
*/
public $alternateLink;
/**
* @var string
*/
public $assigneeMode;
protected $assignmentType = Assignment::class;
protected $assignmentDataType = '';
/**
* @var bool
*/
public $associatedWithDeveloper;
/**
* @var string
*/
public $courseId;
/**
* @var string
*/
public $creationTime;
/**
* @var string
*/
public $creatorUserId;
/**
* @var string
*/
public $description;
protected $dueDateType = Date::class;
protected $dueDateDataType = '';
protected $dueTimeType = TimeOfDay::class;
protected $dueTimeDataType = '';
protected $gradeCategoryType = GradeCategory::class;
protected $gradeCategoryDataType = '';
/**
* @var string
*/
public $id;
protected $individualStudentsOptionsType = IndividualStudentsOptions::class;
protected $individualStudentsOptionsDataType = '';
protected $materialsType = Material::class;
protected $materialsDataType = 'array';
public $maxPoints;
protected $multipleChoiceQuestionType = MultipleChoiceQuestion::class;
protected $multipleChoiceQuestionDataType = '';
/**
* @var string
*/
public $scheduledTime;
/**
* @var string
*/
public $state;
/**
* @var string
*/
public $submissionModificationMode;
/**
* @var string
*/
public $title;
/**
* @var string
*/
public $topicId;
/**
* @var string
*/
public $updateTime;
/**
* @var string
*/
public $workType;
/**
* @param string
*/
public function setAlternateLink($alternateLink)
{
$this->alternateLink = $alternateLink;
}
/**
* @return string
*/
public function getAlternateLink()
{
return $this->alternateLink;
}
/**
* @param string
*/
public function setAssigneeMode($assigneeMode)
{
$this->assigneeMode = $assigneeMode;
}
/**
* @return string
*/
public function getAssigneeMode()
{
return $this->assigneeMode;
}
/**
* @param Assignment
*/
public function setAssignment(Assignment $assignment)
{
$this->assignment = $assignment;
}
/**
* @return Assignment
*/
public function getAssignment()
{
return $this->assignment;
}
/**
* @param bool
*/
public function setAssociatedWithDeveloper($associatedWithDeveloper)
{
$this->associatedWithDeveloper = $associatedWithDeveloper;
}
/**
* @return bool
*/
public function getAssociatedWithDeveloper()
{
return $this->associatedWithDeveloper;
}
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param string
*/
public function setCreationTime($creationTime)
{
$this->creationTime = $creationTime;
}
/**
* @return string
*/
public function getCreationTime()
{
return $this->creationTime;
}
/**
* @param string
*/
public function setCreatorUserId($creatorUserId)
{
$this->creatorUserId = $creatorUserId;
}
/**
* @return string
*/
public function getCreatorUserId()
{
return $this->creatorUserId;
}
/**
* @param string
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param Date
*/
public function setDueDate(Date $dueDate)
{
$this->dueDate = $dueDate;
}
/**
* @return Date
*/
public function getDueDate()
{
return $this->dueDate;
}
/**
* @param TimeOfDay
*/
public function setDueTime(TimeOfDay $dueTime)
{
$this->dueTime = $dueTime;
}
/**
* @return TimeOfDay
*/
public function getDueTime()
{
return $this->dueTime;
}
/**
* @param GradeCategory
*/
public function setGradeCategory(GradeCategory $gradeCategory)
{
$this->gradeCategory = $gradeCategory;
}
/**
* @return GradeCategory
*/
public function getGradeCategory()
{
return $this->gradeCategory;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param IndividualStudentsOptions
*/
public function setIndividualStudentsOptions(IndividualStudentsOptions $individualStudentsOptions)
{
$this->individualStudentsOptions = $individualStudentsOptions;
}
/**
* @return IndividualStudentsOptions
*/
public function getIndividualStudentsOptions()
{
return $this->individualStudentsOptions;
}
/**
* @param Material[]
*/
public function setMaterials($materials)
{
$this->materials = $materials;
}
/**
* @return Material[]
*/
public function getMaterials()
{
return $this->materials;
}
public function setMaxPoints($maxPoints)
{
$this->maxPoints = $maxPoints;
}
public function getMaxPoints()
{
return $this->maxPoints;
}
/**
* @param MultipleChoiceQuestion
*/
public function setMultipleChoiceQuestion(MultipleChoiceQuestion $multipleChoiceQuestion)
{
$this->multipleChoiceQuestion = $multipleChoiceQuestion;
}
/**
* @return MultipleChoiceQuestion
*/
public function getMultipleChoiceQuestion()
{
return $this->multipleChoiceQuestion;
}
/**
* @param string
*/
public function setScheduledTime($scheduledTime)
{
$this->scheduledTime = $scheduledTime;
}
/**
* @return string
*/
public function getScheduledTime()
{
return $this->scheduledTime;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* @param string
*/
public function setSubmissionModificationMode($submissionModificationMode)
{
$this->submissionModificationMode = $submissionModificationMode;
}
/**
* @return string
*/
public function getSubmissionModificationMode()
{
return $this->submissionModificationMode;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @param string
*/
public function setTopicId($topicId)
{
$this->topicId = $topicId;
}
/**
* @return string
*/
public function getTopicId()
{
return $this->topicId;
}
/**
* @param string
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
/**
* @param string
*/
public function setWorkType($workType)
{
$this->workType = $workType;
}
/**
* @return string
*/
public function getWorkType()
{
return $this->workType;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CourseWork::class, 'Google_Service_Classroom_CourseWork');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class CourseWorkChangesInfo extends \Google\Model
{
/**
* @var string
*/
public $courseId;
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CourseWorkChangesInfo::class, 'Google_Service_Classroom_CourseWorkChangesInfo');

View File

@@ -0,0 +1,275 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class CourseWorkMaterial extends \Google\Collection
{
protected $collection_key = 'materials';
/**
* @var string
*/
public $alternateLink;
/**
* @var string
*/
public $assigneeMode;
/**
* @var string
*/
public $courseId;
/**
* @var string
*/
public $creationTime;
/**
* @var string
*/
public $creatorUserId;
/**
* @var string
*/
public $description;
/**
* @var string
*/
public $id;
protected $individualStudentsOptionsType = IndividualStudentsOptions::class;
protected $individualStudentsOptionsDataType = '';
protected $materialsType = Material::class;
protected $materialsDataType = 'array';
/**
* @var string
*/
public $scheduledTime;
/**
* @var string
*/
public $state;
/**
* @var string
*/
public $title;
/**
* @var string
*/
public $topicId;
/**
* @var string
*/
public $updateTime;
/**
* @param string
*/
public function setAlternateLink($alternateLink)
{
$this->alternateLink = $alternateLink;
}
/**
* @return string
*/
public function getAlternateLink()
{
return $this->alternateLink;
}
/**
* @param string
*/
public function setAssigneeMode($assigneeMode)
{
$this->assigneeMode = $assigneeMode;
}
/**
* @return string
*/
public function getAssigneeMode()
{
return $this->assigneeMode;
}
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param string
*/
public function setCreationTime($creationTime)
{
$this->creationTime = $creationTime;
}
/**
* @return string
*/
public function getCreationTime()
{
return $this->creationTime;
}
/**
* @param string
*/
public function setCreatorUserId($creatorUserId)
{
$this->creatorUserId = $creatorUserId;
}
/**
* @return string
*/
public function getCreatorUserId()
{
return $this->creatorUserId;
}
/**
* @param string
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param IndividualStudentsOptions
*/
public function setIndividualStudentsOptions(IndividualStudentsOptions $individualStudentsOptions)
{
$this->individualStudentsOptions = $individualStudentsOptions;
}
/**
* @return IndividualStudentsOptions
*/
public function getIndividualStudentsOptions()
{
return $this->individualStudentsOptions;
}
/**
* @param Material[]
*/
public function setMaterials($materials)
{
$this->materials = $materials;
}
/**
* @return Material[]
*/
public function getMaterials()
{
return $this->materials;
}
/**
* @param string
*/
public function setScheduledTime($scheduledTime)
{
$this->scheduledTime = $scheduledTime;
}
/**
* @return string
*/
public function getScheduledTime()
{
return $this->scheduledTime;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @param string
*/
public function setTopicId($topicId)
{
$this->topicId = $topicId;
}
/**
* @return string
*/
public function getTopicId()
{
return $this->topicId;
}
/**
* @param string
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CourseWorkMaterial::class, 'Google_Service_Classroom_CourseWorkMaterial');

View File

@@ -0,0 +1,97 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Criterion extends \Google\Collection
{
protected $collection_key = 'levels';
/**
* @var string
*/
public $description;
/**
* @var string
*/
public $id;
protected $levelsType = Level::class;
protected $levelsDataType = 'array';
/**
* @var string
*/
public $title;
/**
* @param string
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param Level[]
*/
public function setLevels($levels)
{
$this->levels = $levels;
}
/**
* @return Level[]
*/
public function getLevels()
{
return $this->levels;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Criterion::class, 'Google_Service_Classroom_Criterion');

View File

@@ -0,0 +1,80 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Date extends \Google\Model
{
/**
* @var int
*/
public $day;
/**
* @var int
*/
public $month;
/**
* @var int
*/
public $year;
/**
* @param int
*/
public function setDay($day)
{
$this->day = $day;
}
/**
* @return int
*/
public function getDay()
{
return $this->day;
}
/**
* @param int
*/
public function setMonth($month)
{
$this->month = $month;
}
/**
* @return int
*/
public function getMonth()
{
return $this->month;
}
/**
* @param int
*/
public function setYear($year)
{
$this->year = $year;
}
/**
* @return int
*/
public function getYear()
{
return $this->year;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Date::class, 'Google_Service_Classroom_Date');

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class DriveFile extends \Google\Model
{
/**
* @var string
*/
public $alternateLink;
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $thumbnailUrl;
/**
* @var string
*/
public $title;
/**
* @param string
*/
public function setAlternateLink($alternateLink)
{
$this->alternateLink = $alternateLink;
}
/**
* @return string
*/
public function getAlternateLink()
{
return $this->alternateLink;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setThumbnailUrl($thumbnailUrl)
{
$this->thumbnailUrl = $thumbnailUrl;
}
/**
* @return string
*/
public function getThumbnailUrl()
{
return $this->thumbnailUrl;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DriveFile::class, 'Google_Service_Classroom_DriveFile');

View File

@@ -0,0 +1,80 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class DriveFolder extends \Google\Model
{
/**
* @var string
*/
public $alternateLink;
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $title;
/**
* @param string
*/
public function setAlternateLink($alternateLink)
{
$this->alternateLink = $alternateLink;
}
/**
* @return string
*/
public function getAlternateLink()
{
return $this->alternateLink;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DriveFolder::class, 'Google_Service_Classroom_DriveFolder');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class EmbedUri extends \Google\Model
{
/**
* @var string
*/
public $uri;
/**
* @param string
*/
public function setUri($uri)
{
$this->uri = $uri;
}
/**
* @return string
*/
public function getUri()
{
return $this->uri;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EmbedUri::class, 'Google_Service_Classroom_EmbedUri');

View File

@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Feed extends \Google\Model
{
protected $courseRosterChangesInfoType = CourseRosterChangesInfo::class;
protected $courseRosterChangesInfoDataType = '';
protected $courseWorkChangesInfoType = CourseWorkChangesInfo::class;
protected $courseWorkChangesInfoDataType = '';
/**
* @var string
*/
public $feedType;
/**
* @param CourseRosterChangesInfo
*/
public function setCourseRosterChangesInfo(CourseRosterChangesInfo $courseRosterChangesInfo)
{
$this->courseRosterChangesInfo = $courseRosterChangesInfo;
}
/**
* @return CourseRosterChangesInfo
*/
public function getCourseRosterChangesInfo()
{
return $this->courseRosterChangesInfo;
}
/**
* @param CourseWorkChangesInfo
*/
public function setCourseWorkChangesInfo(CourseWorkChangesInfo $courseWorkChangesInfo)
{
$this->courseWorkChangesInfo = $courseWorkChangesInfo;
}
/**
* @return CourseWorkChangesInfo
*/
public function getCourseWorkChangesInfo()
{
return $this->courseWorkChangesInfo;
}
/**
* @param string
*/
public function setFeedType($feedType)
{
$this->feedType = $feedType;
}
/**
* @return string
*/
public function getFeedType()
{
return $this->feedType;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Feed::class, 'Google_Service_Classroom_Feed');

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Form extends \Google\Model
{
/**
* @var string
*/
public $formUrl;
/**
* @var string
*/
public $responseUrl;
/**
* @var string
*/
public $thumbnailUrl;
/**
* @var string
*/
public $title;
/**
* @param string
*/
public function setFormUrl($formUrl)
{
$this->formUrl = $formUrl;
}
/**
* @return string
*/
public function getFormUrl()
{
return $this->formUrl;
}
/**
* @param string
*/
public function setResponseUrl($responseUrl)
{
$this->responseUrl = $responseUrl;
}
/**
* @return string
*/
public function getResponseUrl()
{
return $this->responseUrl;
}
/**
* @param string
*/
public function setThumbnailUrl($thumbnailUrl)
{
$this->thumbnailUrl = $thumbnailUrl;
}
/**
* @return string
*/
public function getThumbnailUrl()
{
return $this->thumbnailUrl;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Form::class, 'Google_Service_Classroom_Form');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class GlobalPermission extends \Google\Model
{
/**
* @var string
*/
public $permission;
/**
* @param string
*/
public function setPermission($permission)
{
$this->permission = $permission;
}
/**
* @return string
*/
public function getPermission()
{
return $this->permission;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GlobalPermission::class, 'Google_Service_Classroom_GlobalPermission');

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class GradeCategory extends \Google\Model
{
/**
* @var int
*/
public $defaultGradeDenominator;
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $name;
/**
* @var int
*/
public $weight;
/**
* @param int
*/
public function setDefaultGradeDenominator($defaultGradeDenominator)
{
$this->defaultGradeDenominator = $defaultGradeDenominator;
}
/**
* @return int
*/
public function getDefaultGradeDenominator()
{
return $this->defaultGradeDenominator;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param int
*/
public function setWeight($weight)
{
$this->weight = $weight;
}
/**
* @return int
*/
public function getWeight()
{
return $this->weight;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GradeCategory::class, 'Google_Service_Classroom_GradeCategory');

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class GradeHistory extends \Google\Model
{
/**
* @var string
*/
public $actorUserId;
/**
* @var string
*/
public $gradeChangeType;
/**
* @var string
*/
public $gradeTimestamp;
public $maxPoints;
public $pointsEarned;
/**
* @param string
*/
public function setActorUserId($actorUserId)
{
$this->actorUserId = $actorUserId;
}
/**
* @return string
*/
public function getActorUserId()
{
return $this->actorUserId;
}
/**
* @param string
*/
public function setGradeChangeType($gradeChangeType)
{
$this->gradeChangeType = $gradeChangeType;
}
/**
* @return string
*/
public function getGradeChangeType()
{
return $this->gradeChangeType;
}
/**
* @param string
*/
public function setGradeTimestamp($gradeTimestamp)
{
$this->gradeTimestamp = $gradeTimestamp;
}
/**
* @return string
*/
public function getGradeTimestamp()
{
return $this->gradeTimestamp;
}
public function setMaxPoints($maxPoints)
{
$this->maxPoints = $maxPoints;
}
public function getMaxPoints()
{
return $this->maxPoints;
}
public function setPointsEarned($pointsEarned)
{
$this->pointsEarned = $pointsEarned;
}
public function getPointsEarned()
{
return $this->pointsEarned;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GradeHistory::class, 'Google_Service_Classroom_GradeHistory');

View File

@@ -0,0 +1,79 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class GradebookSettings extends \Google\Collection
{
protected $collection_key = 'gradeCategories';
/**
* @var string
*/
public $calculationType;
/**
* @var string
*/
public $displaySetting;
protected $gradeCategoriesType = GradeCategory::class;
protected $gradeCategoriesDataType = 'array';
/**
* @param string
*/
public function setCalculationType($calculationType)
{
$this->calculationType = $calculationType;
}
/**
* @return string
*/
public function getCalculationType()
{
return $this->calculationType;
}
/**
* @param string
*/
public function setDisplaySetting($displaySetting)
{
$this->displaySetting = $displaySetting;
}
/**
* @return string
*/
public function getDisplaySetting()
{
return $this->displaySetting;
}
/**
* @param GradeCategory[]
*/
public function setGradeCategories($gradeCategories)
{
$this->gradeCategories = $gradeCategories;
}
/**
* @return GradeCategory[]
*/
public function getGradeCategories()
{
return $this->gradeCategories;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GradebookSettings::class, 'Google_Service_Classroom_GradebookSettings');

View File

@@ -0,0 +1,96 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Guardian extends \Google\Model
{
/**
* @var string
*/
public $guardianId;
protected $guardianProfileType = UserProfile::class;
protected $guardianProfileDataType = '';
/**
* @var string
*/
public $invitedEmailAddress;
/**
* @var string
*/
public $studentId;
/**
* @param string
*/
public function setGuardianId($guardianId)
{
$this->guardianId = $guardianId;
}
/**
* @return string
*/
public function getGuardianId()
{
return $this->guardianId;
}
/**
* @param UserProfile
*/
public function setGuardianProfile(UserProfile $guardianProfile)
{
$this->guardianProfile = $guardianProfile;
}
/**
* @return UserProfile
*/
public function getGuardianProfile()
{
return $this->guardianProfile;
}
/**
* @param string
*/
public function setInvitedEmailAddress($invitedEmailAddress)
{
$this->invitedEmailAddress = $invitedEmailAddress;
}
/**
* @return string
*/
public function getInvitedEmailAddress()
{
return $this->invitedEmailAddress;
}
/**
* @param string
*/
public function setStudentId($studentId)
{
$this->studentId = $studentId;
}
/**
* @return string
*/
public function getStudentId()
{
return $this->studentId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Guardian::class, 'Google_Service_Classroom_Guardian');

View File

@@ -0,0 +1,116 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class GuardianInvitation extends \Google\Model
{
/**
* @var string
*/
public $creationTime;
/**
* @var string
*/
public $invitationId;
/**
* @var string
*/
public $invitedEmailAddress;
/**
* @var string
*/
public $state;
/**
* @var string
*/
public $studentId;
/**
* @param string
*/
public function setCreationTime($creationTime)
{
$this->creationTime = $creationTime;
}
/**
* @return string
*/
public function getCreationTime()
{
return $this->creationTime;
}
/**
* @param string
*/
public function setInvitationId($invitationId)
{
$this->invitationId = $invitationId;
}
/**
* @return string
*/
public function getInvitationId()
{
return $this->invitationId;
}
/**
* @param string
*/
public function setInvitedEmailAddress($invitedEmailAddress)
{
$this->invitedEmailAddress = $invitedEmailAddress;
}
/**
* @return string
*/
public function getInvitedEmailAddress()
{
return $this->invitedEmailAddress;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* @param string
*/
public function setStudentId($studentId)
{
$this->studentId = $studentId;
}
/**
* @return string
*/
public function getStudentId()
{
return $this->studentId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GuardianInvitation::class, 'Google_Service_Classroom_GuardianInvitation');

View File

@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class IndividualStudentsOptions extends \Google\Collection
{
protected $collection_key = 'studentIds';
/**
* @var string[]
*/
public $studentIds;
/**
* @param string[]
*/
public function setStudentIds($studentIds)
{
$this->studentIds = $studentIds;
}
/**
* @return string[]
*/
public function getStudentIds()
{
return $this->studentIds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(IndividualStudentsOptions::class, 'Google_Service_Classroom_IndividualStudentsOptions');

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Invitation extends \Google\Model
{
/**
* @var string
*/
public $courseId;
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $role;
/**
* @var string
*/
public $userId;
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setRole($role)
{
$this->role = $role;
}
/**
* @return string
*/
public function getRole()
{
return $this->role;
}
/**
* @param string
*/
public function setUserId($userId)
{
$this->userId = $userId;
}
/**
* @return string
*/
public function getUserId()
{
return $this->userId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Invitation::class, 'Google_Service_Classroom_Invitation');

View File

@@ -0,0 +1,89 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Level extends \Google\Model
{
/**
* @var string
*/
public $description;
/**
* @var string
*/
public $id;
public $points;
/**
* @var string
*/
public $title;
/**
* @param string
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
public function setPoints($points)
{
$this->points = $points;
}
public function getPoints()
{
return $this->points;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Level::class, 'Google_Service_Classroom_Level');

View File

@@ -0,0 +1,80 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Link extends \Google\Model
{
/**
* @var string
*/
public $thumbnailUrl;
/**
* @var string
*/
public $title;
/**
* @var string
*/
public $url;
/**
* @param string
*/
public function setThumbnailUrl($thumbnailUrl)
{
$this->thumbnailUrl = $thumbnailUrl;
}
/**
* @return string
*/
public function getThumbnailUrl()
{
return $this->thumbnailUrl;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @param string
*/
public function setUrl($url)
{
$this->url = $url;
}
/**
* @return string
*/
public function getUrl()
{
return $this->url;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Link::class, 'Google_Service_Classroom_Link');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListAddOnAttachmentsResponse extends \Google\Collection
{
protected $collection_key = 'addOnAttachments';
protected $addOnAttachmentsType = AddOnAttachment::class;
protected $addOnAttachmentsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param AddOnAttachment[]
*/
public function setAddOnAttachments($addOnAttachments)
{
$this->addOnAttachments = $addOnAttachments;
}
/**
* @return AddOnAttachment[]
*/
public function getAddOnAttachments()
{
return $this->addOnAttachments;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListAddOnAttachmentsResponse::class, 'Google_Service_Classroom_ListAddOnAttachmentsResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListAnnouncementsResponse extends \Google\Collection
{
protected $collection_key = 'announcements';
protected $announcementsType = Announcement::class;
protected $announcementsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param Announcement[]
*/
public function setAnnouncements($announcements)
{
$this->announcements = $announcements;
}
/**
* @return Announcement[]
*/
public function getAnnouncements()
{
return $this->announcements;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListAnnouncementsResponse::class, 'Google_Service_Classroom_ListAnnouncementsResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListCourseAliasesResponse extends \Google\Collection
{
protected $collection_key = 'aliases';
protected $aliasesType = CourseAlias::class;
protected $aliasesDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param CourseAlias[]
*/
public function setAliases($aliases)
{
$this->aliases = $aliases;
}
/**
* @return CourseAlias[]
*/
public function getAliases()
{
return $this->aliases;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListCourseAliasesResponse::class, 'Google_Service_Classroom_ListCourseAliasesResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListCourseWorkMaterialResponse extends \Google\Collection
{
protected $collection_key = 'courseWorkMaterial';
protected $courseWorkMaterialType = CourseWorkMaterial::class;
protected $courseWorkMaterialDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param CourseWorkMaterial[]
*/
public function setCourseWorkMaterial($courseWorkMaterial)
{
$this->courseWorkMaterial = $courseWorkMaterial;
}
/**
* @return CourseWorkMaterial[]
*/
public function getCourseWorkMaterial()
{
return $this->courseWorkMaterial;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListCourseWorkMaterialResponse::class, 'Google_Service_Classroom_ListCourseWorkMaterialResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListCourseWorkResponse extends \Google\Collection
{
protected $collection_key = 'courseWork';
protected $courseWorkType = CourseWork::class;
protected $courseWorkDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param CourseWork[]
*/
public function setCourseWork($courseWork)
{
$this->courseWork = $courseWork;
}
/**
* @return CourseWork[]
*/
public function getCourseWork()
{
return $this->courseWork;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListCourseWorkResponse::class, 'Google_Service_Classroom_ListCourseWorkResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListCoursesResponse extends \Google\Collection
{
protected $collection_key = 'courses';
protected $coursesType = Course::class;
protected $coursesDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param Course[]
*/
public function setCourses($courses)
{
$this->courses = $courses;
}
/**
* @return Course[]
*/
public function getCourses()
{
return $this->courses;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListCoursesResponse::class, 'Google_Service_Classroom_ListCoursesResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListGuardianInvitationsResponse extends \Google\Collection
{
protected $collection_key = 'guardianInvitations';
protected $guardianInvitationsType = GuardianInvitation::class;
protected $guardianInvitationsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param GuardianInvitation[]
*/
public function setGuardianInvitations($guardianInvitations)
{
$this->guardianInvitations = $guardianInvitations;
}
/**
* @return GuardianInvitation[]
*/
public function getGuardianInvitations()
{
return $this->guardianInvitations;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListGuardianInvitationsResponse::class, 'Google_Service_Classroom_ListGuardianInvitationsResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListGuardiansResponse extends \Google\Collection
{
protected $collection_key = 'guardians';
protected $guardiansType = Guardian::class;
protected $guardiansDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param Guardian[]
*/
public function setGuardians($guardians)
{
$this->guardians = $guardians;
}
/**
* @return Guardian[]
*/
public function getGuardians()
{
return $this->guardians;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListGuardiansResponse::class, 'Google_Service_Classroom_ListGuardiansResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListInvitationsResponse extends \Google\Collection
{
protected $collection_key = 'invitations';
protected $invitationsType = Invitation::class;
protected $invitationsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param Invitation[]
*/
public function setInvitations($invitations)
{
$this->invitations = $invitations;
}
/**
* @return Invitation[]
*/
public function getInvitations()
{
return $this->invitations;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListInvitationsResponse::class, 'Google_Service_Classroom_ListInvitationsResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListRubricsResponse extends \Google\Collection
{
protected $collection_key = 'rubrics';
/**
* @var string
*/
public $nextPageToken;
protected $rubricsType = Rubric::class;
protected $rubricsDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param Rubric[]
*/
public function setRubrics($rubrics)
{
$this->rubrics = $rubrics;
}
/**
* @return Rubric[]
*/
public function getRubrics()
{
return $this->rubrics;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListRubricsResponse::class, 'Google_Service_Classroom_ListRubricsResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListStudentSubmissionsResponse extends \Google\Collection
{
protected $collection_key = 'studentSubmissions';
/**
* @var string
*/
public $nextPageToken;
protected $studentSubmissionsType = StudentSubmission::class;
protected $studentSubmissionsDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param StudentSubmission[]
*/
public function setStudentSubmissions($studentSubmissions)
{
$this->studentSubmissions = $studentSubmissions;
}
/**
* @return StudentSubmission[]
*/
public function getStudentSubmissions()
{
return $this->studentSubmissions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListStudentSubmissionsResponse::class, 'Google_Service_Classroom_ListStudentSubmissionsResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListStudentsResponse extends \Google\Collection
{
protected $collection_key = 'students';
/**
* @var string
*/
public $nextPageToken;
protected $studentsType = Student::class;
protected $studentsDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param Student[]
*/
public function setStudents($students)
{
$this->students = $students;
}
/**
* @return Student[]
*/
public function getStudents()
{
return $this->students;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListStudentsResponse::class, 'Google_Service_Classroom_ListStudentsResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListTeachersResponse extends \Google\Collection
{
protected $collection_key = 'teachers';
/**
* @var string
*/
public $nextPageToken;
protected $teachersType = Teacher::class;
protected $teachersDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param Teacher[]
*/
public function setTeachers($teachers)
{
$this->teachers = $teachers;
}
/**
* @return Teacher[]
*/
public function getTeachers()
{
return $this->teachers;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListTeachersResponse::class, 'Google_Service_Classroom_ListTeachersResponse');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ListTopicResponse extends \Google\Collection
{
protected $collection_key = 'topic';
/**
* @var string
*/
public $nextPageToken;
protected $topicType = Topic::class;
protected $topicDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param Topic[]
*/
public function setTopic($topic)
{
$this->topic = $topic;
}
/**
* @return Topic[]
*/
public function getTopic()
{
return $this->topic;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListTopicResponse::class, 'Google_Service_Classroom_ListTopicResponse');

View File

@@ -0,0 +1,90 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Material extends \Google\Model
{
protected $driveFileType = SharedDriveFile::class;
protected $driveFileDataType = '';
protected $formType = Form::class;
protected $formDataType = '';
protected $linkType = Link::class;
protected $linkDataType = '';
protected $youtubeVideoType = YouTubeVideo::class;
protected $youtubeVideoDataType = '';
/**
* @param SharedDriveFile
*/
public function setDriveFile(SharedDriveFile $driveFile)
{
$this->driveFile = $driveFile;
}
/**
* @return SharedDriveFile
*/
public function getDriveFile()
{
return $this->driveFile;
}
/**
* @param Form
*/
public function setForm(Form $form)
{
$this->form = $form;
}
/**
* @return Form
*/
public function getForm()
{
return $this->form;
}
/**
* @param Link
*/
public function setLink(Link $link)
{
$this->link = $link;
}
/**
* @return Link
*/
public function getLink()
{
return $this->link;
}
/**
* @param YouTubeVideo
*/
public function setYoutubeVideo(YouTubeVideo $youtubeVideo)
{
$this->youtubeVideo = $youtubeVideo;
}
/**
* @return YouTubeVideo
*/
public function getYoutubeVideo()
{
return $this->youtubeVideo;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Material::class, 'Google_Service_Classroom_Material');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ModifyAnnouncementAssigneesRequest extends \Google\Model
{
/**
* @var string
*/
public $assigneeMode;
protected $modifyIndividualStudentsOptionsType = ModifyIndividualStudentsOptions::class;
protected $modifyIndividualStudentsOptionsDataType = '';
/**
* @param string
*/
public function setAssigneeMode($assigneeMode)
{
$this->assigneeMode = $assigneeMode;
}
/**
* @return string
*/
public function getAssigneeMode()
{
return $this->assigneeMode;
}
/**
* @param ModifyIndividualStudentsOptions
*/
public function setModifyIndividualStudentsOptions(ModifyIndividualStudentsOptions $modifyIndividualStudentsOptions)
{
$this->modifyIndividualStudentsOptions = $modifyIndividualStudentsOptions;
}
/**
* @return ModifyIndividualStudentsOptions
*/
public function getModifyIndividualStudentsOptions()
{
return $this->modifyIndividualStudentsOptions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ModifyAnnouncementAssigneesRequest::class, 'Google_Service_Classroom_ModifyAnnouncementAssigneesRequest');

View File

@@ -0,0 +1,43 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ModifyAttachmentsRequest extends \Google\Collection
{
protected $collection_key = 'addAttachments';
protected $addAttachmentsType = Attachment::class;
protected $addAttachmentsDataType = 'array';
/**
* @param Attachment[]
*/
public function setAddAttachments($addAttachments)
{
$this->addAttachments = $addAttachments;
}
/**
* @return Attachment[]
*/
public function getAddAttachments()
{
return $this->addAttachments;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ModifyAttachmentsRequest::class, 'Google_Service_Classroom_ModifyAttachmentsRequest');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ModifyCourseWorkAssigneesRequest extends \Google\Model
{
/**
* @var string
*/
public $assigneeMode;
protected $modifyIndividualStudentsOptionsType = ModifyIndividualStudentsOptions::class;
protected $modifyIndividualStudentsOptionsDataType = '';
/**
* @param string
*/
public function setAssigneeMode($assigneeMode)
{
$this->assigneeMode = $assigneeMode;
}
/**
* @return string
*/
public function getAssigneeMode()
{
return $this->assigneeMode;
}
/**
* @param ModifyIndividualStudentsOptions
*/
public function setModifyIndividualStudentsOptions(ModifyIndividualStudentsOptions $modifyIndividualStudentsOptions)
{
$this->modifyIndividualStudentsOptions = $modifyIndividualStudentsOptions;
}
/**
* @return ModifyIndividualStudentsOptions
*/
public function getModifyIndividualStudentsOptions()
{
return $this->modifyIndividualStudentsOptions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ModifyCourseWorkAssigneesRequest::class, 'Google_Service_Classroom_ModifyCourseWorkAssigneesRequest');

View File

@@ -0,0 +1,63 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ModifyIndividualStudentsOptions extends \Google\Collection
{
protected $collection_key = 'removeStudentIds';
/**
* @var string[]
*/
public $addStudentIds;
/**
* @var string[]
*/
public $removeStudentIds;
/**
* @param string[]
*/
public function setAddStudentIds($addStudentIds)
{
$this->addStudentIds = $addStudentIds;
}
/**
* @return string[]
*/
public function getAddStudentIds()
{
return $this->addStudentIds;
}
/**
* @param string[]
*/
public function setRemoveStudentIds($removeStudentIds)
{
$this->removeStudentIds = $removeStudentIds;
}
/**
* @return string[]
*/
public function getRemoveStudentIds()
{
return $this->removeStudentIds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ModifyIndividualStudentsOptions::class, 'Google_Service_Classroom_ModifyIndividualStudentsOptions');

View File

@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class MultipleChoiceQuestion extends \Google\Collection
{
protected $collection_key = 'choices';
/**
* @var string[]
*/
public $choices;
/**
* @param string[]
*/
public function setChoices($choices)
{
$this->choices = $choices;
}
/**
* @return string[]
*/
public function getChoices()
{
return $this->choices;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MultipleChoiceQuestion::class, 'Google_Service_Classroom_MultipleChoiceQuestion');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class MultipleChoiceSubmission extends \Google\Model
{
/**
* @var string
*/
public $answer;
/**
* @param string
*/
public function setAnswer($answer)
{
$this->answer = $answer;
}
/**
* @return string
*/
public function getAnswer()
{
return $this->answer;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MultipleChoiceSubmission::class, 'Google_Service_Classroom_MultipleChoiceSubmission');

View File

@@ -0,0 +1,80 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Name extends \Google\Model
{
/**
* @var string
*/
public $familyName;
/**
* @var string
*/
public $fullName;
/**
* @var string
*/
public $givenName;
/**
* @param string
*/
public function setFamilyName($familyName)
{
$this->familyName = $familyName;
}
/**
* @return string
*/
public function getFamilyName()
{
return $this->familyName;
}
/**
* @param string
*/
public function setFullName($fullName)
{
$this->fullName = $fullName;
}
/**
* @return string
*/
public function getFullName()
{
return $this->fullName;
}
/**
* @param string
*/
public function setGivenName($givenName)
{
$this->givenName = $givenName;
}
/**
* @return string
*/
public function getGivenName()
{
return $this->givenName;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Name::class, 'Google_Service_Classroom_Name');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ReclaimStudentSubmissionRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReclaimStudentSubmissionRequest::class, 'Google_Service_Classroom_ReclaimStudentSubmissionRequest');

View File

@@ -0,0 +1,94 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Registration extends \Google\Model
{
protected $cloudPubsubTopicType = CloudPubsubTopic::class;
protected $cloudPubsubTopicDataType = '';
/**
* @var string
*/
public $expiryTime;
protected $feedType = Feed::class;
protected $feedDataType = '';
/**
* @var string
*/
public $registrationId;
/**
* @param CloudPubsubTopic
*/
public function setCloudPubsubTopic(CloudPubsubTopic $cloudPubsubTopic)
{
$this->cloudPubsubTopic = $cloudPubsubTopic;
}
/**
* @return CloudPubsubTopic
*/
public function getCloudPubsubTopic()
{
return $this->cloudPubsubTopic;
}
/**
* @param string
*/
public function setExpiryTime($expiryTime)
{
$this->expiryTime = $expiryTime;
}
/**
* @return string
*/
public function getExpiryTime()
{
return $this->expiryTime;
}
/**
* @param Feed
*/
public function setFeed(Feed $feed)
{
$this->feed = $feed;
}
/**
* @return Feed
*/
public function getFeed()
{
return $this->feed;
}
/**
* @param string
*/
public function setRegistrationId($registrationId)
{
$this->registrationId = $registrationId;
}
/**
* @return string
*/
public function getRegistrationId()
{
return $this->registrationId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Registration::class, 'Google_Service_Classroom_Registration');

View File

@@ -0,0 +1,184 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\Course;
use Google\Service\Classroom\ListCoursesResponse;
/**
* The "courses" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $courses = $classroomService->courses;
* </code>
*/
class Courses extends \Google\Service\Resource
{
/**
* Creates a course. The user specified in `ownerId` is the owner of the created
* course and added as a teacher. A non-admin requesting user can only create a
* course with themselves as the owner. Domain admins can create courses owned
* by any user within their domain. 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: * UserCannotOwnCourse *
* UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified
* in the `id` and already exists. (courses.create)
*
* @param Course $postBody
* @param array $optParams Optional parameters.
* @return Course
* @throws \Google\Service\Exception
*/
public function create(Course $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Course::class);
}
/**
* 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. (courses.delete)
*
* @param string $id Identifier of the course to delete. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($id, $optParams = [])
{
$params = ['id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* 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. (courses.get)
*
* @param string $id Identifier of the course to return. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param array $optParams Optional parameters.
* @return Course
* @throws \Google\Service\Exception
*/
public function get($id, $optParams = [])
{
$params = ['id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Course::class);
}
/**
* 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. (courses.listCourses)
*
* @param array $optParams Optional parameters.
*
* @opt_param string courseStates Restricts returned courses to those in one of
* the specified states The default value is ACTIVE, ARCHIVED, PROVISIONED,
* DECLINED.
* @opt_param int 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.
* @opt_param string 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.
* @opt_param string 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
* @opt_param string 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
* @return ListCoursesResponse
* @throws \Google\Service\Exception
*/
public function listCourses($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCoursesResponse::class);
}
/**
* Updates one or more fields in a course. This method returns the following
* error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
* modify the requested course or for access errors. * `NOT_FOUND` if no course
* exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are
* specified in the update mask or if no update mask is supplied. *
* `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
* * InactiveCourseOwner * IneligibleOwner (courses.patch)
*
* @param string $id Identifier of the course to update. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param Course $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Mask that identifies which fields on the course
* to update. This field is required to do an update. The update will fail if
* invalid fields are specified. The following fields are valid: * `name` *
* `section` * `descriptionHeading` * `description` * `room` * `courseState` *
* `ownerId` Note: patches to ownerId are treated as being effective
* immediately, but in practice it may take some time for the ownership transfer
* of all affected resources to complete. When set in a query parameter, this
* field should be specified as `updateMask=,,...`
* @return Course
* @throws \Google\Service\Exception
*/
public function patch($id, Course $postBody, $optParams = [])
{
$params = ['id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Course::class);
}
/**
* Updates a course. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not permitted to modify the
* requested course or for access errors. * `NOT_FOUND` if no course exists with
* the requested ID. * `FAILED_PRECONDITION` for the following request errors: *
* CourseNotModifiable (courses.update)
*
* @param string $id Identifier of the course to update. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param Course $postBody
* @param array $optParams Optional parameters.
* @return Course
* @throws \Google\Service\Exception
*/
public function update($id, Course $postBody, $optParams = [])
{
$params = ['id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('update', [$params], Course::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Courses::class, 'Google_Service_Classroom_Resource_Courses');

View File

@@ -0,0 +1,108 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\CourseAlias;
use Google\Service\Classroom\ListCourseAliasesResponse;
/**
* The "aliases" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $aliases = $classroomService->courses_aliases;
* </code>
*/
class CoursesAliases extends \Google\Service\Resource
{
/**
* Creates an alias for a course. This method returns the following error codes:
* * `PERMISSION_DENIED` if the requesting user is not permitted to create the
* alias or for access errors. * `NOT_FOUND` if the course does not exist. *
* `ALREADY_EXISTS` if the alias already exists. * `FAILED_PRECONDITION` if the
* alias requested does not make sense for the requesting user or course (for
* example, if a user not in a domain attempts to access a domain-scoped alias).
* (aliases.create)
*
* @param string $courseId Identifier of the course to alias. This identifier
* can be either the Classroom-assigned identifier or an alias.
* @param CourseAlias $postBody
* @param array $optParams Optional parameters.
* @return CourseAlias
* @throws \Google\Service\Exception
*/
public function create($courseId, CourseAlias $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], CourseAlias::class);
}
/**
* Deletes an alias of a course. This method returns the following error codes:
* * `PERMISSION_DENIED` if the requesting user is not permitted to remove the
* alias or for access errors. * `NOT_FOUND` if the alias does not exist. *
* `FAILED_PRECONDITION` if the alias requested does not make sense for the
* requesting user or course (for example, if a user not in a domain attempts to
* delete a domain-scoped alias). (aliases.delete)
*
* @param string $courseId Identifier of the course whose alias should be
* deleted. This identifier can be either the Classroom-assigned identifier or
* an alias.
* @param string $alias Alias to delete. This may not be the Classroom-assigned
* identifier.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $alias, $optParams = [])
{
$params = ['courseId' => $courseId, 'alias' => $alias];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns a list of aliases for a course. This method returns the following
* error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
* access the course or for access errors. * `NOT_FOUND` if the course does not
* exist. (aliases.listCoursesAliases)
*
* @param string $courseId The identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param array $optParams Optional parameters.
*
* @opt_param int 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.
* @opt_param string 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.
* @return ListCourseAliasesResponse
* @throws \Google\Service\Exception
*/
public function listCoursesAliases($courseId, $optParams = [])
{
$params = ['courseId' => $courseId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCourseAliasesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesAliases::class, 'Google_Service_Classroom_Resource_CoursesAliases');

View File

@@ -0,0 +1,235 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnContext;
use Google\Service\Classroom\Announcement;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListAnnouncementsResponse;
use Google\Service\Classroom\ModifyAnnouncementAssigneesRequest;
/**
* The "announcements" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $announcements = $classroomService->courses_announcements;
* </code>
*/
class CoursesAnnouncements extends \Google\Service\Resource
{
/**
* Creates an announcement. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not permitted to access the
* requested course, create announcements in the requested course, share a Drive
* attachment, or for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if the requested course does not exist. *
* `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible
* (announcements.create)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param Announcement $postBody
* @param array $optParams Optional parameters.
* @return Announcement
* @throws \Google\Service\Exception
*/
public function create($courseId, Announcement $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Announcement::class);
}
/**
* Deletes an announcement. This request must be made by the Developer Console
* project of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* corresponding announcement item. This method returns the following error
* codes: * `PERMISSION_DENIED` if the requesting developer project did not
* create the corresponding announcement, if the requesting user is not
* permitted to delete the requested course or for access errors. *
* `FAILED_PRECONDITION` if the requested announcement has already been deleted.
* * `NOT_FOUND` if no course exists with the requested ID.
* (announcements.delete)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the announcement to delete. This identifier
* is a Classroom-assigned identifier.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns an announcement. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not permitted to access the
* requested course or announcement, or for access errors. * `INVALID_ARGUMENT`
* if the request is malformed. * `NOT_FOUND` if the requested course or
* announcement does not exist. (announcements.get)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the announcement.
* @param array $optParams Optional parameters.
* @return Announcement
* @throws \Google\Service\Exception
*/
public function get($courseId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Announcement::class);
}
/**
* Gets metadata for Classroom add-ons in the context of a specific post. To
* maintain the integrity of its own data and permissions model, an add-on
* should call this to validate query parameters and the requesting user's role
* whenever the add-on is opened in an
* [iframe](https://developers.google.com/classroom/add-ons/get-
* started/iframes/iframes-overview). This method returns the following error
* codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the
* request is malformed. * `NOT_FOUND` if one of the identified resources does
* not exist. (announcements.getAddOnContext)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param array $optParams Optional parameters.
*
* @opt_param string addOnToken Optional. Token that authorizes the request. The
* token is passed as a query parameter when the user is redirected from
* Classroom to the add-on's URL. The authorization token is required when
* neither of the following is true: * The add-on has attachments on the post. *
* The developer project issuing the request is the same project that created
* the post.
* @opt_param string attachmentId Optional. The identifier of the attachment.
* This field is required for all requests except when the user is in the
* [Attachment Discovery iframe](https://developers.google.com/classroom/add-
* ons/get-started/iframes/attachment-discovery-iframe).
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnContext
* @throws \Google\Service\Exception
*/
public function getAddOnContext($courseId, $itemId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId];
$params = array_merge($params, $optParams);
return $this->call('getAddOnContext', [$params], AddOnContext::class);
}
/**
* Returns a list of announcements that the requester is permitted to view.
* Course students may only view `PUBLISHED` announcements. Course teachers and
* domain administrators may view all announcements. 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. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
* requested course does not exist. (announcements.listCoursesAnnouncements)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param array $optParams Optional parameters.
*
* @opt_param string announcementStates Restriction on the `state` of
* announcements returned. If this argument is left unspecified, the default
* value is `PUBLISHED`.
* @opt_param string orderBy Optional sort ordering for results. A comma-
* separated list of fields with an optional sort direction keyword. Supported
* field is `updateTime`. Supported direction keywords are `asc` and `desc`. If
* not specified, `updateTime desc` is the default behavior. Examples:
* `updateTime asc`, `updateTime`
* @opt_param int 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.
* @opt_param string 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.
* @return ListAnnouncementsResponse
* @throws \Google\Service\Exception
*/
public function listCoursesAnnouncements($courseId, $optParams = [])
{
$params = ['courseId' => $courseId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListAnnouncementsResponse::class);
}
/**
* Modifies assignee mode and options of an announcement. Only a teacher of the
* course that contains the announcement may call this method. This method
* returns the following error codes: * `PERMISSION_DENIED` if the requesting
* user is not permitted to access the requested course or course work or for
* access errors. * `INVALID_ARGUMENT` if the request is malformed. *
* `NOT_FOUND` if the requested course or course work does not exist.
* (announcements.modifyAssignees)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the announcement.
* @param ModifyAnnouncementAssigneesRequest $postBody
* @param array $optParams Optional parameters.
* @return Announcement
* @throws \Google\Service\Exception
*/
public function modifyAssignees($courseId, $id, ModifyAnnouncementAssigneesRequest $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('modifyAssignees', [$params], Announcement::class);
}
/**
* Updates one or more fields of an announcement. This method returns the
* following error codes: * `PERMISSION_DENIED` if the requesting developer
* project did not create the corresponding announcement or for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if
* the requested announcement has already been deleted. * `NOT_FOUND` if the
* requested course or announcement does not exist (announcements.patch)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the announcement.
* @param Announcement $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Mask that identifies which fields on the
* announcement to update. This field is required to do an update. The update
* fails if invalid fields are specified. If a field supports empty values, it
* can be cleared by specifying it in the update mask and not in the
* Announcement object. If a field that does not support empty values is
* included in the update mask and not set in the Announcement object, an
* `INVALID_ARGUMENT` error is returned. The following fields may be specified
* by teachers: * `text` * `state` * `scheduled_time`
* @return Announcement
* @throws \Google\Service\Exception
*/
public function patch($courseId, $id, Announcement $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Announcement::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesAnnouncements::class, 'Google_Service_Classroom_Resource_CoursesAnnouncements');

View File

@@ -0,0 +1,183 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnAttachment;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListAddOnAttachmentsResponse;
/**
* The "addOnAttachments" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $addOnAttachments = $classroomService->courses_announcements_addOnAttachments;
* </code>
*/
class CoursesAnnouncementsAddOnAttachments extends \Google\Service\Resource
{
/**
* Creates an add-on attachment under a post. Requires the add-on to have
* permission to create new attachments on the post. This method returns the
* following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (addOnAttachments.create)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which to create the attachment. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param AddOnAttachment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string addOnToken Optional. Token that authorizes the request. The
* token is passed as a query parameter when the user is redirected from
* Classroom to the add-on's URL. This authorization token is required for in-
* Classroom attachment creation but optional for partner-first attachment
* creation. Returns an error if not provided for partner-first attachment
* creation and the developer projects that created the attachment and its
* parent stream item do not match.
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function create($courseId, $itemId, AddOnAttachment $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], AddOnAttachment::class);
}
/**
* Deletes an add-on attachment. Requires the add-on to have been the original
* creator of the attachment. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.delete)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param string $attachmentId Required. Identifier of the attachment.
* @param array $optParams Optional parameters.
*
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $itemId, $attachmentId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns an add-on attachment. Requires the add-on requesting the attachment
* to be the original creator of the attachment. This method returns the
* following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (addOnAttachments.get)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param string $attachmentId Required. Identifier of the attachment.
* @param array $optParams Optional parameters.
*
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function get($courseId, $itemId, $attachmentId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], AddOnAttachment::class);
}
/**
* Returns all attachments created by an add-on under the post. Requires the
* add-on to have active attachments on the post or have permission to create
* new attachments on the post. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.listCoursesAnnouncementsAddOnAttachments)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` whose attachments should be enumerated. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of attachments to return. The
* service may return fewer than this value. If unspecified, at most 20
* attachments will be returned. The maximum value is 20; values above 20 will
* be coerced to 20.
* @opt_param string pageToken A page token, received from a previous
* `ListAddOnAttachments` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListAddOnAttachments` must
* match the call that provided the page token.
* @opt_param string postId Optional. Identifier of the post under the course
* whose attachments to enumerate. Deprecated, use `item_id` instead.
* @return ListAddOnAttachmentsResponse
* @throws \Google\Service\Exception
*/
public function listCoursesAnnouncementsAddOnAttachments($courseId, $itemId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListAddOnAttachmentsResponse::class);
}
/**
* Updates an add-on attachment. Requires the add-on to have been the original
* creator of the attachment. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.patch)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the post under which the attachment is
* attached.
* @param string $attachmentId Required. Identifier of the attachment.
* @param AddOnAttachment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string postId Required. Identifier of the post under which the
* attachment is attached.
* @opt_param string updateMask Required. Mask that identifies which fields on
* the attachment to update. The update fails if invalid fields are specified.
* If a field supports empty values, it can be cleared by specifying it in the
* update mask and not in the `AddOnAttachment` object. If a field that does not
* support empty values is included in the update mask and not set in the
* `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The
* following fields may be specified by teachers: * `title` * `teacher_view_uri`
* * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` *
* `max_points`
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function patch($courseId, $itemId, $attachmentId, AddOnAttachment $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], AddOnAttachment::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesAnnouncementsAddOnAttachments::class, 'Google_Service_Classroom_Resource_CoursesAnnouncementsAddOnAttachments');

View File

@@ -0,0 +1,294 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnContext;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\CourseWork;
use Google\Service\Classroom\ListCourseWorkResponse;
use Google\Service\Classroom\ModifyCourseWorkAssigneesRequest;
use Google\Service\Classroom\Rubric;
/**
* The "courseWork" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $courseWork = $classroomService->courses_courseWork;
* </code>
*/
class CoursesCourseWork extends \Google\Service\Resource
{
/**
* Creates course work. The resulting course work (and corresponding student
* submissions) are associated with the Developer Console project of the [OAuth
* client ID](https://support.google.com/cloud/answer/6158849) used to make the
* request. Classroom API requests to modify course work and student submissions
* must be made with an OAuth client ID from the associated Developer Console
* project. This method returns the following error codes: * `PERMISSION_DENIED`
* if the requesting user is not permitted to access the requested course,
* create course work in the requested course, share a Drive attachment, or for
* access errors. * `INVALID_ARGUMENT` if the request is malformed. *
* `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION`
* for the following request error: * AttachmentNotVisible (courseWork.create)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param CourseWork $postBody
* @param array $optParams Optional parameters.
* @return CourseWork
* @throws \Google\Service\Exception
*/
public function create($courseId, CourseWork $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], CourseWork::class);
}
/**
* Deletes a course work. This request must be made by the Developer Console
* project of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* corresponding course work item. This method returns the following error
* codes: * `PERMISSION_DENIED` if the requesting developer project did not
* create the corresponding course work, if the requesting user is not permitted
* to delete the requested course or for access errors. * `FAILED_PRECONDITION`
* if the requested course work has already been deleted. * `NOT_FOUND` if no
* course exists with the requested ID. (courseWork.delete)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the course work to delete. This identifier is
* a Classroom-assigned identifier.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns course work. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not permitted to access the
* requested course or course work, or for access errors. * `INVALID_ARGUMENT`
* if the request is malformed. * `NOT_FOUND` if the requested course or course
* work does not exist. (courseWork.get)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the course work.
* @param array $optParams Optional parameters.
* @return CourseWork
* @throws \Google\Service\Exception
*/
public function get($courseId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], CourseWork::class);
}
/**
* Gets metadata for Classroom add-ons in the context of a specific post. To
* maintain the integrity of its own data and permissions model, an add-on
* should call this to validate query parameters and the requesting user's role
* whenever the add-on is opened in an
* [iframe](https://developers.google.com/classroom/add-ons/get-
* started/iframes/iframes-overview). This method returns the following error
* codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the
* request is malformed. * `NOT_FOUND` if one of the identified resources does
* not exist. (courseWork.getAddOnContext)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param array $optParams Optional parameters.
*
* @opt_param string addOnToken Optional. Token that authorizes the request. The
* token is passed as a query parameter when the user is redirected from
* Classroom to the add-on's URL. The authorization token is required when
* neither of the following is true: * The add-on has attachments on the post. *
* The developer project issuing the request is the same project that created
* the post.
* @opt_param string attachmentId Optional. The identifier of the attachment.
* This field is required for all requests except when the user is in the
* [Attachment Discovery iframe](https://developers.google.com/classroom/add-
* ons/get-started/iframes/attachment-discovery-iframe).
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnContext
* @throws \Google\Service\Exception
*/
public function getAddOnContext($courseId, $itemId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId];
$params = array_merge($params, $optParams);
return $this->call('getAddOnContext', [$params], AddOnContext::class);
}
/**
* Returns a list of course work that the requester is permitted to view. Course
* students may only view `PUBLISHED` course work. Course teachers and domain
* administrators may view all course work. 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. * `INVALID_ARGUMENT` if the
* request is malformed. * `NOT_FOUND` if the requested course does not exist.
* (courseWork.listCoursesCourseWork)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param array $optParams Optional parameters.
*
* @opt_param string courseWorkStates Restriction on the work status to return.
* Only courseWork that matches is returned. If unspecified, items with a work
* status of `PUBLISHED` is returned.
* @opt_param string orderBy Optional sort ordering for results. A comma-
* separated list of fields with an optional sort direction keyword. Supported
* fields are `updateTime` and `dueDate`. Supported direction keywords are `asc`
* and `desc`. If not specified, `updateTime desc` is the default behavior.
* Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
* @opt_param int 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.
* @opt_param string 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.
* @return ListCourseWorkResponse
* @throws \Google\Service\Exception
*/
public function listCoursesCourseWork($courseId, $optParams = [])
{
$params = ['courseId' => $courseId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCourseWorkResponse::class);
}
/**
* Modifies assignee mode and options of a coursework. Only a teacher of the
* course that contains the coursework may call this method. This method returns
* the following error codes: * `PERMISSION_DENIED` if the requesting user is
* not permitted to access the requested course or course work or for access
* errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if
* the requested course or course work does not exist.
* (courseWork.modifyAssignees)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the coursework.
* @param ModifyCourseWorkAssigneesRequest $postBody
* @param array $optParams Optional parameters.
* @return CourseWork
* @throws \Google\Service\Exception
*/
public function modifyAssignees($courseId, $id, ModifyCourseWorkAssigneesRequest $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('modifyAssignees', [$params], CourseWork::class);
}
/**
* Updates one or more fields of a course work. See
* google.classroom.v1.CourseWork for details of which fields may be updated and
* who may change them. This request must be made by the Developer Console
* project of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* corresponding course work item. This method returns the following error
* codes: * `PERMISSION_DENIED` if the requesting developer project did not
* create the corresponding course work, if the user is not permitted to make
* the requested modification to the student submission, or for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if
* the requested course work has already been deleted. * `NOT_FOUND` if the
* requested course or course work does not exist. (courseWork.patch)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the course work.
* @param CourseWork $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Mask that identifies which fields on the course
* work to update. This field is required to do an update. The update fails if
* invalid fields are specified. If a field supports empty values, it can be
* cleared by specifying it in the update mask and not in the `CourseWork`
* object. If a field that does not support empty values is included in the
* update mask and not set in the `CourseWork` object, an `INVALID_ARGUMENT`
* error is returned. The following fields may be specified by teachers: *
* `title` * `description` * `state` * `due_date` * `due_time` * `max_points` *
* `scheduled_time` * `submission_modification_mode` * `topic_id` *
* `grading_period_id` Available in [V1_20240401_PREVIEW](https://developers.goo
* gle.com/classroom/reference/preview) and later.
* @return CourseWork
* @throws \Google\Service\Exception
*/
public function patch($courseId, $id, CourseWork $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], CourseWork::class);
}
/**
* Updates a rubric. See google.classroom.v1.Rubric for details of which fields
* can be updated. Rubric update capabilities are
* [limited](/classroom/rubrics/limitations) once grading has started. The
* requesting user and course owner must have rubrics creation capabilities. For
* details, see [licensing requirements](https://developers.google.com/classroom
* /rubrics/limitations#license-requirements). This request must be made by the
* Google Cloud console of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* parent course work item. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting developer project didn't create the
* corresponding course work, if the user isn't permitted to make the requested
* modification to the rubric, or for access errors. This error code is also
* returned if grading has already started on the rubric. * `INVALID_ARGUMENT`
* if the request is malformed and for the following request error: *
* `RubricCriteriaInvalidFormat` * `NOT_FOUND` if the requested course, course
* work, or rubric doesn't exist or if the user doesn't have access to the
* corresponding course work. * `INTERNAL` if grading has already started on the
* rubric. (courseWork.updateRubric)
*
* @param string $courseId Required. Identifier of the course.
* @param string $courseWorkId Required. Identifier of the course work.
* @param Rubric $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string id Optional. Identifier of the rubric.
* @opt_param string updateMask Optional. Mask that identifies which fields on
* the rubric to update. This field is required to do an update. The update
* fails if invalid fields are specified. There are multiple options to define
* the criteria of a rubric: the `source_spreadsheet_id` and the `criteria`
* list. Only one of these can be used at a time to define a rubric. The rubric
* `criteria` list is fully replaced by the rubric criteria specified in the
* update request. For example, if a criterion or level is missing from the
* request, it is deleted. New criteria and levels are added and an ID is
* assigned. Existing criteria and levels retain the previously assigned ID if
* the ID is specified in the request. The following fields can be specified by
* teachers: * `criteria` * `source_spreadsheet_id`
* @return Rubric
* @throws \Google\Service\Exception
*/
public function updateRubric($courseId, $courseWorkId, Rubric $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateRubric', [$params], Rubric::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesCourseWork::class, 'Google_Service_Classroom_Resource_CoursesCourseWork');

View File

@@ -0,0 +1,183 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnAttachment;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListAddOnAttachmentsResponse;
/**
* The "addOnAttachments" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $addOnAttachments = $classroomService->courses_courseWork_addOnAttachments;
* </code>
*/
class CoursesCourseWorkAddOnAttachments extends \Google\Service\Resource
{
/**
* Creates an add-on attachment under a post. Requires the add-on to have
* permission to create new attachments on the post. This method returns the
* following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (addOnAttachments.create)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which to create the attachment. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param AddOnAttachment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string addOnToken Optional. Token that authorizes the request. The
* token is passed as a query parameter when the user is redirected from
* Classroom to the add-on's URL. This authorization token is required for in-
* Classroom attachment creation but optional for partner-first attachment
* creation. Returns an error if not provided for partner-first attachment
* creation and the developer projects that created the attachment and its
* parent stream item do not match.
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function create($courseId, $itemId, AddOnAttachment $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], AddOnAttachment::class);
}
/**
* Deletes an add-on attachment. Requires the add-on to have been the original
* creator of the attachment. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.delete)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param string $attachmentId Required. Identifier of the attachment.
* @param array $optParams Optional parameters.
*
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $itemId, $attachmentId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns an add-on attachment. Requires the add-on requesting the attachment
* to be the original creator of the attachment. This method returns the
* following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (addOnAttachments.get)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param string $attachmentId Required. Identifier of the attachment.
* @param array $optParams Optional parameters.
*
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function get($courseId, $itemId, $attachmentId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], AddOnAttachment::class);
}
/**
* Returns all attachments created by an add-on under the post. Requires the
* add-on to have active attachments on the post or have permission to create
* new attachments on the post. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.listCoursesCourseWorkAddOnAttachments)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` whose attachments should be enumerated. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of attachments to return. The
* service may return fewer than this value. If unspecified, at most 20
* attachments will be returned. The maximum value is 20; values above 20 will
* be coerced to 20.
* @opt_param string pageToken A page token, received from a previous
* `ListAddOnAttachments` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListAddOnAttachments` must
* match the call that provided the page token.
* @opt_param string postId Optional. Identifier of the post under the course
* whose attachments to enumerate. Deprecated, use `item_id` instead.
* @return ListAddOnAttachmentsResponse
* @throws \Google\Service\Exception
*/
public function listCoursesCourseWorkAddOnAttachments($courseId, $itemId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListAddOnAttachmentsResponse::class);
}
/**
* Updates an add-on attachment. Requires the add-on to have been the original
* creator of the attachment. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.patch)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the post under which the attachment is
* attached.
* @param string $attachmentId Required. Identifier of the attachment.
* @param AddOnAttachment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string postId Required. Identifier of the post under which the
* attachment is attached.
* @opt_param string updateMask Required. Mask that identifies which fields on
* the attachment to update. The update fails if invalid fields are specified.
* If a field supports empty values, it can be cleared by specifying it in the
* update mask and not in the `AddOnAttachment` object. If a field that does not
* support empty values is included in the update mask and not set in the
* `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The
* following fields may be specified by teachers: * `title` * `teacher_view_uri`
* * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` *
* `max_points`
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function patch($courseId, $itemId, $attachmentId, AddOnAttachment $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], AddOnAttachment::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesCourseWorkAddOnAttachments::class, 'Google_Service_Classroom_Resource_CoursesCourseWorkAddOnAttachments');

View File

@@ -0,0 +1,91 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnAttachmentStudentSubmission;
/**
* The "studentSubmissions" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $studentSubmissions = $classroomService->courses_courseWork_addOnAttachments_studentSubmissions;
* </code>
*/
class CoursesCourseWorkAddOnAttachmentsStudentSubmissions extends \Google\Service\Resource
{
/**
* Returns a student submission for an add-on attachment. This method returns
* the following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (studentSubmissions.get)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param string $attachmentId Required. Identifier of the attachment.
* @param string $submissionId Required. Identifier of the students submission.
* @param array $optParams Optional parameters.
*
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnAttachmentStudentSubmission
* @throws \Google\Service\Exception
*/
public function get($courseId, $itemId, $attachmentId, $submissionId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId, 'submissionId' => $submissionId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], AddOnAttachmentStudentSubmission::class);
}
/**
* Updates data associated with an add-on attachment submission. Requires the
* add-on to have been the original creator of the attachment and the attachment
* to have a positive `max_points` value set. This method returns the following
* error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if
* the request is malformed. * `NOT_FOUND` if one of the identified resources
* does not exist. (studentSubmissions.patch)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param string $attachmentId Required. Identifier of the attachment.
* @param string $submissionId Required. Identifier of the student's submission.
* @param AddOnAttachmentStudentSubmission $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @opt_param string updateMask Required. Mask that identifies which fields on
* the attachment to update. The update fails if invalid fields are specified.
* If a field supports empty values, it can be cleared by specifying it in the
* update mask and not in the `AddOnAttachmentStudentSubmission` object. The
* following fields may be specified by teachers: * `points_earned`
* @return AddOnAttachmentStudentSubmission
* @throws \Google\Service\Exception
*/
public function patch($courseId, $itemId, $attachmentId, $submissionId, AddOnAttachmentStudentSubmission $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId, 'submissionId' => $submissionId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], AddOnAttachmentStudentSubmission::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesCourseWorkAddOnAttachmentsStudentSubmissions::class, 'Google_Service_Classroom_Resource_CoursesCourseWorkAddOnAttachmentsStudentSubmissions');

View File

@@ -0,0 +1,222 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnContext;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\CourseWorkMaterial;
use Google\Service\Classroom\ListCourseWorkMaterialResponse;
/**
* The "courseWorkMaterials" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $courseWorkMaterials = $classroomService->courses_courseWorkMaterials;
* </code>
*/
class CoursesCourseWorkMaterials extends \Google\Service\Resource
{
/**
* Creates a course work material. This method returns the following error
* codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
* access the requested course, create course work material in the requested
* course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT`
* if the request is malformed or if more than 20 * materials are provided. *
* `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION`
* for the following request error: * AttachmentNotVisible
* (courseWorkMaterials.create)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param CourseWorkMaterial $postBody
* @param array $optParams Optional parameters.
* @return CourseWorkMaterial
* @throws \Google\Service\Exception
*/
public function create($courseId, CourseWorkMaterial $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], CourseWorkMaterial::class);
}
/**
* Deletes a course work material. This request must be made by the Developer
* Console project of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* corresponding course work material item. This method returns the following
* error codes: * `PERMISSION_DENIED` if the requesting developer project did
* not create the corresponding course work material, if the requesting user is
* not permitted to delete the requested course or for access errors. *
* `FAILED_PRECONDITION` if the requested course work material has already been
* deleted. * `NOT_FOUND` if no course exists with the requested ID.
* (courseWorkMaterials.delete)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the course work material to delete. This
* identifier is a Classroom-assigned identifier.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns a course work material. This method returns the following error
* codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
* access the requested course or course work material, or for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
* requested course or course work material does not exist.
* (courseWorkMaterials.get)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the course work material.
* @param array $optParams Optional parameters.
* @return CourseWorkMaterial
* @throws \Google\Service\Exception
*/
public function get($courseId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], CourseWorkMaterial::class);
}
/**
* Gets metadata for Classroom add-ons in the context of a specific post. To
* maintain the integrity of its own data and permissions model, an add-on
* should call this to validate query parameters and the requesting user's role
* whenever the add-on is opened in an
* [iframe](https://developers.google.com/classroom/add-ons/get-
* started/iframes/iframes-overview). This method returns the following error
* codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the
* request is malformed. * `NOT_FOUND` if one of the identified resources does
* not exist. (courseWorkMaterials.getAddOnContext)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param array $optParams Optional parameters.
*
* @opt_param string addOnToken Optional. Token that authorizes the request. The
* token is passed as a query parameter when the user is redirected from
* Classroom to the add-on's URL. The authorization token is required when
* neither of the following is true: * The add-on has attachments on the post. *
* The developer project issuing the request is the same project that created
* the post.
* @opt_param string attachmentId Optional. The identifier of the attachment.
* This field is required for all requests except when the user is in the
* [Attachment Discovery iframe](https://developers.google.com/classroom/add-
* ons/get-started/iframes/attachment-discovery-iframe).
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnContext
* @throws \Google\Service\Exception
*/
public function getAddOnContext($courseId, $itemId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId];
$params = array_merge($params, $optParams);
return $this->call('getAddOnContext', [$params], AddOnContext::class);
}
/**
* Returns a list of course work material that the requester is permitted to
* view. Course students may only view `PUBLISHED` course work material. Course
* teachers and domain administrators may view all course work material. 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. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if
* the requested course does not exist.
* (courseWorkMaterials.listCoursesCourseWorkMaterials)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param array $optParams Optional parameters.
*
* @opt_param string courseWorkMaterialStates Restriction on the work status to
* return. Only course work material that matches is returned. If unspecified,
* items with a work status of `PUBLISHED` is returned.
* @opt_param string materialDriveId Optional filtering for course work material
* with at least one Drive material whose ID matches the provided string. If
* `material_link` is also specified, course work material must have materials
* matching both filters.
* @opt_param string materialLink Optional filtering for course work material
* with at least one link material whose URL partially matches the provided
* string.
* @opt_param string orderBy Optional sort ordering for results. A comma-
* separated list of fields with an optional sort direction keyword. Supported
* field is `updateTime`. Supported direction keywords are `asc` and `desc`. If
* not specified, `updateTime desc` is the default behavior. Examples:
* `updateTime asc`, `updateTime`
* @opt_param int 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.
* @opt_param string 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.
* @return ListCourseWorkMaterialResponse
* @throws \Google\Service\Exception
*/
public function listCoursesCourseWorkMaterials($courseId, $optParams = [])
{
$params = ['courseId' => $courseId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListCourseWorkMaterialResponse::class);
}
/**
* Updates one or more fields of a course work material. This method returns the
* following error codes: * `PERMISSION_DENIED` if the requesting developer
* project for access errors. * `INVALID_ARGUMENT` if the request is malformed.
* * `FAILED_PRECONDITION` if the requested course work material has already
* been deleted. * `NOT_FOUND` if the requested course or course work material
* does not exist (courseWorkMaterials.patch)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the course work material.
* @param CourseWorkMaterial $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Mask that identifies which fields on the course
* work material to update. This field is required to do an update. The update
* fails if invalid fields are specified. If a field supports empty values, it
* can be cleared by specifying it in the update mask and not in the course work
* material object. If a field that does not support empty values is included in
* the update mask and not set in the course work material object, an
* `INVALID_ARGUMENT` error is returned. The following fields may be specified
* by teachers: * `title` * `description` * `state` * `scheduled_time` *
* `topic_id`
* @return CourseWorkMaterial
* @throws \Google\Service\Exception
*/
public function patch($courseId, $id, CourseWorkMaterial $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], CourseWorkMaterial::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesCourseWorkMaterials::class, 'Google_Service_Classroom_Resource_CoursesCourseWorkMaterials');

View File

@@ -0,0 +1,183 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnAttachment;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListAddOnAttachmentsResponse;
/**
* The "addOnAttachments" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $addOnAttachments = $classroomService->courses_courseWorkMaterials_addOnAttachments;
* </code>
*/
class CoursesCourseWorkMaterialsAddOnAttachments extends \Google\Service\Resource
{
/**
* Creates an add-on attachment under a post. Requires the add-on to have
* permission to create new attachments on the post. This method returns the
* following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (addOnAttachments.create)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which to create the attachment. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param AddOnAttachment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string addOnToken Optional. Token that authorizes the request. The
* token is passed as a query parameter when the user is redirected from
* Classroom to the add-on's URL. This authorization token is required for in-
* Classroom attachment creation but optional for partner-first attachment
* creation. Returns an error if not provided for partner-first attachment
* creation and the developer projects that created the attachment and its
* parent stream item do not match.
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function create($courseId, $itemId, AddOnAttachment $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], AddOnAttachment::class);
}
/**
* Deletes an add-on attachment. Requires the add-on to have been the original
* creator of the attachment. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.delete)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param string $attachmentId Required. Identifier of the attachment.
* @param array $optParams Optional parameters.
*
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $itemId, $attachmentId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns an add-on attachment. Requires the add-on requesting the attachment
* to be the original creator of the attachment. This method returns the
* following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (addOnAttachments.get)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param string $attachmentId Required. Identifier of the attachment.
* @param array $optParams Optional parameters.
*
* @opt_param string postId Optional. Deprecated, use `item_id` instead.
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function get($courseId, $itemId, $attachmentId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], AddOnAttachment::class);
}
/**
* Returns all attachments created by an add-on under the post. Requires the
* add-on to have active attachments on the post or have permission to create
* new attachments on the post. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.listCoursesCourseWorkMaterialsAddOnAttachments)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` whose attachments should be enumerated. This field is
* required, but is not marked as such while we are migrating from post_id.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of attachments to return. The
* service may return fewer than this value. If unspecified, at most 20
* attachments will be returned. The maximum value is 20; values above 20 will
* be coerced to 20.
* @opt_param string pageToken A page token, received from a previous
* `ListAddOnAttachments` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListAddOnAttachments` must
* match the call that provided the page token.
* @opt_param string postId Optional. Identifier of the post under the course
* whose attachments to enumerate. Deprecated, use `item_id` instead.
* @return ListAddOnAttachmentsResponse
* @throws \Google\Service\Exception
*/
public function listCoursesCourseWorkMaterialsAddOnAttachments($courseId, $itemId, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListAddOnAttachmentsResponse::class);
}
/**
* Updates an add-on attachment. Requires the add-on to have been the original
* creator of the attachment. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.patch)
*
* @param string $courseId Required. Identifier of the course.
* @param string $itemId Identifier of the post under which the attachment is
* attached.
* @param string $attachmentId Required. Identifier of the attachment.
* @param AddOnAttachment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string postId Required. Identifier of the post under which the
* attachment is attached.
* @opt_param string updateMask Required. Mask that identifies which fields on
* the attachment to update. The update fails if invalid fields are specified.
* If a field supports empty values, it can be cleared by specifying it in the
* update mask and not in the `AddOnAttachment` object. If a field that does not
* support empty values is included in the update mask and not set in the
* `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The
* following fields may be specified by teachers: * `title` * `teacher_view_uri`
* * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` *
* `max_points`
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function patch($courseId, $itemId, $attachmentId, AddOnAttachment $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'itemId' => $itemId, 'attachmentId' => $attachmentId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], AddOnAttachment::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesCourseWorkMaterialsAddOnAttachments::class, 'Google_Service_Classroom_Resource_CoursesCourseWorkMaterialsAddOnAttachments');

View File

@@ -0,0 +1,188 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListRubricsResponse;
use Google\Service\Classroom\Rubric;
/**
* The "rubrics" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $rubrics = $classroomService->courses_courseWork_rubrics;
* </code>
*/
class CoursesCourseWorkRubrics extends \Google\Service\Resource
{
/**
* Creates a rubric. The requesting user and course owner must have rubrics
* creation capabilities. For details, see [licensing requirements](https://deve
* lopers.google.com/classroom/rubrics/limitations#license-requirements). For
* further details, see [Rubrics structure and known
* limitations](/classroom/rubrics/limitations). This request must be made by
* the Google Cloud console of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* parent course work item. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user isn't permitted to create rubrics
* for course work in the requested course. * `INTERNAL` if the request has
* insufficient OAuth scopes. * `INVALID_ARGUMENT` if the request is malformed
* and for the following request error: * `RubricCriteriaInvalidFormat` *
* `NOT_FOUND` if the requested course or course work don't exist or the user
* doesn't have access to the course or course work. * `FAILED_PRECONDITION` for
* the following request error: * `AttachmentNotVisible` (rubrics.create)
*
* @param string $courseId Required. Identifier of the course.
* @param string $courseWorkId Required. Identifier of the course work.
* @param Rubric $postBody
* @param array $optParams Optional parameters.
* @return Rubric
* @throws \Google\Service\Exception
*/
public function create($courseId, $courseWorkId, Rubric $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Rubric::class);
}
/**
* Deletes a rubric. The requesting user and course owner must have rubrics
* creation capabilities. For details, see [licensing requirements](https://deve
* lopers.google.com/classroom/rubrics/limitations#license-requirements). This
* request must be made by the Google Cloud console of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* corresponding rubric. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting developer project didn't create the
* corresponding rubric, or if the requesting user isn't permitted to delete the
* requested rubric. * `NOT_FOUND` if no rubric exists with the requested ID or
* the user does not have access to the course, course work, or rubric. *
* `INVALID_ARGUMENT` if grading has already started on the rubric.
* (rubrics.delete)
*
* @param string $courseId Required. Identifier of the course.
* @param string $courseWorkId Required. Identifier of the course work.
* @param string $id Required. Identifier of the rubric.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $courseWorkId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns a rubric. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if the requested course, course work, or rubric
* doesn't exist or if the user doesn't have access to the corresponding course
* work. (rubrics.get)
*
* @param string $courseId Required. Identifier of the course.
* @param string $courseWorkId Required. Identifier of the course work.
* @param string $id Required. Identifier of the rubric.
* @param array $optParams Optional parameters.
* @return Rubric
* @throws \Google\Service\Exception
*/
public function get($courseId, $courseWorkId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Rubric::class);
}
/**
* Returns a list of rubrics that the requester is permitted to view. This
* method returns the following error codes: * `PERMISSION_DENIED` for access
* errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if
* the requested course or course work doesn't exist or if the user doesn't have
* access to the corresponding course work.
* (rubrics.listCoursesCourseWorkRubrics)
*
* @param string $courseId Required. Identifier of the course.
* @param string $courseWorkId Required. Identifier of the course work.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of rubrics to return. If
* unspecified, at most 1 rubric is returned. The maximum value is 1; values
* above 1 are coerced to 1.
* @opt_param string 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.
* @return ListRubricsResponse
* @throws \Google\Service\Exception
*/
public function listCoursesCourseWorkRubrics($courseId, $courseWorkId, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListRubricsResponse::class);
}
/**
* Updates a rubric. See google.classroom.v1.Rubric for details of which fields
* can be updated. Rubric update capabilities are
* [limited](/classroom/rubrics/limitations) once grading has started. The
* requesting user and course owner must have rubrics creation capabilities. For
* details, see [licensing requirements](https://developers.google.com/classroom
* /rubrics/limitations#license-requirements). This request must be made by the
* Google Cloud console of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* parent course work item. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting developer project didn't create the
* corresponding course work, if the user isn't permitted to make the requested
* modification to the rubric, or for access errors. This error code is also
* returned if grading has already started on the rubric. * `INVALID_ARGUMENT`
* if the request is malformed and for the following request error: *
* `RubricCriteriaInvalidFormat` * `NOT_FOUND` if the requested course, course
* work, or rubric doesn't exist or if the user doesn't have access to the
* corresponding course work. * `INTERNAL` if grading has already started on the
* rubric. (rubrics.patch)
*
* @param string $courseId Required. Identifier of the course.
* @param string $courseWorkId Required. Identifier of the course work.
* @param string $id Optional. Identifier of the rubric.
* @param Rubric $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Optional. Mask that identifies which fields on
* the rubric to update. This field is required to do an update. The update
* fails if invalid fields are specified. There are multiple options to define
* the criteria of a rubric: the `source_spreadsheet_id` and the `criteria`
* list. Only one of these can be used at a time to define a rubric. The rubric
* `criteria` list is fully replaced by the rubric criteria specified in the
* update request. For example, if a criterion or level is missing from the
* request, it is deleted. New criteria and levels are added and an ID is
* assigned. Existing criteria and levels retain the previously assigned ID if
* the ID is specified in the request. The following fields can be specified by
* teachers: * `criteria` * `source_spreadsheet_id`
* @return Rubric
* @throws \Google\Service\Exception
*/
public function patch($courseId, $courseWorkId, $id, Rubric $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Rubric::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesCourseWorkRubrics::class, 'Google_Service_Classroom_Resource_CoursesCourseWorkRubrics');

View File

@@ -0,0 +1,260 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListStudentSubmissionsResponse;
use Google\Service\Classroom\ModifyAttachmentsRequest;
use Google\Service\Classroom\ReclaimStudentSubmissionRequest;
use Google\Service\Classroom\ReturnStudentSubmissionRequest;
use Google\Service\Classroom\StudentSubmission;
use Google\Service\Classroom\TurnInStudentSubmissionRequest;
/**
* The "studentSubmissions" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $studentSubmissions = $classroomService->courses_courseWork_studentSubmissions;
* </code>
*/
class CoursesCourseWorkStudentSubmissions extends \Google\Service\Resource
{
/**
* Returns a student submission. * `PERMISSION_DENIED` if the requesting user is
* not permitted to access the requested course, course work, or student
* submission or for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if the requested course, course work, or student
* submission does not exist. (studentSubmissions.get)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $courseWorkId Identifier of the course work.
* @param string $id Identifier of the student submission.
* @param array $optParams Optional parameters.
* @return StudentSubmission
* @throws \Google\Service\Exception
*/
public function get($courseId, $courseWorkId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], StudentSubmission::class);
}
/**
* Returns a list of student submissions that the requester is permitted to
* view, factoring in the OAuth scopes of the request. `-` may be specified as
* the `course_work_id` to include student submissions for multiple course work
* items. Course students may only view their own work. Course teachers and
* domain administrators may view all student submissions. This method returns
* the following error codes: * `PERMISSION_DENIED` if the requesting user is
* not permitted to access the requested course or course work, or for access
* errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if
* the requested course does not exist.
* (studentSubmissions.listCoursesCourseWorkStudentSubmissions)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $courseWorkId Identifier of the student work to request. This
* may be set to the string literal `"-"` to request student work for all course
* work in the specified course.
* @param array $optParams Optional parameters.
*
* @opt_param string late Requested lateness value. If specified, returned
* student submissions are restricted by the requested value. If unspecified,
* submissions are returned regardless of `late` value.
* @opt_param int 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.
* @opt_param string 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.
* @opt_param string states Requested submission states. If specified, returned
* student submissions match one of the specified submission states.
* @opt_param string userId Optional argument to restrict returned student work
* to those owned by the 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
* @return ListStudentSubmissionsResponse
* @throws \Google\Service\Exception
*/
public function listCoursesCourseWorkStudentSubmissions($courseId, $courseWorkId, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListStudentSubmissionsResponse::class);
}
/**
* Modifies attachments of student submission. Attachments may only be added to
* student submissions belonging to course work objects with a `workType` of
* `ASSIGNMENT`. This request must be made by the Developer Console project of
* the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used
* to create the corresponding course work item. This method returns the
* following error codes: * `PERMISSION_DENIED` if the requesting user is not
* permitted to access the requested course or course work, if the user is not
* permitted to modify attachments on the requested student submission, or for
* access errors. * `INVALID_ARGUMENT` if the request is malformed. *
* `NOT_FOUND` if the requested course, course work, or student submission does
* not exist. (studentSubmissions.modifyAttachments)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $courseWorkId Identifier of the course work.
* @param string $id Identifier of the student submission.
* @param ModifyAttachmentsRequest $postBody
* @param array $optParams Optional parameters.
* @return StudentSubmission
* @throws \Google\Service\Exception
*/
public function modifyAttachments($courseId, $courseWorkId, $id, ModifyAttachmentsRequest $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('modifyAttachments', [$params], StudentSubmission::class);
}
/**
* Updates one or more fields of a student submission. See
* google.classroom.v1.StudentSubmission for details of which fields may be
* updated and who may change them. This request must be made by the Developer
* Console project of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* corresponding course work item. This method returns the following error
* codes: * `PERMISSION_DENIED` if the requesting developer project did not
* create the corresponding course work, if the user is not permitted to make
* the requested modification to the student submission, or for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
* requested course, course work, or student submission does not exist.
* (studentSubmissions.patch)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $courseWorkId Identifier of the course work.
* @param string $id Identifier of the student submission.
* @param StudentSubmission $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Mask that identifies which fields on the student
* submission to update. This field is required to do an update. The update
* fails if invalid fields are specified. The following fields may be specified
* by teachers: * `draft_grade` * `assigned_grade`
* @return StudentSubmission
* @throws \Google\Service\Exception
*/
public function patch($courseId, $courseWorkId, $id, StudentSubmission $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], StudentSubmission::class);
}
/**
* Reclaims a student submission on behalf of the student that owns it.
* Reclaiming a student submission transfers ownership of attached Drive files
* to the student and updates the submission state. Only the student that owns
* the requested student submission may call this method, and only for a student
* submission that has been turned in. This request must be made by the
* Developer Console project of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* corresponding course work item. This method returns the following error
* codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
* access the requested course or course work, unsubmit the requested student
* submission, or for access errors. * `FAILED_PRECONDITION` if the student
* submission has not been turned in. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if the requested course, course work, or student
* submission does not exist. (studentSubmissions.reclaim)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $courseWorkId Identifier of the course work.
* @param string $id Identifier of the student submission.
* @param ReclaimStudentSubmissionRequest $postBody
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function reclaim($courseId, $courseWorkId, $id, ReclaimStudentSubmissionRequest $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('reclaim', [$params], ClassroomEmpty::class);
}
/**
* Returns a student submission. Returning a student submission transfers
* ownership of attached Drive files to the student and may also update the
* submission state. Unlike the Classroom application, returning a student
* submission does not set assignedGrade to the draftGrade value. Only a teacher
* of the course that contains the requested student submission may call this
* method. This request must be made by the Developer Console project of the
* [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
* create the corresponding course work item. This method returns the following
* error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
* access the requested course or course work, return the requested student
* submission, or for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if the requested course, course work, or student
* submission does not exist.
* (studentSubmissions.returnCoursesCourseWorkStudentSubmissions)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $courseWorkId Identifier of the course work.
* @param string $id Identifier of the student submission.
* @param ReturnStudentSubmissionRequest $postBody
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function returnCoursesCourseWorkStudentSubmissions($courseId, $courseWorkId, $id, ReturnStudentSubmissionRequest $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('return', [$params], ClassroomEmpty::class);
}
/**
* Turns in a student submission. Turning in a student submission transfers
* ownership of attached Drive files to the teacher and may also update the
* submission state. This may only be called by the student that owns the
* specified student submission. This request must be made by the Developer
* Console project of the [OAuth client
* ID](https://support.google.com/cloud/answer/6158849) used to create the
* corresponding course work item. This method returns the following error
* codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
* access the requested course or course work, turn in the requested student
* submission, or for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if the requested course, course work, or student
* submission does not exist. (studentSubmissions.turnIn)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $courseWorkId Identifier of the course work.
* @param string $id Identifier of the student submission.
* @param TurnInStudentSubmissionRequest $postBody
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function turnIn($courseId, $courseWorkId, $id, TurnInStudentSubmissionRequest $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'courseWorkId' => $courseWorkId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('turnIn', [$params], ClassroomEmpty::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesCourseWorkStudentSubmissions::class, 'Google_Service_Classroom_Resource_CoursesCourseWorkStudentSubmissions');

View File

@@ -0,0 +1,72 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnContext;
/**
* The "posts" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $posts = $classroomService->courses_posts;
* </code>
*/
class CoursesPosts extends \Google\Service\Resource
{
/**
* Gets metadata for Classroom add-ons in the context of a specific post. To
* maintain the integrity of its own data and permissions model, an add-on
* should call this to validate query parameters and the requesting user's role
* whenever the add-on is opened in an
* [iframe](https://developers.google.com/classroom/add-ons/get-
* started/iframes/iframes-overview). This method returns the following error
* codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the
* request is malformed. * `NOT_FOUND` if one of the identified resources does
* not exist. (posts.getAddOnContext)
*
* @param string $courseId Required. Identifier of the course.
* @param string $postId Optional. Deprecated, use `item_id` instead.
* @param array $optParams Optional parameters.
*
* @opt_param string addOnToken Optional. Token that authorizes the request. The
* token is passed as a query parameter when the user is redirected from
* Classroom to the add-on's URL. The authorization token is required when
* neither of the following is true: * The add-on has attachments on the post. *
* The developer project issuing the request is the same project that created
* the post.
* @opt_param string attachmentId Optional. The identifier of the attachment.
* This field is required for all requests except when the user is in the
* [Attachment Discovery iframe](https://developers.google.com/classroom/add-
* ons/get-started/iframes/attachment-discovery-iframe).
* @opt_param string itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @return AddOnContext
* @throws \Google\Service\Exception
*/
public function getAddOnContext($courseId, $postId, $optParams = [])
{
$params = ['courseId' => $courseId, 'postId' => $postId];
$params = array_merge($params, $optParams);
return $this->call('getAddOnContext', [$params], AddOnContext::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesPosts::class, 'Google_Service_Classroom_Resource_CoursesPosts');

View File

@@ -0,0 +1,183 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnAttachment;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListAddOnAttachmentsResponse;
/**
* The "addOnAttachments" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $addOnAttachments = $classroomService->courses_posts_addOnAttachments;
* </code>
*/
class CoursesPostsAddOnAttachments extends \Google\Service\Resource
{
/**
* Creates an add-on attachment under a post. Requires the add-on to have
* permission to create new attachments on the post. This method returns the
* following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (addOnAttachments.create)
*
* @param string $courseId Required. Identifier of the course.
* @param string $postId Optional. Deprecated, use `item_id` instead.
* @param AddOnAttachment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string addOnToken Optional. Token that authorizes the request. The
* token is passed as a query parameter when the user is redirected from
* Classroom to the add-on's URL. This authorization token is required for in-
* Classroom attachment creation but optional for partner-first attachment
* creation. Returns an error if not provided for partner-first attachment
* creation and the developer projects that created the attachment and its
* parent stream item do not match.
* @opt_param string itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which to create the attachment. This field is
* required, but is not marked as such while we are migrating from post_id.
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function create($courseId, $postId, AddOnAttachment $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postId' => $postId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], AddOnAttachment::class);
}
/**
* Deletes an add-on attachment. Requires the add-on to have been the original
* creator of the attachment. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.delete)
*
* @param string $courseId Required. Identifier of the course.
* @param string $postId Optional. Deprecated, use `item_id` instead.
* @param string $attachmentId Required. Identifier of the attachment.
* @param array $optParams Optional parameters.
*
* @opt_param string itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $postId, $attachmentId, $optParams = [])
{
$params = ['courseId' => $courseId, 'postId' => $postId, 'attachmentId' => $attachmentId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns an add-on attachment. Requires the add-on requesting the attachment
* to be the original creator of the attachment. This method returns the
* following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (addOnAttachments.get)
*
* @param string $courseId Required. Identifier of the course.
* @param string $postId Optional. Deprecated, use `item_id` instead.
* @param string $attachmentId Required. Identifier of the attachment.
* @param array $optParams Optional parameters.
*
* @opt_param string itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function get($courseId, $postId, $attachmentId, $optParams = [])
{
$params = ['courseId' => $courseId, 'postId' => $postId, 'attachmentId' => $attachmentId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], AddOnAttachment::class);
}
/**
* Returns all attachments created by an add-on under the post. Requires the
* add-on to have active attachments on the post or have permission to create
* new attachments on the post. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.listCoursesPostsAddOnAttachments)
*
* @param string $courseId Required. Identifier of the course.
* @param string $postId Optional. Identifier of the post under the course whose
* attachments to enumerate. Deprecated, use `item_id` instead.
* @param array $optParams Optional parameters.
*
* @opt_param string itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` whose attachments should be enumerated. This field is
* required, but is not marked as such while we are migrating from post_id.
* @opt_param int pageSize The maximum number of attachments to return. The
* service may return fewer than this value. If unspecified, at most 20
* attachments will be returned. The maximum value is 20; values above 20 will
* be coerced to 20.
* @opt_param string pageToken A page token, received from a previous
* `ListAddOnAttachments` call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListAddOnAttachments` must
* match the call that provided the page token.
* @return ListAddOnAttachmentsResponse
* @throws \Google\Service\Exception
*/
public function listCoursesPostsAddOnAttachments($courseId, $postId, $optParams = [])
{
$params = ['courseId' => $courseId, 'postId' => $postId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListAddOnAttachmentsResponse::class);
}
/**
* Updates an add-on attachment. Requires the add-on to have been the original
* creator of the attachment. This method returns the following error codes: *
* `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is
* malformed. * `NOT_FOUND` if one of the identified resources does not exist.
* (addOnAttachments.patch)
*
* @param string $courseId Required. Identifier of the course.
* @param string $postId Required. Identifier of the post under which the
* attachment is attached.
* @param string $attachmentId Required. Identifier of the attachment.
* @param AddOnAttachment $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string itemId Identifier of the post under which the attachment is
* attached.
* @opt_param string updateMask Required. Mask that identifies which fields on
* the attachment to update. The update fails if invalid fields are specified.
* If a field supports empty values, it can be cleared by specifying it in the
* update mask and not in the `AddOnAttachment` object. If a field that does not
* support empty values is included in the update mask and not set in the
* `AddOnAttachment` object, an `INVALID_ARGUMENT` error is returned. The
* following fields may be specified by teachers: * `title` * `teacher_view_uri`
* * `student_view_uri` * `student_work_review_uri` * `due_date` * `due_time` *
* `max_points`
* @return AddOnAttachment
* @throws \Google\Service\Exception
*/
public function patch($courseId, $postId, $attachmentId, AddOnAttachment $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postId' => $postId, 'attachmentId' => $attachmentId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], AddOnAttachment::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesPostsAddOnAttachments::class, 'Google_Service_Classroom_Resource_CoursesPostsAddOnAttachments');

View File

@@ -0,0 +1,91 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\AddOnAttachmentStudentSubmission;
/**
* The "studentSubmissions" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $studentSubmissions = $classroomService->courses_posts_addOnAttachments_studentSubmissions;
* </code>
*/
class CoursesPostsAddOnAttachmentsStudentSubmissions extends \Google\Service\Resource
{
/**
* Returns a student submission for an add-on attachment. This method returns
* the following error codes: * `PERMISSION_DENIED` for access errors. *
* `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the
* identified resources does not exist. (studentSubmissions.get)
*
* @param string $courseId Required. Identifier of the course.
* @param string $postId Optional. Deprecated, use `item_id` instead.
* @param string $attachmentId Required. Identifier of the attachment.
* @param string $submissionId Required. Identifier of the students submission.
* @param array $optParams Optional parameters.
*
* @opt_param string itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @return AddOnAttachmentStudentSubmission
* @throws \Google\Service\Exception
*/
public function get($courseId, $postId, $attachmentId, $submissionId, $optParams = [])
{
$params = ['courseId' => $courseId, 'postId' => $postId, 'attachmentId' => $attachmentId, 'submissionId' => $submissionId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], AddOnAttachmentStudentSubmission::class);
}
/**
* Updates data associated with an add-on attachment submission. Requires the
* add-on to have been the original creator of the attachment and the attachment
* to have a positive `max_points` value set. This method returns the following
* error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if
* the request is malformed. * `NOT_FOUND` if one of the identified resources
* does not exist. (studentSubmissions.patch)
*
* @param string $courseId Required. Identifier of the course.
* @param string $postId Optional. Deprecated, use `item_id` instead.
* @param string $attachmentId Required. Identifier of the attachment.
* @param string $submissionId Required. Identifier of the student's submission.
* @param AddOnAttachmentStudentSubmission $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string itemId Identifier of the `Announcement`, `CourseWork`, or
* `CourseWorkMaterial` under which the attachment is attached. This field is
* required, but is not marked as such while we are migrating from post_id.
* @opt_param string updateMask Required. Mask that identifies which fields on
* the attachment to update. The update fails if invalid fields are specified.
* If a field supports empty values, it can be cleared by specifying it in the
* update mask and not in the `AddOnAttachmentStudentSubmission` object. The
* following fields may be specified by teachers: * `points_earned`
* @return AddOnAttachmentStudentSubmission
* @throws \Google\Service\Exception
*/
public function patch($courseId, $postId, $attachmentId, $submissionId, AddOnAttachmentStudentSubmission $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postId' => $postId, 'attachmentId' => $attachmentId, 'submissionId' => $submissionId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], AddOnAttachmentStudentSubmission::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesPostsAddOnAttachmentsStudentSubmissions::class, 'Google_Service_Classroom_Resource_CoursesPostsAddOnAttachmentsStudentSubmissions');

View File

@@ -0,0 +1,140 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListStudentsResponse;
use Google\Service\Classroom\Student;
/**
* The "students" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $students = $classroomService->courses_students;
* </code>
*/
class CoursesStudents extends \Google\Service\Resource
{
/**
* Adds a user as a student of a course. Domain administrators are permitted to
* [directly add](https://developers.google.com/classroom/guides/manage-users)
* users within their domain as students to courses within their domain.
* Students are permitted to add themselves to a course using an enrollment
* code. This method returns the following error codes: * `PERMISSION_DENIED` if
* the requesting user is not permitted to create students in this course or for
* access errors. * `NOT_FOUND` if the requested course ID does not exist. *
* `FAILED_PRECONDITION` if the requested user's account is disabled, for the
* following request errors: * CourseMemberLimitReached * CourseNotModifiable *
* UserGroupsMembershipLimitReached * InactiveCourseOwner * `ALREADY_EXISTS` if
* the user is already a student or teacher in the course. (students.create)
*
* @param string $courseId Identifier of the course to create the student in.
* This identifier can be either the Classroom-assigned identifier or an alias.
* @param Student $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string enrollmentCode Enrollment code of the course to create the
* student in. This code is required if userId corresponds to the requesting
* user; it may be omitted if the requesting user has administrative permissions
* to create students for any user.
* @return Student
* @throws \Google\Service\Exception
*/
public function create($courseId, Student $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Student::class);
}
/**
* Deletes a student of a course. This method returns the following error codes:
* * `PERMISSION_DENIED` if the requesting user is not permitted to delete
* students of this course or for access errors. * `NOT_FOUND` if no student of
* this course has the requested ID or if the course does not exist.
* (students.delete)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $userId Identifier of the student to delete. 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
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $userId, $optParams = [])
{
$params = ['courseId' => $courseId, 'userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns a student of a course. This method returns the following error codes:
* * `PERMISSION_DENIED` if the requesting user is not permitted to view
* students of this course or for access errors. * `NOT_FOUND` if no student of
* this course has the requested ID or if the course does not exist.
* (students.get)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $userId Identifier of the student to return. 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
* @param array $optParams Optional parameters.
* @return Student
* @throws \Google\Service\Exception
*/
public function get($courseId, $userId, $optParams = [])
{
$params = ['courseId' => $courseId, 'userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Student::class);
}
/**
* Returns a list of students of this course that the requester is permitted to
* view. This method returns the following error codes: * `NOT_FOUND` if the
* course does not exist. * `PERMISSION_DENIED` for access errors.
* (students.listCoursesStudents)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Maximum number of items to return. The default is 30
* if unspecified or `0`. The server may return fewer than the specified number
* of results.
* @opt_param string 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.
* @return ListStudentsResponse
* @throws \Google\Service\Exception
*/
public function listCoursesStudents($courseId, $optParams = [])
{
$params = ['courseId' => $courseId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListStudentsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesStudents::class, 'Google_Service_Classroom_Resource_CoursesStudents');

View File

@@ -0,0 +1,139 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListTeachersResponse;
use Google\Service\Classroom\Teacher;
/**
* The "teachers" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $teachers = $classroomService->courses_teachers;
* </code>
*/
class CoursesTeachers extends \Google\Service\Resource
{
/**
* Creates a teacher of a course. Domain administrators are permitted to
* [directly add](https://developers.google.com/classroom/guides/manage-users)
* users within their domain as teachers to courses within their domain. Non-
* admin users should send an Invitation instead. This method returns the
* following error codes: * `PERMISSION_DENIED` if the requesting user is not
* permitted to create teachers in this course or for access errors. *
* `NOT_FOUND` if the requested course ID does not exist. *
* `FAILED_PRECONDITION` if the requested user's account is disabled, for the
* following request errors: * CourseMemberLimitReached * CourseNotModifiable *
* CourseTeacherLimitReached * UserGroupsMembershipLimitReached *
* InactiveCourseOwner * `ALREADY_EXISTS` if the user is already a teacher or
* student in the course. (teachers.create)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param Teacher $postBody
* @param array $optParams Optional parameters.
* @return Teacher
* @throws \Google\Service\Exception
*/
public function create($courseId, Teacher $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Teacher::class);
}
/**
* Removes the specified teacher from the specified course. This method returns
* the following error codes: * `PERMISSION_DENIED` if the requesting user is
* not permitted to delete teachers of this course or for access errors. *
* `NOT_FOUND` if no teacher of this course has the requested ID or if the
* course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to
* the primary teacher of this course. * `FAILED_PRECONDITION` if the requested
* ID belongs to the owner of the course Drive folder. * `FAILED_PRECONDITION`
* if the course no longer has an active owner. (teachers.delete)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $userId Identifier of the teacher to delete. 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
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $userId, $optParams = [])
{
$params = ['courseId' => $courseId, 'userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns a teacher of a course. This method returns the following error codes:
* * `PERMISSION_DENIED` if the requesting user is not permitted to view
* teachers of this course or for access errors. * `NOT_FOUND` if no teacher of
* this course has the requested ID or if the course does not exist.
* (teachers.get)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $userId Identifier of the teacher to return. 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
* @param array $optParams Optional parameters.
* @return Teacher
* @throws \Google\Service\Exception
*/
public function get($courseId, $userId, $optParams = [])
{
$params = ['courseId' => $courseId, 'userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Teacher::class);
}
/**
* Returns a list of teachers of this course that the requester is permitted to
* view. This method returns the following error codes: * `NOT_FOUND` if the
* course does not exist. * `PERMISSION_DENIED` for access errors.
* (teachers.listCoursesTeachers)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Maximum number of items to return. The default is 30
* if unspecified or `0`. The server may return fewer than the specified number
* of results.
* @opt_param string 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.
* @return ListTeachersResponse
* @throws \Google\Service\Exception
*/
public function listCoursesTeachers($courseId, $optParams = [])
{
$params = ['courseId' => $courseId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListTeachersResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesTeachers::class, 'Google_Service_Classroom_Resource_CoursesTeachers');

View File

@@ -0,0 +1,152 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\ListTopicResponse;
use Google\Service\Classroom\Topic;
/**
* The "topics" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $topics = $classroomService->courses_topics;
* </code>
*/
class CoursesTopics extends \Google\Service\Resource
{
/**
* Creates a topic. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not permitted to access the
* requested course, create a topic in the requested course, or for access
* errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if
* the requested course does not exist. (topics.create)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param Topic $postBody
* @param array $optParams Optional parameters.
* @return Topic
* @throws \Google\Service\Exception
*/
public function create($courseId, Topic $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Topic::class);
}
/**
* Deletes a topic. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not allowed to delete the
* requested topic or for access errors. * `FAILED_PRECONDITION` if the
* requested topic has already been deleted. * `NOT_FOUND` if no course or topic
* exists with the requested ID. (topics.delete)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the topic to delete.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($courseId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns a topic. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not permitted to access the
* requested course or topic, or for access errors. * `INVALID_ARGUMENT` if the
* request is malformed. * `NOT_FOUND` if the requested course or topic does not
* exist. (topics.get)
*
* @param string $courseId Identifier of the course.
* @param string $id Identifier of the topic.
* @param array $optParams Optional parameters.
* @return Topic
* @throws \Google\Service\Exception
*/
public function get($courseId, $id, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Topic::class);
}
/**
* Returns the list of topics that the requester is permitted to view. 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. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if
* the requested course does not exist. (topics.listCoursesTopics)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param array $optParams Optional parameters.
*
* @opt_param int 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.
* @opt_param string 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.
* @return ListTopicResponse
* @throws \Google\Service\Exception
*/
public function listCoursesTopics($courseId, $optParams = [])
{
$params = ['courseId' => $courseId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListTopicResponse::class);
}
/**
* Updates one or more fields of a topic. This method returns the following
* error codes: * `PERMISSION_DENIED` if the requesting developer project did
* not create the corresponding topic or for access errors. * `INVALID_ARGUMENT`
* if the request is malformed. * `NOT_FOUND` if the requested course or topic
* does not exist (topics.patch)
*
* @param string $courseId Identifier of the course. This identifier can be
* either the Classroom-assigned identifier or an alias.
* @param string $id Identifier of the topic.
* @param Topic $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Mask that identifies which fields on the topic
* to update. This field is required to do an update. The update fails if
* invalid fields are specified. If a field supports empty values, it can be
* cleared by specifying it in the update mask and not in the Topic object. If a
* field that does not support empty values is included in the update mask and
* not set in the Topic object, an `INVALID_ARGUMENT` error is returned. The
* following fields may be specified: * `name`
* @return Topic
* @throws \Google\Service\Exception
*/
public function patch($courseId, $id, Topic $postBody, $optParams = [])
{
$params = ['courseId' => $courseId, 'id' => $id, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], Topic::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CoursesTopics::class, 'Google_Service_Classroom_Resource_CoursesTopics');

View File

@@ -0,0 +1,147 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\Invitation;
use Google\Service\Classroom\ListInvitationsResponse;
/**
* The "invitations" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $invitations = $classroomService->invitations;
* </code>
*/
class Invitations extends \Google\Service\Resource
{
/**
* Accepts an invitation, removing it and adding the invited user to the
* teachers or students (as appropriate) of the specified course. Only the
* invited user may accept an invitation. This method returns the following
* error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
* accept the requested invitation or for access errors. * `FAILED_PRECONDITION`
* for the following request errors: * CourseMemberLimitReached *
* CourseNotModifiable * CourseTeacherLimitReached *
* UserGroupsMembershipLimitReached * `NOT_FOUND` if no invitation exists with
* the requested ID. (invitations.accept)
*
* @param string $id Identifier of the invitation to accept.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function accept($id, $optParams = [])
{
$params = ['id' => $id];
$params = array_merge($params, $optParams);
return $this->call('accept', [$params], ClassroomEmpty::class);
}
/**
* Creates an invitation. Only one invitation for a user and course may exist at
* a time. Delete and re-create an invitation to make changes. This method
* returns the following error codes: * `PERMISSION_DENIED` if the requesting
* user is not permitted to create invitations for this course or for access
* errors. * `NOT_FOUND` if the course or the user does not exist. *
* `FAILED_PRECONDITION`: * if the requested user's account is disabled. * if
* the user already has this role or a role with greater permissions. * for the
* following request errors: * IneligibleOwner * `ALREADY_EXISTS` if an
* invitation for the specified user and course already exists.
* (invitations.create)
*
* @param Invitation $postBody
* @param array $optParams Optional parameters.
* @return Invitation
* @throws \Google\Service\Exception
*/
public function create(Invitation $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Invitation::class);
}
/**
* Deletes an invitation. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not permitted to delete the
* requested invitation or for access errors. * `NOT_FOUND` if no invitation
* exists with the requested ID. (invitations.delete)
*
* @param string $id Identifier of the invitation to delete.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($id, $optParams = [])
{
$params = ['id' => $id];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns an invitation. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not permitted to view the
* requested invitation or for access errors. * `NOT_FOUND` if no invitation
* exists with the requested ID. (invitations.get)
*
* @param string $id Identifier of the invitation to return.
* @param array $optParams Optional parameters.
* @return Invitation
* @throws \Google\Service\Exception
*/
public function get($id, $optParams = [])
{
$params = ['id' => $id];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Invitation::class);
}
/**
* Returns a list of invitations that the requesting user is permitted to view,
* restricted to those that match the list request. *Note:* At least one of
* `user_id` or `course_id` must be supplied. Both fields can be supplied. This
* method returns the following error codes: * `PERMISSION_DENIED` for access
* errors. (invitations.listInvitations)
*
* @param array $optParams Optional parameters.
*
* @opt_param string courseId Restricts returned invitations to those for a
* course with the specified identifier.
* @opt_param int pageSize Maximum number of items to return. The default is 500
* if unspecified or `0`. The server may return fewer than the specified number
* of results.
* @opt_param string 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.
* @opt_param string userId Restricts returned invitations to those for a
* specific user. 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
* @return ListInvitationsResponse
* @throws \Google\Service\Exception
*/
public function listInvitations($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListInvitationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Invitations::class, 'Google_Service_Classroom_Resource_Invitations');

View File

@@ -0,0 +1,87 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\Registration;
/**
* The "registrations" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $registrations = $classroomService->registrations;
* </code>
*/
class Registrations extends \Google\Service\Resource
{
/**
* Creates a `Registration`, causing Classroom to start sending notifications
* from the provided `feed` to the destination provided in `cloudPubSubTopic`.
* Returns the created `Registration`. Currently, this will be the same as the
* argument, but with server-assigned fields such as `expiry_time` and `id`
* filled in. Note that any value specified for the `expiry_time` or `id` fields
* will be ignored. While Classroom may validate the `cloudPubSubTopic` and
* return errors on a best effort basis, it is the caller's responsibility to
* ensure that it exists and that Classroom has permission to publish to it.
* This method may return the following error codes: * `PERMISSION_DENIED` if: *
* the authenticated user does not have permission to receive notifications from
* the requested field; or * the current user has not granted access to the
* current Cloud project with the appropriate scope for the requested feed. Note
* that domain-wide delegation of authority is not currently supported for this
* purpose. If the request has the appropriate scope, but no grant exists, a
* Request Errors is returned. * another access error is encountered. *
* `INVALID_ARGUMENT` if: * no `cloudPubsubTopic` is specified, or the specified
* `cloudPubsubTopic` is not valid; or * no `feed` is specified, or the
* specified `feed` is not valid. * `NOT_FOUND` if: * the specified `feed`
* cannot be located, or the requesting user does not have permission to
* determine whether or not it exists; or * the specified `cloudPubsubTopic`
* cannot be located, or Classroom has not been granted permission to publish to
* it. (registrations.create)
*
* @param Registration $postBody
* @param array $optParams Optional parameters.
* @return Registration
* @throws \Google\Service\Exception
*/
public function create(Registration $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Registration::class);
}
/**
* Deletes a `Registration`, causing Classroom to stop sending notifications for
* that `Registration`. (registrations.delete)
*
* @param string $registrationId The `registration_id` of the `Registration` to
* be deleted.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($registrationId, $optParams = [])
{
$params = ['registrationId' => $registrationId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Registrations::class, 'Google_Service_Classroom_Resource_Registrations');

View File

@@ -0,0 +1,55 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\UserProfile;
/**
* The "userProfiles" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $userProfiles = $classroomService->userProfiles;
* </code>
*/
class UserProfiles extends \Google\Service\Resource
{
/**
* Returns a user profile. This method returns the following error codes: *
* `PERMISSION_DENIED` if the requesting user is not permitted to access this
* user profile, if no profile exists with the requested ID, or for access
* errors. (userProfiles.get)
*
* @param string $userId Identifier of the profile to return. 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
* @param array $optParams Optional parameters.
* @return UserProfile
* @throws \Google\Service\Exception
*/
public function get($userId, $optParams = [])
{
$params = ['userId' => $userId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], UserProfile::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UserProfiles::class, 'Google_Service_Classroom_Resource_UserProfiles');

View File

@@ -0,0 +1,178 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\GuardianInvitation;
use Google\Service\Classroom\ListGuardianInvitationsResponse;
/**
* The "guardianInvitations" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $guardianInvitations = $classroomService->userProfiles_guardianInvitations;
* </code>
*/
class UserProfilesGuardianInvitations extends \Google\Service\Resource
{
/**
* Creates a guardian invitation, and sends an email to the guardian asking them
* to confirm that they are the student's guardian. Once the guardian accepts
* the invitation, their `state` will change to `COMPLETED` and they will start
* receiving guardian notifications. A `Guardian` resource will also be created
* to represent the active guardian. The request object must have the
* `student_id` and `invited_email_address` fields set. Failing to set these
* fields, or setting any other fields in the request, will result in an error.
* This method returns the following error codes: * `PERMISSION_DENIED` if the
* current user does not have permission to manage guardians, if the guardian in
* question has already rejected too many requests for that student, if
* guardians are not enabled for the domain in question, or for other access
* errors. * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the
* guardian link limit. * `INVALID_ARGUMENT` if the guardian email address is
* not valid (for example, if it is too long), or if the format of the student
* ID provided cannot be recognized (it is not an email address, nor a `user_id`
* from this API). This error will also be returned if read-only fields are set,
* or if the `state` field is set to to a value other than `PENDING`. *
* `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom
* has no record of that student. * `ALREADY_EXISTS` if there is already a
* pending guardian invitation for the student and `invited_email_address`
* provided, or if the provided `invited_email_address` matches the Google
* account of an existing `Guardian` for this user. (guardianInvitations.create)
*
* @param string $studentId ID of the student (in standard format)
* @param GuardianInvitation $postBody
* @param array $optParams Optional parameters.
* @return GuardianInvitation
* @throws \Google\Service\Exception
*/
public function create($studentId, GuardianInvitation $postBody, $optParams = [])
{
$params = ['studentId' => $studentId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GuardianInvitation::class);
}
/**
* Returns a specific guardian invitation. This method returns the following
* error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
* view guardian invitations for the student identified by the `student_id`, if
* guardians are not enabled for the domain in question, or for other access
* errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
* cannot be recognized (it is not an email address, nor a `student_id` from the
* API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any
* record of the given student or `invitation_id`. May also be returned if the
* student exists, but the requesting user does not have access to see that
* student. (guardianInvitations.get)
*
* @param string $studentId The ID of the student whose guardian invitation is
* being requested.
* @param string $invitationId The `id` field of the `GuardianInvitation` being
* requested.
* @param array $optParams Optional parameters.
* @return GuardianInvitation
* @throws \Google\Service\Exception
*/
public function get($studentId, $invitationId, $optParams = [])
{
$params = ['studentId' => $studentId, 'invitationId' => $invitationId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GuardianInvitation::class);
}
/**
* Returns a list of guardian invitations that the requesting user is permitted
* to view, filtered by the parameters provided. This method returns the
* following error codes: * `PERMISSION_DENIED` if a `student_id` is specified,
* and the requesting user is not permitted to view guardian invitations for
* that student, if `"-"` is specified as the `student_id` and the user is not a
* domain administrator, if guardians are not enabled for the domain in
* question, or for other access errors. * `INVALID_ARGUMENT` if a `student_id`
* is specified, but its format cannot be recognized (it is not an email
* address, nor a `student_id` from the API, nor the literal string `me`). May
* also be returned if an invalid `page_token` or `state` is provided. *
* `NOT_FOUND` if a `student_id` is specified, and its format can be recognized,
* but Classroom has no record of that student.
* (guardianInvitations.listUserProfilesGuardianInvitations)
*
* @param string $studentId The ID of the student whose guardian invitations are
* to be returned. 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 * the string literal `"-"`, indicating
* that results should be returned for all students that the requesting user is
* permitted to view guardian invitations.
* @param array $optParams Optional parameters.
*
* @opt_param string invitedEmailAddress If specified, only results with the
* specified `invited_email_address` are returned.
* @opt_param int 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.
* @opt_param string 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.
* @opt_param string states If specified, only results with the specified
* `state` values are returned. Otherwise, results with a `state` of `PENDING`
* are returned.
* @return ListGuardianInvitationsResponse
* @throws \Google\Service\Exception
*/
public function listUserProfilesGuardianInvitations($studentId, $optParams = [])
{
$params = ['studentId' => $studentId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListGuardianInvitationsResponse::class);
}
/**
* Modifies a guardian invitation. Currently, the only valid modification is to
* change the `state` from `PENDING` to `COMPLETE`. This has the effect of
* withdrawing the invitation. This method returns the following error codes: *
* `PERMISSION_DENIED` if the current user does not have permission to manage
* guardians, if guardians are not enabled for the domain in question or for
* other access errors. * `FAILED_PRECONDITION` if the guardian link is not in
* the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID
* provided cannot be recognized (it is not an email address, nor a `user_id`
* from this API), or if the passed `GuardianInvitation` has a `state` other
* than `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND`
* if the student ID provided is a valid student ID, but Classroom has no record
* of that student, or if the `id` field does not refer to a guardian invitation
* known to Classroom. (guardianInvitations.patch)
*
* @param string $studentId The ID of the student whose guardian invitation is
* to be modified.
* @param string $invitationId The `id` field of the `GuardianInvitation` to be
* modified.
* @param GuardianInvitation $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask Mask that identifies which fields on the course
* to update. This field is required to do an update. The update fails if
* invalid fields are specified. The following fields are valid: * `state` When
* set in a query parameter, this field should be specified as
* `updateMask=,,...`
* @return GuardianInvitation
* @throws \Google\Service\Exception
*/
public function patch($studentId, $invitationId, GuardianInvitation $postBody, $optParams = [])
{
$params = ['studentId' => $studentId, 'invitationId' => $invitationId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], GuardianInvitation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UserProfilesGuardianInvitations::class, 'Google_Service_Classroom_Resource_UserProfilesGuardianInvitations');

View File

@@ -0,0 +1,136 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom\Resource;
use Google\Service\Classroom\ClassroomEmpty;
use Google\Service\Classroom\Guardian;
use Google\Service\Classroom\ListGuardiansResponse;
/**
* The "guardians" collection of methods.
* Typical usage is:
* <code>
* $classroomService = new Google\Service\Classroom(...);
* $guardians = $classroomService->userProfiles_guardians;
* </code>
*/
class UserProfilesGuardians extends \Google\Service\Resource
{
/**
* Deletes a guardian. The guardian will no longer receive guardian
* notifications and the guardian will no longer be accessible via the API. This
* method returns the following error codes: * `PERMISSION_DENIED` if no user
* that matches the provided `student_id` is visible to the requesting user, if
* the requesting user is not permitted to manage guardians for the student
* identified by the `student_id`, if guardians are not enabled for the domain
* in question, or for other access errors. * `INVALID_ARGUMENT` if a
* `student_id` is specified, but its format cannot be recognized (it is not an
* email address, nor a `student_id` from the API). * `NOT_FOUND` if the
* requesting user is permitted to modify guardians for the requested
* `student_id`, but no `Guardian` record exists for that student with the
* provided `guardian_id`. (guardians.delete)
*
* @param string $studentId The student whose guardian is to be deleted. One of
* the following: * the numeric identifier for the user * the email address of
* the user * the string literal `"me"`, indicating the requesting user
* @param string $guardianId The `id` field from a `Guardian`.
* @param array $optParams Optional parameters.
* @return ClassroomEmpty
* @throws \Google\Service\Exception
*/
public function delete($studentId, $guardianId, $optParams = [])
{
$params = ['studentId' => $studentId, 'guardianId' => $guardianId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], ClassroomEmpty::class);
}
/**
* Returns a specific guardian. This method returns the following error codes: *
* `PERMISSION_DENIED` if no user that matches the provided `student_id` is
* visible to the requesting user, if the requesting user is not permitted to
* view guardian information for the student identified by the `student_id`, if
* guardians are not enabled for the domain in question, or for other access
* errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
* cannot be recognized (it is not an email address, nor a `student_id` from the
* API, nor the literal string `me`). * `NOT_FOUND` if the requesting user is
* permitted to view guardians for the requested `student_id`, but no `Guardian`
* record exists for that student that matches the provided `guardian_id`.
* (guardians.get)
*
* @param string $studentId The student whose guardian is being requested. One
* of the following: * the numeric identifier for the user * the email address
* of the user * the string literal `"me"`, indicating the requesting user
* @param string $guardianId The `id` field from a `Guardian`.
* @param array $optParams Optional parameters.
* @return Guardian
* @throws \Google\Service\Exception
*/
public function get($studentId, $guardianId, $optParams = [])
{
$params = ['studentId' => $studentId, 'guardianId' => $guardianId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Guardian::class);
}
/**
* Returns a list of guardians that the requesting user is permitted to view,
* restricted to those that match the request. To list guardians for any student
* that the requesting user may view guardians for, use the literal character
* `-` for the student ID. This method returns the following error codes: *
* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting user
* is not permitted to view guardian information for that student, if `"-"` is
* specified as the `student_id` and the user is not a domain administrator, if
* guardians are not enabled for the domain in question, if the
* `invited_email_address` filter is set by a user who is not a domain
* administrator, or for other access errors. * `INVALID_ARGUMENT` if a
* `student_id` is specified, but its format cannot be recognized (it is not an
* email address, nor a `student_id` from the API, nor the literal string `me`).
* May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if
* a `student_id` is specified, and its format can be recognized, but Classroom
* has no record of that student. (guardians.listUserProfilesGuardians)
*
* @param string $studentId Filter results by the student who the guardian is
* linked to. 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 * the string literal `"-"`, indicating
* that results should be returned for all students that the requesting user has
* access to view.
* @param array $optParams Optional parameters.
*
* @opt_param string invitedEmailAddress Filter results by the email address
* that the original invitation was sent to, resulting in this guardian link.
* This filter can only be used by domain administrators.
* @opt_param int 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.
* @opt_param string 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.
* @return ListGuardiansResponse
* @throws \Google\Service\Exception
*/
public function listUserProfilesGuardians($studentId, $optParams = [])
{
$params = ['studentId' => $studentId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListGuardiansResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UserProfilesGuardians::class, 'Google_Service_Classroom_Resource_UserProfilesGuardians');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ReturnStudentSubmissionRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReturnStudentSubmissionRequest::class, 'Google_Service_Classroom_ReturnStudentSubmissionRequest');

View File

@@ -0,0 +1,151 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Rubric extends \Google\Collection
{
protected $collection_key = 'criteria';
/**
* @var string
*/
public $courseId;
/**
* @var string
*/
public $courseWorkId;
/**
* @var string
*/
public $creationTime;
protected $criteriaType = Criterion::class;
protected $criteriaDataType = 'array';
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $sourceSpreadsheetId;
/**
* @var string
*/
public $updateTime;
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param string
*/
public function setCourseWorkId($courseWorkId)
{
$this->courseWorkId = $courseWorkId;
}
/**
* @return string
*/
public function getCourseWorkId()
{
return $this->courseWorkId;
}
/**
* @param string
*/
public function setCreationTime($creationTime)
{
$this->creationTime = $creationTime;
}
/**
* @return string
*/
public function getCreationTime()
{
return $this->creationTime;
}
/**
* @param Criterion[]
*/
public function setCriteria($criteria)
{
$this->criteria = $criteria;
}
/**
* @return Criterion[]
*/
public function getCriteria()
{
return $this->criteria;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setSourceSpreadsheetId($sourceSpreadsheetId)
{
$this->sourceSpreadsheetId = $sourceSpreadsheetId;
}
/**
* @return string
*/
public function getSourceSpreadsheetId()
{
return $this->sourceSpreadsheetId;
}
/**
* @param string
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Rubric::class, 'Google_Service_Classroom_Rubric');

View File

@@ -0,0 +1,71 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class RubricGrade extends \Google\Model
{
/**
* @var string
*/
public $criterionId;
/**
* @var string
*/
public $levelId;
public $points;
/**
* @param string
*/
public function setCriterionId($criterionId)
{
$this->criterionId = $criterionId;
}
/**
* @return string
*/
public function getCriterionId()
{
return $this->criterionId;
}
/**
* @param string
*/
public function setLevelId($levelId)
{
$this->levelId = $levelId;
}
/**
* @return string
*/
public function getLevelId()
{
return $this->levelId;
}
public function setPoints($points)
{
$this->points = $points;
}
public function getPoints()
{
return $this->points;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RubricGrade::class, 'Google_Service_Classroom_RubricGrade');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class SharedDriveFile extends \Google\Model
{
protected $driveFileType = DriveFile::class;
protected $driveFileDataType = '';
/**
* @var string
*/
public $shareMode;
/**
* @param DriveFile
*/
public function setDriveFile(DriveFile $driveFile)
{
$this->driveFile = $driveFile;
}
/**
* @return DriveFile
*/
public function getDriveFile()
{
return $this->driveFile;
}
/**
* @param string
*/
public function setShareMode($shareMode)
{
$this->shareMode = $shareMode;
}
/**
* @return string
*/
public function getShareMode()
{
return $this->shareMode;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SharedDriveFile::class, 'Google_Service_Classroom_SharedDriveFile');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class ShortAnswerSubmission extends \Google\Model
{
/**
* @var string
*/
public $answer;
/**
* @param string
*/
public function setAnswer($answer)
{
$this->answer = $answer;
}
/**
* @return string
*/
public function getAnswer()
{
return $this->answer;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ShortAnswerSubmission::class, 'Google_Service_Classroom_ShortAnswerSubmission');

View File

@@ -0,0 +1,80 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class StateHistory extends \Google\Model
{
/**
* @var string
*/
public $actorUserId;
/**
* @var string
*/
public $state;
/**
* @var string
*/
public $stateTimestamp;
/**
* @param string
*/
public function setActorUserId($actorUserId)
{
$this->actorUserId = $actorUserId;
}
/**
* @return string
*/
public function getActorUserId()
{
return $this->actorUserId;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* @param string
*/
public function setStateTimestamp($stateTimestamp)
{
$this->stateTimestamp = $stateTimestamp;
}
/**
* @return string
*/
public function getStateTimestamp()
{
return $this->stateTimestamp;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StateHistory::class, 'Google_Service_Classroom_StateHistory');

View File

@@ -0,0 +1,94 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Student extends \Google\Model
{
/**
* @var string
*/
public $courseId;
protected $profileType = UserProfile::class;
protected $profileDataType = '';
protected $studentWorkFolderType = DriveFolder::class;
protected $studentWorkFolderDataType = '';
/**
* @var string
*/
public $userId;
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param UserProfile
*/
public function setProfile(UserProfile $profile)
{
$this->profile = $profile;
}
/**
* @return UserProfile
*/
public function getProfile()
{
return $this->profile;
}
/**
* @param DriveFolder
*/
public function setStudentWorkFolder(DriveFolder $studentWorkFolder)
{
$this->studentWorkFolder = $studentWorkFolder;
}
/**
* @return DriveFolder
*/
public function getStudentWorkFolder()
{
return $this->studentWorkFolder;
}
/**
* @param string
*/
public function setUserId($userId)
{
$this->userId = $userId;
}
/**
* @return string
*/
public function getUserId()
{
return $this->userId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Student::class, 'Google_Service_Classroom_Student');

View File

@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class StudentContext extends \Google\Model
{
/**
* @var string
*/
public $submissionId;
/**
* @param string
*/
public function setSubmissionId($submissionId)
{
$this->submissionId = $submissionId;
}
/**
* @return string
*/
public function getSubmissionId()
{
return $this->submissionId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StudentContext::class, 'Google_Service_Classroom_StudentContext');

View File

@@ -0,0 +1,339 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class StudentSubmission extends \Google\Collection
{
protected $collection_key = 'submissionHistory';
/**
* @var string
*/
public $alternateLink;
public $assignedGrade;
protected $assignedRubricGradesType = RubricGrade::class;
protected $assignedRubricGradesDataType = 'map';
protected $assignmentSubmissionType = AssignmentSubmission::class;
protected $assignmentSubmissionDataType = '';
/**
* @var bool
*/
public $associatedWithDeveloper;
/**
* @var string
*/
public $courseId;
/**
* @var string
*/
public $courseWorkId;
/**
* @var string
*/
public $courseWorkType;
/**
* @var string
*/
public $creationTime;
public $draftGrade;
protected $draftRubricGradesType = RubricGrade::class;
protected $draftRubricGradesDataType = 'map';
/**
* @var string
*/
public $id;
/**
* @var bool
*/
public $late;
protected $multipleChoiceSubmissionType = MultipleChoiceSubmission::class;
protected $multipleChoiceSubmissionDataType = '';
protected $shortAnswerSubmissionType = ShortAnswerSubmission::class;
protected $shortAnswerSubmissionDataType = '';
/**
* @var string
*/
public $state;
protected $submissionHistoryType = SubmissionHistory::class;
protected $submissionHistoryDataType = 'array';
/**
* @var string
*/
public $updateTime;
/**
* @var string
*/
public $userId;
/**
* @param string
*/
public function setAlternateLink($alternateLink)
{
$this->alternateLink = $alternateLink;
}
/**
* @return string
*/
public function getAlternateLink()
{
return $this->alternateLink;
}
public function setAssignedGrade($assignedGrade)
{
$this->assignedGrade = $assignedGrade;
}
public function getAssignedGrade()
{
return $this->assignedGrade;
}
/**
* @param RubricGrade[]
*/
public function setAssignedRubricGrades($assignedRubricGrades)
{
$this->assignedRubricGrades = $assignedRubricGrades;
}
/**
* @return RubricGrade[]
*/
public function getAssignedRubricGrades()
{
return $this->assignedRubricGrades;
}
/**
* @param AssignmentSubmission
*/
public function setAssignmentSubmission(AssignmentSubmission $assignmentSubmission)
{
$this->assignmentSubmission = $assignmentSubmission;
}
/**
* @return AssignmentSubmission
*/
public function getAssignmentSubmission()
{
return $this->assignmentSubmission;
}
/**
* @param bool
*/
public function setAssociatedWithDeveloper($associatedWithDeveloper)
{
$this->associatedWithDeveloper = $associatedWithDeveloper;
}
/**
* @return bool
*/
public function getAssociatedWithDeveloper()
{
return $this->associatedWithDeveloper;
}
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param string
*/
public function setCourseWorkId($courseWorkId)
{
$this->courseWorkId = $courseWorkId;
}
/**
* @return string
*/
public function getCourseWorkId()
{
return $this->courseWorkId;
}
/**
* @param string
*/
public function setCourseWorkType($courseWorkType)
{
$this->courseWorkType = $courseWorkType;
}
/**
* @return string
*/
public function getCourseWorkType()
{
return $this->courseWorkType;
}
/**
* @param string
*/
public function setCreationTime($creationTime)
{
$this->creationTime = $creationTime;
}
/**
* @return string
*/
public function getCreationTime()
{
return $this->creationTime;
}
public function setDraftGrade($draftGrade)
{
$this->draftGrade = $draftGrade;
}
public function getDraftGrade()
{
return $this->draftGrade;
}
/**
* @param RubricGrade[]
*/
public function setDraftRubricGrades($draftRubricGrades)
{
$this->draftRubricGrades = $draftRubricGrades;
}
/**
* @return RubricGrade[]
*/
public function getDraftRubricGrades()
{
return $this->draftRubricGrades;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param bool
*/
public function setLate($late)
{
$this->late = $late;
}
/**
* @return bool
*/
public function getLate()
{
return $this->late;
}
/**
* @param MultipleChoiceSubmission
*/
public function setMultipleChoiceSubmission(MultipleChoiceSubmission $multipleChoiceSubmission)
{
$this->multipleChoiceSubmission = $multipleChoiceSubmission;
}
/**
* @return MultipleChoiceSubmission
*/
public function getMultipleChoiceSubmission()
{
return $this->multipleChoiceSubmission;
}
/**
* @param ShortAnswerSubmission
*/
public function setShortAnswerSubmission(ShortAnswerSubmission $shortAnswerSubmission)
{
$this->shortAnswerSubmission = $shortAnswerSubmission;
}
/**
* @return ShortAnswerSubmission
*/
public function getShortAnswerSubmission()
{
return $this->shortAnswerSubmission;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* @param SubmissionHistory[]
*/
public function setSubmissionHistory($submissionHistory)
{
$this->submissionHistory = $submissionHistory;
}
/**
* @return SubmissionHistory[]
*/
public function getSubmissionHistory()
{
return $this->submissionHistory;
}
/**
* @param string
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
/**
* @param string
*/
public function setUserId($userId)
{
$this->userId = $userId;
}
/**
* @return string
*/
public function getUserId()
{
return $this->userId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StudentSubmission::class, 'Google_Service_Classroom_StudentSubmission');

View File

@@ -0,0 +1,58 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class SubmissionHistory extends \Google\Model
{
protected $gradeHistoryType = GradeHistory::class;
protected $gradeHistoryDataType = '';
protected $stateHistoryType = StateHistory::class;
protected $stateHistoryDataType = '';
/**
* @param GradeHistory
*/
public function setGradeHistory(GradeHistory $gradeHistory)
{
$this->gradeHistory = $gradeHistory;
}
/**
* @return GradeHistory
*/
public function getGradeHistory()
{
return $this->gradeHistory;
}
/**
* @param StateHistory
*/
public function setStateHistory(StateHistory $stateHistory)
{
$this->stateHistory = $stateHistory;
}
/**
* @return StateHistory
*/
public function getStateHistory()
{
return $this->stateHistory;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SubmissionHistory::class, 'Google_Service_Classroom_SubmissionHistory');

View File

@@ -0,0 +1,78 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Teacher extends \Google\Model
{
/**
* @var string
*/
public $courseId;
protected $profileType = UserProfile::class;
protected $profileDataType = '';
/**
* @var string
*/
public $userId;
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param UserProfile
*/
public function setProfile(UserProfile $profile)
{
$this->profile = $profile;
}
/**
* @return UserProfile
*/
public function getProfile()
{
return $this->profile;
}
/**
* @param string
*/
public function setUserId($userId)
{
$this->userId = $userId;
}
/**
* @return string
*/
public function getUserId()
{
return $this->userId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Teacher::class, 'Google_Service_Classroom_Teacher');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class TeacherContext extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TeacherContext::class, 'Google_Service_Classroom_TeacherContext');

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class TimeOfDay extends \Google\Model
{
/**
* @var int
*/
public $hours;
/**
* @var int
*/
public $minutes;
/**
* @var int
*/
public $nanos;
/**
* @var int
*/
public $seconds;
/**
* @param int
*/
public function setHours($hours)
{
$this->hours = $hours;
}
/**
* @return int
*/
public function getHours()
{
return $this->hours;
}
/**
* @param int
*/
public function setMinutes($minutes)
{
$this->minutes = $minutes;
}
/**
* @return int
*/
public function getMinutes()
{
return $this->minutes;
}
/**
* @param int
*/
public function setNanos($nanos)
{
$this->nanos = $nanos;
}
/**
* @return int
*/
public function getNanos()
{
return $this->nanos;
}
/**
* @param int
*/
public function setSeconds($seconds)
{
$this->seconds = $seconds;
}
/**
* @return int
*/
public function getSeconds()
{
return $this->seconds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TimeOfDay::class, 'Google_Service_Classroom_TimeOfDay');

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class Topic extends \Google\Model
{
/**
* @var string
*/
public $courseId;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $topicId;
/**
* @var string
*/
public $updateTime;
/**
* @param string
*/
public function setCourseId($courseId)
{
$this->courseId = $courseId;
}
/**
* @return string
*/
public function getCourseId()
{
return $this->courseId;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setTopicId($topicId)
{
$this->topicId = $topicId;
}
/**
* @return string
*/
public function getTopicId()
{
return $this->topicId;
}
/**
* @param string
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Topic::class, 'Google_Service_Classroom_Topic');

View File

@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class TurnInStudentSubmissionRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TurnInStudentSubmissionRequest::class, 'Google_Service_Classroom_TurnInStudentSubmissionRequest');

View File

@@ -0,0 +1,131 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class UserProfile extends \Google\Collection
{
protected $collection_key = 'permissions';
/**
* @var string
*/
public $emailAddress;
/**
* @var string
*/
public $id;
protected $nameType = Name::class;
protected $nameDataType = '';
protected $permissionsType = GlobalPermission::class;
protected $permissionsDataType = 'array';
/**
* @var string
*/
public $photoUrl;
/**
* @var bool
*/
public $verifiedTeacher;
/**
* @param string
*/
public function setEmailAddress($emailAddress)
{
$this->emailAddress = $emailAddress;
}
/**
* @return string
*/
public function getEmailAddress()
{
return $this->emailAddress;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param Name
*/
public function setName(Name $name)
{
$this->name = $name;
}
/**
* @return Name
*/
public function getName()
{
return $this->name;
}
/**
* @param GlobalPermission[]
*/
public function setPermissions($permissions)
{
$this->permissions = $permissions;
}
/**
* @return GlobalPermission[]
*/
public function getPermissions()
{
return $this->permissions;
}
/**
* @param string
*/
public function setPhotoUrl($photoUrl)
{
$this->photoUrl = $photoUrl;
}
/**
* @return string
*/
public function getPhotoUrl()
{
return $this->photoUrl;
}
/**
* @param bool
*/
public function setVerifiedTeacher($verifiedTeacher)
{
$this->verifiedTeacher = $verifiedTeacher;
}
/**
* @return bool
*/
public function getVerifiedTeacher()
{
return $this->verifiedTeacher;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UserProfile::class, 'Google_Service_Classroom_UserProfile');

View File

@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Classroom;
class YouTubeVideo extends \Google\Model
{
/**
* @var string
*/
public $alternateLink;
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $thumbnailUrl;
/**
* @var string
*/
public $title;
/**
* @param string
*/
public function setAlternateLink($alternateLink)
{
$this->alternateLink = $alternateLink;
}
/**
* @return string
*/
public function getAlternateLink()
{
return $this->alternateLink;
}
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setThumbnailUrl($thumbnailUrl)
{
$this->thumbnailUrl = $thumbnailUrl;
}
/**
* @return string
*/
public function getThumbnailUrl()
{
return $this->thumbnailUrl;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(YouTubeVideo::class, 'Google_Service_Classroom_YouTubeVideo');