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\Dataform\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Dataform\CompilationResult;
|
---|
21 | use Google\Service\Dataform\ListCompilationResultsResponse;
|
---|
22 | use Google\Service\Dataform\QueryCompilationResultActionsResponse;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "compilationResults" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $dataformService = new Google\Service\Dataform(...);
|
---|
29 | * $compilationResults = $dataformService->projects_locations_repositories_compilationResults;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsRepositoriesCompilationResults extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new CompilationResult in a given project and location.
|
---|
36 | * (compilationResults.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The repository in which to create the
|
---|
39 | * compilation result. Must be in the format `projects/locations/repositories`.
|
---|
40 | * @param CompilationResult $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | * @return CompilationResult
|
---|
43 | * @throws \Google\Service\Exception
|
---|
44 | */
|
---|
45 | public function create($parent, CompilationResult $postBody, $optParams = [])
|
---|
46 | {
|
---|
47 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
48 | $params = array_merge($params, $optParams);
|
---|
49 | return $this->call('create', [$params], CompilationResult::class);
|
---|
50 | }
|
---|
51 | /**
|
---|
52 | * Fetches a single CompilationResult. (compilationResults.get)
|
---|
53 | *
|
---|
54 | * @param string $name Required. The compilation result's name.
|
---|
55 | * @param array $optParams Optional parameters.
|
---|
56 | * @return CompilationResult
|
---|
57 | * @throws \Google\Service\Exception
|
---|
58 | */
|
---|
59 | public function get($name, $optParams = [])
|
---|
60 | {
|
---|
61 | $params = ['name' => $name];
|
---|
62 | $params = array_merge($params, $optParams);
|
---|
63 | return $this->call('get', [$params], CompilationResult::class);
|
---|
64 | }
|
---|
65 | /**
|
---|
66 | * Lists CompilationResults in a given Repository.
|
---|
67 | * (compilationResults.listProjectsLocationsRepositoriesCompilationResults)
|
---|
68 | *
|
---|
69 | * @param string $parent Required. The repository in which to list compilation
|
---|
70 | * results. Must be in the format `projects/locations/repositories`.
|
---|
71 | * @param array $optParams Optional parameters.
|
---|
72 | *
|
---|
73 | * @opt_param string filter Optional. Filter for the returned list.
|
---|
74 | * @opt_param string orderBy Optional. This field only supports ordering by
|
---|
75 | * `name` and `create_time`. If unspecified, the server will choose the
|
---|
76 | * ordering. If specified, the default order is ascending for the `name` field.
|
---|
77 | * @opt_param int pageSize Optional. Maximum number of compilation results to
|
---|
78 | * return. The server may return fewer items than requested. If unspecified, the
|
---|
79 | * server will pick an appropriate default.
|
---|
80 | * @opt_param string pageToken Optional. Page token received from a previous
|
---|
81 | * `ListCompilationResults` call. Provide this to retrieve the subsequent page.
|
---|
82 | * When paginating, all other parameters provided to `ListCompilationResults`,
|
---|
83 | * with the exception of `page_size`, must match the call that provided the page
|
---|
84 | * token.
|
---|
85 | * @return ListCompilationResultsResponse
|
---|
86 | * @throws \Google\Service\Exception
|
---|
87 | */
|
---|
88 | public function listProjectsLocationsRepositoriesCompilationResults($parent, $optParams = [])
|
---|
89 | {
|
---|
90 | $params = ['parent' => $parent];
|
---|
91 | $params = array_merge($params, $optParams);
|
---|
92 | return $this->call('list', [$params], ListCompilationResultsResponse::class);
|
---|
93 | }
|
---|
94 | /**
|
---|
95 | * Returns CompilationResultActions in a given CompilationResult.
|
---|
96 | * (compilationResults.query)
|
---|
97 | *
|
---|
98 | * @param string $name Required. The compilation result's name.
|
---|
99 | * @param array $optParams Optional parameters.
|
---|
100 | *
|
---|
101 | * @opt_param string filter Optional. Optional filter for the returned list.
|
---|
102 | * Filtering is only currently supported on the `file_path` field.
|
---|
103 | * @opt_param int pageSize Optional. Maximum number of compilation results to
|
---|
104 | * return. The server may return fewer items than requested. If unspecified, the
|
---|
105 | * server will pick an appropriate default.
|
---|
106 | * @opt_param string pageToken Optional. Page token received from a previous
|
---|
107 | * `QueryCompilationResultActions` call. Provide this to retrieve the subsequent
|
---|
108 | * page. When paginating, all other parameters provided to
|
---|
109 | * `QueryCompilationResultActions`, with the exception of `page_size`, must
|
---|
110 | * match the call that provided the page token.
|
---|
111 | * @return QueryCompilationResultActionsResponse
|
---|
112 | * @throws \Google\Service\Exception
|
---|
113 | */
|
---|
114 | public function query($name, $optParams = [])
|
---|
115 | {
|
---|
116 | $params = ['name' => $name];
|
---|
117 | $params = array_merge($params, $optParams);
|
---|
118 | return $this->call('query', [$params], QueryCompilationResultActionsResponse::class);
|
---|
119 | }
|
---|
120 | }
|
---|
121 |
|
---|
122 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
123 | class_alias(ProjectsLocationsRepositoriesCompilationResults::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesCompilationResults');
|
---|