Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions
@@ -0,0 +1,86 @@
<?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;
/**
* 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.
* @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);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Forms::class, 'Google_Service_Forms_Resource_Forms');
@@ -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');
@@ -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');