Google_OrgunitsServiceResource
The "orgunits" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /google-api-php-client/src/contrib/Google_DirectoryService.php
- class Google_OrgunitsServiceResource extends Google_ServiceResource {
- /**
- * Remove Organization Unit (orgunits.delete)
- *
- * @param string $customerId Immutable id of the Google Apps account
- * @param string $orgUnitPath Full path of the organization unit
- * @param array $optParams Optional parameters.
- */
- public function delete($customerId, $orgUnitPath, $optParams = array()) {
- $params = array('customerId' => $customerId, 'orgUnitPath' => $orgUnitPath);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- /**
- * Retrieve Organization Unit (orgunits.get)
- *
- * @param string $customerId Immutable id of the Google Apps account
- * @param string $orgUnitPath Full path of the organization unit
- * @param array $optParams Optional parameters.
- * @return Google_OrgUnit
- */
- public function get($customerId, $orgUnitPath, $optParams = array()) {
- $params = array('customerId' => $customerId, 'orgUnitPath' => $orgUnitPath);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_OrgUnit($data);
- } else {
- return $data;
- }
- }
- /**
- * Add Organization Unit (orgunits.insert)
- *
- * @param string $customerId Immutable id of the Google Apps account
- * @param Google_OrgUnit $postBody
- * @param array $optParams Optional parameters.
- * @return Google_OrgUnit
- */
- public function insert($customerId, Google_OrgUnit $postBody, $optParams = array()) {
- $params = array('customerId' => $customerId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_OrgUnit($data);
- } else {
- return $data;
- }
- }
- /**
- * Retrieve all Organization Units (orgunits.list)
- *
- * @param string $customerId Immutable id of the Google Apps account
- * @param array $optParams Optional parameters.
- *
- * @opt_param string orgUnitPath the URL-encoded organization unit
- * @opt_param string type Whether to return all sub-organizations or just immediate children
- * @return Google_OrgUnits
- */
- public function listOrgunits($customerId, $optParams = array()) {
- $params = array('customerId' => $customerId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_OrgUnits($data);
- } else {
- return $data;
- }
- }
- /**
- * Update Organization Unit. This method supports patch semantics. (orgunits.patch)
- *
- * @param string $customerId Immutable id of the Google Apps account
- * @param string $orgUnitPath Full path of the organization unit
- * @param Google_OrgUnit $postBody
- * @param array $optParams Optional parameters.
- * @return Google_OrgUnit
- */
- public function patch($customerId, $orgUnitPath, Google_OrgUnit $postBody, $optParams = array()) {
- $params = array('customerId' => $customerId, 'orgUnitPath' => $orgUnitPath, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('patch', array($params));
- if ($this->useObjects()) {
- return new Google_OrgUnit($data);
- } else {
- return $data;
- }
- }
- /**
- * Update Organization Unit (orgunits.update)
- *
- * @param string $customerId Immutable id of the Google Apps account
- * @param string $orgUnitPath Full path of the organization unit
- * @param Google_OrgUnit $postBody
- * @param array $optParams Optional parameters.
- * @return Google_OrgUnit
- */
- public function update($customerId, $orgUnitPath, Google_OrgUnit $postBody, $optParams = array()) {
- $params = array('customerId' => $customerId, 'orgUnitPath' => $orgUnitPath, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_OrgUnit($data);
- } else {
- return $data;
- }
- }
- }