Google_OrgunitsServiceResource

The "orgunits" collection of methods.

Defined (1)

The class is defined in the following location(s).

/src/contrib/Google_DirectoryService.php  
  1. class Google_OrgunitsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Remove Organization Unit (orgunits.delete) 
  6. * @param string $customerId Immutable id of the Google Apps account 
  7. * @param string $orgUnitPath Full path of the organization unit 
  8. * @param array $optParams Optional parameters. 
  9. */ 
  10. public function delete($customerId, $orgUnitPath, $optParams = array()) { 
  11. $params = array('customerId' => $customerId, 'orgUnitPath' => $orgUnitPath); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('delete', array($params)); 
  14. return $data; 
  15. /** 
  16. * Retrieve Organization Unit (orgunits.get) 
  17. * @param string $customerId Immutable id of the Google Apps account 
  18. * @param string $orgUnitPath Full path of the organization unit 
  19. * @param array $optParams Optional parameters. 
  20. * @return Google_OrgUnit 
  21. */ 
  22. public function get($customerId, $orgUnitPath, $optParams = array()) { 
  23. $params = array('customerId' => $customerId, 'orgUnitPath' => $orgUnitPath); 
  24. $params = array_merge($params, $optParams); 
  25. $data = $this->__call('get', array($params)); 
  26. if ($this->useObjects()) { 
  27. return new Google_OrgUnit($data); 
  28. } else { 
  29. return $data; 
  30. /** 
  31. * Add Organization Unit (orgunits.insert) 
  32. * @param string $customerId Immutable id of the Google Apps account 
  33. * @param Google_OrgUnit $postBody 
  34. * @param array $optParams Optional parameters. 
  35. * @return Google_OrgUnit 
  36. */ 
  37. public function insert($customerId, Google_OrgUnit $postBody, $optParams = array()) { 
  38. $params = array('customerId' => $customerId, 'postBody' => $postBody); 
  39. $params = array_merge($params, $optParams); 
  40. $data = $this->__call('insert', array($params)); 
  41. if ($this->useObjects()) { 
  42. return new Google_OrgUnit($data); 
  43. } else { 
  44. return $data; 
  45. /** 
  46. * Retrieve all Organization Units (orgunits.list) 
  47. * @param string $customerId Immutable id of the Google Apps account 
  48. * @param array $optParams Optional parameters. 
  49. * @opt_param string orgUnitPath the URL-encoded organization unit 
  50. * @opt_param string type Whether to return all sub-organizations or just immediate children 
  51. * @return Google_OrgUnits 
  52. */ 
  53. public function listOrgunits($customerId, $optParams = array()) { 
  54. $params = array('customerId' => $customerId); 
  55. $params = array_merge($params, $optParams); 
  56. $data = $this->__call('list', array($params)); 
  57. if ($this->useObjects()) { 
  58. return new Google_OrgUnits($data); 
  59. } else { 
  60. return $data; 
  61. /** 
  62. * Update Organization Unit. This method supports patch semantics. (orgunits.patch) 
  63. * @param string $customerId Immutable id of the Google Apps account 
  64. * @param string $orgUnitPath Full path of the organization unit 
  65. * @param Google_OrgUnit $postBody 
  66. * @param array $optParams Optional parameters. 
  67. * @return Google_OrgUnit 
  68. */ 
  69. public function patch($customerId, $orgUnitPath, Google_OrgUnit $postBody, $optParams = array()) { 
  70. $params = array('customerId' => $customerId, 'orgUnitPath' => $orgUnitPath, 'postBody' => $postBody); 
  71. $params = array_merge($params, $optParams); 
  72. $data = $this->__call('patch', array($params)); 
  73. if ($this->useObjects()) { 
  74. return new Google_OrgUnit($data); 
  75. } else { 
  76. return $data; 
  77. /** 
  78. * Update Organization Unit (orgunits.update) 
  79. * @param string $customerId Immutable id of the Google Apps account 
  80. * @param string $orgUnitPath Full path of the organization unit 
  81. * @param Google_OrgUnit $postBody 
  82. * @param array $optParams Optional parameters. 
  83. * @return Google_OrgUnit 
  84. */ 
  85. public function update($customerId, $orgUnitPath, Google_OrgUnit $postBody, $optParams = array()) { 
  86. $params = array('customerId' => $customerId, 'orgUnitPath' => $orgUnitPath, 'postBody' => $postBody); 
  87. $params = array_merge($params, $optParams); 
  88. $data = $this->__call('update', array($params)); 
  89. if ($this->useObjects()) { 
  90. return new Google_OrgUnit($data); 
  91. } else { 
  92. return $data;