Initial commit: Complete WooCommerce Smart Google Pricing plugin with vendor dependencies

This commit is contained in:
2025-12-23 07:48:45 +01:00
commit 9b66109ca1
32472 changed files with 4065017 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
<?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\Forms;
class Answer extends \Google\Model
{
protected $fileUploadAnswersType = FileUploadAnswers::class;
protected $fileUploadAnswersDataType = '';
protected $gradeType = Grade::class;
protected $gradeDataType = '';
/**
* Output only. The question's ID. See also Question.question_id.
*
* @var string
*/
public $questionId;
protected $textAnswersType = TextAnswers::class;
protected $textAnswersDataType = '';
/**
* Output only. The answers to a file upload question.
*
* @param FileUploadAnswers $fileUploadAnswers
*/
public function setFileUploadAnswers(FileUploadAnswers $fileUploadAnswers)
{
$this->fileUploadAnswers = $fileUploadAnswers;
}
/**
* @return FileUploadAnswers
*/
public function getFileUploadAnswers()
{
return $this->fileUploadAnswers;
}
/**
* Output only. The grade for the answer if the form was a quiz.
*
* @param Grade $grade
*/
public function setGrade(Grade $grade)
{
$this->grade = $grade;
}
/**
* @return Grade
*/
public function getGrade()
{
return $this->grade;
}
/**
* Output only. The question's ID. See also Question.question_id.
*
* @param string $questionId
*/
public function setQuestionId($questionId)
{
$this->questionId = $questionId;
}
/**
* @return string
*/
public function getQuestionId()
{
return $this->questionId;
}
/**
* Output only. The specific answers as text.
*
* @param TextAnswers $textAnswers
*/
public function setTextAnswers(TextAnswers $textAnswers)
{
$this->textAnswers = $textAnswers;
}
/**
* @return TextAnswers
*/
public function getTextAnswers()
{
return $this->textAnswers;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Answer::class, 'Google_Service_Forms_Answer');

View File

@@ -0,0 +1,85 @@
<?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\Forms;
class BatchUpdateFormRequest extends \Google\Collection
{
protected $collection_key = 'requests';
/**
* Whether to return an updated version of the model in the response.
*
* @var bool
*/
public $includeFormInResponse;
protected $requestsType = Request::class;
protected $requestsDataType = 'array';
protected $writeControlType = WriteControl::class;
protected $writeControlDataType = '';
/**
* Whether to return an updated version of the model in the response.
*
* @param bool $includeFormInResponse
*/
public function setIncludeFormInResponse($includeFormInResponse)
{
$this->includeFormInResponse = $includeFormInResponse;
}
/**
* @return bool
*/
public function getIncludeFormInResponse()
{
return $this->includeFormInResponse;
}
/**
* Required. The update requests of this batch.
*
* @param Request[] $requests
*/
public function setRequests($requests)
{
$this->requests = $requests;
}
/**
* @return Request[]
*/
public function getRequests()
{
return $this->requests;
}
/**
* Provides control over how write requests are executed.
*
* @param WriteControl $writeControl
*/
public function setWriteControl(WriteControl $writeControl)
{
$this->writeControl = $writeControl;
}
/**
* @return WriteControl
*/
public function getWriteControl()
{
return $this->writeControl;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BatchUpdateFormRequest::class, 'Google_Service_Forms_BatchUpdateFormRequest');

View File

@@ -0,0 +1,84 @@
<?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\Forms;
class BatchUpdateFormResponse extends \Google\Collection
{
protected $collection_key = 'replies';
protected $formType = Form::class;
protected $formDataType = '';
protected $repliesType = Response::class;
protected $repliesDataType = 'array';
protected $writeControlType = WriteControl::class;
protected $writeControlDataType = '';
/**
* Based on the bool request field `include_form_in_response`, a form with all
* applied mutations/updates is returned or not. This may be later than the
* revision ID created by these changes.
*
* @param Form $form
*/
public function setForm(Form $form)
{
$this->form = $form;
}
/**
* @return Form
*/
public function getForm()
{
return $this->form;
}
/**
* The reply of the updates. This maps 1:1 with the update requests, although
* replies to some requests may be empty.
*
* @param Response[] $replies
*/
public function setReplies($replies)
{
$this->replies = $replies;
}
/**
* @return Response[]
*/
public function getReplies()
{
return $this->replies;
}
/**
* The updated write control after applying the request.
*
* @param WriteControl $writeControl
*/
public function setWriteControl(WriteControl $writeControl)
{
$this->writeControl = $writeControl;
}
/**
* @return WriteControl
*/
public function getWriteControl()
{
return $this->writeControl;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BatchUpdateFormResponse::class, 'Google_Service_Forms_BatchUpdateFormResponse');

View File

@@ -0,0 +1,118 @@
<?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\Forms;
class ChoiceQuestion extends \Google\Collection
{
/**
* Default value. Unused.
*/
public const TYPE_CHOICE_TYPE_UNSPECIFIED = 'CHOICE_TYPE_UNSPECIFIED';
/**
* Radio buttons: All choices are shown to the user, who can only pick one of
* them.
*/
public const TYPE_RADIO = 'RADIO';
/**
* Checkboxes: All choices are shown to the user, who can pick any number of
* them.
*/
public const TYPE_CHECKBOX = 'CHECKBOX';
/**
* Drop-down menu: The choices are only shown to the user on demand, otherwise
* only the current choice is shown. Only one option can be chosen.
*/
public const TYPE_DROP_DOWN = 'DROP_DOWN';
protected $collection_key = 'options';
protected $optionsType = Option::class;
protected $optionsDataType = 'array';
/**
* Whether the options should be displayed in random order for different
* instances of the quiz. This is often used to prevent cheating by
* respondents who might be looking at another respondent's screen, or to
* address bias in a survey that might be introduced by always putting the
* same options first or last.
*
* @var bool
*/
public $shuffle;
/**
* Required. The type of choice question.
*
* @var string
*/
public $type;
/**
* Required. List of options that a respondent must choose from.
*
* @param Option[] $options
*/
public function setOptions($options)
{
$this->options = $options;
}
/**
* @return Option[]
*/
public function getOptions()
{
return $this->options;
}
/**
* Whether the options should be displayed in random order for different
* instances of the quiz. This is often used to prevent cheating by
* respondents who might be looking at another respondent's screen, or to
* address bias in a survey that might be introduced by always putting the
* same options first or last.
*
* @param bool $shuffle
*/
public function setShuffle($shuffle)
{
$this->shuffle = $shuffle;
}
/**
* @return bool
*/
public function getShuffle()
{
return $this->shuffle;
}
/**
* Required. The type of choice question.
*
* Accepted values: CHOICE_TYPE_UNSPECIFIED, RADIO, CHECKBOX, DROP_DOWN
*
* @param self::TYPE_* $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return self::TYPE_*
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ChoiceQuestion::class, 'Google_Service_Forms_ChoiceQuestion');

View File

@@ -0,0 +1,52 @@
<?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\Forms;
class CloudPubsubTopic extends \Google\Model
{
/**
* Required. A fully qualified Pub/Sub topic name to publish the events to.
* This topic must be owned by the calling project and already exist in
* Pub/Sub.
*
* @var string
*/
public $topicName;
/**
* Required. A fully qualified Pub/Sub topic name to publish the events to.
* This topic must be owned by the calling project and already exist in
* Pub/Sub.
*
* @param string $topicName
*/
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_Forms_CloudPubsubTopic');

View File

@@ -0,0 +1,50 @@
<?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\Forms;
class CorrectAnswer extends \Google\Model
{
/**
* Required. The correct answer value. See the documentation for
* TextAnswer.value for details on how various value types are formatted.
*
* @var string
*/
public $value;
/**
* Required. The correct answer value. See the documentation for
* TextAnswer.value for details on how various value types are formatted.
*
* @param string $value
*/
public function setValue($value)
{
$this->value = $value;
}
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CorrectAnswer::class, 'Google_Service_Forms_CorrectAnswer');

View File

@@ -0,0 +1,50 @@
<?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\Forms;
class CorrectAnswers extends \Google\Collection
{
protected $collection_key = 'answers';
protected $answersType = CorrectAnswer::class;
protected $answersDataType = 'array';
/**
* A list of correct answers. A quiz response can be automatically graded
* based on these answers. For single-valued questions, a response is marked
* correct if it matches any value in this list (in other words, multiple
* correct answers are possible). For multiple-valued (`CHECKBOX`) questions,
* a response is marked correct if it contains exactly the values in this
* list.
*
* @param CorrectAnswer[] $answers
*/
public function setAnswers($answers)
{
$this->answers = $answers;
}
/**
* @return CorrectAnswer[]
*/
public function getAnswers()
{
return $this->answers;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CorrectAnswers::class, 'Google_Service_Forms_CorrectAnswers');

View File

@@ -0,0 +1,62 @@
<?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\Forms;
class CreateItemRequest extends \Google\Model
{
protected $itemType = Item::class;
protected $itemDataType = '';
protected $locationType = Location::class;
protected $locationDataType = '';
/**
* Required. The item to create.
*
* @param Item $item
*/
public function setItem(Item $item)
{
$this->item = $item;
}
/**
* @return Item
*/
public function getItem()
{
return $this->item;
}
/**
* Required. Where to place the new item.
*
* @param Location $location
*/
public function setLocation(Location $location)
{
$this->location = $location;
}
/**
* @return Location
*/
public function getLocation()
{
return $this->location;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CreateItemRequest::class, 'Google_Service_Forms_CreateItemRequest');

View File

@@ -0,0 +1,73 @@
<?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\Forms;
class CreateItemResponse extends \Google\Collection
{
protected $collection_key = 'questionId';
/**
* The ID of the created item.
*
* @var string
*/
public $itemId;
/**
* The ID of the question created as part of this item, for a question group
* it lists IDs of all the questions created for this item.
*
* @var string[]
*/
public $questionId;
/**
* The ID of the created item.
*
* @param string $itemId
*/
public function setItemId($itemId)
{
$this->itemId = $itemId;
}
/**
* @return string
*/
public function getItemId()
{
return $this->itemId;
}
/**
* The ID of the question created as part of this item, for a question group
* it lists IDs of all the questions created for this item.
*
* @param string[] $questionId
*/
public function setQuestionId($questionId)
{
$this->questionId = $questionId;
}
/**
* @return string[]
*/
public function getQuestionId()
{
return $this->questionId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CreateItemResponse::class, 'Google_Service_Forms_CreateItemResponse');

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\Forms;
class CreateWatchRequest extends \Google\Model
{
protected $watchType = Watch::class;
protected $watchDataType = '';
/**
* The ID to use for the watch. If specified, the ID must not already be in
* use. If not specified, an ID is generated. This value should be 4-63
* characters, and valid characters are /a-z-/.
*
* @var string
*/
public $watchId;
/**
* Required. The watch object. No ID should be set on this object; use
* `watch_id` instead.
*
* @param Watch $watch
*/
public function setWatch(Watch $watch)
{
$this->watch = $watch;
}
/**
* @return Watch
*/
public function getWatch()
{
return $this->watch;
}
/**
* The ID to use for the watch. If specified, the ID must not already be in
* use. If not specified, an ID is generated. This value should be 4-63
* characters, and valid characters are /a-z-/.
*
* @param string $watchId
*/
public function setWatchId($watchId)
{
$this->watchId = $watchId;
}
/**
* @return string
*/
public function getWatchId()
{
return $this->watchId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CreateWatchRequest::class, 'Google_Service_Forms_CreateWatchRequest');

View File

@@ -0,0 +1,70 @@
<?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\Forms;
class DateQuestion extends \Google\Model
{
/**
* Whether to include the time as part of the question.
*
* @var bool
*/
public $includeTime;
/**
* Whether to include the year as part of the question.
*
* @var bool
*/
public $includeYear;
/**
* Whether to include the time as part of the question.
*
* @param bool $includeTime
*/
public function setIncludeTime($includeTime)
{
$this->includeTime = $includeTime;
}
/**
* @return bool
*/
public function getIncludeTime()
{
return $this->includeTime;
}
/**
* Whether to include the year as part of the question.
*
* @param bool $includeYear
*/
public function setIncludeYear($includeYear)
{
$this->includeYear = $includeYear;
}
/**
* @return bool
*/
public function getIncludeYear()
{
return $this->includeYear;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DateQuestion::class, 'Google_Service_Forms_DateQuestion');

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\Forms;
class DeleteItemRequest extends \Google\Model
{
protected $locationType = Location::class;
protected $locationDataType = '';
/**
* Required. The location of the item to delete.
*
* @param Location $location
*/
public function setLocation(Location $location)
{
$this->location = $location;
}
/**
* @return Location
*/
public function getLocation()
{
return $this->location;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DeleteItemRequest::class, 'Google_Service_Forms_DeleteItemRequest');

View File

@@ -0,0 +1,62 @@
<?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\Forms;
class ExtraMaterial extends \Google\Model
{
protected $linkType = TextLink::class;
protected $linkDataType = '';
protected $videoType = VideoLink::class;
protected $videoDataType = '';
/**
* Text feedback.
*
* @param TextLink $link
*/
public function setLink(TextLink $link)
{
$this->link = $link;
}
/**
* @return TextLink
*/
public function getLink()
{
return $this->link;
}
/**
* Video feedback.
*
* @param VideoLink $video
*/
public function setVideo(VideoLink $video)
{
$this->video = $video;
}
/**
* @return VideoLink
*/
public function getVideo()
{
return $this->video;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ExtraMaterial::class, 'Google_Service_Forms_ExtraMaterial');

View File

@@ -0,0 +1,68 @@
<?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\Forms;
class Feedback extends \Google\Collection
{
protected $collection_key = 'material';
protected $materialType = ExtraMaterial::class;
protected $materialDataType = 'array';
/**
* Required. The main text of the feedback.
*
* @var string
*/
public $text;
/**
* Additional information provided as part of the feedback, often used to
* point the respondent to more reading and resources.
*
* @param ExtraMaterial[] $material
*/
public function setMaterial($material)
{
$this->material = $material;
}
/**
* @return ExtraMaterial[]
*/
public function getMaterial()
{
return $this->material;
}
/**
* Required. The main text of the feedback.
*
* @param string $text
*/
public function setText($text)
{
$this->text = $text;
}
/**
* @return string
*/
public function getText()
{
return $this->text;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Feedback::class, 'Google_Service_Forms_Feedback');

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\Forms;
class FileUploadAnswer extends \Google\Model
{
/**
* Output only. The ID of the Google Drive file.
*
* @var string
*/
public $fileId;
/**
* Output only. The file name, as stored in Google Drive on upload.
*
* @var string
*/
public $fileName;
/**
* Output only. The MIME type of the file, as stored in Google Drive on
* upload.
*
* @var string
*/
public $mimeType;
/**
* Output only. The ID of the Google Drive file.
*
* @param string $fileId
*/
public function setFileId($fileId)
{
$this->fileId = $fileId;
}
/**
* @return string
*/
public function getFileId()
{
return $this->fileId;
}
/**
* Output only. The file name, as stored in Google Drive on upload.
*
* @param string $fileName
*/
public function setFileName($fileName)
{
$this->fileName = $fileName;
}
/**
* @return string
*/
public function getFileName()
{
return $this->fileName;
}
/**
* Output only. The MIME type of the file, as stored in Google Drive on
* upload.
*
* @param string $mimeType
*/
public function setMimeType($mimeType)
{
$this->mimeType = $mimeType;
}
/**
* @return string
*/
public function getMimeType()
{
return $this->mimeType;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FileUploadAnswer::class, 'Google_Service_Forms_FileUploadAnswer');

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\Forms;
class FileUploadAnswers extends \Google\Collection
{
protected $collection_key = 'answers';
protected $answersType = FileUploadAnswer::class;
protected $answersDataType = 'array';
/**
* Output only. All submitted files for a FileUpload question.
*
* @param FileUploadAnswer[] $answers
*/
public function setAnswers($answers)
{
$this->answers = $answers;
}
/**
* @return FileUploadAnswer[]
*/
public function getAnswers()
{
return $this->answers;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FileUploadAnswers::class, 'Google_Service_Forms_FileUploadAnswers');

View File

@@ -0,0 +1,119 @@
<?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\Forms;
class FileUploadQuestion extends \Google\Collection
{
protected $collection_key = 'types';
/**
* Required. The ID of the Drive folder where uploaded files are stored.
*
* @var string
*/
public $folderId;
/**
* Maximum number of bytes allowed for any single file uploaded to this
* question.
*
* @var string
*/
public $maxFileSize;
/**
* Maximum number of files that can be uploaded for this question in a single
* response.
*
* @var int
*/
public $maxFiles;
/**
* File types accepted by this question.
*
* @var string[]
*/
public $types;
/**
* Required. The ID of the Drive folder where uploaded files are stored.
*
* @param string $folderId
*/
public function setFolderId($folderId)
{
$this->folderId = $folderId;
}
/**
* @return string
*/
public function getFolderId()
{
return $this->folderId;
}
/**
* Maximum number of bytes allowed for any single file uploaded to this
* question.
*
* @param string $maxFileSize
*/
public function setMaxFileSize($maxFileSize)
{
$this->maxFileSize = $maxFileSize;
}
/**
* @return string
*/
public function getMaxFileSize()
{
return $this->maxFileSize;
}
/**
* Maximum number of files that can be uploaded for this question in a single
* response.
*
* @param int $maxFiles
*/
public function setMaxFiles($maxFiles)
{
$this->maxFiles = $maxFiles;
}
/**
* @return int
*/
public function getMaxFiles()
{
return $this->maxFiles;
}
/**
* File types accepted by this question.
*
* @param string[] $types
*/
public function setTypes($types)
{
$this->types = $types;
}
/**
* @return string[]
*/
public function getTypes()
{
return $this->types;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FileUploadQuestion::class, 'Google_Service_Forms_FileUploadQuestion');

View File

@@ -0,0 +1,218 @@
<?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\Forms;
class Form extends \Google\Collection
{
protected $collection_key = 'items';
/**
* Output only. The form ID.
*
* @var string
*/
public $formId;
protected $infoType = Info::class;
protected $infoDataType = '';
protected $itemsType = Item::class;
protected $itemsDataType = 'array';
/**
* Output only. The ID of the linked Google Sheet which is accumulating
* responses from this Form (if such a Sheet exists).
*
* @var string
*/
public $linkedSheetId;
protected $publishSettingsType = PublishSettings::class;
protected $publishSettingsDataType = '';
/**
* Output only. The form URI to share with responders. This opens a page that
* allows the user to submit responses but not edit the questions. For forms
* that have publish_settings value set, this is the published form URI.
*
* @var string
*/
public $responderUri;
/**
* Output only. The revision ID of the form. Used in the WriteControl in
* update requests to identify the revision on which the changes are based.
* The format of the revision ID may change over time, so it should be treated
* opaquely. A returned revision ID is only guaranteed to be valid for 24
* hours after it has been returned and cannot be shared across users. If the
* revision ID is unchanged between calls, then the form *content* has not
* changed. Conversely, a changed ID (for the same form and user) usually
* means the form *content* has been updated; however, a changed ID can also
* be due to internal factors such as ID format changes. Form content excludes
* form metadata, including: * sharing settings (who has access to the form) *
* publish_settings (if the form supports publishing and if it is published)
*
* @var string
*/
public $revisionId;
protected $settingsType = FormSettings::class;
protected $settingsDataType = '';
/**
* Output only. The form ID.
*
* @param string $formId
*/
public function setFormId($formId)
{
$this->formId = $formId;
}
/**
* @return string
*/
public function getFormId()
{
return $this->formId;
}
/**
* Required. The title and description of the form.
*
* @param Info $info
*/
public function setInfo(Info $info)
{
$this->info = $info;
}
/**
* @return Info
*/
public function getInfo()
{
return $this->info;
}
/**
* Required. A list of the form's items, which can include section headers,
* questions, embedded media, etc.
*
* @param Item[] $items
*/
public function setItems($items)
{
$this->items = $items;
}
/**
* @return Item[]
*/
public function getItems()
{
return $this->items;
}
/**
* Output only. The ID of the linked Google Sheet which is accumulating
* responses from this Form (if such a Sheet exists).
*
* @param string $linkedSheetId
*/
public function setLinkedSheetId($linkedSheetId)
{
$this->linkedSheetId = $linkedSheetId;
}
/**
* @return string
*/
public function getLinkedSheetId()
{
return $this->linkedSheetId;
}
/**
* Output only. The publishing settings for a form. This field isn't set for
* legacy forms because they don't have the publish_settings field. All newly
* created forms support publish settings. Forms with publish_settings value
* set can call SetPublishSettings API to publish or unpublish the form.
*
* @param PublishSettings $publishSettings
*/
public function setPublishSettings(PublishSettings $publishSettings)
{
$this->publishSettings = $publishSettings;
}
/**
* @return PublishSettings
*/
public function getPublishSettings()
{
return $this->publishSettings;
}
/**
* Output only. The form URI to share with responders. This opens a page that
* allows the user to submit responses but not edit the questions. For forms
* that have publish_settings value set, this is the published form URI.
*
* @param string $responderUri
*/
public function setResponderUri($responderUri)
{
$this->responderUri = $responderUri;
}
/**
* @return string
*/
public function getResponderUri()
{
return $this->responderUri;
}
/**
* Output only. The revision ID of the form. Used in the WriteControl in
* update requests to identify the revision on which the changes are based.
* The format of the revision ID may change over time, so it should be treated
* opaquely. A returned revision ID is only guaranteed to be valid for 24
* hours after it has been returned and cannot be shared across users. If the
* revision ID is unchanged between calls, then the form *content* has not
* changed. Conversely, a changed ID (for the same form and user) usually
* means the form *content* has been updated; however, a changed ID can also
* be due to internal factors such as ID format changes. Form content excludes
* form metadata, including: * sharing settings (who has access to the form) *
* publish_settings (if the form supports publishing and if it is published)
*
* @param string $revisionId
*/
public function setRevisionId($revisionId)
{
$this->revisionId = $revisionId;
}
/**
* @return string
*/
public function getRevisionId()
{
return $this->revisionId;
}
/**
* The form's settings. This must be updated with UpdateSettingsRequest; it is
* ignored during CreateForm and UpdateFormInfoRequest.
*
* @param FormSettings $settings
*/
public function setSettings(FormSettings $settings)
{
$this->settings = $settings;
}
/**
* @return FormSettings
*/
public function getSettings()
{
return $this->settings;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Form::class, 'Google_Service_Forms_Form');

View File

@@ -0,0 +1,173 @@
<?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\Forms;
class FormResponse extends \Google\Model
{
protected $answersType = Answer::class;
protected $answersDataType = 'map';
/**
* Output only. Timestamp for the first time the response was submitted.
*
* @var string
*/
public $createTime;
/**
* Output only. The form ID.
*
* @var string
*/
public $formId;
/**
* Output only. Timestamp for the most recent time the response was submitted.
* Does not track changes to grades.
*
* @var string
*/
public $lastSubmittedTime;
/**
* Output only. The email address (if collected) for the respondent.
*
* @var string
*/
public $respondentEmail;
/**
* Output only. The response ID.
*
* @var string
*/
public $responseId;
/**
* Output only. The total number of points the respondent received for their
* submission Only set if the form was a quiz and the response was graded.
* This includes points automatically awarded via autograding adjusted by any
* manual corrections entered by the form owner.
*
* @var
*/
public $totalScore;
/**
* Output only. The actual answers to the questions, keyed by question_id.
*
* @param Answer[] $answers
*/
public function setAnswers($answers)
{
$this->answers = $answers;
}
/**
* @return Answer[]
*/
public function getAnswers()
{
return $this->answers;
}
/**
* Output only. Timestamp for the first time the response was submitted.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Output only. The form ID.
*
* @param string $formId
*/
public function setFormId($formId)
{
$this->formId = $formId;
}
/**
* @return string
*/
public function getFormId()
{
return $this->formId;
}
/**
* Output only. Timestamp for the most recent time the response was submitted.
* Does not track changes to grades.
*
* @param string $lastSubmittedTime
*/
public function setLastSubmittedTime($lastSubmittedTime)
{
$this->lastSubmittedTime = $lastSubmittedTime;
}
/**
* @return string
*/
public function getLastSubmittedTime()
{
return $this->lastSubmittedTime;
}
/**
* Output only. The email address (if collected) for the respondent.
*
* @param string $respondentEmail
*/
public function setRespondentEmail($respondentEmail)
{
$this->respondentEmail = $respondentEmail;
}
/**
* @return string
*/
public function getRespondentEmail()
{
return $this->respondentEmail;
}
/**
* Output only. The response ID.
*
* @param string $responseId
*/
public function setResponseId($responseId)
{
$this->responseId = $responseId;
}
/**
* @return string
*/
public function getResponseId()
{
return $this->responseId;
}
public function setTotalScore($totalScore)
{
$this->totalScore = $totalScore;
}
public function getTotalScore()
{
return $this->totalScore;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FormResponse::class, 'Google_Service_Forms_FormResponse');

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\Forms;
class FormSettings extends \Google\Model
{
/**
* Unspecified. This value is unused.
*/
public const EMAIL_COLLECTION_TYPE_EMAIL_COLLECTION_TYPE_UNSPECIFIED = 'EMAIL_COLLECTION_TYPE_UNSPECIFIED';
/**
* The form doesn't collect email addresses. Default value if the form owner
* uses a Google account.
*/
public const EMAIL_COLLECTION_TYPE_DO_NOT_COLLECT = 'DO_NOT_COLLECT';
/**
* The form collects email addresses automatically based on the account of the
* signed-in user. Default value if the form owner uses a Google Workspace
* account.
*/
public const EMAIL_COLLECTION_TYPE_VERIFIED = 'VERIFIED';
/**
* The form collects email addresses using a field that the respondent
* completes on the form.
*/
public const EMAIL_COLLECTION_TYPE_RESPONDER_INPUT = 'RESPONDER_INPUT';
/**
* Optional. The setting that determines whether the form collects email
* addresses from respondents.
*
* @var string
*/
public $emailCollectionType;
protected $quizSettingsType = QuizSettings::class;
protected $quizSettingsDataType = '';
/**
* Optional. The setting that determines whether the form collects email
* addresses from respondents.
*
* Accepted values: EMAIL_COLLECTION_TYPE_UNSPECIFIED, DO_NOT_COLLECT,
* VERIFIED, RESPONDER_INPUT
*
* @param self::EMAIL_COLLECTION_TYPE_* $emailCollectionType
*/
public function setEmailCollectionType($emailCollectionType)
{
$this->emailCollectionType = $emailCollectionType;
}
/**
* @return self::EMAIL_COLLECTION_TYPE_*
*/
public function getEmailCollectionType()
{
return $this->emailCollectionType;
}
/**
* Settings related to quiz forms and grading.
*
* @param QuizSettings $quizSettings
*/
public function setQuizSettings(QuizSettings $quizSettings)
{
$this->quizSettings = $quizSettings;
}
/**
* @return QuizSettings
*/
public function getQuizSettings()
{
return $this->quizSettings;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FormSettings::class, 'Google_Service_Forms_FormSettings');

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\Forms;
class FormsEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FormsEmpty::class, 'Google_Service_Forms_FormsEmpty');

View File

@@ -0,0 +1,84 @@
<?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\Forms;
class Grade extends \Google\Model
{
/**
* Output only. Whether the question was answered correctly or not. A zero-
* point score is not enough to infer incorrectness, since a correctly
* answered question could be worth zero points.
*
* @var bool
*/
public $correct;
protected $feedbackType = Feedback::class;
protected $feedbackDataType = '';
/**
* Output only. The numeric score awarded for the answer.
*
* @var
*/
public $score;
/**
* Output only. Whether the question was answered correctly or not. A zero-
* point score is not enough to infer incorrectness, since a correctly
* answered question could be worth zero points.
*
* @param bool $correct
*/
public function setCorrect($correct)
{
$this->correct = $correct;
}
/**
* @return bool
*/
public function getCorrect()
{
return $this->correct;
}
/**
* Output only. Additional feedback given for an answer.
*
* @param Feedback $feedback
*/
public function setFeedback(Feedback $feedback)
{
$this->feedback = $feedback;
}
/**
* @return Feedback
*/
public function getFeedback()
{
return $this->feedback;
}
public function setScore($score)
{
$this->score = $score;
}
public function getScore()
{
return $this->score;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Grade::class, 'Google_Service_Forms_Grade');

View File

@@ -0,0 +1,129 @@
<?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\Forms;
class Grading extends \Google\Model
{
protected $correctAnswersType = CorrectAnswers::class;
protected $correctAnswersDataType = '';
protected $generalFeedbackType = Feedback::class;
protected $generalFeedbackDataType = '';
/**
* Required. The maximum number of points a respondent can automatically get
* for a correct answer. This must not be negative.
*
* @var int
*/
public $pointValue;
protected $whenRightType = Feedback::class;
protected $whenRightDataType = '';
protected $whenWrongType = Feedback::class;
protected $whenWrongDataType = '';
/**
* Required. The answer key for the question. Responses are automatically
* graded based on this field.
*
* @param CorrectAnswers $correctAnswers
*/
public function setCorrectAnswers(CorrectAnswers $correctAnswers)
{
$this->correctAnswers = $correctAnswers;
}
/**
* @return CorrectAnswers
*/
public function getCorrectAnswers()
{
return $this->correctAnswers;
}
/**
* The feedback displayed for all answers. This is commonly used for short
* answer questions when a quiz owner wants to quickly give respondents some
* sense of whether they answered the question correctly before they've had a
* chance to officially grade the response. General feedback cannot be set for
* automatically graded multiple choice questions.
*
* @param Feedback $generalFeedback
*/
public function setGeneralFeedback(Feedback $generalFeedback)
{
$this->generalFeedback = $generalFeedback;
}
/**
* @return Feedback
*/
public function getGeneralFeedback()
{
return $this->generalFeedback;
}
/**
* Required. The maximum number of points a respondent can automatically get
* for a correct answer. This must not be negative.
*
* @param int $pointValue
*/
public function setPointValue($pointValue)
{
$this->pointValue = $pointValue;
}
/**
* @return int
*/
public function getPointValue()
{
return $this->pointValue;
}
/**
* The feedback displayed for correct responses. This feedback can only be set
* for multiple choice questions that have correct answers provided.
*
* @param Feedback $whenRight
*/
public function setWhenRight(Feedback $whenRight)
{
$this->whenRight = $whenRight;
}
/**
* @return Feedback
*/
public function getWhenRight()
{
return $this->whenRight;
}
/**
* The feedback displayed for incorrect responses. This feedback can only be
* set for multiple choice questions that have correct answers provided.
*
* @param Feedback $whenWrong
*/
public function setWhenWrong(Feedback $whenWrong)
{
$this->whenWrong = $whenWrong;
}
/**
* @return Feedback
*/
public function getWhenWrong()
{
return $this->whenWrong;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Grading::class, 'Google_Service_Forms_Grading');

View File

@@ -0,0 +1,70 @@
<?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\Forms;
class Grid extends \Google\Model
{
protected $columnsType = ChoiceQuestion::class;
protected $columnsDataType = '';
/**
* If `true`, the questions are randomly ordered. In other words, the rows
* appear in a different order for every respondent.
*
* @var bool
*/
public $shuffleQuestions;
/**
* Required. The choices shared by each question in the grid. In other words,
* the values of the columns. Only `CHECK_BOX` and `RADIO` choices are
* allowed.
*
* @param ChoiceQuestion $columns
*/
public function setColumns(ChoiceQuestion $columns)
{
$this->columns = $columns;
}
/**
* @return ChoiceQuestion
*/
public function getColumns()
{
return $this->columns;
}
/**
* If `true`, the questions are randomly ordered. In other words, the rows
* appear in a different order for every respondent.
*
* @param bool $shuffleQuestions
*/
public function setShuffleQuestions($shuffleQuestions)
{
$this->shuffleQuestions = $shuffleQuestions;
}
/**
* @return bool
*/
public function getShuffleQuestions()
{
return $this->shuffleQuestions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Grid::class, 'Google_Service_Forms_Grid');

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\Forms;
class Image extends \Google\Model
{
/**
* A description of the image that is shown on hover and read by
* screenreaders.
*
* @var string
*/
public $altText;
/**
* Output only. A URI from which you can download the image; this is valid
* only for a limited time.
*
* @var string
*/
public $contentUri;
protected $propertiesType = MediaProperties::class;
protected $propertiesDataType = '';
/**
* Input only. The source URI is the URI used to insert the image. The source
* URI can be empty when fetched.
*
* @var string
*/
public $sourceUri;
/**
* A description of the image that is shown on hover and read by
* screenreaders.
*
* @param string $altText
*/
public function setAltText($altText)
{
$this->altText = $altText;
}
/**
* @return string
*/
public function getAltText()
{
return $this->altText;
}
/**
* Output only. A URI from which you can download the image; this is valid
* only for a limited time.
*
* @param string $contentUri
*/
public function setContentUri($contentUri)
{
$this->contentUri = $contentUri;
}
/**
* @return string
*/
public function getContentUri()
{
return $this->contentUri;
}
/**
* Properties of an image.
*
* @param MediaProperties $properties
*/
public function setProperties(MediaProperties $properties)
{
$this->properties = $properties;
}
/**
* @return MediaProperties
*/
public function getProperties()
{
return $this->properties;
}
/**
* Input only. The source URI is the URI used to insert the image. The source
* URI can be empty when fetched.
*
* @param string $sourceUri
*/
public function setSourceUri($sourceUri)
{
$this->sourceUri = $sourceUri;
}
/**
* @return string
*/
public function getSourceUri()
{
return $this->sourceUri;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Image::class, 'Google_Service_Forms_Image');

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\Forms;
class ImageItem extends \Google\Model
{
protected $imageType = Image::class;
protected $imageDataType = '';
/**
* Required. The image displayed in the item.
*
* @param Image $image
*/
public function setImage(Image $image)
{
$this->image = $image;
}
/**
* @return Image
*/
public function getImage()
{
return $this->image;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ImageItem::class, 'Google_Service_Forms_ImageItem');

View File

@@ -0,0 +1,104 @@
<?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\Forms;
class Info extends \Google\Model
{
/**
* The description of the form.
*
* @var string
*/
public $description;
/**
* Output only. The title of the document which is visible in Drive. If
* Info.title is empty, `document_title` may appear in its place in the Google
* Forms UI and be visible to responders. `document_title` can be set on
* create, but cannot be modified by a batchUpdate request. Please use the
* [Google Drive
* API](https://developers.google.com/drive/api/v3/reference/files/update) if
* you need to programmatically update `document_title`.
*
* @var string
*/
public $documentTitle;
/**
* Required. The title of the form which is visible to responders.
*
* @var string
*/
public $title;
/**
* The description of the form.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Output only. The title of the document which is visible in Drive. If
* Info.title is empty, `document_title` may appear in its place in the Google
* Forms UI and be visible to responders. `document_title` can be set on
* create, but cannot be modified by a batchUpdate request. Please use the
* [Google Drive
* API](https://developers.google.com/drive/api/v3/reference/files/update) if
* you need to programmatically update `document_title`.
*
* @param string $documentTitle
*/
public function setDocumentTitle($documentTitle)
{
$this->documentTitle = $documentTitle;
}
/**
* @return string
*/
public function getDocumentTitle()
{
return $this->documentTitle;
}
/**
* Required. The title of the form which is visible to responders.
*
* @param string $title
*/
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(Info::class, 'Google_Service_Forms_Info');

View File

@@ -0,0 +1,202 @@
<?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\Forms;
class Item extends \Google\Model
{
/**
* The description of the item.
*
* @var string
*/
public $description;
protected $imageItemType = ImageItem::class;
protected $imageItemDataType = '';
/**
* The item ID. On creation, it can be provided but the ID must not be already
* used in the form. If not provided, a new ID is assigned.
*
* @var string
*/
public $itemId;
protected $pageBreakItemType = PageBreakItem::class;
protected $pageBreakItemDataType = '';
protected $questionGroupItemType = QuestionGroupItem::class;
protected $questionGroupItemDataType = '';
protected $questionItemType = QuestionItem::class;
protected $questionItemDataType = '';
protected $textItemType = TextItem::class;
protected $textItemDataType = '';
/**
* The title of the item.
*
* @var string
*/
public $title;
protected $videoItemType = VideoItem::class;
protected $videoItemDataType = '';
/**
* The description of the item.
*
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Displays an image on the page.
*
* @param ImageItem $imageItem
*/
public function setImageItem(ImageItem $imageItem)
{
$this->imageItem = $imageItem;
}
/**
* @return ImageItem
*/
public function getImageItem()
{
return $this->imageItem;
}
/**
* The item ID. On creation, it can be provided but the ID must not be already
* used in the form. If not provided, a new ID is assigned.
*
* @param string $itemId
*/
public function setItemId($itemId)
{
$this->itemId = $itemId;
}
/**
* @return string
*/
public function getItemId()
{
return $this->itemId;
}
/**
* Starts a new page with a title.
*
* @param PageBreakItem $pageBreakItem
*/
public function setPageBreakItem(PageBreakItem $pageBreakItem)
{
$this->pageBreakItem = $pageBreakItem;
}
/**
* @return PageBreakItem
*/
public function getPageBreakItem()
{
return $this->pageBreakItem;
}
/**
* Poses one or more questions to the user with a single major prompt.
*
* @param QuestionGroupItem $questionGroupItem
*/
public function setQuestionGroupItem(QuestionGroupItem $questionGroupItem)
{
$this->questionGroupItem = $questionGroupItem;
}
/**
* @return QuestionGroupItem
*/
public function getQuestionGroupItem()
{
return $this->questionGroupItem;
}
/**
* Poses a question to the user.
*
* @param QuestionItem $questionItem
*/
public function setQuestionItem(QuestionItem $questionItem)
{
$this->questionItem = $questionItem;
}
/**
* @return QuestionItem
*/
public function getQuestionItem()
{
return $this->questionItem;
}
/**
* Displays a title and description on the page.
*
* @param TextItem $textItem
*/
public function setTextItem(TextItem $textItem)
{
$this->textItem = $textItem;
}
/**
* @return TextItem
*/
public function getTextItem()
{
return $this->textItem;
}
/**
* The title of the item.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Displays a video on the page.
*
* @param VideoItem $videoItem
*/
public function setVideoItem(VideoItem $videoItem)
{
$this->videoItem = $videoItem;
}
/**
* @return VideoItem
*/
public function getVideoItem()
{
return $this->videoItem;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Item::class, 'Google_Service_Forms_Item');

View File

@@ -0,0 +1,70 @@
<?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\Forms;
class ListFormResponsesResponse extends \Google\Collection
{
protected $collection_key = 'responses';
/**
* If set, there are more responses. To get the next page of responses,
* provide this as `page_token` in a future request.
*
* @var string
*/
public $nextPageToken;
protected $responsesType = FormResponse::class;
protected $responsesDataType = 'array';
/**
* If set, there are more responses. To get the next page of responses,
* provide this as `page_token` in a future request.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The returned form responses. Note: The `formId` field is not returned in
* the `FormResponse` object for list requests.
*
* @param FormResponse[] $responses
*/
public function setResponses($responses)
{
$this->responses = $responses;
}
/**
* @return FormResponse[]
*/
public function getResponses()
{
return $this->responses;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListFormResponsesResponse::class, 'Google_Service_Forms_ListFormResponsesResponse');

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\Forms;
class ListWatchesResponse extends \Google\Collection
{
protected $collection_key = 'watches';
protected $watchesType = Watch::class;
protected $watchesDataType = 'array';
/**
* The returned watches.
*
* @param Watch[] $watches
*/
public function setWatches($watches)
{
$this->watches = $watches;
}
/**
* @return Watch[]
*/
public function getWatches()
{
return $this->watches;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListWatchesResponse::class, 'Google_Service_Forms_ListWatchesResponse');

View File

@@ -0,0 +1,50 @@
<?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\Forms;
class Location extends \Google\Model
{
/**
* The index of an item in the form. This must be in the range [0..*N*), where
* *N* is the number of items in the form.
*
* @var int
*/
public $index;
/**
* The index of an item in the form. This must be in the range [0..*N*), where
* *N* is the number of items in the form.
*
* @param int $index
*/
public function setIndex($index)
{
$this->index = $index;
}
/**
* @return int
*/
public function getIndex()
{
return $this->index;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Location::class, 'Google_Service_Forms_Location');

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\Forms;
class MediaProperties extends \Google\Model
{
/**
* Default value. Unused.
*/
public const ALIGNMENT_ALIGNMENT_UNSPECIFIED = 'ALIGNMENT_UNSPECIFIED';
/**
* Left align.
*/
public const ALIGNMENT_LEFT = 'LEFT';
/**
* Right align.
*/
public const ALIGNMENT_RIGHT = 'RIGHT';
/**
* Center.
*/
public const ALIGNMENT_CENTER = 'CENTER';
/**
* Position of the media.
*
* @var string
*/
public $alignment;
/**
* The width of the media in pixels. When the media is displayed, it is scaled
* to the smaller of this value or the width of the displayed form. The
* original aspect ratio of the media is preserved. If a width is not
* specified when the media is added to the form, it is set to the width of
* the media source. Width must be between 0 and 740, inclusive. Setting width
* to 0 or unspecified is only permitted when updating the media source.
*
* @var int
*/
public $width;
/**
* Position of the media.
*
* Accepted values: ALIGNMENT_UNSPECIFIED, LEFT, RIGHT, CENTER
*
* @param self::ALIGNMENT_* $alignment
*/
public function setAlignment($alignment)
{
$this->alignment = $alignment;
}
/**
* @return self::ALIGNMENT_*
*/
public function getAlignment()
{
return $this->alignment;
}
/**
* The width of the media in pixels. When the media is displayed, it is scaled
* to the smaller of this value or the width of the displayed form. The
* original aspect ratio of the media is preserved. If a width is not
* specified when the media is added to the form, it is set to the width of
* the media source. Width must be between 0 and 740, inclusive. Setting width
* to 0 or unspecified is only permitted when updating the media source.
*
* @param int $width
*/
public function setWidth($width)
{
$this->width = $width;
}
/**
* @return int
*/
public function getWidth()
{
return $this->width;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MediaProperties::class, 'Google_Service_Forms_MediaProperties');

View File

@@ -0,0 +1,62 @@
<?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\Forms;
class MoveItemRequest extends \Google\Model
{
protected $newLocationType = Location::class;
protected $newLocationDataType = '';
protected $originalLocationType = Location::class;
protected $originalLocationDataType = '';
/**
* Required. The new location for the item.
*
* @param Location $newLocation
*/
public function setNewLocation(Location $newLocation)
{
$this->newLocation = $newLocation;
}
/**
* @return Location
*/
public function getNewLocation()
{
return $this->newLocation;
}
/**
* Required. The location of the item to move.
*
* @param Location $originalLocation
*/
public function setOriginalLocation(Location $originalLocation)
{
$this->originalLocation = $originalLocation;
}
/**
* @return Location
*/
public function getOriginalLocation()
{
return $this->originalLocation;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MoveItemRequest::class, 'Google_Service_Forms_MoveItemRequest');

View File

@@ -0,0 +1,153 @@
<?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\Forms;
class Option extends \Google\Model
{
/**
* Default value. Unused.
*/
public const GO_TO_ACTION_GO_TO_ACTION_UNSPECIFIED = 'GO_TO_ACTION_UNSPECIFIED';
/**
* Go to the next section.
*/
public const GO_TO_ACTION_NEXT_SECTION = 'NEXT_SECTION';
/**
* Go back to the beginning of the form.
*/
public const GO_TO_ACTION_RESTART_FORM = 'RESTART_FORM';
/**
* Submit form immediately.
*/
public const GO_TO_ACTION_SUBMIT_FORM = 'SUBMIT_FORM';
/**
* Section navigation type.
*
* @var string
*/
public $goToAction;
/**
* Item ID of section header to go to.
*
* @var string
*/
public $goToSectionId;
protected $imageType = Image::class;
protected $imageDataType = '';
/**
* Whether the option is "other". Currently only applies to `RADIO` and
* `CHECKBOX` choice types, but is not allowed in a QuestionGroupItem.
*
* @var bool
*/
public $isOther;
/**
* Required. The choice as presented to the user.
*
* @var string
*/
public $value;
/**
* Section navigation type.
*
* Accepted values: GO_TO_ACTION_UNSPECIFIED, NEXT_SECTION, RESTART_FORM,
* SUBMIT_FORM
*
* @param self::GO_TO_ACTION_* $goToAction
*/
public function setGoToAction($goToAction)
{
$this->goToAction = $goToAction;
}
/**
* @return self::GO_TO_ACTION_*
*/
public function getGoToAction()
{
return $this->goToAction;
}
/**
* Item ID of section header to go to.
*
* @param string $goToSectionId
*/
public function setGoToSectionId($goToSectionId)
{
$this->goToSectionId = $goToSectionId;
}
/**
* @return string
*/
public function getGoToSectionId()
{
return $this->goToSectionId;
}
/**
* Display image as an option.
*
* @param Image $image
*/
public function setImage(Image $image)
{
$this->image = $image;
}
/**
* @return Image
*/
public function getImage()
{
return $this->image;
}
/**
* Whether the option is "other". Currently only applies to `RADIO` and
* `CHECKBOX` choice types, but is not allowed in a QuestionGroupItem.
*
* @param bool $isOther
*/
public function setIsOther($isOther)
{
$this->isOther = $isOther;
}
/**
* @return bool
*/
public function getIsOther()
{
return $this->isOther;
}
/**
* Required. The choice as presented to the user.
*
* @param string $value
*/
public function setValue($value)
{
$this->value = $value;
}
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Option::class, 'Google_Service_Forms_Option');

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\Forms;
class PageBreakItem extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PageBreakItem::class, 'Google_Service_Forms_PageBreakItem');

View File

@@ -0,0 +1,47 @@
<?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\Forms;
class PublishSettings extends \Google\Model
{
protected $publishStateType = PublishState::class;
protected $publishStateDataType = '';
/**
* Optional. The publishing state of a form. When updating `publish_state`,
* both `is_published` and `is_accepting_responses` must be set. However,
* setting `is_accepting_responses` to `true` and `is_published` to `false`
* isn't supported and returns an error.
*
* @param PublishState $publishState
*/
public function setPublishState(PublishState $publishState)
{
$this->publishState = $publishState;
}
/**
* @return PublishState
*/
public function getPublishState()
{
return $this->publishState;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PublishSettings::class, 'Google_Service_Forms_PublishSettings');

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\Forms;
class PublishState extends \Google\Model
{
/**
* Required. Whether the form accepts responses. If `is_published` is set to
* `false`, this field is forced to `false`.
*
* @var bool
*/
public $isAcceptingResponses;
/**
* Required. Whether the form is published and visible to others.
*
* @var bool
*/
public $isPublished;
/**
* Required. Whether the form accepts responses. If `is_published` is set to
* `false`, this field is forced to `false`.
*
* @param bool $isAcceptingResponses
*/
public function setIsAcceptingResponses($isAcceptingResponses)
{
$this->isAcceptingResponses = $isAcceptingResponses;
}
/**
* @return bool
*/
public function getIsAcceptingResponses()
{
return $this->isAcceptingResponses;
}
/**
* Required. Whether the form is published and visible to others.
*
* @param bool $isPublished
*/
public function setIsPublished($isPublished)
{
$this->isPublished = $isPublished;
}
/**
* @return bool
*/
public function getIsPublished()
{
return $this->isPublished;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PublishState::class, 'Google_Service_Forms_PublishState');

View File

@@ -0,0 +1,236 @@
<?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\Forms;
class Question extends \Google\Model
{
protected $choiceQuestionType = ChoiceQuestion::class;
protected $choiceQuestionDataType = '';
protected $dateQuestionType = DateQuestion::class;
protected $dateQuestionDataType = '';
protected $fileUploadQuestionType = FileUploadQuestion::class;
protected $fileUploadQuestionDataType = '';
protected $gradingType = Grading::class;
protected $gradingDataType = '';
/**
* Read only. The question ID. On creation, it can be provided but the ID must
* not be already used in the form. If not provided, a new ID is assigned.
*
* @var string
*/
public $questionId;
protected $ratingQuestionType = RatingQuestion::class;
protected $ratingQuestionDataType = '';
/**
* Whether the question must be answered in order for a respondent to submit
* their response.
*
* @var bool
*/
public $required;
protected $rowQuestionType = RowQuestion::class;
protected $rowQuestionDataType = '';
protected $scaleQuestionType = ScaleQuestion::class;
protected $scaleQuestionDataType = '';
protected $textQuestionType = TextQuestion::class;
protected $textQuestionDataType = '';
protected $timeQuestionType = TimeQuestion::class;
protected $timeQuestionDataType = '';
/**
* A respondent can choose from a pre-defined set of options.
*
* @param ChoiceQuestion $choiceQuestion
*/
public function setChoiceQuestion(ChoiceQuestion $choiceQuestion)
{
$this->choiceQuestion = $choiceQuestion;
}
/**
* @return ChoiceQuestion
*/
public function getChoiceQuestion()
{
return $this->choiceQuestion;
}
/**
* A respondent can enter a date.
*
* @param DateQuestion $dateQuestion
*/
public function setDateQuestion(DateQuestion $dateQuestion)
{
$this->dateQuestion = $dateQuestion;
}
/**
* @return DateQuestion
*/
public function getDateQuestion()
{
return $this->dateQuestion;
}
/**
* A respondent can upload one or more files.
*
* @param FileUploadQuestion $fileUploadQuestion
*/
public function setFileUploadQuestion(FileUploadQuestion $fileUploadQuestion)
{
$this->fileUploadQuestion = $fileUploadQuestion;
}
/**
* @return FileUploadQuestion
*/
public function getFileUploadQuestion()
{
return $this->fileUploadQuestion;
}
/**
* Grading setup for the question.
*
* @param Grading $grading
*/
public function setGrading(Grading $grading)
{
$this->grading = $grading;
}
/**
* @return Grading
*/
public function getGrading()
{
return $this->grading;
}
/**
* Read only. The question ID. On creation, it can be provided but the ID must
* not be already used in the form. If not provided, a new ID is assigned.
*
* @param string $questionId
*/
public function setQuestionId($questionId)
{
$this->questionId = $questionId;
}
/**
* @return string
*/
public function getQuestionId()
{
return $this->questionId;
}
/**
* A respondent can choose a rating from a pre-defined set of icons.
*
* @param RatingQuestion $ratingQuestion
*/
public function setRatingQuestion(RatingQuestion $ratingQuestion)
{
$this->ratingQuestion = $ratingQuestion;
}
/**
* @return RatingQuestion
*/
public function getRatingQuestion()
{
return $this->ratingQuestion;
}
/**
* Whether the question must be answered in order for a respondent to submit
* their response.
*
* @param bool $required
*/
public function setRequired($required)
{
$this->required = $required;
}
/**
* @return bool
*/
public function getRequired()
{
return $this->required;
}
/**
* A row of a QuestionGroupItem.
*
* @param RowQuestion $rowQuestion
*/
public function setRowQuestion(RowQuestion $rowQuestion)
{
$this->rowQuestion = $rowQuestion;
}
/**
* @return RowQuestion
*/
public function getRowQuestion()
{
return $this->rowQuestion;
}
/**
* A respondent can choose a number from a range.
*
* @param ScaleQuestion $scaleQuestion
*/
public function setScaleQuestion(ScaleQuestion $scaleQuestion)
{
$this->scaleQuestion = $scaleQuestion;
}
/**
* @return ScaleQuestion
*/
public function getScaleQuestion()
{
return $this->scaleQuestion;
}
/**
* A respondent can enter a free text response.
*
* @param TextQuestion $textQuestion
*/
public function setTextQuestion(TextQuestion $textQuestion)
{
$this->textQuestion = $textQuestion;
}
/**
* @return TextQuestion
*/
public function getTextQuestion()
{
return $this->textQuestion;
}
/**
* A respondent can enter a time.
*
* @param TimeQuestion $timeQuestion
*/
public function setTimeQuestion(TimeQuestion $timeQuestion)
{
$this->timeQuestion = $timeQuestion;
}
/**
* @return TimeQuestion
*/
public function getTimeQuestion()
{
return $this->timeQuestion;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Question::class, 'Google_Service_Forms_Question');

View File

@@ -0,0 +1,85 @@
<?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\Forms;
class QuestionGroupItem extends \Google\Collection
{
protected $collection_key = 'questions';
protected $gridType = Grid::class;
protected $gridDataType = '';
protected $imageType = Image::class;
protected $imageDataType = '';
protected $questionsType = Question::class;
protected $questionsDataType = 'array';
/**
* The question group is a grid with rows of multiple choice questions that
* share the same options. When `grid` is set, all questions in the group must
* be of kind `row`.
*
* @param Grid $grid
*/
public function setGrid(Grid $grid)
{
$this->grid = $grid;
}
/**
* @return Grid
*/
public function getGrid()
{
return $this->grid;
}
/**
* The image displayed within the question group above the specific questions.
*
* @param Image $image
*/
public function setImage(Image $image)
{
$this->image = $image;
}
/**
* @return Image
*/
public function getImage()
{
return $this->image;
}
/**
* Required. A list of questions that belong in this question group. A
* question must only belong to one group. The `kind` of the group may affect
* what types of questions are allowed.
*
* @param Question[] $questions
*/
public function setQuestions($questions)
{
$this->questions = $questions;
}
/**
* @return Question[]
*/
public function getQuestions()
{
return $this->questions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QuestionGroupItem::class, 'Google_Service_Forms_QuestionGroupItem');

View File

@@ -0,0 +1,62 @@
<?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\Forms;
class QuestionItem extends \Google\Model
{
protected $imageType = Image::class;
protected $imageDataType = '';
protected $questionType = Question::class;
protected $questionDataType = '';
/**
* The image displayed within the question.
*
* @param Image $image
*/
public function setImage(Image $image)
{
$this->image = $image;
}
/**
* @return Image
*/
public function getImage()
{
return $this->image;
}
/**
* Required. The displayed question.
*
* @param Question $question
*/
public function setQuestion(Question $question)
{
$this->question = $question;
}
/**
* @return Question
*/
public function getQuestion()
{
return $this->question;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QuestionItem::class, 'Google_Service_Forms_QuestionItem');

View File

@@ -0,0 +1,52 @@
<?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\Forms;
class QuizSettings extends \Google\Model
{
/**
* Whether this form is a quiz or not. When true, responses are graded based
* on question Grading. Upon setting to false, all question Grading is
* deleted.
*
* @var bool
*/
public $isQuiz;
/**
* Whether this form is a quiz or not. When true, responses are graded based
* on question Grading. Upon setting to false, all question Grading is
* deleted.
*
* @param bool $isQuiz
*/
public function setIsQuiz($isQuiz)
{
$this->isQuiz = $isQuiz;
}
/**
* @return bool
*/
public function getIsQuiz()
{
return $this->isQuiz;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QuizSettings::class, 'Google_Service_Forms_QuizSettings');

View File

@@ -0,0 +1,88 @@
<?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\Forms;
class RatingQuestion extends \Google\Model
{
/**
* Default value. Unused.
*/
public const ICON_TYPE_RATING_ICON_TYPE_UNSPECIFIED = 'RATING_ICON_TYPE_UNSPECIFIED';
/**
* A star icon.
*/
public const ICON_TYPE_STAR = 'STAR';
/**
* A heart icon.
*/
public const ICON_TYPE_HEART = 'HEART';
/**
* A thumbs down icon.
*/
public const ICON_TYPE_THUMB_UP = 'THUMB_UP';
/**
* Required. The icon type to use for the rating.
*
* @var string
*/
public $iconType;
/**
* Required. The rating scale level of the rating question.
*
* @var int
*/
public $ratingScaleLevel;
/**
* Required. The icon type to use for the rating.
*
* Accepted values: RATING_ICON_TYPE_UNSPECIFIED, STAR, HEART, THUMB_UP
*
* @param self::ICON_TYPE_* $iconType
*/
public function setIconType($iconType)
{
$this->iconType = $iconType;
}
/**
* @return self::ICON_TYPE_*
*/
public function getIconType()
{
return $this->iconType;
}
/**
* Required. The rating scale level of the rating question.
*
* @param int $ratingScaleLevel
*/
public function setRatingScaleLevel($ratingScaleLevel)
{
$this->ratingScaleLevel = $ratingScaleLevel;
}
/**
* @return int
*/
public function getRatingScaleLevel()
{
return $this->ratingScaleLevel;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RatingQuestion::class, 'Google_Service_Forms_RatingQuestion');

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\Forms;
class RenewWatchRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RenewWatchRequest::class, 'Google_Service_Forms_RenewWatchRequest');

View File

@@ -0,0 +1,134 @@
<?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\Forms;
class Request extends \Google\Model
{
protected $createItemType = CreateItemRequest::class;
protected $createItemDataType = '';
protected $deleteItemType = DeleteItemRequest::class;
protected $deleteItemDataType = '';
protected $moveItemType = MoveItemRequest::class;
protected $moveItemDataType = '';
protected $updateFormInfoType = UpdateFormInfoRequest::class;
protected $updateFormInfoDataType = '';
protected $updateItemType = UpdateItemRequest::class;
protected $updateItemDataType = '';
protected $updateSettingsType = UpdateSettingsRequest::class;
protected $updateSettingsDataType = '';
/**
* Create a new item.
*
* @param CreateItemRequest $createItem
*/
public function setCreateItem(CreateItemRequest $createItem)
{
$this->createItem = $createItem;
}
/**
* @return CreateItemRequest
*/
public function getCreateItem()
{
return $this->createItem;
}
/**
* Delete an item.
*
* @param DeleteItemRequest $deleteItem
*/
public function setDeleteItem(DeleteItemRequest $deleteItem)
{
$this->deleteItem = $deleteItem;
}
/**
* @return DeleteItemRequest
*/
public function getDeleteItem()
{
return $this->deleteItem;
}
/**
* Move an item to a specified location.
*
* @param MoveItemRequest $moveItem
*/
public function setMoveItem(MoveItemRequest $moveItem)
{
$this->moveItem = $moveItem;
}
/**
* @return MoveItemRequest
*/
public function getMoveItem()
{
return $this->moveItem;
}
/**
* Update Form's Info.
*
* @param UpdateFormInfoRequest $updateFormInfo
*/
public function setUpdateFormInfo(UpdateFormInfoRequest $updateFormInfo)
{
$this->updateFormInfo = $updateFormInfo;
}
/**
* @return UpdateFormInfoRequest
*/
public function getUpdateFormInfo()
{
return $this->updateFormInfo;
}
/**
* Update an item.
*
* @param UpdateItemRequest $updateItem
*/
public function setUpdateItem(UpdateItemRequest $updateItem)
{
$this->updateItem = $updateItem;
}
/**
* @return UpdateItemRequest
*/
public function getUpdateItem()
{
return $this->updateItem;
}
/**
* Updates the Form's settings.
*
* @param UpdateSettingsRequest $updateSettings
*/
public function setUpdateSettings(UpdateSettingsRequest $updateSettings)
{
$this->updateSettings = $updateSettings;
}
/**
* @return UpdateSettingsRequest
*/
public function getUpdateSettings()
{
return $this->updateSettings;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Request::class, 'Google_Service_Forms_Request');

View File

@@ -0,0 +1,109 @@
<?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\Forms\Resource;
use Google\Service\Forms\BatchUpdateFormRequest;
use Google\Service\Forms\BatchUpdateFormResponse;
use Google\Service\Forms\Form;
use Google\Service\Forms\SetPublishSettingsRequest;
use Google\Service\Forms\SetPublishSettingsResponse;
/**
* The "forms" collection of methods.
* Typical usage is:
* <code>
* $formsService = new Google\Service\Forms(...);
* $forms = $formsService->forms;
* </code>
*/
class Forms extends \Google\Service\Resource
{
/**
* Change the form with a batch of updates. (forms.batchUpdate)
*
* @param string $formId Required. The form ID.
* @param BatchUpdateFormRequest $postBody
* @param array $optParams Optional parameters.
* @return BatchUpdateFormResponse
* @throws \Google\Service\Exception
*/
public function batchUpdate($formId, BatchUpdateFormRequest $postBody, $optParams = [])
{
$params = ['formId' => $formId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('batchUpdate', [$params], BatchUpdateFormResponse::class);
}
/**
* Create a new form using the title given in the provided form message in the
* request. *Important:* Only the form.info.title and form.info.document_title
* fields are copied to the new form. All other fields including the form
* description, items and settings are disallowed. To create a new form and add
* items, you must first call forms.create to create an empty form with a title
* and (optional) document title, and then call forms.update to add the items.
* (forms.create)
*
* @param Form $postBody
* @param array $optParams Optional parameters.
*
* @opt_param bool unpublished Optional. Whether the form is unpublished. If set
* to `true`, the form doesn't accept responses. If set to `false` or unset, the
* form is published and accepts responses.
* @return Form
* @throws \Google\Service\Exception
*/
public function create(Form $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Form::class);
}
/**
* Get a form. (forms.get)
*
* @param string $formId Required. The form ID.
* @param array $optParams Optional parameters.
* @return Form
* @throws \Google\Service\Exception
*/
public function get($formId, $optParams = [])
{
$params = ['formId' => $formId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Form::class);
}
/**
* Updates the publish settings of a form. Legacy forms aren't supported because
* they don't have the `publish_settings` field. (forms.setPublishSettings)
*
* @param string $formId Required. The ID of the form. You can get the id from
* Form.form_id field.
* @param SetPublishSettingsRequest $postBody
* @param array $optParams Optional parameters.
* @return SetPublishSettingsResponse
* @throws \Google\Service\Exception
*/
public function setPublishSettings($formId, SetPublishSettingsRequest $postBody, $optParams = [])
{
$params = ['formId' => $formId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('setPublishSettings', [$params], SetPublishSettingsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Forms::class, 'Google_Service_Forms_Resource_Forms');

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\Forms\Resource;
use Google\Service\Forms\FormResponse;
use Google\Service\Forms\ListFormResponsesResponse;
/**
* The "responses" collection of methods.
* Typical usage is:
* <code>
* $formsService = new Google\Service\Forms(...);
* $responses = $formsService->forms_responses;
* </code>
*/
class FormsResponses extends \Google\Service\Resource
{
/**
* Get one response from the form. (responses.get)
*
* @param string $formId Required. The form ID.
* @param string $responseId Required. The response ID within the form.
* @param array $optParams Optional parameters.
* @return FormResponse
* @throws \Google\Service\Exception
*/
public function get($formId, $responseId, $optParams = [])
{
$params = ['formId' => $formId, 'responseId' => $responseId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], FormResponse::class);
}
/**
* List a form's responses. (responses.listFormsResponses)
*
* @param string $formId Required. ID of the Form whose responses to list.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Which form responses to return. Currently, the only
* supported filters are: * timestamp > *N* which means to get all form
* responses submitted after (but not at) timestamp *N*. * timestamp >= *N*
* which means to get all form responses submitted at and after timestamp *N*.
* For both supported filters, timestamp must be formatted in RFC3339 UTC "Zulu"
* format. Examples: "2014-10-02T15:01:23Z" and
* "2014-10-02T15:01:23.045123456Z".
* @opt_param int pageSize The maximum number of responses to return. The
* service may return fewer than this value. If unspecified or zero, at most
* 5000 responses are returned.
* @opt_param string pageToken A page token returned by a previous list
* response. If this field is set, the form and the values of the filter must be
* the same as for the original request.
* @return ListFormResponsesResponse
* @throws \Google\Service\Exception
*/
public function listFormsResponses($formId, $optParams = [])
{
$params = ['formId' => $formId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListFormResponsesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FormsResponses::class, 'Google_Service_Forms_Resource_FormsResponses');

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\Forms\Resource;
use Google\Service\Forms\CreateWatchRequest;
use Google\Service\Forms\FormsEmpty;
use Google\Service\Forms\ListWatchesResponse;
use Google\Service\Forms\RenewWatchRequest;
use Google\Service\Forms\Watch;
/**
* The "watches" collection of methods.
* Typical usage is:
* <code>
* $formsService = new Google\Service\Forms(...);
* $watches = $formsService->forms_watches;
* </code>
*/
class FormsWatches extends \Google\Service\Resource
{
/**
* Create a new watch. If a watch ID is provided, it must be unused. For each
* invoking project, the per form limit is one watch per Watch.EventType. A
* watch expires seven days after it is created (see Watch.expire_time).
* (watches.create)
*
* @param string $formId Required. ID of the Form to watch.
* @param CreateWatchRequest $postBody
* @param array $optParams Optional parameters.
* @return Watch
* @throws \Google\Service\Exception
*/
public function create($formId, CreateWatchRequest $postBody, $optParams = [])
{
$params = ['formId' => $formId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Watch::class);
}
/**
* Delete a watch. (watches.delete)
*
* @param string $formId Required. The ID of the Form.
* @param string $watchId Required. The ID of the Watch to delete.
* @param array $optParams Optional parameters.
* @return FormsEmpty
* @throws \Google\Service\Exception
*/
public function delete($formId, $watchId, $optParams = [])
{
$params = ['formId' => $formId, 'watchId' => $watchId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], FormsEmpty::class);
}
/**
* Return a list of the watches owned by the invoking project. The maximum
* number of watches is two: For each invoker, the limit is one for each event
* type per form. (watches.listFormsWatches)
*
* @param string $formId Required. ID of the Form whose watches to list.
* @param array $optParams Optional parameters.
* @return ListWatchesResponse
* @throws \Google\Service\Exception
*/
public function listFormsWatches($formId, $optParams = [])
{
$params = ['formId' => $formId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListWatchesResponse::class);
}
/**
* Renew an existing watch for seven days. The state of the watch after renewal
* is `ACTIVE`, and the `expire_time` is seven days from the renewal. Renewing a
* watch in an error state (e.g. `SUSPENDED`) succeeds if the error is no longer
* present, but fail otherwise. After a watch has expired, RenewWatch returns
* `NOT_FOUND`. (watches.renew)
*
* @param string $formId Required. The ID of the Form.
* @param string $watchId Required. The ID of the Watch to renew.
* @param RenewWatchRequest $postBody
* @param array $optParams Optional parameters.
* @return Watch
* @throws \Google\Service\Exception
*/
public function renew($formId, $watchId, RenewWatchRequest $postBody, $optParams = [])
{
$params = ['formId' => $formId, 'watchId' => $watchId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('renew', [$params], Watch::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FormsWatches::class, 'Google_Service_Forms_Resource_FormsWatches');

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\Forms;
class Response extends \Google\Model
{
protected $createItemType = CreateItemResponse::class;
protected $createItemDataType = '';
/**
* The result of creating an item.
*
* @param CreateItemResponse $createItem
*/
public function setCreateItem(CreateItemResponse $createItem)
{
$this->createItem = $createItem;
}
/**
* @return CreateItemResponse
*/
public function getCreateItem()
{
return $this->createItem;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Response::class, 'Google_Service_Forms_Response');

View File

@@ -0,0 +1,48 @@
<?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\Forms;
class RowQuestion extends \Google\Model
{
/**
* Required. The title for the single row in the QuestionGroupItem.
*
* @var string
*/
public $title;
/**
* Required. The title for the single row in the QuestionGroupItem.
*
* @param string $title
*/
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(RowQuestion::class, 'Google_Service_Forms_RowQuestion');

View File

@@ -0,0 +1,114 @@
<?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\Forms;
class ScaleQuestion extends \Google\Model
{
/**
* Required. The highest possible value for the scale.
*
* @var int
*/
public $high;
/**
* The label to display describing the highest point on the scale.
*
* @var string
*/
public $highLabel;
/**
* Required. The lowest possible value for the scale.
*
* @var int
*/
public $low;
/**
* The label to display describing the lowest point on the scale.
*
* @var string
*/
public $lowLabel;
/**
* Required. The highest possible value for the scale.
*
* @param int $high
*/
public function setHigh($high)
{
$this->high = $high;
}
/**
* @return int
*/
public function getHigh()
{
return $this->high;
}
/**
* The label to display describing the highest point on the scale.
*
* @param string $highLabel
*/
public function setHighLabel($highLabel)
{
$this->highLabel = $highLabel;
}
/**
* @return string
*/
public function getHighLabel()
{
return $this->highLabel;
}
/**
* Required. The lowest possible value for the scale.
*
* @param int $low
*/
public function setLow($low)
{
$this->low = $low;
}
/**
* @return int
*/
public function getLow()
{
return $this->low;
}
/**
* The label to display describing the lowest point on the scale.
*
* @param string $lowLabel
*/
public function setLowLabel($lowLabel)
{
$this->lowLabel = $lowLabel;
}
/**
* @return string
*/
public function getLowLabel()
{
return $this->lowLabel;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ScaleQuestion::class, 'Google_Service_Forms_ScaleQuestion');

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\Forms;
class SetPublishSettingsRequest extends \Google\Model
{
protected $publishSettingsType = PublishSettings::class;
protected $publishSettingsDataType = '';
/**
* Optional. The `publish_settings` fields to update. This field mask accepts
* the following values: * `publish_state`: Updates or replaces all
* `publish_state` settings. * `"*"`: Updates or replaces all
* `publish_settings` fields.
*
* @var string
*/
public $updateMask;
/**
* Required. The desired publish settings to apply to the form.
*
* @param PublishSettings $publishSettings
*/
public function setPublishSettings(PublishSettings $publishSettings)
{
$this->publishSettings = $publishSettings;
}
/**
* @return PublishSettings
*/
public function getPublishSettings()
{
return $this->publishSettings;
}
/**
* Optional. The `publish_settings` fields to update. This field mask accepts
* the following values: * `publish_state`: Updates or replaces all
* `publish_state` settings. * `"*"`: Updates or replaces all
* `publish_settings` fields.
*
* @param string $updateMask
*/
public function setUpdateMask($updateMask)
{
$this->updateMask = $updateMask;
}
/**
* @return string
*/
public function getUpdateMask()
{
return $this->updateMask;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SetPublishSettingsRequest::class, 'Google_Service_Forms_SetPublishSettingsRequest');

View File

@@ -0,0 +1,66 @@
<?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\Forms;
class SetPublishSettingsResponse extends \Google\Model
{
/**
* Required. The ID of the Form. This is same as the Form.form_id field.
*
* @var string
*/
public $formId;
protected $publishSettingsType = PublishSettings::class;
protected $publishSettingsDataType = '';
/**
* Required. The ID of the Form. This is same as the Form.form_id field.
*
* @param string $formId
*/
public function setFormId($formId)
{
$this->formId = $formId;
}
/**
* @return string
*/
public function getFormId()
{
return $this->formId;
}
/**
* The publish settings of the form.
*
* @param PublishSettings $publishSettings
*/
public function setPublishSettings(PublishSettings $publishSettings)
{
$this->publishSettings = $publishSettings;
}
/**
* @return PublishSettings
*/
public function getPublishSettings()
{
return $this->publishSettings;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SetPublishSettingsResponse::class, 'Google_Service_Forms_SetPublishSettingsResponse');

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\Forms;
class TextAnswer extends \Google\Model
{
/**
* Output only. The answer value. Formatting used for different kinds of
* question: * ChoiceQuestion * `RADIO` or `DROP_DOWN`: A single string
* corresponding to the option that was selected. * `CHECKBOX`: Multiple
* strings corresponding to each option that was selected. * TextQuestion: The
* text that the user entered. * ScaleQuestion: A string containing the number
* that was selected. * DateQuestion * Without time or year: MM-DD e.g.
* "05-19" * With year: YYYY-MM-DD e.g. "1986-05-19" * With time: MM-DD HH:MM
* e.g. "05-19 14:51" * With year and time: YYYY-MM-DD HH:MM e.g. "1986-05-19
* 14:51" * TimeQuestion: String with time or duration in HH:MM format e.g.
* "14:51" * RowQuestion within QuestionGroupItem: The answer for each row of
* a QuestionGroupItem is represented as a separate Answer. Each will contain
* one string for `RADIO`-type choices or multiple strings for `CHECKBOX`
* choices.
*
* @var string
*/
public $value;
/**
* Output only. The answer value. Formatting used for different kinds of
* question: * ChoiceQuestion * `RADIO` or `DROP_DOWN`: A single string
* corresponding to the option that was selected. * `CHECKBOX`: Multiple
* strings corresponding to each option that was selected. * TextQuestion: The
* text that the user entered. * ScaleQuestion: A string containing the number
* that was selected. * DateQuestion * Without time or year: MM-DD e.g.
* "05-19" * With year: YYYY-MM-DD e.g. "1986-05-19" * With time: MM-DD HH:MM
* e.g. "05-19 14:51" * With year and time: YYYY-MM-DD HH:MM e.g. "1986-05-19
* 14:51" * TimeQuestion: String with time or duration in HH:MM format e.g.
* "14:51" * RowQuestion within QuestionGroupItem: The answer for each row of
* a QuestionGroupItem is represented as a separate Answer. Each will contain
* one string for `RADIO`-type choices or multiple strings for `CHECKBOX`
* choices.
*
* @param string $value
*/
public function setValue($value)
{
$this->value = $value;
}
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TextAnswer::class, 'Google_Service_Forms_TextAnswer');

View File

@@ -0,0 +1,46 @@
<?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\Forms;
class TextAnswers extends \Google\Collection
{
protected $collection_key = 'answers';
protected $answersType = TextAnswer::class;
protected $answersDataType = 'array';
/**
* Output only. Answers to a question. For multiple-value ChoiceQuestions,
* each answer is a separate value.
*
* @param TextAnswer[] $answers
*/
public function setAnswers($answers)
{
$this->answers = $answers;
}
/**
* @return TextAnswer[]
*/
public function getAnswers()
{
return $this->answers;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TextAnswers::class, 'Google_Service_Forms_TextAnswers');

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\Forms;
class TextItem extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TextItem::class, 'Google_Service_Forms_TextItem');

View File

@@ -0,0 +1,70 @@
<?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\Forms;
class TextLink extends \Google\Model
{
/**
* Required. Display text for the URI.
*
* @var string
*/
public $displayText;
/**
* Required. The URI.
*
* @var string
*/
public $uri;
/**
* Required. Display text for the URI.
*
* @param string $displayText
*/
public function setDisplayText($displayText)
{
$this->displayText = $displayText;
}
/**
* @return string
*/
public function getDisplayText()
{
return $this->displayText;
}
/**
* Required. The URI.
*
* @param string $uri
*/
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(TextLink::class, 'Google_Service_Forms_TextLink');

View File

@@ -0,0 +1,50 @@
<?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\Forms;
class TextQuestion extends \Google\Model
{
/**
* Whether the question is a paragraph question or not. If not, the question
* is a short text question.
*
* @var bool
*/
public $paragraph;
/**
* Whether the question is a paragraph question or not. If not, the question
* is a short text question.
*
* @param bool $paragraph
*/
public function setParagraph($paragraph)
{
$this->paragraph = $paragraph;
}
/**
* @return bool
*/
public function getParagraph()
{
return $this->paragraph;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TextQuestion::class, 'Google_Service_Forms_TextQuestion');

View File

@@ -0,0 +1,50 @@
<?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\Forms;
class TimeQuestion extends \Google\Model
{
/**
* `true` if the question is about an elapsed time. Otherwise it is about a
* time of day.
*
* @var bool
*/
public $duration;
/**
* `true` if the question is about an elapsed time. Otherwise it is about a
* time of day.
*
* @param bool $duration
*/
public function setDuration($duration)
{
$this->duration = $duration;
}
/**
* @return bool
*/
public function getDuration()
{
return $this->duration;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TimeQuestion::class, 'Google_Service_Forms_TimeQuestion');

View File

@@ -0,0 +1,70 @@
<?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\Forms;
class UpdateFormInfoRequest extends \Google\Model
{
protected $infoType = Info::class;
protected $infoDataType = '';
/**
* Required. Only values named in this mask are changed. At least one field
* must be specified. The root `info` is implied and should not be specified.
* A single `"*"` can be used as short-hand for updating every field.
*
* @var string
*/
public $updateMask;
/**
* The info to update.
*
* @param Info $info
*/
public function setInfo(Info $info)
{
$this->info = $info;
}
/**
* @return Info
*/
public function getInfo()
{
return $this->info;
}
/**
* Required. Only values named in this mask are changed. At least one field
* must be specified. The root `info` is implied and should not be specified.
* A single `"*"` can be used as short-hand for updating every field.
*
* @param string $updateMask
*/
public function setUpdateMask($updateMask)
{
$this->updateMask = $updateMask;
}
/**
* @return string
*/
public function getUpdateMask()
{
return $this->updateMask;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UpdateFormInfoRequest::class, 'Google_Service_Forms_UpdateFormInfoRequest');

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\Forms;
class UpdateItemRequest extends \Google\Model
{
protected $itemType = Item::class;
protected $itemDataType = '';
protected $locationType = Location::class;
protected $locationDataType = '';
/**
* Required. Only values named in this mask are changed.
*
* @var string
*/
public $updateMask;
/**
* Required. New values for the item. Note that item and question IDs are used
* if they are provided (and are in the field mask). If an ID is blank (and in
* the field mask) a new ID is generated. This means you can modify an item by
* getting the form via forms.get, modifying your local copy of that item to
* be how you want it, and using UpdateItemRequest to write it back, with the
* IDs being the same (or not in the field mask).
*
* @param Item $item
*/
public function setItem(Item $item)
{
$this->item = $item;
}
/**
* @return Item
*/
public function getItem()
{
return $this->item;
}
/**
* Required. The location identifying the item to update.
*
* @param Location $location
*/
public function setLocation(Location $location)
{
$this->location = $location;
}
/**
* @return Location
*/
public function getLocation()
{
return $this->location;
}
/**
* Required. Only values named in this mask are changed.
*
* @param string $updateMask
*/
public function setUpdateMask($updateMask)
{
$this->updateMask = $updateMask;
}
/**
* @return string
*/
public function getUpdateMask()
{
return $this->updateMask;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UpdateItemRequest::class, 'Google_Service_Forms_UpdateItemRequest');

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\Forms;
class UpdateSettingsRequest extends \Google\Model
{
protected $settingsType = FormSettings::class;
protected $settingsDataType = '';
/**
* Required. Only values named in this mask are changed. At least one field
* must be specified. The root `settings` is implied and should not be
* specified. A single `"*"` can be used as short-hand for updating every
* field.
*
* @var string
*/
public $updateMask;
/**
* Required. The settings to update with.
*
* @param FormSettings $settings
*/
public function setSettings(FormSettings $settings)
{
$this->settings = $settings;
}
/**
* @return FormSettings
*/
public function getSettings()
{
return $this->settings;
}
/**
* Required. Only values named in this mask are changed. At least one field
* must be specified. The root `settings` is implied and should not be
* specified. A single `"*"` can be used as short-hand for updating every
* field.
*
* @param string $updateMask
*/
public function setUpdateMask($updateMask)
{
$this->updateMask = $updateMask;
}
/**
* @return string
*/
public function getUpdateMask()
{
return $this->updateMask;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UpdateSettingsRequest::class, 'Google_Service_Forms_UpdateSettingsRequest');

View File

@@ -0,0 +1,66 @@
<?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\Forms;
class Video extends \Google\Model
{
protected $propertiesType = MediaProperties::class;
protected $propertiesDataType = '';
/**
* Required. A YouTube URI.
*
* @var string
*/
public $youtubeUri;
/**
* Properties of a video.
*
* @param MediaProperties $properties
*/
public function setProperties(MediaProperties $properties)
{
$this->properties = $properties;
}
/**
* @return MediaProperties
*/
public function getProperties()
{
return $this->properties;
}
/**
* Required. A YouTube URI.
*
* @param string $youtubeUri
*/
public function setYoutubeUri($youtubeUri)
{
$this->youtubeUri = $youtubeUri;
}
/**
* @return string
*/
public function getYoutubeUri()
{
return $this->youtubeUri;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Video::class, 'Google_Service_Forms_Video');

View File

@@ -0,0 +1,66 @@
<?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\Forms;
class VideoItem extends \Google\Model
{
/**
* The text displayed below the video.
*
* @var string
*/
public $caption;
protected $videoType = Video::class;
protected $videoDataType = '';
/**
* The text displayed below the video.
*
* @param string $caption
*/
public function setCaption($caption)
{
$this->caption = $caption;
}
/**
* @return string
*/
public function getCaption()
{
return $this->caption;
}
/**
* Required. The video displayed in the item.
*
* @param Video $video
*/
public function setVideo(Video $video)
{
$this->video = $video;
}
/**
* @return Video
*/
public function getVideo()
{
return $this->video;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(VideoItem::class, 'Google_Service_Forms_VideoItem');

View File

@@ -0,0 +1,70 @@
<?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\Forms;
class VideoLink extends \Google\Model
{
/**
* Required. The display text for the link.
*
* @var string
*/
public $displayText;
/**
* The URI of a YouTube video.
*
* @var string
*/
public $youtubeUri;
/**
* Required. The display text for the link.
*
* @param string $displayText
*/
public function setDisplayText($displayText)
{
$this->displayText = $displayText;
}
/**
* @return string
*/
public function getDisplayText()
{
return $this->displayText;
}
/**
* The URI of a YouTube video.
*
* @param string $youtubeUri
*/
public function setYoutubeUri($youtubeUri)
{
$this->youtubeUri = $youtubeUri;
}
/**
* @return string
*/
public function getYoutubeUri()
{
return $this->youtubeUri;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(VideoLink::class, 'Google_Service_Forms_VideoLink');

View File

@@ -0,0 +1,243 @@
<?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\Forms;
class Watch extends \Google\Model
{
/**
* Unspecified error type.
*/
public const ERROR_TYPE_ERROR_TYPE_UNSPECIFIED = 'ERROR_TYPE_UNSPECIFIED';
/**
* The cloud project does not have access to the form being watched. This
* occurs if the user has revoked the authorization for your project to access
* their form(s). Watches with this error will not be retried. To attempt to
* begin watching the form again a call can be made to watches.renew
*/
public const ERROR_TYPE_PROJECT_NOT_AUTHORIZED = 'PROJECT_NOT_AUTHORIZED';
/**
* The user that granted access no longer has access to the form being
* watched. Watches with this error will not be retried. To attempt to begin
* watching the form again a call can be made to watches.renew
*/
public const ERROR_TYPE_NO_USER_ACCESS = 'NO_USER_ACCESS';
/**
* Another type of error has occurred. Whether notifications will continue
* depends on the watch state.
*/
public const ERROR_TYPE_OTHER_ERRORS = 'OTHER_ERRORS';
/**
* Unspecified event type. This value should not be used.
*/
public const EVENT_TYPE_EVENT_TYPE_UNSPECIFIED = 'EVENT_TYPE_UNSPECIFIED';
/**
* The schema event type. A watch with this event type will be notified about
* changes to form content and settings.
*/
public const EVENT_TYPE_SCHEMA = 'SCHEMA';
/**
* The responses event type. A watch with this event type will be notified
* when form responses are submitted.
*/
public const EVENT_TYPE_RESPONSES = 'RESPONSES';
/**
* Unspecified state.
*/
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* Watch is active.
*/
public const STATE_ACTIVE = 'ACTIVE';
/**
* The watch is suspended due to an error that may be resolved. The watch will
* continue to exist until it expires. To attempt to reactivate the watch a
* call can be made to watches.renew
*/
public const STATE_SUSPENDED = 'SUSPENDED';
/**
* Output only. Timestamp of when this was created.
*
* @var string
*/
public $createTime;
/**
* Output only. The most recent error type for an attempted delivery. To begin
* watching the form again a call can be made to watches.renew which also
* clears this error information.
*
* @var string
*/
public $errorType;
/**
* Required. Which event type to watch for.
*
* @var string
*/
public $eventType;
/**
* Output only. Timestamp for when this will expire. Each watches.renew call
* resets this to seven days in the future.
*
* @var string
*/
public $expireTime;
/**
* Output only. The ID of this watch. See notes on
* CreateWatchRequest.watch_id.
*
* @var string
*/
public $id;
/**
* Output only. The current state of the watch. Additional details about
* suspended watches can be found by checking the `error_type`.
*
* @var string
*/
public $state;
protected $targetType = WatchTarget::class;
protected $targetDataType = '';
/**
* Output only. Timestamp of when this was created.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* Output only. The most recent error type for an attempted delivery. To begin
* watching the form again a call can be made to watches.renew which also
* clears this error information.
*
* Accepted values: ERROR_TYPE_UNSPECIFIED, PROJECT_NOT_AUTHORIZED,
* NO_USER_ACCESS, OTHER_ERRORS
*
* @param self::ERROR_TYPE_* $errorType
*/
public function setErrorType($errorType)
{
$this->errorType = $errorType;
}
/**
* @return self::ERROR_TYPE_*
*/
public function getErrorType()
{
return $this->errorType;
}
/**
* Required. Which event type to watch for.
*
* Accepted values: EVENT_TYPE_UNSPECIFIED, SCHEMA, RESPONSES
*
* @param self::EVENT_TYPE_* $eventType
*/
public function setEventType($eventType)
{
$this->eventType = $eventType;
}
/**
* @return self::EVENT_TYPE_*
*/
public function getEventType()
{
return $this->eventType;
}
/**
* Output only. Timestamp for when this will expire. Each watches.renew call
* resets this to seven days in the future.
*
* @param string $expireTime
*/
public function setExpireTime($expireTime)
{
$this->expireTime = $expireTime;
}
/**
* @return string
*/
public function getExpireTime()
{
return $this->expireTime;
}
/**
* Output only. The ID of this watch. See notes on
* CreateWatchRequest.watch_id.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* Output only. The current state of the watch. Additional details about
* suspended watches can be found by checking the `error_type`.
*
* Accepted values: STATE_UNSPECIFIED, ACTIVE, SUSPENDED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
/**
* Required. Where to send the notification.
*
* @param WatchTarget $target
*/
public function setTarget(WatchTarget $target)
{
$this->target = $target;
}
/**
* @return WatchTarget
*/
public function getTarget()
{
return $this->target;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Watch::class, 'Google_Service_Forms_Watch');

View File

@@ -0,0 +1,48 @@
<?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\Forms;
class WatchTarget extends \Google\Model
{
protected $topicType = CloudPubsubTopic::class;
protected $topicDataType = '';
/**
* A Pub/Sub topic. To receive notifications, the topic must grant publish
* privileges to the Forms service account `serviceAccount:forms-
* notifications@system.gserviceaccount.com`. Only the project that owns a
* topic may create a watch with it. Pub/Sub delivery guarantees should be
* considered.
*
* @param CloudPubsubTopic $topic
*/
public function setTopic(CloudPubsubTopic $topic)
{
$this->topic = $topic;
}
/**
* @return CloudPubsubTopic
*/
public function getTopic()
{
return $this->topic;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(WatchTarget::class, 'Google_Service_Forms_WatchTarget');

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\Forms;
class WriteControl extends \Google\Model
{
/**
* The revision ID of the form that the write request is applied to. If this
* is not the latest revision of the form, the request is not processed and
* returns a 400 bad request error.
*
* @var string
*/
public $requiredRevisionId;
/**
* The target revision ID of the form that the write request is applied to. If
* changes have occurred after this revision, the changes in this update
* request are transformed against those changes. This results in a new
* revision of the form that incorporates both the changes in the request and
* the intervening changes, with the server resolving conflicting changes. The
* target revision ID may only be used to write to recent versions of a form.
* If the target revision is too far behind the latest revision, the request
* is not processed and returns a 400 (Bad Request Error). The request may be
* retried after reading the latest version of the form. In most cases a
* target revision ID remains valid for several minutes after it is read, but
* for frequently-edited forms this window may be shorter.
*
* @var string
*/
public $targetRevisionId;
/**
* The revision ID of the form that the write request is applied to. If this
* is not the latest revision of the form, the request is not processed and
* returns a 400 bad request error.
*
* @param string $requiredRevisionId
*/
public function setRequiredRevisionId($requiredRevisionId)
{
$this->requiredRevisionId = $requiredRevisionId;
}
/**
* @return string
*/
public function getRequiredRevisionId()
{
return $this->requiredRevisionId;
}
/**
* The target revision ID of the form that the write request is applied to. If
* changes have occurred after this revision, the changes in this update
* request are transformed against those changes. This results in a new
* revision of the form that incorporates both the changes in the request and
* the intervening changes, with the server resolving conflicting changes. The
* target revision ID may only be used to write to recent versions of a form.
* If the target revision is too far behind the latest revision, the request
* is not processed and returns a 400 (Bad Request Error). The request may be
* retried after reading the latest version of the form. In most cases a
* target revision ID remains valid for several minutes after it is read, but
* for frequently-edited forms this window may be shorter.
*
* @param string $targetRevisionId
*/
public function setTargetRevisionId($targetRevisionId)
{
$this->targetRevisionId = $targetRevisionId;
}
/**
* @return string
*/
public function getTargetRevisionId()
{
return $this->targetRevisionId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(WriteControl::class, 'Google_Service_Forms_WriteControl');