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\CloudControlsPartnerService\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudControlsPartnerService\CloudcontrolspartnerEmpty;
|
---|
21 | use Google\Service\CloudControlsPartnerService\Customer;
|
---|
22 | use Google\Service\CloudControlsPartnerService\ListCustomersResponse;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "customers" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $cloudcontrolspartnerService = new Google\Service\CloudControlsPartnerService(...);
|
---|
29 | * $customers = $cloudcontrolspartnerService->organizations_locations_customers;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class OrganizationsLocationsCustomers extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new customer. (customers.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. Parent resource Format:
|
---|
38 | * `organizations/{organization}/locations/{location}`
|
---|
39 | * @param Customer $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | *
|
---|
42 | * @opt_param string customerId Required. The customer id to use for the
|
---|
43 | * customer, which will become the final component of the customer's resource
|
---|
44 | * name. The specified value must be a valid Google cloud organization id.
|
---|
45 | * @return Customer
|
---|
46 | * @throws \Google\Service\Exception
|
---|
47 | */
|
---|
48 | public function create($parent, Customer $postBody, $optParams = [])
|
---|
49 | {
|
---|
50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
51 | $params = array_merge($params, $optParams);
|
---|
52 | return $this->call('create', [$params], Customer::class);
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * Delete details of a single customer (customers.delete)
|
---|
56 | *
|
---|
57 | * @param string $name Required. name of the resource to be deleted format:
|
---|
58 | * name=organizations/locations/customers
|
---|
59 | * @param array $optParams Optional parameters.
|
---|
60 | * @return CloudcontrolspartnerEmpty
|
---|
61 | * @throws \Google\Service\Exception
|
---|
62 | */
|
---|
63 | public function delete($name, $optParams = [])
|
---|
64 | {
|
---|
65 | $params = ['name' => $name];
|
---|
66 | $params = array_merge($params, $optParams);
|
---|
67 | return $this->call('delete', [$params], CloudcontrolspartnerEmpty::class);
|
---|
68 | }
|
---|
69 | /**
|
---|
70 | * Gets details of a single customer (customers.get)
|
---|
71 | *
|
---|
72 | * @param string $name Required. Format:
|
---|
73 | * `organizations/{organization}/locations/{location}/customers/{customer}`
|
---|
74 | * @param array $optParams Optional parameters.
|
---|
75 | * @return Customer
|
---|
76 | * @throws \Google\Service\Exception
|
---|
77 | */
|
---|
78 | public function get($name, $optParams = [])
|
---|
79 | {
|
---|
80 | $params = ['name' => $name];
|
---|
81 | $params = array_merge($params, $optParams);
|
---|
82 | return $this->call('get', [$params], Customer::class);
|
---|
83 | }
|
---|
84 | /**
|
---|
85 | * Lists customers of a partner identified by its Google Cloud organization ID
|
---|
86 | * (customers.listOrganizationsLocationsCustomers)
|
---|
87 | *
|
---|
88 | * @param string $parent Required. Parent resource Format:
|
---|
89 | * `organizations/{organization}/locations/{location}`
|
---|
90 | * @param array $optParams Optional parameters.
|
---|
91 | *
|
---|
92 | * @opt_param string filter Optional. Filtering results
|
---|
93 | * @opt_param string orderBy Optional. Hint for how to order the results
|
---|
94 | * @opt_param int pageSize The maximum number of Customers to return. The
|
---|
95 | * service may return fewer than this value. If unspecified, at most 500
|
---|
96 | * Customers will be returned.
|
---|
97 | * @opt_param string pageToken A page token, received from a previous
|
---|
98 | * `ListCustomers` call. Provide this to retrieve the subsequent page.
|
---|
99 | * @return ListCustomersResponse
|
---|
100 | * @throws \Google\Service\Exception
|
---|
101 | */
|
---|
102 | public function listOrganizationsLocationsCustomers($parent, $optParams = [])
|
---|
103 | {
|
---|
104 | $params = ['parent' => $parent];
|
---|
105 | $params = array_merge($params, $optParams);
|
---|
106 | return $this->call('list', [$params], ListCustomersResponse::class);
|
---|
107 | }
|
---|
108 | /**
|
---|
109 | * Update details of a single customer (customers.patch)
|
---|
110 | *
|
---|
111 | * @param string $name Identifier. Format:
|
---|
112 | * `organizations/{organization}/locations/{location}/customers/{customer}`
|
---|
113 | * @param Customer $postBody
|
---|
114 | * @param array $optParams Optional parameters.
|
---|
115 | *
|
---|
116 | * @opt_param string updateMask Optional. The list of fields to update
|
---|
117 | * @return Customer
|
---|
118 | * @throws \Google\Service\Exception
|
---|
119 | */
|
---|
120 | public function patch($name, Customer $postBody, $optParams = [])
|
---|
121 | {
|
---|
122 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
123 | $params = array_merge($params, $optParams);
|
---|
124 | return $this->call('patch', [$params], Customer::class);
|
---|
125 | }
|
---|
126 | }
|
---|
127 |
|
---|
128 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
129 | class_alias(OrganizationsLocationsCustomers::class, 'Google_Service_CloudControlsPartnerService_Resource_OrganizationsLocationsCustomers');
|
---|