source: vendor/google/apiclient-services/src/MigrationCenterAPI/Resource/ProjectsLocationsDiscoveryClients.php

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

Upload project files

  • Property mode set to 100644
File size: 8.5 KB
RevLine 
[e3d4e0a]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\MigrationCenterAPI\Resource;
19
20use Google\Service\MigrationCenterAPI\DiscoveryClient;
21use Google\Service\MigrationCenterAPI\ListDiscoveryClientsResponse;
22use Google\Service\MigrationCenterAPI\Operation;
23use Google\Service\MigrationCenterAPI\SendDiscoveryClientHeartbeatRequest;
24
25/**
26 * The "discoveryClients" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $migrationcenterService = new Google\Service\MigrationCenterAPI(...);
30 * $discoveryClients = $migrationcenterService->projects_locations_discoveryClients;
31 * </code>
32 */
33class ProjectsLocationsDiscoveryClients extends \Google\Service\Resource
34{
35 /**
36 * Creates a new discovery client. (discoveryClients.create)
37 *
38 * @param string $parent Required. Parent resource.
39 * @param DiscoveryClient $postBody
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string discoveryClientId Required. User specified ID for the
43 * discovery client. It will become the last component of the discovery client
44 * name. The ID must be unique within the project, is restricted to lower-cased
45 * letters and has a maximum length of 63 characters. The ID must match the
46 * regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
47 * @opt_param string requestId Optional. An optional request ID to identify
48 * requests. Specify a unique request ID so that if you must retry your request,
49 * the server will know to ignore the request if it has already been completed.
50 * The server will guarantee that for at least 60 minutes since the first
51 * request. For example, consider a situation where you make an initial request
52 * and the request times out. If you make the request again with the same
53 * request ID, the server can check if original operation with the same request
54 * ID was received, and if so, will ignore the second request. This prevents
55 * clients from accidentally creating duplicate commitments. The request ID must
56 * be a valid UUID with the exception that zero UUID is not supported
57 * (00000000-0000-0000-0000-000000000000).
58 * @return Operation
59 * @throws \Google\Service\Exception
60 */
61 public function create($parent, DiscoveryClient $postBody, $optParams = [])
62 {
63 $params = ['parent' => $parent, 'postBody' => $postBody];
64 $params = array_merge($params, $optParams);
65 return $this->call('create', [$params], Operation::class);
66 }
67 /**
68 * Deletes a discovery client. (discoveryClients.delete)
69 *
70 * @param string $name Required. The discovery client name.
71 * @param array $optParams Optional parameters.
72 *
73 * @opt_param string requestId Optional. An optional request ID to identify
74 * requests. Specify a unique request ID so that if you must retry your request,
75 * the server will know to ignore the request if it has already been completed.
76 * The server will guarantee that for at least 60 minutes after the first
77 * request. For example, consider a situation where you make an initial request
78 * and the request times out. If you make the request again with the same
79 * request ID, the server can check if original operation with the same request
80 * ID was received, and if so, will ignore the second request. This prevents
81 * clients from accidentally creating duplicate commitments. The request ID must
82 * be a valid UUID with the exception that zero UUID is not supported
83 * (00000000-0000-0000-0000-000000000000).
84 * @return Operation
85 * @throws \Google\Service\Exception
86 */
87 public function delete($name, $optParams = [])
88 {
89 $params = ['name' => $name];
90 $params = array_merge($params, $optParams);
91 return $this->call('delete', [$params], Operation::class);
92 }
93 /**
94 * Gets the details of a discovery client. (discoveryClients.get)
95 *
96 * @param string $name Required. The discovery client name.
97 * @param array $optParams Optional parameters.
98 * @return DiscoveryClient
99 * @throws \Google\Service\Exception
100 */
101 public function get($name, $optParams = [])
102 {
103 $params = ['name' => $name];
104 $params = array_merge($params, $optParams);
105 return $this->call('get', [$params], DiscoveryClient::class);
106 }
107 /**
108 * Lists all the discovery clients in a given project and location.
109 * (discoveryClients.listProjectsLocationsDiscoveryClients)
110 *
111 * @param string $parent Required. Parent resource.
112 * @param array $optParams Optional parameters.
113 *
114 * @opt_param string filter Optional. Filter expression to filter results by.
115 * @opt_param string orderBy Optional. Field to sort by.
116 * @opt_param int pageSize Optional. The maximum number of items to return. The
117 * server may return fewer items than requested. If unspecified, the server will
118 * pick an appropriate default value.
119 * @opt_param string pageToken Optional. A page token, received from a previous
120 * `ListDiscoveryClients` call. Provide this to retrieve the subsequent page.
121 * When paginating, all other parameters provided to `ListDiscoveryClients` must
122 * match the call that provided the page token.
123 * @return ListDiscoveryClientsResponse
124 * @throws \Google\Service\Exception
125 */
126 public function listProjectsLocationsDiscoveryClients($parent, $optParams = [])
127 {
128 $params = ['parent' => $parent];
129 $params = array_merge($params, $optParams);
130 return $this->call('list', [$params], ListDiscoveryClientsResponse::class);
131 }
132 /**
133 * Updates a discovery client. (discoveryClients.patch)
134 *
135 * @param string $name Output only. Identifier. Full name of this discovery
136 * client.
137 * @param DiscoveryClient $postBody
138 * @param array $optParams Optional parameters.
139 *
140 * @opt_param string requestId Optional. An optional request ID to identify
141 * requests. Specify a unique request ID so that if you must retry your request,
142 * the server will know to ignore the request if it has already been completed.
143 * The server will guarantee that for at least 60 minutes since the first
144 * request. For example, consider a situation where you make an initial request
145 * and the request times out. If you make the request again with the same
146 * request ID, the server can check if original operation with the same request
147 * ID was received, and if so, will ignore the second request. This prevents
148 * clients from accidentally creating duplicate commitments. The request ID must
149 * be a valid UUID with the exception that zero UUID is not supported
150 * (00000000-0000-0000-0000-000000000000).
151 * @opt_param string updateMask Required. Update mask is used to specify the
152 * fields to be overwritten in the `DiscoveryClient` resource by the update. The
153 * values specified in the `update_mask` field are relative to the resource, not
154 * the full request. A field will be overwritten if it is in the mask. A single
155 * * value in the mask lets you to overwrite all fields.
156 * @return Operation
157 * @throws \Google\Service\Exception
158 */
159 public function patch($name, DiscoveryClient $postBody, $optParams = [])
160 {
161 $params = ['name' => $name, 'postBody' => $postBody];
162 $params = array_merge($params, $optParams);
163 return $this->call('patch', [$params], Operation::class);
164 }
165 /**
166 * Sends a discovery client heartbeat. Healthy clients are expected to send
167 * heartbeats regularly (normally every few minutes).
168 * (discoveryClients.sendHeartbeat)
169 *
170 * @param string $name Required. The discovery client name.
171 * @param SendDiscoveryClientHeartbeatRequest $postBody
172 * @param array $optParams Optional parameters.
173 * @return Operation
174 * @throws \Google\Service\Exception
175 */
176 public function sendHeartbeat($name, SendDiscoveryClientHeartbeatRequest $postBody, $optParams = [])
177 {
178 $params = ['name' => $name, 'postBody' => $postBody];
179 $params = array_merge($params, $optParams);
180 return $this->call('sendHeartbeat', [$params], Operation::class);
181 }
182}
183
184// Adding a class alias for backwards compatibility with the previous class name.
185class_alias(ProjectsLocationsDiscoveryClients::class, 'Google_Service_MigrationCenterAPI_Resource_ProjectsLocationsDiscoveryClients');
Note: See TracBrowser for help on using the repository browser.