source: vendor/google/apiclient-services/src/CloudSourceRepositories.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 7.3 KB
RevLine 
[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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for CloudSourceRepositories (v1).
24 *
25 * <p>
26 * Accesses source code repositories hosted by Google. Important: Cloud Source
27 * Repositories is scheduled for end of sales starting June 17, 2024. Customers
28 * who have enabled the API prior to this date will not be affected and can
29 * continue to use Cloud Source Repositories. Organizations or projects who have
30 * not previously enabled the API cannot use Cloud Source Repositories after
31 * this date. View Cloud Source Repositories documentation for more info.</p>
32 *
33 * <p>
34 * For more information about this service, see the API
35 * <a href="https://cloud.google.com/source-repositories/docs" target="_blank">Documentation</a>
36 * </p>
37 *
38 * @author Google, Inc.
39 */
40class CloudSourceRepositories extends \Google\Service
41{
42 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
43 const CLOUD_PLATFORM =
44 "https://www.googleapis.com/auth/cloud-platform";
45 /** Manage your source code repositories. */
46 const SOURCE_FULL_CONTROL =
47 "https://www.googleapis.com/auth/source.full_control";
48 /** View the contents of your source code repositories. */
49 const SOURCE_READ_ONLY =
50 "https://www.googleapis.com/auth/source.read_only";
51 /** Manage the contents of your source code repositories. */
52 const SOURCE_READ_WRITE =
53 "https://www.googleapis.com/auth/source.read_write";
54
55 public $projects;
56 public $projects_repos;
57 public $rootUrlTemplate;
58
59 /**
60 * Constructs the internal representation of the CloudSourceRepositories
61 * service.
62 *
63 * @param Client|array $clientOrConfig The client used to deliver requests, or a
64 * config array to pass to a new Client instance.
65 * @param string $rootUrl The root URL used for requests to the service.
66 */
67 public function __construct($clientOrConfig = [], $rootUrl = null)
68 {
69 parent::__construct($clientOrConfig);
70 $this->rootUrl = $rootUrl ?: 'https://sourcerepo.googleapis.com/';
71 $this->rootUrlTemplate = $rootUrl ?: 'https://sourcerepo.UNIVERSE_DOMAIN/';
72 $this->servicePath = '';
73 $this->batchPath = 'batch';
74 $this->version = 'v1';
75 $this->serviceName = 'sourcerepo';
76
77 $this->projects = new CloudSourceRepositories\Resource\Projects(
78 $this,
79 $this->serviceName,
80 'projects',
81 [
82 'methods' => [
83 'getConfig' => [
84 'path' => 'v1/{+name}/config',
85 'httpMethod' => 'GET',
86 'parameters' => [
87 'name' => [
88 'location' => 'path',
89 'type' => 'string',
90 'required' => true,
91 ],
92 ],
93 ],'updateConfig' => [
94 'path' => 'v1/{+name}/config',
95 'httpMethod' => 'PATCH',
96 'parameters' => [
97 'name' => [
98 'location' => 'path',
99 'type' => 'string',
100 'required' => true,
101 ],
102 ],
103 ],
104 ]
105 ]
106 );
107 $this->projects_repos = new CloudSourceRepositories\Resource\ProjectsRepos(
108 $this,
109 $this->serviceName,
110 'repos',
111 [
112 'methods' => [
113 'create' => [
114 'path' => 'v1/{+parent}/repos',
115 'httpMethod' => 'POST',
116 'parameters' => [
117 'parent' => [
118 'location' => 'path',
119 'type' => 'string',
120 'required' => true,
121 ],
122 ],
123 ],'delete' => [
124 'path' => 'v1/{+name}',
125 'httpMethod' => 'DELETE',
126 'parameters' => [
127 'name' => [
128 'location' => 'path',
129 'type' => 'string',
130 'required' => true,
131 ],
132 ],
133 ],'get' => [
134 'path' => 'v1/{+name}',
135 'httpMethod' => 'GET',
136 'parameters' => [
137 'name' => [
138 'location' => 'path',
139 'type' => 'string',
140 'required' => true,
141 ],
142 ],
143 ],'getIamPolicy' => [
144 'path' => 'v1/{+resource}:getIamPolicy',
145 'httpMethod' => 'GET',
146 'parameters' => [
147 'resource' => [
148 'location' => 'path',
149 'type' => 'string',
150 'required' => true,
151 ],
152 'options.requestedPolicyVersion' => [
153 'location' => 'query',
154 'type' => 'integer',
155 ],
156 ],
157 ],'list' => [
158 'path' => 'v1/{+name}/repos',
159 'httpMethod' => 'GET',
160 'parameters' => [
161 'name' => [
162 'location' => 'path',
163 'type' => 'string',
164 'required' => true,
165 ],
166 'pageSize' => [
167 'location' => 'query',
168 'type' => 'integer',
169 ],
170 'pageToken' => [
171 'location' => 'query',
172 'type' => 'string',
173 ],
174 ],
175 ],'patch' => [
176 'path' => 'v1/{+name}',
177 'httpMethod' => 'PATCH',
178 'parameters' => [
179 'name' => [
180 'location' => 'path',
181 'type' => 'string',
182 'required' => true,
183 ],
184 ],
185 ],'setIamPolicy' => [
186 'path' => 'v1/{+resource}:setIamPolicy',
187 'httpMethod' => 'POST',
188 'parameters' => [
189 'resource' => [
190 'location' => 'path',
191 'type' => 'string',
192 'required' => true,
193 ],
194 ],
195 ],'sync' => [
196 'path' => 'v1/{+name}:sync',
197 'httpMethod' => 'POST',
198 'parameters' => [
199 'name' => [
200 'location' => 'path',
201 'type' => 'string',
202 'required' => true,
203 ],
204 ],
205 ],'testIamPermissions' => [
206 'path' => 'v1/{+resource}:testIamPermissions',
207 'httpMethod' => 'POST',
208 'parameters' => [
209 'resource' => [
210 'location' => 'path',
211 'type' => 'string',
212 'required' => true,
213 ],
214 ],
215 ],
216 ]
217 ]
218 );
219 }
220}
221
222// Adding a class alias for backwards compatibility with the previous class name.
223class_alias(CloudSourceRepositories::class, 'Google_Service_CloudSourceRepositories');
Note: See TracBrowser for help on using the repository browser.