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\AndroidProvisioningPartner\Resource; 19 20use Google\Service\AndroidProvisioningPartner\AndroiddeviceprovisioningEmpty; 21use Google\Service\AndroidProvisioningPartner\Configuration; 22use Google\Service\AndroidProvisioningPartner\CustomerListConfigurationsResponse; 23 24/** 25 * The "configurations" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $androiddeviceprovisioningService = new Google\Service\AndroidProvisioningPartner(...); 29 * $configurations = $androiddeviceprovisioningService->configurations; 30 * </code> 31 */ 32class CustomersConfigurations extends \Google\Service\Resource 33{ 34 /** 35 * Creates a new configuration. Once created, a customer can apply the 36 * configuration to devices. (configurations.create) 37 * 38 * @param string $parent Required. The customer that manages the configuration. 39 * An API resource name in the format `customers/[CUSTOMER_ID]`. This field has 40 * custom validation in CreateConfigurationRequestValidator 41 * @param Configuration $postBody 42 * @param array $optParams Optional parameters. 43 * @return Configuration 44 */ 45 public function create($parent, Configuration $postBody, $optParams = []) 46 { 47 $params = ['parent' => $parent, 'postBody' => $postBody]; 48 $params = array_merge($params, $optParams); 49 return $this->call('create', [$params], Configuration::class); 50 } 51 /** 52 * Deletes an unused configuration. The API call fails if the customer has 53 * devices with the configuration applied. (configurations.delete) 54 * 55 * @param string $name Required. The configuration to delete. An API resource 56 * name in the format 57 * `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. If the 58 * configuration is applied to any devices, the API call fails. 59 * @param array $optParams Optional parameters. 60 * @return AndroiddeviceprovisioningEmpty 61 */ 62 public function delete($name, $optParams = []) 63 { 64 $params = ['name' => $name]; 65 $params = array_merge($params, $optParams); 66 return $this->call('delete', [$params], AndroiddeviceprovisioningEmpty::class); 67 } 68 /** 69 * Gets the details of a configuration. (configurations.get) 70 * 71 * @param string $name Required. The configuration to get. An API resource name 72 * in the format `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. 73 * @param array $optParams Optional parameters. 74 * @return Configuration 75 */ 76 public function get($name, $optParams = []) 77 { 78 $params = ['name' => $name]; 79 $params = array_merge($params, $optParams); 80 return $this->call('get', [$params], Configuration::class); 81 } 82 /** 83 * Lists a customer's configurations. 84 * (configurations.listCustomersConfigurations) 85 * 86 * @param string $parent Required. The customer that manages the listed 87 * configurations. An API resource name in the format `customers/[CUSTOMER_ID]`. 88 * @param array $optParams Optional parameters. 89 * @return CustomerListConfigurationsResponse 90 */ 91 public function listCustomersConfigurations($parent, $optParams = []) 92 { 93 $params = ['parent' => $parent]; 94 $params = array_merge($params, $optParams); 95 return $this->call('list', [$params], CustomerListConfigurationsResponse::class); 96 } 97 /** 98 * Updates a configuration's field values. (configurations.patch) 99 * 100 * @param string $name Output only. The API resource name in the format 101 * `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. Assigned by the 102 * server. 103 * @param Configuration $postBody 104 * @param array $optParams Optional parameters. 105 * 106 * @opt_param string updateMask Required. The field mask applied to the target 107 * `Configuration` before updating the fields. To learn more about using field 108 * masks, read [FieldMask](/protocol- 109 * buffers/docs/reference/google.protobuf#fieldmask) in the Protocol Buffers 110 * documentation. 111 * @return Configuration 112 */ 113 public function patch($name, Configuration $postBody, $optParams = []) 114 { 115 $params = ['name' => $name, 'postBody' => $postBody]; 116 $params = array_merge($params, $optParams); 117 return $this->call('patch', [$params], Configuration::class); 118 } 119} 120 121// Adding a class alias for backwards compatibility with the previous class name. 122class_alias(CustomersConfigurations::class, 'Google_Service_AndroidProvisioningPartner_Resource_CustomersConfigurations'); 123