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 ResourceSettings (v1). 24 * 25 * <p> 26 * The Resource Settings API allows users to control and modify the behavior of 27 * their GCP resources (e.g., VM, firewall, Project, etc.) across the Cloud 28 * Resource Hierarchy.</p> 29 * 30 * <p> 31 * For more information about this service, see the API 32 * <a href="https://cloud.google.com/resource-manager/docs/resource-settings/overview" target="_blank">Documentation</a> 33 * </p> 34 * 35 * @author Google, Inc. 36 */ 37class ResourceSettings extends \Google\Service 38{ 39 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */ 40 const CLOUD_PLATFORM = 41 "https://www.googleapis.com/auth/cloud-platform"; 42 43 public $folders_settings; 44 public $organizations_settings; 45 public $projects_settings; 46 47 /** 48 * Constructs the internal representation of the ResourceSettings service. 49 * 50 * @param Client|array $clientOrConfig The client used to deliver requests, or a 51 * config array to pass to a new Client instance. 52 * @param string $rootUrl The root URL used for requests to the service. 53 */ 54 public function __construct($clientOrConfig = [], $rootUrl = null) 55 { 56 parent::__construct($clientOrConfig); 57 $this->rootUrl = $rootUrl ?: 'https://resourcesettings.googleapis.com/'; 58 $this->servicePath = ''; 59 $this->batchPath = 'batch'; 60 $this->version = 'v1'; 61 $this->serviceName = 'resourcesettings'; 62 63 $this->folders_settings = new ResourceSettings\Resource\FoldersSettings( 64 $this, 65 $this->serviceName, 66 'settings', 67 [ 68 'methods' => [ 69 'get' => [ 70 'path' => 'v1/{+name}', 71 'httpMethod' => 'GET', 72 'parameters' => [ 73 'name' => [ 74 'location' => 'path', 75 'type' => 'string', 76 'required' => true, 77 ], 78 'view' => [ 79 'location' => 'query', 80 'type' => 'string', 81 ], 82 ], 83 ],'list' => [ 84 'path' => 'v1/{+parent}/settings', 85 'httpMethod' => 'GET', 86 'parameters' => [ 87 'parent' => [ 88 'location' => 'path', 89 'type' => 'string', 90 'required' => true, 91 ], 92 'pageSize' => [ 93 'location' => 'query', 94 'type' => 'integer', 95 ], 96 'pageToken' => [ 97 'location' => 'query', 98 'type' => 'string', 99 ], 100 'view' => [ 101 'location' => 'query', 102 'type' => 'string', 103 ], 104 ], 105 ],'patch' => [ 106 'path' => 'v1/{+name}', 107 'httpMethod' => 'PATCH', 108 'parameters' => [ 109 'name' => [ 110 'location' => 'path', 111 'type' => 'string', 112 'required' => true, 113 ], 114 ], 115 ], 116 ] 117 ] 118 ); 119 $this->organizations_settings = new ResourceSettings\Resource\OrganizationsSettings( 120 $this, 121 $this->serviceName, 122 'settings', 123 [ 124 'methods' => [ 125 'get' => [ 126 'path' => 'v1/{+name}', 127 'httpMethod' => 'GET', 128 'parameters' => [ 129 'name' => [ 130 'location' => 'path', 131 'type' => 'string', 132 'required' => true, 133 ], 134 'view' => [ 135 'location' => 'query', 136 'type' => 'string', 137 ], 138 ], 139 ],'list' => [ 140 'path' => 'v1/{+parent}/settings', 141 'httpMethod' => 'GET', 142 'parameters' => [ 143 'parent' => [ 144 'location' => 'path', 145 'type' => 'string', 146 'required' => true, 147 ], 148 'pageSize' => [ 149 'location' => 'query', 150 'type' => 'integer', 151 ], 152 'pageToken' => [ 153 'location' => 'query', 154 'type' => 'string', 155 ], 156 'view' => [ 157 'location' => 'query', 158 'type' => 'string', 159 ], 160 ], 161 ],'patch' => [ 162 'path' => 'v1/{+name}', 163 'httpMethod' => 'PATCH', 164 'parameters' => [ 165 'name' => [ 166 'location' => 'path', 167 'type' => 'string', 168 'required' => true, 169 ], 170 ], 171 ], 172 ] 173 ] 174 ); 175 $this->projects_settings = new ResourceSettings\Resource\ProjectsSettings( 176 $this, 177 $this->serviceName, 178 'settings', 179 [ 180 'methods' => [ 181 'get' => [ 182 'path' => 'v1/{+name}', 183 'httpMethod' => 'GET', 184 'parameters' => [ 185 'name' => [ 186 'location' => 'path', 187 'type' => 'string', 188 'required' => true, 189 ], 190 'view' => [ 191 'location' => 'query', 192 'type' => 'string', 193 ], 194 ], 195 ],'list' => [ 196 'path' => 'v1/{+parent}/settings', 197 'httpMethod' => 'GET', 198 'parameters' => [ 199 'parent' => [ 200 'location' => 'path', 201 'type' => 'string', 202 'required' => true, 203 ], 204 'pageSize' => [ 205 'location' => 'query', 206 'type' => 'integer', 207 ], 208 'pageToken' => [ 209 'location' => 'query', 210 'type' => 'string', 211 ], 212 'view' => [ 213 'location' => 'query', 214 'type' => 'string', 215 ], 216 ], 217 ],'patch' => [ 218 'path' => 'v1/{+name}', 219 'httpMethod' => 'PATCH', 220 'parameters' => [ 221 'name' => [ 222 'location' => 'path', 223 'type' => 'string', 224 'required' => true, 225 ], 226 ], 227 ], 228 ] 229 ] 230 ); 231 } 232} 233 234// Adding a class alias for backwards compatibility with the previous class name. 235class_alias(ResourceSettings::class, 'Google_Service_ResourceSettings'); 236