source: vendor/google/apiclient-services/src/CloudResourceManager/Resource/Liens.php

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

Upload project files

  • Property mode set to 100644
File size: 4.4 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\CloudResourceManager\Resource;
19
20use Google\Service\CloudResourceManager\CloudresourcemanagerEmpty;
21use Google\Service\CloudResourceManager\Lien;
22use Google\Service\CloudResourceManager\ListLiensResponse;
23
24/**
25 * The "liens" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $cloudresourcemanagerService = new Google\Service\CloudResourceManager(...);
29 * $liens = $cloudresourcemanagerService->liens;
30 * </code>
31 */
32class Liens extends \Google\Service\Resource
33{
34 /**
35 * Create a Lien which applies to the resource denoted by the `parent` field.
36 * Callers of this method will require permission on the `parent` resource. For
37 * example, applying to `projects/1234` requires permission
38 * `resourcemanager.projects.updateLiens`. NOTE: Some resources may limit the
39 * number of Liens which may be applied. (liens.create)
40 *
41 * @param Lien $postBody
42 * @param array $optParams Optional parameters.
43 * @return Lien
44 * @throws \Google\Service\Exception
45 */
46 public function create(Lien $postBody, $optParams = [])
47 {
48 $params = ['postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('create', [$params], Lien::class);
51 }
52 /**
53 * Delete a Lien by `name`. Callers of this method will require permission on
54 * the `parent` resource. For example, a Lien with a `parent` of `projects/1234`
55 * requires permission `resourcemanager.projects.updateLiens`. (liens.delete)
56 *
57 * @param string $name Required. The name/identifier of the Lien to delete.
58 * @param array $optParams Optional parameters.
59 * @return CloudresourcemanagerEmpty
60 * @throws \Google\Service\Exception
61 */
62 public function delete($name, $optParams = [])
63 {
64 $params = ['name' => $name];
65 $params = array_merge($params, $optParams);
66 return $this->call('delete', [$params], CloudresourcemanagerEmpty::class);
67 }
68 /**
69 * Retrieve a Lien by `name`. Callers of this method will require permission on
70 * the `parent` resource. For example, a Lien with a `parent` of `projects/1234`
71 * requires permission `resourcemanager.projects.get` (liens.get)
72 *
73 * @param string $name Required. The name/identifier of the Lien.
74 * @param array $optParams Optional parameters.
75 * @return Lien
76 * @throws \Google\Service\Exception
77 */
78 public function get($name, $optParams = [])
79 {
80 $params = ['name' => $name];
81 $params = array_merge($params, $optParams);
82 return $this->call('get', [$params], Lien::class);
83 }
84 /**
85 * List all Liens applied to the `parent` resource. Callers of this method will
86 * require permission on the `parent` resource. For example, a Lien with a
87 * `parent` of `projects/1234` requires permission
88 * `resourcemanager.projects.get`. (liens.listLiens)
89 *
90 * @param array $optParams Optional parameters.
91 *
92 * @opt_param int pageSize The maximum number of items to return. This is a
93 * suggestion for the server. The server can return fewer liens than requested.
94 * If unspecified, server picks an appropriate default.
95 * @opt_param string pageToken The `next_page_token` value returned from a
96 * previous List request, if any.
97 * @opt_param string parent Required. The name of the resource to list all
98 * attached Liens. For example, `projects/1234`.
99 * (google.api.field_policy).resource_type annotation is not set since the
100 * parent depends on the meta api implementation. This field could be a project
101 * or other sub project resources.
102 * @return ListLiensResponse
103 * @throws \Google\Service\Exception
104 */
105 public function listLiens($optParams = [])
106 {
107 $params = [];
108 $params = array_merge($params, $optParams);
109 return $this->call('list', [$params], ListLiensResponse::class);
110 }
111}
112
113// Adding a class alias for backwards compatibility with the previous class name.
114class_alias(Liens::class, 'Google_Service_CloudResourceManager_Resource_Liens');
Note: See TracBrowser for help on using the repository browser.