source: vendor/google/apiclient-services/src/MigrationCenterAPI/Resource/ProjectsLocationsSources.php@ f9c482b

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

Upload new project files

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