source: vendor/google/apiclient-services/src/NetAppFiles/Resource/ProjectsLocationsVolumesQuotaRules.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 5.0 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\NetAppFiles\Resource;
19
20use Google\Service\NetAppFiles\ListQuotaRulesResponse;
21use Google\Service\NetAppFiles\Operation;
22use Google\Service\NetAppFiles\QuotaRule;
23
24/**
25 * The "quotaRules" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $netappService = new Google\Service\NetAppFiles(...);
29 * $quotaRules = $netappService->projects_locations_volumes_quotaRules;
30 * </code>
31 */
32class ProjectsLocationsVolumesQuotaRules extends \Google\Service\Resource
33{
34 /**
35 * Creates a new quota rule. (quotaRules.create)
36 *
37 * @param string $parent Required. Parent value for CreateQuotaRuleRequest
38 * @param QuotaRule $postBody
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param string quotaRuleId Required. ID of the quota rule to create. Must
42 * be unique within the parent resource. Must contain only letters, numbers,
43 * underscore and hyphen, with the first character a letter or underscore, the
44 * last a letter or underscore or a number, and a 63 character maximum.
45 * @return Operation
46 * @throws \Google\Service\Exception
47 */
48 public function create($parent, QuotaRule $postBody, $optParams = [])
49 {
50 $params = ['parent' => $parent, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('create', [$params], Operation::class);
53 }
54 /**
55 * Deletes a quota rule. (quotaRules.delete)
56 *
57 * @param string $name Required. Name of the quota rule.
58 * @param array $optParams Optional parameters.
59 * @return Operation
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], Operation::class);
67 }
68 /**
69 * Returns details of the specified quota rule. (quotaRules.get)
70 *
71 * @param string $name Required. Name of the quota rule
72 * @param array $optParams Optional parameters.
73 * @return QuotaRule
74 * @throws \Google\Service\Exception
75 */
76 public function get($name, $optParams = [])
77 {
78 $params = ['name' => $name];
79 $params = array_merge($params, $optParams);
80 return $this->call('get', [$params], QuotaRule::class);
81 }
82 /**
83 * Returns list of all quota rules in a location.
84 * (quotaRules.listProjectsLocationsVolumesQuotaRules)
85 *
86 * @param string $parent Required. Parent value for ListQuotaRulesRequest
87 * @param array $optParams Optional parameters.
88 *
89 * @opt_param string filter Optional. Filtering results
90 * @opt_param string orderBy Optional. Hint for how to order the results
91 * @opt_param int pageSize Optional. Requested page size. Server may return
92 * fewer items than requested. If unspecified, the server will pick an
93 * appropriate default.
94 * @opt_param string pageToken Optional. A token identifying a page of results
95 * the server should return.
96 * @return ListQuotaRulesResponse
97 * @throws \Google\Service\Exception
98 */
99 public function listProjectsLocationsVolumesQuotaRules($parent, $optParams = [])
100 {
101 $params = ['parent' => $parent];
102 $params = array_merge($params, $optParams);
103 return $this->call('list', [$params], ListQuotaRulesResponse::class);
104 }
105 /**
106 * Updates a quota rule. (quotaRules.patch)
107 *
108 * @param string $name Identifier. The resource name of the active directory.
109 * Format: `projects/{project_number}/locations/{location_id}/quotaRules/{quota_
110 * rule_id}`.
111 * @param QuotaRule $postBody
112 * @param array $optParams Optional parameters.
113 *
114 * @opt_param string updateMask Optional. Field mask is used to specify the
115 * fields to be overwritten in the Quota Rule resource by the update. The fields
116 * specified in the update_mask are relative to the resource, not the full
117 * request. A field will be overwritten if it is in the mask. If the user does
118 * not provide a mask then all fields will be overwritten.
119 * @return Operation
120 * @throws \Google\Service\Exception
121 */
122 public function patch($name, QuotaRule $postBody, $optParams = [])
123 {
124 $params = ['name' => $name, 'postBody' => $postBody];
125 $params = array_merge($params, $optParams);
126 return $this->call('patch', [$params], Operation::class);
127 }
128}
129
130// Adding a class alias for backwards compatibility with the previous class name.
131class_alias(ProjectsLocationsVolumesQuotaRules::class, 'Google_Service_NetAppFiles_Resource_ProjectsLocationsVolumesQuotaRules');
Note: See TracBrowser for help on using the repository browser.