source: vendor/google/apiclient-services/src/ResourceSettings/Resource/ProjectsSettings.php

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

Upload project files

  • Property mode set to 100644
File size: 4.5 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\ResourceSettings\Resource;
19
20use Google\Service\ResourceSettings\GoogleCloudResourcesettingsV1ListSettingsResponse;
21use Google\Service\ResourceSettings\GoogleCloudResourcesettingsV1Setting;
22
23/**
24 * The "settings" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $resourcesettingsService = new Google\Service\ResourceSettings(...);
28 * $settings = $resourcesettingsService->projects_settings;
29 * </code>
30 */
31class ProjectsSettings extends \Google\Service\Resource
32{
33 /**
34 * Returns a specified setting. Returns a `google.rpc.Status` with
35 * `google.rpc.Code.NOT_FOUND` if the setting does not exist. (settings.get)
36 *
37 * @param string $name Required. The name of the setting to get. See Setting for
38 * naming requirements.
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param string view The SettingView for this request.
42 * @return GoogleCloudResourcesettingsV1Setting
43 * @throws \Google\Service\Exception
44 */
45 public function get($name, $optParams = [])
46 {
47 $params = ['name' => $name];
48 $params = array_merge($params, $optParams);
49 return $this->call('get', [$params], GoogleCloudResourcesettingsV1Setting::class);
50 }
51 /**
52 * Lists all the settings that are available on the Cloud resource `parent`.
53 * (settings.listProjectsSettings)
54 *
55 * @param string $parent Required. The project, folder, or organization that is
56 * the parent resource for this setting. Must be in one of the following forms:
57 * * `projects/{project_number}` * `projects/{project_id}` *
58 * `folders/{folder_id}` * `organizations/{organization_id}`
59 * @param array $optParams Optional parameters.
60 *
61 * @opt_param int pageSize Unused. The size of the page to be returned.
62 * @opt_param string pageToken Unused. A page token used to retrieve the next
63 * page.
64 * @opt_param string view The SettingView for this request.
65 * @return GoogleCloudResourcesettingsV1ListSettingsResponse
66 * @throws \Google\Service\Exception
67 */
68 public function listProjectsSettings($parent, $optParams = [])
69 {
70 $params = ['parent' => $parent];
71 $params = array_merge($params, $optParams);
72 return $this->call('list', [$params], GoogleCloudResourcesettingsV1ListSettingsResponse::class);
73 }
74 /**
75 * Updates a specified setting. Returns a `google.rpc.Status` with
76 * `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a
77 * `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting
78 * is flagged as read only. Returns a `google.rpc.Status` with
79 * `google.rpc.Code.ABORTED` if the etag supplied in the request does not match
80 * the persisted etag of the setting value. On success, the response will
81 * contain only `name`, `local_value` and `etag`. The `metadata` and
82 * `effective_value` cannot be updated through this API. Note: the supplied
83 * setting will perform a full overwrite of the `local_value` field.
84 * (settings.patch)
85 *
86 * @param string $name The resource name of the setting. Must be in one of the
87 * following forms: * `projects/{project_number}/settings/{setting_name}` *
88 * `folders/{folder_id}/settings/{setting_name}` *
89 * `organizations/{organization_id}/settings/{setting_name}` For example,
90 * "/projects/123/settings/gcp-enableMyFeature"
91 * @param GoogleCloudResourcesettingsV1Setting $postBody
92 * @param array $optParams Optional parameters.
93 * @return GoogleCloudResourcesettingsV1Setting
94 * @throws \Google\Service\Exception
95 */
96 public function patch($name, GoogleCloudResourcesettingsV1Setting $postBody, $optParams = [])
97 {
98 $params = ['name' => $name, 'postBody' => $postBody];
99 $params = array_merge($params, $optParams);
100 return $this->call('patch', [$params], GoogleCloudResourcesettingsV1Setting::class);
101 }
102}
103
104// Adding a class alias for backwards compatibility with the previous class name.
105class_alias(ProjectsSettings::class, 'Google_Service_ResourceSettings_Resource_ProjectsSettings');
Note: See TracBrowser for help on using the repository browser.