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\DataformEmpty;
|
---|
21 | use Google\Service\Dataform\ListWorkflowConfigsResponse;
|
---|
22 | use Google\Service\Dataform\WorkflowConfig;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "workflowConfigs" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $dataformService = new Google\Service\Dataform(...);
|
---|
29 | * $workflowConfigs = $dataformService->projects_locations_repositories_workflowConfigs;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsRepositoriesWorkflowConfigs extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new WorkflowConfig in a given Repository. (workflowConfigs.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The repository in which to create the
|
---|
38 | * workflow config. Must be in the format `projects/locations/repositories`.
|
---|
39 | * @param WorkflowConfig $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | *
|
---|
42 | * @opt_param string workflowConfigId Required. The ID to use for the workflow
|
---|
43 | * config, which will become the final component of the workflow config's
|
---|
44 | * resource name.
|
---|
45 | * @return WorkflowConfig
|
---|
46 | * @throws \Google\Service\Exception
|
---|
47 | */
|
---|
48 | public function create($parent, WorkflowConfig $postBody, $optParams = [])
|
---|
49 | {
|
---|
50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
51 | $params = array_merge($params, $optParams);
|
---|
52 | return $this->call('create', [$params], WorkflowConfig::class);
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * Deletes a single WorkflowConfig. (workflowConfigs.delete)
|
---|
56 | *
|
---|
57 | * @param string $name Required. The workflow config's name.
|
---|
58 | * @param array $optParams Optional parameters.
|
---|
59 | * @return DataformEmpty
|
---|
60 | * @throws \Google\Service\Exception
|
---|
61 | */
|
---|
62 | public function delete($name, $optParams = [])
|
---|
63 | {
|
---|
64 | $params = ['name' => $name];
|
---|
65 | $params = array_merge($params, $optParams);
|
---|
66 | return $this->call('delete', [$params], DataformEmpty::class);
|
---|
67 | }
|
---|
68 | /**
|
---|
69 | * Fetches a single WorkflowConfig. (workflowConfigs.get)
|
---|
70 | *
|
---|
71 | * @param string $name Required. The workflow config's name.
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | * @return WorkflowConfig
|
---|
74 | * @throws \Google\Service\Exception
|
---|
75 | */
|
---|
76 | public function get($name, $optParams = [])
|
---|
77 | {
|
---|
78 | $params = ['name' => $name];
|
---|
79 | $params = array_merge($params, $optParams);
|
---|
80 | return $this->call('get', [$params], WorkflowConfig::class);
|
---|
81 | }
|
---|
82 | /**
|
---|
83 | * Lists WorkflowConfigs in a given Repository.
|
---|
84 | * (workflowConfigs.listProjectsLocationsRepositoriesWorkflowConfigs)
|
---|
85 | *
|
---|
86 | * @param string $parent Required. The repository in which to list workflow
|
---|
87 | * configs. Must be in the format `projects/locations/repositories`.
|
---|
88 | * @param array $optParams Optional parameters.
|
---|
89 | *
|
---|
90 | * @opt_param int pageSize Optional. Maximum number of workflow configs to
|
---|
91 | * return. The server may return fewer items than requested. If unspecified, the
|
---|
92 | * server will pick an appropriate default.
|
---|
93 | * @opt_param string pageToken Optional. Page token received from a previous
|
---|
94 | * `ListWorkflowConfigs` call. Provide this to retrieve the subsequent page.
|
---|
95 | * When paginating, all other parameters provided to `ListWorkflowConfigs`, with
|
---|
96 | * the exception of `page_size`, must match the call that provided the page
|
---|
97 | * token.
|
---|
98 | * @return ListWorkflowConfigsResponse
|
---|
99 | * @throws \Google\Service\Exception
|
---|
100 | */
|
---|
101 | public function listProjectsLocationsRepositoriesWorkflowConfigs($parent, $optParams = [])
|
---|
102 | {
|
---|
103 | $params = ['parent' => $parent];
|
---|
104 | $params = array_merge($params, $optParams);
|
---|
105 | return $this->call('list', [$params], ListWorkflowConfigsResponse::class);
|
---|
106 | }
|
---|
107 | /**
|
---|
108 | * Updates a single WorkflowConfig. *Note:* This method does not fully implement
|
---|
109 | * AIP/134. In particular: 1. The wildcard entry (***) is treated as a bad
|
---|
110 | * request 2. When the *field_mask* is omitted, instead of only updating the set
|
---|
111 | * fields, the request is treated as a full update on all modifiable fields
|
---|
112 | * (workflowConfigs.patch)
|
---|
113 | *
|
---|
114 | * @param string $name Identifier. The workflow config's name.
|
---|
115 | * @param WorkflowConfig $postBody
|
---|
116 | * @param array $optParams Optional parameters.
|
---|
117 | *
|
---|
118 | * @opt_param string updateMask Optional. Specifies the fields to be updated in
|
---|
119 | * the workflow config. If left unset, all fields will be updated.
|
---|
120 | * @return WorkflowConfig
|
---|
121 | * @throws \Google\Service\Exception
|
---|
122 | */
|
---|
123 | public function patch($name, WorkflowConfig $postBody, $optParams = [])
|
---|
124 | {
|
---|
125 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
126 | $params = array_merge($params, $optParams);
|
---|
127 | return $this->call('patch', [$params], WorkflowConfig::class);
|
---|
128 | }
|
---|
129 | }
|
---|
130 |
|
---|
131 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
132 | class_alias(ProjectsLocationsRepositoriesWorkflowConfigs::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesWorkflowConfigs');
|
---|