source: vendor/google/apiclient-services/src/VMMigrationService/Resource/ProjectsLocationsSources.php

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

Upload project files

  • Property mode set to 100644
File size: 8.9 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\VMMigrationService\Resource;
19
20use Google\Service\VMMigrationService\FetchInventoryResponse;
21use Google\Service\VMMigrationService\ListSourcesResponse;
22use Google\Service\VMMigrationService\Operation;
23use Google\Service\VMMigrationService\Source;
24
25/**
26 * The "sources" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $vmmigrationService = new Google\Service\VMMigrationService(...);
30 * $sources = $vmmigrationService->projects_locations_sources;
31 * </code>
32 */
33class ProjectsLocationsSources extends \Google\Service\Resource
34{
35 /**
36 * Creates a new Source in a given project and location. (sources.create)
37 *
38 * @param string $parent Required. The Source's parent.
39 * @param Source $postBody
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string requestId A request ID to identify requests. Specify a
43 * unique request ID so that if you must retry your request, the server will
44 * know to ignore the request if it has already been completed. The server will
45 * guarantee that for at least 60 minutes since the first request. For example,
46 * consider a situation where you make an initial request and the request times
47 * out. If you make the request again with the same request ID, the server can
48 * check if original operation with the same request ID was received, and if so,
49 * will ignore the second request. This prevents clients from accidentally
50 * creating duplicate commitments. The request ID must be a valid UUID with the
51 * exception that zero UUID is not supported
52 * (00000000-0000-0000-0000-000000000000).
53 * @opt_param string sourceId Required. The source identifier.
54 * @return Operation
55 * @throws \Google\Service\Exception
56 */
57 public function create($parent, Source $postBody, $optParams = [])
58 {
59 $params = ['parent' => $parent, 'postBody' => $postBody];
60 $params = array_merge($params, $optParams);
61 return $this->call('create', [$params], Operation::class);
62 }
63 /**
64 * Deletes a single Source. (sources.delete)
65 *
66 * @param string $name Required. The Source name.
67 * @param array $optParams Optional parameters.
68 *
69 * @opt_param string requestId Optional. A request ID to identify requests.
70 * Specify a unique request ID so that if you must retry your request, the
71 * server will know to ignore the request if it has already been completed. The
72 * server will guarantee that for at least 60 minutes after the first request.
73 * For example, consider a situation where you make an initial request and the
74 * request times out. If you make the request again with the same request ID,
75 * the server can check if original operation with the same request ID was
76 * received, and if so, will ignore the second request. This prevents clients
77 * from accidentally creating duplicate commitments. The request ID must be a
78 * valid UUID with the exception that zero UUID is not supported
79 * (00000000-0000-0000-0000-000000000000).
80 * @return Operation
81 * @throws \Google\Service\Exception
82 */
83 public function delete($name, $optParams = [])
84 {
85 $params = ['name' => $name];
86 $params = array_merge($params, $optParams);
87 return $this->call('delete', [$params], Operation::class);
88 }
89 /**
90 * List remote source's inventory of VMs. The remote source is the onprem
91 * vCenter (remote in the sense it's not in Compute Engine). The inventory
92 * describes the list of existing VMs in that source. Note that this operation
93 * lists the VMs on the remote source, as opposed to listing the MigratingVms
94 * resources in the vmmigration service. (sources.fetchInventory)
95 *
96 * @param string $source Required. The name of the Source.
97 * @param array $optParams Optional parameters.
98 *
99 * @opt_param bool forceRefresh If this flag is set to true, the source will be
100 * queried instead of using cached results. Using this flag will make the call
101 * slower.
102 * @opt_param int pageSize The maximum number of VMs to return. The service may
103 * return fewer than this value. For AWS source: If unspecified, at most 500 VMs
104 * will be returned. The maximum value is 1000; values above 1000 will be
105 * coerced to 1000. For VMWare source: If unspecified, all VMs will be returned.
106 * There is no limit for maximum value.
107 * @opt_param string pageToken A page token, received from a previous
108 * `FetchInventory` call. Provide this to retrieve the subsequent page. When
109 * paginating, all other parameters provided to `FetchInventory` must match the
110 * call that provided the page token.
111 * @return FetchInventoryResponse
112 * @throws \Google\Service\Exception
113 */
114 public function fetchInventory($source, $optParams = [])
115 {
116 $params = ['source' => $source];
117 $params = array_merge($params, $optParams);
118 return $this->call('fetchInventory', [$params], FetchInventoryResponse::class);
119 }
120 /**
121 * Gets details of a single Source. (sources.get)
122 *
123 * @param string $name Required. The Source name.
124 * @param array $optParams Optional parameters.
125 * @return Source
126 * @throws \Google\Service\Exception
127 */
128 public function get($name, $optParams = [])
129 {
130 $params = ['name' => $name];
131 $params = array_merge($params, $optParams);
132 return $this->call('get', [$params], Source::class);
133 }
134 /**
135 * Lists Sources in a given project and location.
136 * (sources.listProjectsLocationsSources)
137 *
138 * @param string $parent Required. The parent, which owns this collection of
139 * sources.
140 * @param array $optParams Optional parameters.
141 *
142 * @opt_param string filter Optional. The filter request.
143 * @opt_param string orderBy Optional. the order by fields for the result.
144 * @opt_param int pageSize Optional. The maximum number of sources to return.
145 * The service may return fewer than this value. If unspecified, at most 500
146 * sources will be returned. The maximum value is 1000; values above 1000 will
147 * be coerced to 1000.
148 * @opt_param string pageToken Required. A page token, received from a previous
149 * `ListSources` call. Provide this to retrieve the subsequent page. When
150 * paginating, all other parameters provided to `ListSources` must match the
151 * call that provided the page token.
152 * @return ListSourcesResponse
153 * @throws \Google\Service\Exception
154 */
155 public function listProjectsLocationsSources($parent, $optParams = [])
156 {
157 $params = ['parent' => $parent];
158 $params = array_merge($params, $optParams);
159 return $this->call('list', [$params], ListSourcesResponse::class);
160 }
161 /**
162 * Updates the parameters of a single Source. (sources.patch)
163 *
164 * @param string $name Output only. The Source name.
165 * @param Source $postBody
166 * @param array $optParams Optional parameters.
167 *
168 * @opt_param string requestId A request ID to identify requests. Specify a
169 * unique request ID so that if you must retry your request, the server will
170 * know to ignore the request if it has already been completed. The server will
171 * guarantee that for at least 60 minutes since the first request. For example,
172 * consider a situation where you make an initial request and the request times
173 * out. If you make the request again with the same request ID, the server can
174 * check if original operation with the same request ID was received, and if so,
175 * will ignore the second request. This prevents clients from accidentally
176 * creating duplicate commitments. The request ID must be a valid UUID with the
177 * exception that zero UUID is not supported
178 * (00000000-0000-0000-0000-000000000000).
179 * @opt_param string updateMask Field mask is used to specify the fields to be
180 * overwritten in the Source resource by the update. The fields specified in the
181 * update_mask are relative to the resource, not the full request. A field will
182 * be overwritten if it is in the mask. If the user does not provide a mask then
183 * all fields will be overwritten.
184 * @return Operation
185 * @throws \Google\Service\Exception
186 */
187 public function patch($name, Source $postBody, $optParams = [])
188 {
189 $params = ['name' => $name, 'postBody' => $postBody];
190 $params = array_merge($params, $optParams);
191 return $this->call('patch', [$params], Operation::class);
192 }
193}
194
195// Adding a class alias for backwards compatibility with the previous class name.
196class_alias(ProjectsLocationsSources::class, 'Google_Service_VMMigrationService_Resource_ProjectsLocationsSources');
Note: See TracBrowser for help on using the repository browser.