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
18namespace Google\Service\ChromePolicy\Resource;
19
20use Google\Service\ChromePolicy\GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest;
21use Google\Service\ChromePolicy\GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest;
22use Google\Service\ChromePolicy\GoogleProtobufEmpty;
23
24/**
25 * The "orgunits" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $chromepolicyService = new Google\Service\ChromePolicy(...);
29 *   $orgunits = $chromepolicyService->orgunits;
30 *  </code>
31 */
32class CustomersPoliciesOrgunits extends \Google\Service\Resource
33{
34  /**
35   * Modify multiple policy values that are applied to a specific org unit so that
36   * they now inherit the value from a parent (if applicable). All targets must
37   * have the same target format. That is to say that they must point to the same
38   * target resource and must have the same keys specified in
39   * `additionalTargetKeyNames`, though the values for those keys may be
40   * different. On failure the request will return the error details as part of
41   * the google.rpc.Status. (orgunits.batchInherit)
42   *
43   * @param string $customer ID of the G Suite account or literal "my_customer"
44   * for the customer associated to the request.
45   * @param GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest $postBody
46   * @param array $optParams Optional parameters.
47   * @return GoogleProtobufEmpty
48   */
49  public function batchInherit($customer, GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest $postBody, $optParams = [])
50  {
51    $params = ['customer' => $customer, 'postBody' => $postBody];
52    $params = array_merge($params, $optParams);
53    return $this->call('batchInherit', [$params], GoogleProtobufEmpty::class);
54  }
55  /**
56   * Modify multiple policy values that are applied to a specific org unit. All
57   * targets must have the same target format. That is to say that they must point
58   * to the same target resource and must have the same keys specified in
59   * `additionalTargetKeyNames`, though the values for those keys may be
60   * different. On failure the request will return the error details as part of
61   * the google.rpc.Status. (orgunits.batchModify)
62   *
63   * @param string $customer ID of the G Suite account or literal "my_customer"
64   * for the customer associated to the request.
65   * @param GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest $postBody
66   * @param array $optParams Optional parameters.
67   * @return GoogleProtobufEmpty
68   */
69  public function batchModify($customer, GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest $postBody, $optParams = [])
70  {
71    $params = ['customer' => $customer, 'postBody' => $postBody];
72    $params = array_merge($params, $optParams);
73    return $this->call('batchModify', [$params], GoogleProtobufEmpty::class);
74  }
75}
76
77// Adding a class alias for backwards compatibility with the previous class name.
78class_alias(CustomersPoliciesOrgunits::class, 'Google_Service_ChromePolicy_Resource_CustomersPoliciesOrgunits');
79