source: vendor/google/apiclient-services/src/AndroidManagement/Resource/Enterprises.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: 5.9 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\Enterprise;
22use Google\Service\AndroidManagement\ListEnterprisesResponse;
23
24/**
25 * The "enterprises" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $androidmanagementService = new Google\Service\AndroidManagement(...);
29 * $enterprises = $androidmanagementService->enterprises;
30 * </code>
31 */
32class Enterprises extends \Google\Service\Resource
33{
34 /**
35 * Creates an enterprise. This is the last step in the enterprise signup flow.
36 * See also: SigninDetail (enterprises.create)
37 *
38 * @param Enterprise $postBody
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param bool agreementAccepted Whether the enterprise admin has seen and
42 * agreed to the managed Google Play Agreement
43 * (https://www.android.com/enterprise/terms/). Do not set this field for any
44 * customer-managed enterprise
45 * (https://developers.google.com/android/management/create-enterprise#customer-
46 * managed_enterprises). Set this to field to true for all EMM-managed
47 * enterprises (https://developers.google.com/android/management/create-
48 * enterprise#emm-managed_enterprises).
49 * @opt_param string enterpriseToken The enterprise token appended to the
50 * callback URL. Set this when creating a customer-managed enterprise
51 * (https://developers.google.com/android/management/create-enterprise#customer-
52 * managed_enterprises) and not when creating a deprecated EMM-managed
53 * enterprise (https://developers.google.com/android/management/create-
54 * enterprise#emm-managed_enterprises).
55 * @opt_param string projectId The ID of the Google Cloud Platform project which
56 * will own the enterprise.
57 * @opt_param string signupUrlName The name of the SignupUrl used to sign up for
58 * the enterprise. Set this when creating a customer-managed enterprise
59 * (https://developers.google.com/android/management/create-enterprise#customer-
60 * managed_enterprises) and not when creating a deprecated EMM-managed
61 * enterprise (https://developers.google.com/android/management/create-
62 * enterprise#emm-managed_enterprises).
63 * @return Enterprise
64 * @throws \Google\Service\Exception
65 */
66 public function create(Enterprise $postBody, $optParams = [])
67 {
68 $params = ['postBody' => $postBody];
69 $params = array_merge($params, $optParams);
70 return $this->call('create', [$params], Enterprise::class);
71 }
72 /**
73 * Permanently deletes an enterprise and all accounts and data associated with
74 * it. Warning: this will result in a cascaded deletion of all AM API devices
75 * associated with the deleted enterprise. Only available for EMM-managed
76 * enterprises. (enterprises.delete)
77 *
78 * @param string $name The name of the enterprise in the form
79 * enterprises/{enterpriseId}.
80 * @param array $optParams Optional parameters.
81 * @return AndroidmanagementEmpty
82 * @throws \Google\Service\Exception
83 */
84 public function delete($name, $optParams = [])
85 {
86 $params = ['name' => $name];
87 $params = array_merge($params, $optParams);
88 return $this->call('delete', [$params], AndroidmanagementEmpty::class);
89 }
90 /**
91 * Gets an enterprise. (enterprises.get)
92 *
93 * @param string $name The name of the enterprise in the form
94 * enterprises/{enterpriseId}.
95 * @param array $optParams Optional parameters.
96 * @return Enterprise
97 * @throws \Google\Service\Exception
98 */
99 public function get($name, $optParams = [])
100 {
101 $params = ['name' => $name];
102 $params = array_merge($params, $optParams);
103 return $this->call('get', [$params], Enterprise::class);
104 }
105 /**
106 * Lists EMM-managed enterprises. Only BASIC fields are returned.
107 * (enterprises.listEnterprises)
108 *
109 * @param array $optParams Optional parameters.
110 *
111 * @opt_param int pageSize The requested page size. The actual page size may be
112 * fixed to a min or max value.
113 * @opt_param string pageToken A token identifying a page of results returned by
114 * the server.
115 * @opt_param string projectId Required. The Cloud project ID of the EMM
116 * managing the enterprises.
117 * @opt_param string view Specifies which Enterprise fields to return. This
118 * method only supports BASIC.
119 * @return ListEnterprisesResponse
120 * @throws \Google\Service\Exception
121 */
122 public function listEnterprises($optParams = [])
123 {
124 $params = [];
125 $params = array_merge($params, $optParams);
126 return $this->call('list', [$params], ListEnterprisesResponse::class);
127 }
128 /**
129 * Updates an enterprise. See also: SigninDetail (enterprises.patch)
130 *
131 * @param string $name The name of the enterprise in the form
132 * enterprises/{enterpriseId}.
133 * @param Enterprise $postBody
134 * @param array $optParams Optional parameters.
135 *
136 * @opt_param string updateMask The field mask indicating the fields to update.
137 * If not set, all modifiable fields will be modified.
138 * @return Enterprise
139 * @throws \Google\Service\Exception
140 */
141 public function patch($name, Enterprise $postBody, $optParams = [])
142 {
143 $params = ['name' => $name, 'postBody' => $postBody];
144 $params = array_merge($params, $optParams);
145 return $this->call('patch', [$params], Enterprise::class);
146 }
147}
148
149// Adding a class alias for backwards compatibility with the previous class name.
150class_alias(Enterprises::class, 'Google_Service_AndroidManagement_Resource_Enterprises');
Note: See TracBrowser for help on using the repository browser.