source: vendor/google/apiclient-services/src/Logging/Resource/Exclusions.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: 6.2 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\Logging\Resource;
19
20use Google\Service\Logging\ListExclusionsResponse;
21use Google\Service\Logging\LogExclusion;
22use Google\Service\Logging\LoggingEmpty;
23
24/**
25 * The "exclusions" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $loggingService = new Google\Service\Logging(...);
29 * $exclusions = $loggingService->exclusions;
30 * </code>
31 */
32class Exclusions extends \Google\Service\Resource
33{
34 /**
35 * Creates a new exclusion in the _Default sink in a specified parent resource.
36 * Only log entries belonging to that resource can be excluded. You can have up
37 * to 10 exclusions in a resource. (exclusions.create)
38 *
39 * @param string $parent Required. The parent resource in which to create the
40 * exclusion: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
41 * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For
42 * examples:"projects/my-logging-project" "organizations/123456789"
43 * @param LogExclusion $postBody
44 * @param array $optParams Optional parameters.
45 * @return LogExclusion
46 * @throws \Google\Service\Exception
47 */
48 public function create($parent, LogExclusion $postBody, $optParams = [])
49 {
50 $params = ['parent' => $parent, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('create', [$params], LogExclusion::class);
53 }
54 /**
55 * Deletes an exclusion in the _Default sink. (exclusions.delete)
56 *
57 * @param string $name Required. The resource name of an existing exclusion to
58 * delete: "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
59 * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
60 * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
61 * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example:"projects/my-
62 * project/exclusions/my-exclusion"
63 * @param array $optParams Optional parameters.
64 * @return LoggingEmpty
65 * @throws \Google\Service\Exception
66 */
67 public function delete($name, $optParams = [])
68 {
69 $params = ['name' => $name];
70 $params = array_merge($params, $optParams);
71 return $this->call('delete', [$params], LoggingEmpty::class);
72 }
73 /**
74 * Gets the description of an exclusion in the _Default sink. (exclusions.get)
75 *
76 * @param string $name Required. The resource name of an existing exclusion:
77 * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
78 * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
79 * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
80 * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example:"projects/my-
81 * project/exclusions/my-exclusion"
82 * @param array $optParams Optional parameters.
83 * @return LogExclusion
84 * @throws \Google\Service\Exception
85 */
86 public function get($name, $optParams = [])
87 {
88 $params = ['name' => $name];
89 $params = array_merge($params, $optParams);
90 return $this->call('get', [$params], LogExclusion::class);
91 }
92 /**
93 * Lists all the exclusions on the _Default sink in a parent resource.
94 * (exclusions.listExclusions)
95 *
96 * @param string $parent Required. The parent resource whose exclusions are to
97 * be listed. "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
98 * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
99 * @param array $optParams Optional parameters.
100 *
101 * @opt_param int pageSize Optional. The maximum number of results to return
102 * from this request. Non-positive values are ignored. The presence of
103 * nextPageToken in the response indicates that more results might be available.
104 * @opt_param string pageToken Optional. If present, then retrieve the next
105 * batch of results from the preceding call to this method. pageToken must be
106 * the value of nextPageToken from the previous response. The values of other
107 * method parameters should be identical to those in the previous call.
108 * @return ListExclusionsResponse
109 * @throws \Google\Service\Exception
110 */
111 public function listExclusions($parent, $optParams = [])
112 {
113 $params = ['parent' => $parent];
114 $params = array_merge($params, $optParams);
115 return $this->call('list', [$params], ListExclusionsResponse::class);
116 }
117 /**
118 * Changes one or more properties of an existing exclusion in the _Default sink.
119 * (exclusions.patch)
120 *
121 * @param string $name Required. The resource name of the exclusion to update:
122 * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]"
123 * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]"
124 * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]"
125 * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example:"projects/my-
126 * project/exclusions/my-exclusion"
127 * @param LogExclusion $postBody
128 * @param array $optParams Optional parameters.
129 *
130 * @opt_param string updateMask Required. A non-empty list of fields to change
131 * in the existing exclusion. New values for the fields are taken from the
132 * corresponding fields in the LogExclusion included in this request. Fields not
133 * mentioned in update_mask are not changed and are ignored in the request.For
134 * example, to change the filter and description of an exclusion, specify an
135 * update_mask of "filter,description".
136 * @return LogExclusion
137 * @throws \Google\Service\Exception
138 */
139 public function patch($name, LogExclusion $postBody, $optParams = [])
140 {
141 $params = ['name' => $name, 'postBody' => $postBody];
142 $params = array_merge($params, $optParams);
143 return $this->call('patch', [$params], LogExclusion::class);
144 }
145}
146
147// Adding a class alias for backwards compatibility with the previous class name.
148class_alias(Exclusions::class, 'Google_Service_Logging_Resource_Exclusions');
Note: See TracBrowser for help on using the repository browser.