source: vendor/google/apiclient-services/src/CloudIot/Resource/ProjectsLocationsRegistries.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 9.2 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\CloudIot\Resource;
19
20use Google\Service\CloudIot\BindDeviceToGatewayRequest;
21use Google\Service\CloudIot\BindDeviceToGatewayResponse;
22use Google\Service\CloudIot\CloudiotEmpty;
23use Google\Service\CloudIot\DeviceRegistry;
24use Google\Service\CloudIot\GetIamPolicyRequest;
25use Google\Service\CloudIot\ListDeviceRegistriesResponse;
26use Google\Service\CloudIot\Policy;
27use Google\Service\CloudIot\SetIamPolicyRequest;
28use Google\Service\CloudIot\TestIamPermissionsRequest;
29use Google\Service\CloudIot\TestIamPermissionsResponse;
30use Google\Service\CloudIot\UnbindDeviceFromGatewayRequest;
31use Google\Service\CloudIot\UnbindDeviceFromGatewayResponse;
32
33/**
34 * The "registries" collection of methods.
35 * Typical usage is:
36 * <code>
37 * $cloudiotService = new Google\Service\CloudIot(...);
38 * $registries = $cloudiotService->projects_locations_registries;
39 * </code>
40 */
41class ProjectsLocationsRegistries extends \Google\Service\Resource
42{
43 /**
44 * Associates the device with the gateway. (registries.bindDeviceToGateway)
45 *
46 * @param string $parent Required. The name of the registry. For example,
47 * `projects/example-project/locations/us-central1/registries/my-registry`.
48 * @param BindDeviceToGatewayRequest $postBody
49 * @param array $optParams Optional parameters.
50 * @return BindDeviceToGatewayResponse
51 */
52 public function bindDeviceToGateway($parent, BindDeviceToGatewayRequest $postBody, $optParams = [])
53 {
54 $params = ['parent' => $parent, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('bindDeviceToGateway', [$params], BindDeviceToGatewayResponse::class);
57 }
58 /**
59 * Creates a device registry that contains devices. (registries.create)
60 *
61 * @param string $parent Required. The project and cloud region where this
62 * device registry must be created. For example, `projects/example-
63 * project/locations/us-central1`.
64 * @param DeviceRegistry $postBody
65 * @param array $optParams Optional parameters.
66 * @return DeviceRegistry
67 */
68 public function create($parent, DeviceRegistry $postBody, $optParams = [])
69 {
70 $params = ['parent' => $parent, 'postBody' => $postBody];
71 $params = array_merge($params, $optParams);
72 return $this->call('create', [$params], DeviceRegistry::class);
73 }
74 /**
75 * Deletes a device registry configuration. (registries.delete)
76 *
77 * @param string $name Required. The name of the device registry. For example,
78 * `projects/example-project/locations/us-central1/registries/my-registry`.
79 * @param array $optParams Optional parameters.
80 * @return CloudiotEmpty
81 */
82 public function delete($name, $optParams = [])
83 {
84 $params = ['name' => $name];
85 $params = array_merge($params, $optParams);
86 return $this->call('delete', [$params], CloudiotEmpty::class);
87 }
88 /**
89 * Gets a device registry configuration. (registries.get)
90 *
91 * @param string $name Required. The name of the device registry. For example,
92 * `projects/example-project/locations/us-central1/registries/my-registry`.
93 * @param array $optParams Optional parameters.
94 * @return DeviceRegistry
95 */
96 public function get($name, $optParams = [])
97 {
98 $params = ['name' => $name];
99 $params = array_merge($params, $optParams);
100 return $this->call('get', [$params], DeviceRegistry::class);
101 }
102 /**
103 * Gets the access control policy for a resource. Returns an empty policy if the
104 * resource exists and does not have a policy set. (registries.getIamPolicy)
105 *
106 * @param string $resource REQUIRED: The resource for which the policy is being
107 * requested. See [Resource
108 * names](https://cloud.google.com/apis/design/resource_names) for the
109 * appropriate value for this field.
110 * @param GetIamPolicyRequest $postBody
111 * @param array $optParams Optional parameters.
112 * @return Policy
113 */
114 public function getIamPolicy($resource, GetIamPolicyRequest $postBody, $optParams = [])
115 {
116 $params = ['resource' => $resource, 'postBody' => $postBody];
117 $params = array_merge($params, $optParams);
118 return $this->call('getIamPolicy', [$params], Policy::class);
119 }
120 /**
121 * Lists device registries. (registries.listProjectsLocationsRegistries)
122 *
123 * @param string $parent Required. The project and cloud region path. For
124 * example, `projects/example-project/locations/us-central1`.
125 * @param array $optParams Optional parameters.
126 *
127 * @opt_param int pageSize The maximum number of registries to return in the
128 * response. If this value is zero, the service will select a default size. A
129 * call may return fewer objects than requested. A non-empty `next_page_token`
130 * in the response indicates that more data is available.
131 * @opt_param string pageToken The value returned by the last
132 * `ListDeviceRegistriesResponse`; indicates that this is a continuation of a
133 * prior `ListDeviceRegistries` call and the system should return the next page
134 * of data.
135 * @return ListDeviceRegistriesResponse
136 */
137 public function listProjectsLocationsRegistries($parent, $optParams = [])
138 {
139 $params = ['parent' => $parent];
140 $params = array_merge($params, $optParams);
141 return $this->call('list', [$params], ListDeviceRegistriesResponse::class);
142 }
143 /**
144 * Updates a device registry configuration. (registries.patch)
145 *
146 * @param string $name The resource path name. For example, `projects/example-
147 * project/locations/us-central1/registries/my-registry`.
148 * @param DeviceRegistry $postBody
149 * @param array $optParams Optional parameters.
150 *
151 * @opt_param string updateMask Required. Only updates the `device_registry`
152 * fields indicated by this mask. The field mask must not be empty, and it must
153 * not contain fields that are immutable or only set by the server. Mutable top-
154 * level fields: `event_notification_config`, `http_config`, `mqtt_config`, and
155 * `state_notification_config`.
156 * @return DeviceRegistry
157 */
158 public function patch($name, DeviceRegistry $postBody, $optParams = [])
159 {
160 $params = ['name' => $name, 'postBody' => $postBody];
161 $params = array_merge($params, $optParams);
162 return $this->call('patch', [$params], DeviceRegistry::class);
163 }
164 /**
165 * Sets the access control policy on the specified resource. Replaces any
166 * existing policy. (registries.setIamPolicy)
167 *
168 * @param string $resource REQUIRED: The resource for which the policy is being
169 * specified. See [Resource
170 * names](https://cloud.google.com/apis/design/resource_names) for the
171 * appropriate value for this field.
172 * @param SetIamPolicyRequest $postBody
173 * @param array $optParams Optional parameters.
174 * @return Policy
175 */
176 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
177 {
178 $params = ['resource' => $resource, 'postBody' => $postBody];
179 $params = array_merge($params, $optParams);
180 return $this->call('setIamPolicy', [$params], Policy::class);
181 }
182 /**
183 * Returns permissions that a caller has on the specified resource. If the
184 * resource does not exist, this will return an empty set of permissions, not a
185 * NOT_FOUND error. (registries.testIamPermissions)
186 *
187 * @param string $resource REQUIRED: The resource for which the policy detail is
188 * being requested. See [Resource
189 * names](https://cloud.google.com/apis/design/resource_names) for the
190 * appropriate value for this field.
191 * @param TestIamPermissionsRequest $postBody
192 * @param array $optParams Optional parameters.
193 * @return TestIamPermissionsResponse
194 */
195 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
196 {
197 $params = ['resource' => $resource, 'postBody' => $postBody];
198 $params = array_merge($params, $optParams);
199 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
200 }
201 /**
202 * Deletes the association between the device and the gateway.
203 * (registries.unbindDeviceFromGateway)
204 *
205 * @param string $parent Required. The name of the registry. For example,
206 * `projects/example-project/locations/us-central1/registries/my-registry`.
207 * @param UnbindDeviceFromGatewayRequest $postBody
208 * @param array $optParams Optional parameters.
209 * @return UnbindDeviceFromGatewayResponse
210 */
211 public function unbindDeviceFromGateway($parent, UnbindDeviceFromGatewayRequest $postBody, $optParams = [])
212 {
213 $params = ['parent' => $parent, 'postBody' => $postBody];
214 $params = array_merge($params, $optParams);
215 return $this->call('unbindDeviceFromGateway', [$params], UnbindDeviceFromGatewayResponse::class);
216 }
217}
218
219// Adding a class alias for backwards compatibility with the previous class name.
220class_alias(ProjectsLocationsRegistries::class, 'Google_Service_CloudIot_Resource_ProjectsLocationsRegistries');
Note: See TracBrowser for help on using the repository browser.