source: vendor/google/apiclient-services/src/AndroidManagement/Resource/EnterprisesPolicies.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 3.8 KB
Line 
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\AndroidManagement\Resource;
19
20use Google\Service\AndroidManagement\AndroidmanagementEmpty;
21use Google\Service\AndroidManagement\ListPoliciesResponse;
22use Google\Service\AndroidManagement\Policy;
23
24/**
25 * The "policies" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $androidmanagementService = new Google\Service\AndroidManagement(...);
29 * $policies = $androidmanagementService->enterprises_policies;
30 * </code>
31 */
32class EnterprisesPolicies extends \Google\Service\Resource
33{
34 /**
35 * Deletes a policy. This operation is only permitted if no devices are
36 * currently referencing the policy. (policies.delete)
37 *
38 * @param string $name The name of the policy in the form
39 * enterprises/{enterpriseId}/policies/{policyId}.
40 * @param array $optParams Optional parameters.
41 * @return AndroidmanagementEmpty
42 * @throws \Google\Service\Exception
43 */
44 public function delete($name, $optParams = [])
45 {
46 $params = ['name' => $name];
47 $params = array_merge($params, $optParams);
48 return $this->call('delete', [$params], AndroidmanagementEmpty::class);
49 }
50 /**
51 * Gets a policy. (policies.get)
52 *
53 * @param string $name The name of the policy in the form
54 * enterprises/{enterpriseId}/policies/{policyId}.
55 * @param array $optParams Optional parameters.
56 * @return Policy
57 * @throws \Google\Service\Exception
58 */
59 public function get($name, $optParams = [])
60 {
61 $params = ['name' => $name];
62 $params = array_merge($params, $optParams);
63 return $this->call('get', [$params], Policy::class);
64 }
65 /**
66 * Lists policies for a given enterprise. (policies.listEnterprisesPolicies)
67 *
68 * @param string $parent The name of the enterprise in the form
69 * enterprises/{enterpriseId}.
70 * @param array $optParams Optional parameters.
71 *
72 * @opt_param int pageSize The requested page size. The actual page size may be
73 * fixed to a min or max value.
74 * @opt_param string pageToken A token identifying a page of results returned by
75 * the server.
76 * @return ListPoliciesResponse
77 * @throws \Google\Service\Exception
78 */
79 public function listEnterprisesPolicies($parent, $optParams = [])
80 {
81 $params = ['parent' => $parent];
82 $params = array_merge($params, $optParams);
83 return $this->call('list', [$params], ListPoliciesResponse::class);
84 }
85 /**
86 * Updates or creates a policy. (policies.patch)
87 *
88 * @param string $name The name of the policy in the form
89 * enterprises/{enterpriseId}/policies/{policyId}.
90 * @param Policy $postBody
91 * @param array $optParams Optional parameters.
92 *
93 * @opt_param string updateMask The field mask indicating the fields to update.
94 * If not set, all modifiable fields will be modified.
95 * @return Policy
96 * @throws \Google\Service\Exception
97 */
98 public function patch($name, Policy $postBody, $optParams = [])
99 {
100 $params = ['name' => $name, 'postBody' => $postBody];
101 $params = array_merge($params, $optParams);
102 return $this->call('patch', [$params], Policy::class);
103 }
104}
105
106// Adding a class alias for backwards compatibility with the previous class name.
107class_alias(EnterprisesPolicies::class, 'Google_Service_AndroidManagement_Resource_EnterprisesPolicies');
Note: See TracBrowser for help on using the repository browser.