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\MigrationCenterAPI\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\MigrationCenterAPI\ListReportConfigsResponse;
|
---|
21 | use Google\Service\MigrationCenterAPI\Operation;
|
---|
22 | use Google\Service\MigrationCenterAPI\ReportConfig;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "reportConfigs" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $migrationcenterService = new Google\Service\MigrationCenterAPI(...);
|
---|
29 | * $reportConfigs = $migrationcenterService->projects_locations_reportConfigs;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsReportConfigs extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a report configuration. (reportConfigs.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. Value for parent.
|
---|
38 | * @param ReportConfig $postBody
|
---|
39 | * @param array $optParams Optional parameters.
|
---|
40 | *
|
---|
41 | * @opt_param string reportConfigId Required. User specified ID for the report
|
---|
42 | * config. It will become the last component of the report config name. The ID
|
---|
43 | * must be unique within the project, must conform with RFC-1034, is restricted
|
---|
44 | * to lower-cased letters, and has a maximum length of 63 characters. The ID
|
---|
45 | * must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
|
---|
46 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
47 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
48 | * the server will know to ignore the request if it has already been completed.
|
---|
49 | * The server will guarantee that for at least 60 minutes since the first
|
---|
50 | * request. For example, consider a situation where you make an initial request
|
---|
51 | * and the request times out. If you make the request again with the same
|
---|
52 | * request ID, the server can check if original operation with the same request
|
---|
53 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
54 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
55 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
56 | * (00000000-0000-0000-0000-000000000000).
|
---|
57 | * @return Operation
|
---|
58 | * @throws \Google\Service\Exception
|
---|
59 | */
|
---|
60 | public function create($parent, ReportConfig $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 ReportConfig. (reportConfigs.delete)
|
---|
68 | *
|
---|
69 | * @param string $name Required. Name of the resource.
|
---|
70 | * @param array $optParams Optional parameters.
|
---|
71 | *
|
---|
72 | * @opt_param bool force Optional. If set to `true`, any child `Reports` of this
|
---|
73 | * entity will also be deleted. If set to `false`, the request only works if the
|
---|
74 | * resource has no children.
|
---|
75 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
76 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
77 | * the server will know to ignore the request if it has already been completed.
|
---|
78 | * The server will guarantee that for at least 60 minutes after the first
|
---|
79 | * request. For example, consider a situation where you make an initial request
|
---|
80 | * and the request times out. If you make the request again with the same
|
---|
81 | * request ID, the server can check if original operation with the same request
|
---|
82 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
83 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
84 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
85 | * (00000000-0000-0000-0000-000000000000).
|
---|
86 | * @return Operation
|
---|
87 | * @throws \Google\Service\Exception
|
---|
88 | */
|
---|
89 | public function delete($name, $optParams = [])
|
---|
90 | {
|
---|
91 | $params = ['name' => $name];
|
---|
92 | $params = array_merge($params, $optParams);
|
---|
93 | return $this->call('delete', [$params], Operation::class);
|
---|
94 | }
|
---|
95 | /**
|
---|
96 | * Gets details of a single ReportConfig. (reportConfigs.get)
|
---|
97 | *
|
---|
98 | * @param string $name Required. Name of the resource.
|
---|
99 | * @param array $optParams Optional parameters.
|
---|
100 | * @return ReportConfig
|
---|
101 | * @throws \Google\Service\Exception
|
---|
102 | */
|
---|
103 | public function get($name, $optParams = [])
|
---|
104 | {
|
---|
105 | $params = ['name' => $name];
|
---|
106 | $params = array_merge($params, $optParams);
|
---|
107 | return $this->call('get', [$params], ReportConfig::class);
|
---|
108 | }
|
---|
109 | /**
|
---|
110 | * Lists ReportConfigs in a given project and location.
|
---|
111 | * (reportConfigs.listProjectsLocationsReportConfigs)
|
---|
112 | *
|
---|
113 | * @param string $parent Required. Parent value for `ListReportConfigsRequest`.
|
---|
114 | * @param array $optParams Optional parameters.
|
---|
115 | *
|
---|
116 | * @opt_param string filter Filtering results.
|
---|
117 | * @opt_param string orderBy Field to sort by. See
|
---|
118 | * https://google.aip.dev/132#ordering for more details.
|
---|
119 | * @opt_param int pageSize Requested page size. Server may return fewer items
|
---|
120 | * than requested. If unspecified, server will pick an appropriate default.
|
---|
121 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
122 | * should return.
|
---|
123 | * @return ListReportConfigsResponse
|
---|
124 | * @throws \Google\Service\Exception
|
---|
125 | */
|
---|
126 | public function listProjectsLocationsReportConfigs($parent, $optParams = [])
|
---|
127 | {
|
---|
128 | $params = ['parent' => $parent];
|
---|
129 | $params = array_merge($params, $optParams);
|
---|
130 | return $this->call('list', [$params], ListReportConfigsResponse::class);
|
---|
131 | }
|
---|
132 | }
|
---|
133 |
|
---|
134 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
135 | class_alias(ProjectsLocationsReportConfigs::class, 'Google_Service_MigrationCenterAPI_Resource_ProjectsLocationsReportConfigs');
|
---|