[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 |
|
---|
| 18 | namespace Google\Service\MigrationCenterAPI\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\MigrationCenterAPI\AggregateAssetsValuesRequest;
|
---|
| 21 | use Google\Service\MigrationCenterAPI\AggregateAssetsValuesResponse;
|
---|
| 22 | use Google\Service\MigrationCenterAPI\Asset;
|
---|
| 23 | use Google\Service\MigrationCenterAPI\BatchDeleteAssetsRequest;
|
---|
| 24 | use Google\Service\MigrationCenterAPI\BatchUpdateAssetsRequest;
|
---|
| 25 | use Google\Service\MigrationCenterAPI\BatchUpdateAssetsResponse;
|
---|
| 26 | use Google\Service\MigrationCenterAPI\Frames;
|
---|
| 27 | use Google\Service\MigrationCenterAPI\ListAssetsResponse;
|
---|
| 28 | use Google\Service\MigrationCenterAPI\MigrationcenterEmpty;
|
---|
| 29 | use Google\Service\MigrationCenterAPI\ReportAssetFramesResponse;
|
---|
| 30 |
|
---|
| 31 | /**
|
---|
| 32 | * The "assets" collection of methods.
|
---|
| 33 | * Typical usage is:
|
---|
| 34 | * <code>
|
---|
| 35 | * $migrationcenterService = new Google\Service\MigrationCenterAPI(...);
|
---|
| 36 | * $assets = $migrationcenterService->projects_locations_assets;
|
---|
| 37 | * </code>
|
---|
| 38 | */
|
---|
| 39 | class ProjectsLocationsAssets extends \Google\Service\Resource
|
---|
| 40 | {
|
---|
| 41 | /**
|
---|
| 42 | * Aggregates the requested fields based on provided function.
|
---|
| 43 | * (assets.aggregateValues)
|
---|
| 44 | *
|
---|
| 45 | * @param string $parent Required. Parent value for
|
---|
| 46 | * `AggregateAssetsValuesRequest`.
|
---|
| 47 | * @param AggregateAssetsValuesRequest $postBody
|
---|
| 48 | * @param array $optParams Optional parameters.
|
---|
| 49 | * @return AggregateAssetsValuesResponse
|
---|
| 50 | * @throws \Google\Service\Exception
|
---|
| 51 | */
|
---|
| 52 | public function aggregateValues($parent, AggregateAssetsValuesRequest $postBody, $optParams = [])
|
---|
| 53 | {
|
---|
| 54 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 55 | $params = array_merge($params, $optParams);
|
---|
| 56 | return $this->call('aggregateValues', [$params], AggregateAssetsValuesResponse::class);
|
---|
| 57 | }
|
---|
| 58 | /**
|
---|
| 59 | * Deletes list of Assets. (assets.batchDelete)
|
---|
| 60 | *
|
---|
| 61 | * @param string $parent Required. Parent value for batch asset delete.
|
---|
| 62 | * @param BatchDeleteAssetsRequest $postBody
|
---|
| 63 | * @param array $optParams Optional parameters.
|
---|
| 64 | * @return MigrationcenterEmpty
|
---|
| 65 | * @throws \Google\Service\Exception
|
---|
| 66 | */
|
---|
| 67 | public function batchDelete($parent, BatchDeleteAssetsRequest $postBody, $optParams = [])
|
---|
| 68 | {
|
---|
| 69 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 70 | $params = array_merge($params, $optParams);
|
---|
| 71 | return $this->call('batchDelete', [$params], MigrationcenterEmpty::class);
|
---|
| 72 | }
|
---|
| 73 | /**
|
---|
| 74 | * Updates the parameters of a list of assets. (assets.batchUpdate)
|
---|
| 75 | *
|
---|
| 76 | * @param string $parent Required. Parent value for batch asset update.
|
---|
| 77 | * @param BatchUpdateAssetsRequest $postBody
|
---|
| 78 | * @param array $optParams Optional parameters.
|
---|
| 79 | * @return BatchUpdateAssetsResponse
|
---|
| 80 | * @throws \Google\Service\Exception
|
---|
| 81 | */
|
---|
| 82 | public function batchUpdate($parent, BatchUpdateAssetsRequest $postBody, $optParams = [])
|
---|
| 83 | {
|
---|
| 84 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 85 | $params = array_merge($params, $optParams);
|
---|
| 86 | return $this->call('batchUpdate', [$params], BatchUpdateAssetsResponse::class);
|
---|
| 87 | }
|
---|
| 88 | /**
|
---|
| 89 | * Deletes an asset. (assets.delete)
|
---|
| 90 | *
|
---|
| 91 | * @param string $name Required. Name of the resource.
|
---|
| 92 | * @param array $optParams Optional parameters.
|
---|
| 93 | *
|
---|
| 94 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 95 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 96 | * the server will know to ignore the request if it has already been completed.
|
---|
| 97 | * The server will guarantee that for at least 60 minutes after the first
|
---|
| 98 | * request. For example, consider a situation where you make an initial request
|
---|
| 99 | * and the request times out. If you make the request again with the same
|
---|
| 100 | * request ID, the server can check if original operation with the same request
|
---|
| 101 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
| 102 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
| 103 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
| 104 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 105 | * @return MigrationcenterEmpty
|
---|
| 106 | * @throws \Google\Service\Exception
|
---|
| 107 | */
|
---|
| 108 | public function delete($name, $optParams = [])
|
---|
| 109 | {
|
---|
| 110 | $params = ['name' => $name];
|
---|
| 111 | $params = array_merge($params, $optParams);
|
---|
| 112 | return $this->call('delete', [$params], MigrationcenterEmpty::class);
|
---|
| 113 | }
|
---|
| 114 | /**
|
---|
| 115 | * Gets the details of an asset. (assets.get)
|
---|
| 116 | *
|
---|
| 117 | * @param string $name Required. Name of the resource.
|
---|
| 118 | * @param array $optParams Optional parameters.
|
---|
| 119 | *
|
---|
| 120 | * @opt_param string view View of the assets. Defaults to BASIC.
|
---|
| 121 | * @return Asset
|
---|
| 122 | * @throws \Google\Service\Exception
|
---|
| 123 | */
|
---|
| 124 | public function get($name, $optParams = [])
|
---|
| 125 | {
|
---|
| 126 | $params = ['name' => $name];
|
---|
| 127 | $params = array_merge($params, $optParams);
|
---|
| 128 | return $this->call('get', [$params], Asset::class);
|
---|
| 129 | }
|
---|
| 130 | /**
|
---|
| 131 | * Lists all the assets in a given project and location.
|
---|
| 132 | * (assets.listProjectsLocationsAssets)
|
---|
| 133 | *
|
---|
| 134 | * @param string $parent Required. Parent value for `ListAssetsRequest`.
|
---|
| 135 | * @param array $optParams Optional parameters.
|
---|
| 136 | *
|
---|
| 137 | * @opt_param string filter Filtering results.
|
---|
| 138 | * @opt_param string orderBy Field to sort by. See
|
---|
| 139 | * https://google.aip.dev/132#ordering for more details.
|
---|
| 140 | * @opt_param int pageSize Requested page size. Server may return fewer items
|
---|
| 141 | * than requested. If unspecified, server will pick an appropriate default.
|
---|
| 142 | * @opt_param string pageToken A token identifying a page of results the server
|
---|
| 143 | * should return.
|
---|
| 144 | * @opt_param string view View of the assets. Defaults to BASIC.
|
---|
| 145 | * @return ListAssetsResponse
|
---|
| 146 | * @throws \Google\Service\Exception
|
---|
| 147 | */
|
---|
| 148 | public function listProjectsLocationsAssets($parent, $optParams = [])
|
---|
| 149 | {
|
---|
| 150 | $params = ['parent' => $parent];
|
---|
| 151 | $params = array_merge($params, $optParams);
|
---|
| 152 | return $this->call('list', [$params], ListAssetsResponse::class);
|
---|
| 153 | }
|
---|
| 154 | /**
|
---|
| 155 | * Updates the parameters of an asset. (assets.patch)
|
---|
| 156 | *
|
---|
| 157 | * @param string $name Output only. The full name of the asset.
|
---|
| 158 | * @param Asset $postBody
|
---|
| 159 | * @param array $optParams Optional parameters.
|
---|
| 160 | *
|
---|
| 161 | * @opt_param string requestId Optional. An optional request ID to identify
|
---|
| 162 | * requests. Specify a unique request ID so that if you must retry your request,
|
---|
| 163 | * the server will know to ignore the request if it has already been completed.
|
---|
| 164 | * The server will guarantee that for at least 60 minutes since the first
|
---|
| 165 | * request. For example, consider a situation where you make an initial request
|
---|
| 166 | * and the request times out. If you make the request again with the same
|
---|
| 167 | * request ID, the server can check if original operation with the same request
|
---|
| 168 | * ID was received, and if so, will ignore the second request. This prevents
|
---|
| 169 | * clients from accidentally creating duplicate commitments. The request ID must
|
---|
| 170 | * be a valid UUID with the exception that zero UUID is not supported
|
---|
| 171 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 172 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
| 173 | * fields to be overwritten in the `Asset` resource by the update. The values
|
---|
| 174 | * specified in the `update_mask` field are relative to the resource, not the
|
---|
| 175 | * full request. A field will be overwritten if it is in the mask. A single *
|
---|
| 176 | * value in the mask lets you to overwrite all fields.
|
---|
| 177 | * @return Asset
|
---|
| 178 | * @throws \Google\Service\Exception
|
---|
| 179 | */
|
---|
| 180 | public function patch($name, Asset $postBody, $optParams = [])
|
---|
| 181 | {
|
---|
| 182 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 183 | $params = array_merge($params, $optParams);
|
---|
| 184 | return $this->call('patch', [$params], Asset::class);
|
---|
| 185 | }
|
---|
| 186 | /**
|
---|
| 187 | * Reports a set of frames. (assets.reportAssetFrames)
|
---|
| 188 | *
|
---|
| 189 | * @param string $parent Required. Parent of the resource.
|
---|
| 190 | * @param Frames $postBody
|
---|
| 191 | * @param array $optParams Optional parameters.
|
---|
| 192 | *
|
---|
| 193 | * @opt_param string source Required. Reference to a source.
|
---|
| 194 | * @return ReportAssetFramesResponse
|
---|
| 195 | * @throws \Google\Service\Exception
|
---|
| 196 | */
|
---|
| 197 | public function reportAssetFrames($parent, Frames $postBody, $optParams = [])
|
---|
| 198 | {
|
---|
| 199 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 200 | $params = array_merge($params, $optParams);
|
---|
| 201 | return $this->call('reportAssetFrames', [$params], ReportAssetFramesResponse::class);
|
---|
| 202 | }
|
---|
| 203 | }
|
---|
| 204 |
|
---|
| 205 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 206 | class_alias(ProjectsLocationsAssets::class, 'Google_Service_MigrationCenterAPI_Resource_ProjectsLocationsAssets');
|
---|