No Description

TemplatesResource.php 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. /**
  18. * The "templates" collection of methods.
  19. * Typical usage is:
  20. * <code>
  21. * $managerService = new Google_Service_Manager(...);
  22. * $templates = $managerService->templates;
  23. * </code>
  24. */
  25. class Google_Service_Manager_TemplatesResource extends Google_Service_Resource
  26. {
  27. /**
  28. * (templates.delete)
  29. *
  30. * @param string $projectId
  31. * @param string $templateName
  32. * @param array $optParams Optional parameters.
  33. */
  34. public function delete($projectId, $templateName, $optParams = array())
  35. {
  36. $params = array('projectId' => $projectId, 'templateName' => $templateName);
  37. $params = array_merge($params, $optParams);
  38. return $this->call('delete', array($params));
  39. }
  40. /**
  41. * (templates.get)
  42. *
  43. * @param string $projectId
  44. * @param string $templateName
  45. * @param array $optParams Optional parameters.
  46. * @return Google_Service_Template
  47. */
  48. public function get($projectId, $templateName, $optParams = array())
  49. {
  50. $params = array('projectId' => $projectId, 'templateName' => $templateName);
  51. $params = array_merge($params, $optParams);
  52. return $this->call('get', array($params), "Google_Service_Manager_Template");
  53. }
  54. /**
  55. * (templates.insert)
  56. *
  57. * @param string $projectId
  58. * @param Google_Template $postBody
  59. * @param array $optParams Optional parameters.
  60. * @return Google_Service_Template
  61. */
  62. public function insert($projectId, Google_Service_Manager_Template $postBody, $optParams = array())
  63. {
  64. $params = array('projectId' => $projectId, 'postBody' => $postBody);
  65. $params = array_merge($params, $optParams);
  66. return $this->call('insert', array($params), "Google_Service_Manager_Template");
  67. }
  68. /**
  69. * (templates.listTemplates)
  70. *
  71. * @param string $projectId
  72. * @param array $optParams Optional parameters.
  73. *
  74. * @opt_param int maxResults Maximum count of results to be returned. Acceptable
  75. * values are 0 to 100, inclusive. (Default: 50)
  76. * @opt_param string pageToken Specifies a nextPageToken returned by a previous
  77. * list request. This token can be used to request the next page of results from
  78. * a previous list request.
  79. * @return Google_Service_TemplatesListResponse
  80. */
  81. public function listTemplates($projectId, $optParams = array())
  82. {
  83. $params = array('projectId' => $projectId);
  84. $params = array_merge($params, $optParams);
  85. return $this->call('list', array($params), "Google_Service_Manager_TemplatesListResponse");
  86. }
  87. }