source: vendor/google/apiclient-services/src/DeveloperConnect/Resource/ProjectsLocationsConnections.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 11.1 KB
Line 
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
18namespace Google\Service\DeveloperConnect\Resource;
19
20use Google\Service\DeveloperConnect\Connection;
21use Google\Service\DeveloperConnect\DeveloperconnectEmpty;
22use Google\Service\DeveloperConnect\FetchGitHubInstallationsResponse;
23use Google\Service\DeveloperConnect\FetchLinkableGitRepositoriesResponse;
24use Google\Service\DeveloperConnect\ListConnectionsResponse;
25use Google\Service\DeveloperConnect\Operation;
26use Google\Service\DeveloperConnect\ProcessGitHubEnterpriseWebhookRequest;
27
28/**
29 * The "connections" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $developerconnectService = new Google\Service\DeveloperConnect(...);
33 * $connections = $developerconnectService->projects_locations_connections;
34 * </code>
35 */
36class ProjectsLocationsConnections extends \Google\Service\Resource
37{
38 /**
39 * Creates a new Connection in a given project and location.
40 * (connections.create)
41 *
42 * @param string $parent Required. Value for parent.
43 * @param Connection $postBody
44 * @param array $optParams Optional parameters.
45 *
46 * @opt_param string connectionId Required. Id of the requesting object If auto-
47 * generating Id server-side, remove this field and connection_id from the
48 * method_signature of Create RPC
49 * @opt_param string requestId Optional. An optional request ID to identify
50 * requests. Specify a unique request ID so that if you must retry your request,
51 * the server will know to ignore the request if it has already been completed.
52 * The server will guarantee that for at least 60 minutes since the first
53 * request. For example, consider a situation where you make an initial request
54 * and the request times out. If you make the request again with the same
55 * request ID, the server can check if original operation with the same request
56 * ID was received, and if so, will ignore the second request. This prevents
57 * clients from accidentally creating duplicate commitments. The request ID must
58 * be a valid UUID with the exception that zero UUID is not supported
59 * (00000000-0000-0000-0000-000000000000).
60 * @opt_param bool validateOnly Optional. If set, validate the request, but do
61 * not actually post it.
62 * @return Operation
63 * @throws \Google\Service\Exception
64 */
65 public function create($parent, Connection $postBody, $optParams = [])
66 {
67 $params = ['parent' => $parent, 'postBody' => $postBody];
68 $params = array_merge($params, $optParams);
69 return $this->call('create', [$params], Operation::class);
70 }
71 /**
72 * Deletes a single Connection. (connections.delete)
73 *
74 * @param string $name Required. Name of the resource
75 * @param array $optParams Optional parameters.
76 *
77 * @opt_param string etag Optional. The current etag of the Connection. If an
78 * etag is provided and does not match the current etag of the Connection,
79 * deletion will be blocked and an ABORTED error will be returned.
80 * @opt_param string requestId Optional. An optional request ID to identify
81 * requests. Specify a unique request ID so that if you must retry your request,
82 * the server will know to ignore the request if it has already been completed.
83 * The server will guarantee that for at least 60 minutes after the first
84 * request. For example, consider a situation where you make an initial request
85 * and the request times out. If you make the request again with the same
86 * request ID, the server can check if original operation with the same request
87 * ID was received, and if so, will ignore the second request. This prevents
88 * clients from accidentally creating duplicate commitments. The request ID must
89 * be a valid UUID with the exception that zero UUID is not supported
90 * (00000000-0000-0000-0000-000000000000).
91 * @opt_param bool validateOnly Optional. If set, validate the request, but do
92 * not actually post it.
93 * @return Operation
94 * @throws \Google\Service\Exception
95 */
96 public function delete($name, $optParams = [])
97 {
98 $params = ['name' => $name];
99 $params = array_merge($params, $optParams);
100 return $this->call('delete', [$params], Operation::class);
101 }
102 /**
103 * FetchGitHubInstallations returns the list of GitHub Installations that are
104 * available to be added to a Connection. For github.com, only installations
105 * accessible to the authorizer token are returned. For GitHub Enterprise, all
106 * installations are returned. (connections.fetchGitHubInstallations)
107 *
108 * @param string $connection Required. The resource name of the connection in
109 * the format `projects/locations/connections`.
110 * @param array $optParams Optional parameters.
111 * @return FetchGitHubInstallationsResponse
112 * @throws \Google\Service\Exception
113 */
114 public function fetchGitHubInstallations($connection, $optParams = [])
115 {
116 $params = ['connection' => $connection];
117 $params = array_merge($params, $optParams);
118 return $this->call('fetchGitHubInstallations', [$params], FetchGitHubInstallationsResponse::class);
119 }
120 /**
121 * FetchLinkableGitRepositories returns a list of git repositories from an SCM
122 * that are available to be added to a Connection.
123 * (connections.fetchLinkableGitRepositories)
124 *
125 * @param string $connection Required. The name of the Connection. Format:
126 * `projects/locations/connections`.
127 * @param array $optParams Optional parameters.
128 *
129 * @opt_param int pageSize Optional. Number of results to return in the list.
130 * Defaults to 20.
131 * @opt_param string pageToken Optional. Page start.
132 * @return FetchLinkableGitRepositoriesResponse
133 * @throws \Google\Service\Exception
134 */
135 public function fetchLinkableGitRepositories($connection, $optParams = [])
136 {
137 $params = ['connection' => $connection];
138 $params = array_merge($params, $optParams);
139 return $this->call('fetchLinkableGitRepositories', [$params], FetchLinkableGitRepositoriesResponse::class);
140 }
141 /**
142 * Gets details of a single Connection. (connections.get)
143 *
144 * @param string $name Required. Name of the resource
145 * @param array $optParams Optional parameters.
146 * @return Connection
147 * @throws \Google\Service\Exception
148 */
149 public function get($name, $optParams = [])
150 {
151 $params = ['name' => $name];
152 $params = array_merge($params, $optParams);
153 return $this->call('get', [$params], Connection::class);
154 }
155 /**
156 * Lists Connections in a given project and location.
157 * (connections.listProjectsLocationsConnections)
158 *
159 * @param string $parent Required. Parent value for ListConnectionsRequest
160 * @param array $optParams Optional parameters.
161 *
162 * @opt_param string filter Optional. Filtering results
163 * @opt_param string orderBy Optional. Hint for how to order the results
164 * @opt_param int pageSize Optional. Requested page size. Server may return
165 * fewer items than requested. If unspecified, server will pick an appropriate
166 * default.
167 * @opt_param string pageToken Optional. A token identifying a page of results
168 * the server should return.
169 * @return ListConnectionsResponse
170 * @throws \Google\Service\Exception
171 */
172 public function listProjectsLocationsConnections($parent, $optParams = [])
173 {
174 $params = ['parent' => $parent];
175 $params = array_merge($params, $optParams);
176 return $this->call('list', [$params], ListConnectionsResponse::class);
177 }
178 /**
179 * Updates the parameters of a single Connection. (connections.patch)
180 *
181 * @param string $name Identifier. The resource name of the connection, in the
182 * format `projects/{project}/locations/{location}/connections/{connection_id}`.
183 * @param Connection $postBody
184 * @param array $optParams Optional parameters.
185 *
186 * @opt_param bool allowMissing Optional. If set to true, and the connection is
187 * not found a new connection will be created. In this situation `update_mask`
188 * is ignored. The creation will succeed only if the input connection has all
189 * the necessary information (e.g a github_config with both user_oauth_token and
190 * installation_id properties).
191 * @opt_param string requestId Optional. An optional request ID to identify
192 * requests. Specify a unique request ID so that if you must retry your request,
193 * the server will know to ignore the request if it has already been completed.
194 * The server will guarantee that for at least 60 minutes since the first
195 * request. For example, consider a situation where you make an initial request
196 * and the request times out. If you make the request again with the same
197 * request ID, the server can check if original operation with the same request
198 * ID was received, and if so, will ignore the second request. This prevents
199 * clients from accidentally creating duplicate commitments. The request ID must
200 * be a valid UUID with the exception that zero UUID is not supported
201 * (00000000-0000-0000-0000-000000000000).
202 * @opt_param string updateMask Required. Field mask is used to specify the
203 * fields to be overwritten in the Connection resource by the update. The fields
204 * specified in the update_mask are relative to the resource, not the full
205 * request. A field will be overwritten if it is in the mask. If the user does
206 * not provide a mask then all fields will be overwritten.
207 * @opt_param bool validateOnly Optional. If set, validate the request, but do
208 * not actually post it.
209 * @return Operation
210 * @throws \Google\Service\Exception
211 */
212 public function patch($name, Connection $postBody, $optParams = [])
213 {
214 $params = ['name' => $name, 'postBody' => $postBody];
215 $params = array_merge($params, $optParams);
216 return $this->call('patch', [$params], Operation::class);
217 }
218 /**
219 * ProcessGitHubEnterpriseWebhook is called by the external GitHub Enterprise
220 * instances for notifying events. (connections.processGitHubEnterpriseWebhook)
221 *
222 * @param string $parent Required. Project and location where the webhook will
223 * be received. Format: `projects/locations`.
224 * @param ProcessGitHubEnterpriseWebhookRequest $postBody
225 * @param array $optParams Optional parameters.
226 * @return DeveloperconnectEmpty
227 * @throws \Google\Service\Exception
228 */
229 public function processGitHubEnterpriseWebhook($parent, ProcessGitHubEnterpriseWebhookRequest $postBody, $optParams = [])
230 {
231 $params = ['parent' => $parent, 'postBody' => $postBody];
232 $params = array_merge($params, $optParams);
233 return $this->call('processGitHubEnterpriseWebhook', [$params], DeveloperconnectEmpty::class);
234 }
235}
236
237// Adding a class alias for backwards compatibility with the previous class name.
238class_alias(ProjectsLocationsConnections::class, 'Google_Service_DeveloperConnect_Resource_ProjectsLocationsConnections');
Note: See TracBrowser for help on using the repository browser.