[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\Sheets\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Sheets\DeveloperMetadata;
|
---|
| 21 | use Google\Service\Sheets\SearchDeveloperMetadataRequest;
|
---|
| 22 | use Google\Service\Sheets\SearchDeveloperMetadataResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "developerMetadata" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $sheetsService = new Google\Service\Sheets(...);
|
---|
| 29 | * $developerMetadata = $sheetsService->spreadsheets_developerMetadata;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class SpreadsheetsDeveloperMetadata extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Returns the developer metadata with the specified ID. The caller must specify
|
---|
| 36 | * the spreadsheet ID and the developer metadata's unique metadataId.
|
---|
| 37 | * (developerMetadata.get)
|
---|
| 38 | *
|
---|
| 39 | * @param string $spreadsheetId The ID of the spreadsheet to retrieve metadata
|
---|
| 40 | * from.
|
---|
| 41 | * @param int $metadataId The ID of the developer metadata to retrieve.
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | * @return DeveloperMetadata
|
---|
| 44 | * @throws \Google\Service\Exception
|
---|
| 45 | */
|
---|
| 46 | public function get($spreadsheetId, $metadataId, $optParams = [])
|
---|
| 47 | {
|
---|
| 48 | $params = ['spreadsheetId' => $spreadsheetId, 'metadataId' => $metadataId];
|
---|
| 49 | $params = array_merge($params, $optParams);
|
---|
| 50 | return $this->call('get', [$params], DeveloperMetadata::class);
|
---|
| 51 | }
|
---|
| 52 | /**
|
---|
| 53 | * Returns all developer metadata matching the specified DataFilter. If the
|
---|
| 54 | * provided DataFilter represents a DeveloperMetadataLookup object, this will
|
---|
| 55 | * return all DeveloperMetadata entries selected by it. If the DataFilter
|
---|
| 56 | * represents a location in a spreadsheet, this will return all developer
|
---|
| 57 | * metadata associated with locations intersecting that region.
|
---|
| 58 | * (developerMetadata.search)
|
---|
| 59 | *
|
---|
| 60 | * @param string $spreadsheetId The ID of the spreadsheet to retrieve metadata
|
---|
| 61 | * from.
|
---|
| 62 | * @param SearchDeveloperMetadataRequest $postBody
|
---|
| 63 | * @param array $optParams Optional parameters.
|
---|
| 64 | * @return SearchDeveloperMetadataResponse
|
---|
| 65 | * @throws \Google\Service\Exception
|
---|
| 66 | */
|
---|
| 67 | public function search($spreadsheetId, SearchDeveloperMetadataRequest $postBody, $optParams = [])
|
---|
| 68 | {
|
---|
| 69 | $params = ['spreadsheetId' => $spreadsheetId, 'postBody' => $postBody];
|
---|
| 70 | $params = array_merge($params, $optParams);
|
---|
| 71 | return $this->call('search', [$params], SearchDeveloperMetadataResponse::class);
|
---|
| 72 | }
|
---|
| 73 | }
|
---|
| 74 |
|
---|
| 75 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 76 | class_alias(SpreadsheetsDeveloperMetadata::class, 'Google_Service_Sheets_Resource_SpreadsheetsDeveloperMetadata');
|
---|