[e3d4e0a] | 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 |
|
---|
| 18 | namespace Google\Service;
|
---|
| 19 |
|
---|
| 20 | use Google\Client;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * Service definition for ChromePolicy (v1).
|
---|
| 24 | *
|
---|
| 25 | * <p>
|
---|
| 26 | * The Chrome Policy API is a suite of services that allows Chrome
|
---|
| 27 | * administrators to control the policies applied to their managed Chrome OS
|
---|
| 28 | * devices and Chrome browsers.</p>
|
---|
| 29 | *
|
---|
| 30 | * <p>
|
---|
| 31 | * For more information about this service, see the API
|
---|
| 32 | * <a href="http://developers.google.com/chrome/policy" target="_blank">Documentation</a>
|
---|
| 33 | * </p>
|
---|
| 34 | *
|
---|
| 35 | * @author Google, Inc.
|
---|
| 36 | */
|
---|
| 37 | class ChromePolicy extends \Google\Service
|
---|
| 38 | {
|
---|
| 39 | /** See, edit, create or delete policies applied to ChromeOS and Chrome Browsers managed within your organization. */
|
---|
| 40 | const CHROME_MANAGEMENT_POLICY =
|
---|
| 41 | "https://www.googleapis.com/auth/chrome.management.policy";
|
---|
| 42 | /** See policies applied to ChromeOS and Chrome Browsers managed within your organization. */
|
---|
| 43 | const CHROME_MANAGEMENT_POLICY_READONLY =
|
---|
| 44 | "https://www.googleapis.com/auth/chrome.management.policy.readonly";
|
---|
| 45 |
|
---|
| 46 | public $customers_policies;
|
---|
| 47 | public $customers_policies_groups;
|
---|
| 48 | public $customers_policies_networks;
|
---|
| 49 | public $customers_policies_orgunits;
|
---|
| 50 | public $customers_policySchemas;
|
---|
| 51 | public $media;
|
---|
| 52 | public $rootUrlTemplate;
|
---|
| 53 |
|
---|
| 54 | /**
|
---|
| 55 | * Constructs the internal representation of the ChromePolicy service.
|
---|
| 56 | *
|
---|
| 57 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
| 58 | * config array to pass to a new Client instance.
|
---|
| 59 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
| 60 | */
|
---|
| 61 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
| 62 | {
|
---|
| 63 | parent::__construct($clientOrConfig);
|
---|
| 64 | $this->rootUrl = $rootUrl ?: 'https://chromepolicy.googleapis.com/';
|
---|
| 65 | $this->rootUrlTemplate = $rootUrl ?: 'https://chromepolicy.UNIVERSE_DOMAIN/';
|
---|
| 66 | $this->servicePath = '';
|
---|
| 67 | $this->batchPath = 'batch';
|
---|
| 68 | $this->version = 'v1';
|
---|
| 69 | $this->serviceName = 'chromepolicy';
|
---|
| 70 |
|
---|
| 71 | $this->customers_policies = new ChromePolicy\Resource\CustomersPolicies(
|
---|
| 72 | $this,
|
---|
| 73 | $this->serviceName,
|
---|
| 74 | 'policies',
|
---|
| 75 | [
|
---|
| 76 | 'methods' => [
|
---|
| 77 | 'resolve' => [
|
---|
| 78 | 'path' => 'v1/{+customer}/policies:resolve',
|
---|
| 79 | 'httpMethod' => 'POST',
|
---|
| 80 | 'parameters' => [
|
---|
| 81 | 'customer' => [
|
---|
| 82 | 'location' => 'path',
|
---|
| 83 | 'type' => 'string',
|
---|
| 84 | 'required' => true,
|
---|
| 85 | ],
|
---|
| 86 | ],
|
---|
| 87 | ],
|
---|
| 88 | ]
|
---|
| 89 | ]
|
---|
| 90 | );
|
---|
| 91 | $this->customers_policies_groups = new ChromePolicy\Resource\CustomersPoliciesGroups(
|
---|
| 92 | $this,
|
---|
| 93 | $this->serviceName,
|
---|
| 94 | 'groups',
|
---|
| 95 | [
|
---|
| 96 | 'methods' => [
|
---|
| 97 | 'batchDelete' => [
|
---|
| 98 | 'path' => 'v1/{+customer}/policies/groups:batchDelete',
|
---|
| 99 | 'httpMethod' => 'POST',
|
---|
| 100 | 'parameters' => [
|
---|
| 101 | 'customer' => [
|
---|
| 102 | 'location' => 'path',
|
---|
| 103 | 'type' => 'string',
|
---|
| 104 | 'required' => true,
|
---|
| 105 | ],
|
---|
| 106 | ],
|
---|
| 107 | ],'batchModify' => [
|
---|
| 108 | 'path' => 'v1/{+customer}/policies/groups:batchModify',
|
---|
| 109 | 'httpMethod' => 'POST',
|
---|
| 110 | 'parameters' => [
|
---|
| 111 | 'customer' => [
|
---|
| 112 | 'location' => 'path',
|
---|
| 113 | 'type' => 'string',
|
---|
| 114 | 'required' => true,
|
---|
| 115 | ],
|
---|
| 116 | ],
|
---|
| 117 | ],'listGroupPriorityOrdering' => [
|
---|
| 118 | 'path' => 'v1/{+customer}/policies/groups:listGroupPriorityOrdering',
|
---|
| 119 | 'httpMethod' => 'POST',
|
---|
| 120 | 'parameters' => [
|
---|
| 121 | 'customer' => [
|
---|
| 122 | 'location' => 'path',
|
---|
| 123 | 'type' => 'string',
|
---|
| 124 | 'required' => true,
|
---|
| 125 | ],
|
---|
| 126 | ],
|
---|
| 127 | ],'updateGroupPriorityOrdering' => [
|
---|
| 128 | 'path' => 'v1/{+customer}/policies/groups:updateGroupPriorityOrdering',
|
---|
| 129 | 'httpMethod' => 'POST',
|
---|
| 130 | 'parameters' => [
|
---|
| 131 | 'customer' => [
|
---|
| 132 | 'location' => 'path',
|
---|
| 133 | 'type' => 'string',
|
---|
| 134 | 'required' => true,
|
---|
| 135 | ],
|
---|
| 136 | ],
|
---|
| 137 | ],
|
---|
| 138 | ]
|
---|
| 139 | ]
|
---|
| 140 | );
|
---|
| 141 | $this->customers_policies_networks = new ChromePolicy\Resource\CustomersPoliciesNetworks(
|
---|
| 142 | $this,
|
---|
| 143 | $this->serviceName,
|
---|
| 144 | 'networks',
|
---|
| 145 | [
|
---|
| 146 | 'methods' => [
|
---|
| 147 | 'defineCertificate' => [
|
---|
| 148 | 'path' => 'v1/{+customer}/policies/networks:defineCertificate',
|
---|
| 149 | 'httpMethod' => 'POST',
|
---|
| 150 | 'parameters' => [
|
---|
| 151 | 'customer' => [
|
---|
| 152 | 'location' => 'path',
|
---|
| 153 | 'type' => 'string',
|
---|
| 154 | 'required' => true,
|
---|
| 155 | ],
|
---|
| 156 | ],
|
---|
| 157 | ],'defineNetwork' => [
|
---|
| 158 | 'path' => 'v1/{+customer}/policies/networks:defineNetwork',
|
---|
| 159 | 'httpMethod' => 'POST',
|
---|
| 160 | 'parameters' => [
|
---|
| 161 | 'customer' => [
|
---|
| 162 | 'location' => 'path',
|
---|
| 163 | 'type' => 'string',
|
---|
| 164 | 'required' => true,
|
---|
| 165 | ],
|
---|
| 166 | ],
|
---|
| 167 | ],'removeCertificate' => [
|
---|
| 168 | 'path' => 'v1/{+customer}/policies/networks:removeCertificate',
|
---|
| 169 | 'httpMethod' => 'POST',
|
---|
| 170 | 'parameters' => [
|
---|
| 171 | 'customer' => [
|
---|
| 172 | 'location' => 'path',
|
---|
| 173 | 'type' => 'string',
|
---|
| 174 | 'required' => true,
|
---|
| 175 | ],
|
---|
| 176 | ],
|
---|
| 177 | ],'removeNetwork' => [
|
---|
| 178 | 'path' => 'v1/{+customer}/policies/networks:removeNetwork',
|
---|
| 179 | 'httpMethod' => 'POST',
|
---|
| 180 | 'parameters' => [
|
---|
| 181 | 'customer' => [
|
---|
| 182 | 'location' => 'path',
|
---|
| 183 | 'type' => 'string',
|
---|
| 184 | 'required' => true,
|
---|
| 185 | ],
|
---|
| 186 | ],
|
---|
| 187 | ],
|
---|
| 188 | ]
|
---|
| 189 | ]
|
---|
| 190 | );
|
---|
| 191 | $this->customers_policies_orgunits = new ChromePolicy\Resource\CustomersPoliciesOrgunits(
|
---|
| 192 | $this,
|
---|
| 193 | $this->serviceName,
|
---|
| 194 | 'orgunits',
|
---|
| 195 | [
|
---|
| 196 | 'methods' => [
|
---|
| 197 | 'batchInherit' => [
|
---|
| 198 | 'path' => 'v1/{+customer}/policies/orgunits:batchInherit',
|
---|
| 199 | 'httpMethod' => 'POST',
|
---|
| 200 | 'parameters' => [
|
---|
| 201 | 'customer' => [
|
---|
| 202 | 'location' => 'path',
|
---|
| 203 | 'type' => 'string',
|
---|
| 204 | 'required' => true,
|
---|
| 205 | ],
|
---|
| 206 | ],
|
---|
| 207 | ],'batchModify' => [
|
---|
| 208 | 'path' => 'v1/{+customer}/policies/orgunits:batchModify',
|
---|
| 209 | 'httpMethod' => 'POST',
|
---|
| 210 | 'parameters' => [
|
---|
| 211 | 'customer' => [
|
---|
| 212 | 'location' => 'path',
|
---|
| 213 | 'type' => 'string',
|
---|
| 214 | 'required' => true,
|
---|
| 215 | ],
|
---|
| 216 | ],
|
---|
| 217 | ],
|
---|
| 218 | ]
|
---|
| 219 | ]
|
---|
| 220 | );
|
---|
| 221 | $this->customers_policySchemas = new ChromePolicy\Resource\CustomersPolicySchemas(
|
---|
| 222 | $this,
|
---|
| 223 | $this->serviceName,
|
---|
| 224 | 'policySchemas',
|
---|
| 225 | [
|
---|
| 226 | 'methods' => [
|
---|
| 227 | 'get' => [
|
---|
| 228 | 'path' => 'v1/{+name}',
|
---|
| 229 | 'httpMethod' => 'GET',
|
---|
| 230 | 'parameters' => [
|
---|
| 231 | 'name' => [
|
---|
| 232 | 'location' => 'path',
|
---|
| 233 | 'type' => 'string',
|
---|
| 234 | 'required' => true,
|
---|
| 235 | ],
|
---|
| 236 | ],
|
---|
| 237 | ],'list' => [
|
---|
| 238 | 'path' => 'v1/{+parent}/policySchemas',
|
---|
| 239 | 'httpMethod' => 'GET',
|
---|
| 240 | 'parameters' => [
|
---|
| 241 | 'parent' => [
|
---|
| 242 | 'location' => 'path',
|
---|
| 243 | 'type' => 'string',
|
---|
| 244 | 'required' => true,
|
---|
| 245 | ],
|
---|
| 246 | 'filter' => [
|
---|
| 247 | 'location' => 'query',
|
---|
| 248 | 'type' => 'string',
|
---|
| 249 | ],
|
---|
| 250 | 'pageSize' => [
|
---|
| 251 | 'location' => 'query',
|
---|
| 252 | 'type' => 'integer',
|
---|
| 253 | ],
|
---|
| 254 | 'pageToken' => [
|
---|
| 255 | 'location' => 'query',
|
---|
| 256 | 'type' => 'string',
|
---|
| 257 | ],
|
---|
| 258 | ],
|
---|
| 259 | ],
|
---|
| 260 | ]
|
---|
| 261 | ]
|
---|
| 262 | );
|
---|
| 263 | $this->media = new ChromePolicy\Resource\Media(
|
---|
| 264 | $this,
|
---|
| 265 | $this->serviceName,
|
---|
| 266 | 'media',
|
---|
| 267 | [
|
---|
| 268 | 'methods' => [
|
---|
| 269 | 'upload' => [
|
---|
| 270 | 'path' => 'v1/{+customer}/policies/files:uploadPolicyFile',
|
---|
| 271 | 'httpMethod' => 'POST',
|
---|
| 272 | 'parameters' => [
|
---|
| 273 | 'customer' => [
|
---|
| 274 | 'location' => 'path',
|
---|
| 275 | 'type' => 'string',
|
---|
| 276 | 'required' => true,
|
---|
| 277 | ],
|
---|
| 278 | ],
|
---|
| 279 | ],
|
---|
| 280 | ]
|
---|
| 281 | ]
|
---|
| 282 | );
|
---|
| 283 | }
|
---|
| 284 | }
|
---|
| 285 |
|
---|
| 286 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 287 | class_alias(ChromePolicy::class, 'Google_Service_ChromePolicy');
|
---|