source: vendor/google/apiclient-services/src/Cloudchannel/Resource/AccountsChannelPartnerLinksCustomers.php

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

Upload project files

  • Property mode set to 100644
File size: 8.6 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\Cloudchannel\Resource;
19
20use Google\Service\Cloudchannel\GoogleCloudChannelV1Customer;
21use Google\Service\Cloudchannel\GoogleCloudChannelV1ImportCustomerRequest;
22use Google\Service\Cloudchannel\GoogleCloudChannelV1ListCustomersResponse;
23use Google\Service\Cloudchannel\GoogleProtobufEmpty;
24
25/**
26 * The "customers" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $cloudchannelService = new Google\Service\Cloudchannel(...);
30 * $customers = $cloudchannelService->accounts_channelPartnerLinks_customers;
31 * </code>
32 */
33class AccountsChannelPartnerLinksCustomers extends \Google\Service\Resource
34{
35 /**
36 * Creates a new Customer resource under the reseller or distributor account.
37 * Possible error codes: * PERMISSION_DENIED: * The reseller account making the
38 * request is different from the reseller account in the API request. * You are
39 * not authorized to create a customer. See
40 * https://support.google.com/channelservices/answer/9759265 * INVALID_ARGUMENT:
41 * * Required request parameters are missing or invalid. * Domain field value
42 * doesn't match the primary email domain. Return value: The newly created
43 * Customer resource. (customers.create)
44 *
45 * @param string $parent Required. The resource name of reseller account in
46 * which to create the customer. Parent uses the format: accounts/{account_id}
47 * @param GoogleCloudChannelV1Customer $postBody
48 * @param array $optParams Optional parameters.
49 * @return GoogleCloudChannelV1Customer
50 * @throws \Google\Service\Exception
51 */
52 public function create($parent, GoogleCloudChannelV1Customer $postBody, $optParams = [])
53 {
54 $params = ['parent' => $parent, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('create', [$params], GoogleCloudChannelV1Customer::class);
57 }
58 /**
59 * Deletes the given Customer permanently. Possible error codes: *
60 * PERMISSION_DENIED: The account making the request does not own this customer.
61 * * INVALID_ARGUMENT: Required request parameters are missing or invalid. *
62 * FAILED_PRECONDITION: The customer has existing entitlements. * NOT_FOUND: No
63 * Customer resource found for the name in the request. (customers.delete)
64 *
65 * @param string $name Required. The resource name of the customer to delete.
66 * @param array $optParams Optional parameters.
67 * @return GoogleProtobufEmpty
68 * @throws \Google\Service\Exception
69 */
70 public function delete($name, $optParams = [])
71 {
72 $params = ['name' => $name];
73 $params = array_merge($params, $optParams);
74 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
75 }
76 /**
77 * Returns the requested Customer resource. Possible error codes: *
78 * PERMISSION_DENIED: The reseller account making the request is different from
79 * the reseller account in the API request. * INVALID_ARGUMENT: Required request
80 * parameters are missing or invalid. * NOT_FOUND: The customer resource doesn't
81 * exist. Usually the result of an invalid name parameter. Return value: The
82 * Customer resource. (customers.get)
83 *
84 * @param string $name Required. The resource name of the customer to retrieve.
85 * Name uses the format: accounts/{account_id}/customers/{customer_id}
86 * @param array $optParams Optional parameters.
87 * @return GoogleCloudChannelV1Customer
88 * @throws \Google\Service\Exception
89 */
90 public function get($name, $optParams = [])
91 {
92 $params = ['name' => $name];
93 $params = array_merge($params, $optParams);
94 return $this->call('get', [$params], GoogleCloudChannelV1Customer::class);
95 }
96 /**
97 * Imports a Customer from the Cloud Identity associated with the provided Cloud
98 * Identity ID or domain before a TransferEntitlements call. If a linked
99 * Customer already exists and overwrite_if_exists is true, it will update that
100 * Customer's data. Possible error codes: * PERMISSION_DENIED: * The reseller
101 * account making the request is different from the reseller account in the API
102 * request. * You are not authorized to import the customer. See
103 * https://support.google.com/channelservices/answer/9759265 * NOT_FOUND: Cloud
104 * Identity doesn't exist or was deleted. * INVALID_ARGUMENT: Required
105 * parameters are missing, or the auth_token is expired or invalid. *
106 * ALREADY_EXISTS: A customer already exists and has conflicting critical
107 * fields. Requires an overwrite. Return value: The Customer. (customers.import)
108 *
109 * @param string $parent Required. The resource name of the reseller's account.
110 * Parent takes the format: accounts/{account_id} or
111 * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
112 * @param GoogleCloudChannelV1ImportCustomerRequest $postBody
113 * @param array $optParams Optional parameters.
114 * @return GoogleCloudChannelV1Customer
115 * @throws \Google\Service\Exception
116 */
117 public function import($parent, GoogleCloudChannelV1ImportCustomerRequest $postBody, $optParams = [])
118 {
119 $params = ['parent' => $parent, 'postBody' => $postBody];
120 $params = array_merge($params, $optParams);
121 return $this->call('import', [$params], GoogleCloudChannelV1Customer::class);
122 }
123 /**
124 * List Customers. Possible error codes: * PERMISSION_DENIED: The reseller
125 * account making the request is different from the reseller account in the API
126 * request. * INVALID_ARGUMENT: Required request parameters are missing or
127 * invalid. Return value: List of Customers, or an empty list if there are no
128 * customers. (customers.listAccountsChannelPartnerLinksCustomers)
129 *
130 * @param string $parent Required. The resource name of the reseller account to
131 * list customers from. Parent uses the format: accounts/{account_id}.
132 * @param array $optParams Optional parameters.
133 *
134 * @opt_param string filter Optional. Filters applied to the
135 * [CloudChannelService.ListCustomers] results. See
136 * https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers
137 * for more information.
138 * @opt_param int pageSize Optional. The maximum number of customers to return.
139 * The service may return fewer than this value. If unspecified, returns at most
140 * 10 customers. The maximum value is 50.
141 * @opt_param string pageToken Optional. A token identifying a page of results
142 * other than the first page. Obtained through
143 * ListCustomersResponse.next_page_token of the previous
144 * CloudChannelService.ListCustomers call.
145 * @return GoogleCloudChannelV1ListCustomersResponse
146 * @throws \Google\Service\Exception
147 */
148 public function listAccountsChannelPartnerLinksCustomers($parent, $optParams = [])
149 {
150 $params = ['parent' => $parent];
151 $params = array_merge($params, $optParams);
152 return $this->call('list', [$params], GoogleCloudChannelV1ListCustomersResponse::class);
153 }
154 /**
155 * Updates an existing Customer resource for the reseller or distributor.
156 * Possible error codes: * PERMISSION_DENIED: The reseller account making the
157 * request is different from the reseller account in the API request. *
158 * INVALID_ARGUMENT: Required request parameters are missing or invalid. *
159 * NOT_FOUND: No Customer resource found for the name in the request. Return
160 * value: The updated Customer resource. (customers.patch)
161 *
162 * @param string $name Output only. Resource name of the customer. Format:
163 * accounts/{account_id}/customers/{customer_id}
164 * @param GoogleCloudChannelV1Customer $postBody
165 * @param array $optParams Optional parameters.
166 *
167 * @opt_param string updateMask The update mask that applies to the resource.
168 * Optional.
169 * @return GoogleCloudChannelV1Customer
170 * @throws \Google\Service\Exception
171 */
172 public function patch($name, GoogleCloudChannelV1Customer $postBody, $optParams = [])
173 {
174 $params = ['name' => $name, 'postBody' => $postBody];
175 $params = array_merge($params, $optParams);
176 return $this->call('patch', [$params], GoogleCloudChannelV1Customer::class);
177 }
178}
179
180// Adding a class alias for backwards compatibility with the previous class name.
181class_alias(AccountsChannelPartnerLinksCustomers::class, 'Google_Service_Cloudchannel_Resource_AccountsChannelPartnerLinksCustomers');
Note: See TracBrowser for help on using the repository browser.