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\CloudIdentity\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudIdentity\GoogleAppsCloudidentityDevicesV1ClientState;
|
---|
21 | use Google\Service\CloudIdentity\GoogleAppsCloudidentityDevicesV1ListClientStatesResponse;
|
---|
22 | use Google\Service\CloudIdentity\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "clientStates" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $cloudidentityService = new Google\Service\CloudIdentity(...);
|
---|
29 | * $clientStates = $cloudidentityService->devices_deviceUsers_clientStates;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class DevicesDeviceUsersClientStates extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Gets the client state for the device user (clientStates.get)
|
---|
36 | *
|
---|
37 | * @param string $name Required. [Resource
|
---|
38 | * name](https://cloud.google.com/apis/design/resource_names) of the ClientState
|
---|
39 | * in format:
|
---|
40 | * `devices/{device}/deviceUsers/{device_user}/clientStates/{partner}`, where
|
---|
41 | * `device` is the unique ID assigned to the Device, `device_user` is the unique
|
---|
42 | * ID assigned to the User and `partner` identifies the partner storing the
|
---|
43 | * data. To get the client state for devices belonging to your own organization,
|
---|
44 | * the `partnerId` is in the format: `customerId-*anystring*`. Where the
|
---|
45 | * `customerId` is your organization's customer ID and `anystring` is any
|
---|
46 | * suffix. This suffix is used in setting up Custom Access Levels in Context-
|
---|
47 | * Aware Access. You may use `my_customer` instead of the customer ID for
|
---|
48 | * devices managed by your own organization. You may specify `-` in place of the
|
---|
49 | * `{device}`, so the ClientState resource name can be:
|
---|
50 | * `devices/-/deviceUsers/{device_user_resource}/clientStates/{partner}`.
|
---|
51 | * @param array $optParams Optional parameters.
|
---|
52 | *
|
---|
53 | * @opt_param string customer Optional. [Resource
|
---|
54 | * name](https://cloud.google.com/apis/design/resource_names) of the customer.
|
---|
55 | * If you're using this API for your own organization, use
|
---|
56 | * `customers/my_customer` If you're using this API to manage another
|
---|
57 | * organization, use `customers/{customer}`, where customer is the customer to
|
---|
58 | * whom the device belongs.
|
---|
59 | * @return GoogleAppsCloudidentityDevicesV1ClientState
|
---|
60 | * @throws \Google\Service\Exception
|
---|
61 | */
|
---|
62 | public function get($name, $optParams = [])
|
---|
63 | {
|
---|
64 | $params = ['name' => $name];
|
---|
65 | $params = array_merge($params, $optParams);
|
---|
66 | return $this->call('get', [$params], GoogleAppsCloudidentityDevicesV1ClientState::class);
|
---|
67 | }
|
---|
68 | /**
|
---|
69 | * Lists the client states for the given search query.
|
---|
70 | * (clientStates.listDevicesDeviceUsersClientStates)
|
---|
71 | *
|
---|
72 | * @param string $parent Required. To list all ClientStates, set this to
|
---|
73 | * "devices/-/deviceUsers/-". To list all ClientStates owned by a DeviceUser,
|
---|
74 | * set this to the resource name of the DeviceUser. Format:
|
---|
75 | * devices/{device}/deviceUsers/{deviceUser}
|
---|
76 | * @param array $optParams Optional parameters.
|
---|
77 | *
|
---|
78 | * @opt_param string customer Optional. [Resource
|
---|
79 | * name](https://cloud.google.com/apis/design/resource_names) of the customer.
|
---|
80 | * If you're using this API for your own organization, use
|
---|
81 | * `customers/my_customer` If you're using this API to manage another
|
---|
82 | * organization, use `customers/{customer}`, where customer is the customer to
|
---|
83 | * whom the device belongs.
|
---|
84 | * @opt_param string filter Optional. Additional restrictions when fetching list
|
---|
85 | * of client states.
|
---|
86 | * @opt_param string orderBy Optional. Order specification for client states in
|
---|
87 | * the response.
|
---|
88 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
89 | * `ListClientStates` call. Provide this to retrieve the subsequent page. When
|
---|
90 | * paginating, all other parameters provided to `ListClientStates` must match
|
---|
91 | * the call that provided the page token.
|
---|
92 | * @return GoogleAppsCloudidentityDevicesV1ListClientStatesResponse
|
---|
93 | * @throws \Google\Service\Exception
|
---|
94 | */
|
---|
95 | public function listDevicesDeviceUsersClientStates($parent, $optParams = [])
|
---|
96 | {
|
---|
97 | $params = ['parent' => $parent];
|
---|
98 | $params = array_merge($params, $optParams);
|
---|
99 | return $this->call('list', [$params], GoogleAppsCloudidentityDevicesV1ListClientStatesResponse::class);
|
---|
100 | }
|
---|
101 | /**
|
---|
102 | * Updates the client state for the device user **Note**: This method is
|
---|
103 | * available only to customers who have one of the following SKUs: Enterprise
|
---|
104 | * Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity
|
---|
105 | * Premium (clientStates.patch)
|
---|
106 | *
|
---|
107 | * @param string $name Output only. [Resource
|
---|
108 | * name](https://cloud.google.com/apis/design/resource_names) of the ClientState
|
---|
109 | * in format:
|
---|
110 | * `devices/{device}/deviceUsers/{device_user}/clientState/{partner}`, where
|
---|
111 | * partner corresponds to the partner storing the data. For partners belonging
|
---|
112 | * to the "BeyondCorp Alliance", this is the partner ID specified to you by
|
---|
113 | * Google. For all other callers, this is a string of the form:
|
---|
114 | * `{customer}-suffix`, where `customer` is your customer ID. The *suffix* is
|
---|
115 | * any string the caller specifies. This string will be displayed verbatim in
|
---|
116 | * the administration console. This suffix is used in setting up Custom Access
|
---|
117 | * Levels in Context-Aware Access. Your organization's customer ID can be
|
---|
118 | * obtained from the URL: `GET
|
---|
119 | * https://www.googleapis.com/admin/directory/v1/customers/my_customer` The `id`
|
---|
120 | * field in the response contains the customer ID starting with the letter 'C'.
|
---|
121 | * The customer ID to be used in this API is the string after the letter 'C'
|
---|
122 | * (not including 'C')
|
---|
123 | * @param GoogleAppsCloudidentityDevicesV1ClientState $postBody
|
---|
124 | * @param array $optParams Optional parameters.
|
---|
125 | *
|
---|
126 | * @opt_param string customer Optional. [Resource
|
---|
127 | * name](https://cloud.google.com/apis/design/resource_names) of the customer.
|
---|
128 | * If you're using this API for your own organization, use
|
---|
129 | * `customers/my_customer` If you're using this API to manage another
|
---|
130 | * organization, use `customers/{customer}`, where customer is the customer to
|
---|
131 | * whom the device belongs.
|
---|
132 | * @opt_param string updateMask Optional. Comma-separated list of fully
|
---|
133 | * qualified names of fields to be updated. If not specified, all updatable
|
---|
134 | * fields in ClientState are updated.
|
---|
135 | * @return Operation
|
---|
136 | * @throws \Google\Service\Exception
|
---|
137 | */
|
---|
138 | public function patch($name, GoogleAppsCloudidentityDevicesV1ClientState $postBody, $optParams = [])
|
---|
139 | {
|
---|
140 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
141 | $params = array_merge($params, $optParams);
|
---|
142 | return $this->call('patch', [$params], Operation::class);
|
---|
143 | }
|
---|
144 | }
|
---|
145 |
|
---|
146 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
147 | class_alias(DevicesDeviceUsersClientStates::class, 'Google_Service_CloudIdentity_Resource_DevicesDeviceUsersClientStates');
|
---|