[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\Translate\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Translate\AdaptiveMtFile;
|
---|
| 21 | use Google\Service\Translate\ListAdaptiveMtFilesResponse;
|
---|
| 22 | use Google\Service\Translate\TranslateEmpty;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "adaptiveMtFiles" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $translateService = new Google\Service\Translate(...);
|
---|
| 29 | * $adaptiveMtFiles = $translateService->projects_locations_adaptiveMtDatasets_adaptiveMtFiles;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Deletes an AdaptiveMtFile along with its sentences. (adaptiveMtFiles.delete)
|
---|
| 36 | *
|
---|
| 37 | * @param string $name Required. The resource name of the file to delete, in
|
---|
| 38 | * form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDa
|
---|
| 39 | * tasets/{dataset}/adaptiveMtFiles/{file}`
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | * @return TranslateEmpty
|
---|
| 42 | * @throws \Google\Service\Exception
|
---|
| 43 | */
|
---|
| 44 | public function delete($name, $optParams = [])
|
---|
| 45 | {
|
---|
| 46 | $params = ['name' => $name];
|
---|
| 47 | $params = array_merge($params, $optParams);
|
---|
| 48 | return $this->call('delete', [$params], TranslateEmpty::class);
|
---|
| 49 | }
|
---|
| 50 | /**
|
---|
| 51 | * Gets and AdaptiveMtFile (adaptiveMtFiles.get)
|
---|
| 52 | *
|
---|
| 53 | * @param string $name Required. The resource name of the file, in form of
|
---|
| 54 | * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{
|
---|
| 55 | * dataset}/adaptiveMtFiles/{file}`
|
---|
| 56 | * @param array $optParams Optional parameters.
|
---|
| 57 | * @return AdaptiveMtFile
|
---|
| 58 | * @throws \Google\Service\Exception
|
---|
| 59 | */
|
---|
| 60 | public function get($name, $optParams = [])
|
---|
| 61 | {
|
---|
| 62 | $params = ['name' => $name];
|
---|
| 63 | $params = array_merge($params, $optParams);
|
---|
| 64 | return $this->call('get', [$params], AdaptiveMtFile::class);
|
---|
| 65 | }
|
---|
| 66 | /**
|
---|
| 67 | * Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.
|
---|
| 68 | * (adaptiveMtFiles.listProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles)
|
---|
| 69 | *
|
---|
| 70 | * @param string $parent Required. The resource name of the project from which
|
---|
| 71 | * to list the Adaptive MT files.
|
---|
| 72 | * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | *
|
---|
| 75 | * @opt_param int pageSize Optional.
|
---|
| 76 | * @opt_param string pageToken Optional. A token identifying a page of results
|
---|
| 77 | * the server should return. Typically, this is the value of
|
---|
| 78 | * ListAdaptiveMtFilesResponse.next_page_token returned from the previous call
|
---|
| 79 | * to `ListAdaptiveMtFiles` method. The first page is returned if `page_token`is
|
---|
| 80 | * empty or missing.
|
---|
| 81 | * @return ListAdaptiveMtFilesResponse
|
---|
| 82 | * @throws \Google\Service\Exception
|
---|
| 83 | */
|
---|
| 84 | public function listProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles($parent, $optParams = [])
|
---|
| 85 | {
|
---|
| 86 | $params = ['parent' => $parent];
|
---|
| 87 | $params = array_merge($params, $optParams);
|
---|
| 88 | return $this->call('list', [$params], ListAdaptiveMtFilesResponse::class);
|
---|
| 89 | }
|
---|
| 90 | }
|
---|
| 91 |
|
---|
| 92 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 93 | class_alias(ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles::class, 'Google_Service_Translate_Resource_ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles');
|
---|