* $translateService = new Google\Service\Translate(...); * $adaptiveMtFiles = $translateService->projects_locations_adaptiveMtDatasets_adaptiveMtFiles; * */ class ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles extends \Google\Service\Resource { /** * Deletes an AdaptiveMtFile along with its sentences. (adaptiveMtFiles.delete) * * @param string $name Required. The resource name of the file to delete, in * form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDa * tasets/{dataset}/adaptiveMtFiles/{file}` * @param array $optParams Optional parameters. * @return TranslateEmpty * @throws \Google\Service\Exception */ public function delete($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('delete', [$params], TranslateEmpty::class); } /** * Gets and AdaptiveMtFile (adaptiveMtFiles.get) * * @param string $name Required. The resource name of the file, in form of * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{ * dataset}/adaptiveMtFiles/{file}` * @param array $optParams Optional parameters. * @return AdaptiveMtFile * @throws \Google\Service\Exception */ public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], AdaptiveMtFile::class); } /** * Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset. * (adaptiveMtFiles.listProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles) * * @param string $parent Required. The resource name of the project from which * to list the Adaptive MT files. * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` * @param array $optParams Optional parameters. * * @opt_param int pageSize Optional. * @opt_param string pageToken Optional. A token identifying a page of results * the server should return. Typically, this is the value of * ListAdaptiveMtFilesResponse.next_page_token returned from the previous call * to `ListAdaptiveMtFiles` method. The first page is returned if `page_token`is * empty or missing. * @return ListAdaptiveMtFilesResponse * @throws \Google\Service\Exception */ public function listProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles($parent, $optParams = []) { $params = ['parent' => $parent]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListAdaptiveMtFilesResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles::class, 'Google_Service_Translate_Resource_ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFiles');