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/** 19 * Service definition for CloudSourceRepositories (v1). 20 * 21 * <p> 22 * Accesses source code repositories hosted by Google.</p> 23 * 24 * <p> 25 * For more information about this service, see the API 26 * <a href="https://cloud.google.com/source-repositories/docs/apis" target="_blank">Documentation</a> 27 * </p> 28 * 29 * @author Google, Inc. 30 */ 31class Google_Service_CloudSourceRepositories extends Google_Service 32{ 33 /** View and manage your data across Google Cloud Platform services. */ 34 const CLOUD_PLATFORM = 35 "https://www.googleapis.com/auth/cloud-platform"; 36 /** Manage your source code repositories. */ 37 const SOURCE_FULL_CONTROL = 38 "https://www.googleapis.com/auth/source.full_control"; 39 /** View the contents of your source code repositories. */ 40 const SOURCE_READ_ONLY = 41 "https://www.googleapis.com/auth/source.read_only"; 42 /** Manage the contents of your source code repositories. */ 43 const SOURCE_READ_WRITE = 44 "https://www.googleapis.com/auth/source.read_write"; 45 46 public $projects; 47 public $projects_repos; 48 49 /** 50 * Constructs the internal representation of the CloudSourceRepositories 51 * service. 52 * 53 * @param Google_Client $client 54 */ 55 public function __construct(Google_Client $client) 56 { 57 parent::__construct($client); 58 $this->rootUrl = 'https://sourcerepo.googleapis.com/'; 59 $this->servicePath = ''; 60 $this->batchPath = 'batch'; 61 $this->version = 'v1'; 62 $this->serviceName = 'sourcerepo'; 63 64 $this->projects = new Google_Service_CloudSourceRepositories_Resource_Projects( 65 $this, 66 $this->serviceName, 67 'projects', 68 array( 69 'methods' => array( 70 'getConfig' => array( 71 'path' => 'v1/{+name}/config', 72 'httpMethod' => 'GET', 73 'parameters' => array( 74 'name' => array( 75 'location' => 'path', 76 'type' => 'string', 77 'required' => true, 78 ), 79 ), 80 ),'updateConfig' => array( 81 'path' => 'v1/{+name}/config', 82 'httpMethod' => 'PATCH', 83 'parameters' => array( 84 'name' => array( 85 'location' => 'path', 86 'type' => 'string', 87 'required' => true, 88 ), 89 ), 90 ), 91 ) 92 ) 93 ); 94 $this->projects_repos = new Google_Service_CloudSourceRepositories_Resource_ProjectsRepos( 95 $this, 96 $this->serviceName, 97 'repos', 98 array( 99 'methods' => array( 100 'create' => array( 101 'path' => 'v1/{+parent}/repos', 102 'httpMethod' => 'POST', 103 'parameters' => array( 104 'parent' => array( 105 'location' => 'path', 106 'type' => 'string', 107 'required' => true, 108 ), 109 ), 110 ),'delete' => array( 111 'path' => 'v1/{+name}', 112 'httpMethod' => 'DELETE', 113 'parameters' => array( 114 'name' => array( 115 'location' => 'path', 116 'type' => 'string', 117 'required' => true, 118 ), 119 ), 120 ),'get' => array( 121 'path' => 'v1/{+name}', 122 'httpMethod' => 'GET', 123 'parameters' => array( 124 'name' => array( 125 'location' => 'path', 126 'type' => 'string', 127 'required' => true, 128 ), 129 ), 130 ),'getIamPolicy' => array( 131 'path' => 'v1/{+resource}:getIamPolicy', 132 'httpMethod' => 'GET', 133 'parameters' => array( 134 'resource' => array( 135 'location' => 'path', 136 'type' => 'string', 137 'required' => true, 138 ), 139 ), 140 ),'list' => array( 141 'path' => 'v1/{+name}/repos', 142 'httpMethod' => 'GET', 143 'parameters' => array( 144 'name' => array( 145 'location' => 'path', 146 'type' => 'string', 147 'required' => true, 148 ), 149 'pageToken' => array( 150 'location' => 'query', 151 'type' => 'string', 152 ), 153 'pageSize' => array( 154 'location' => 'query', 155 'type' => 'integer', 156 ), 157 ), 158 ),'patch' => array( 159 'path' => 'v1/{+name}', 160 'httpMethod' => 'PATCH', 161 'parameters' => array( 162 'name' => array( 163 'location' => 'path', 164 'type' => 'string', 165 'required' => true, 166 ), 167 ), 168 ),'setIamPolicy' => array( 169 'path' => 'v1/{+resource}:setIamPolicy', 170 'httpMethod' => 'POST', 171 'parameters' => array( 172 'resource' => array( 173 'location' => 'path', 174 'type' => 'string', 175 'required' => true, 176 ), 177 ), 178 ),'sync' => array( 179 'path' => 'v1/{+name}:sync', 180 'httpMethod' => 'POST', 181 'parameters' => array( 182 'name' => array( 183 'location' => 'path', 184 'type' => 'string', 185 'required' => true, 186 ), 187 ), 188 ),'testIamPermissions' => array( 189 'path' => 'v1/{+resource}:testIamPermissions', 190 'httpMethod' => 'POST', 191 'parameters' => array( 192 'resource' => array( 193 'location' => 'path', 194 'type' => 'string', 195 'required' => true, 196 ), 197 ), 198 ), 199 ) 200 ) 201 ); 202 } 203} 204