source: vendor/google/apiclient-services/src/Logging/Resource/OrganizationsLocationsSavedQueries.php@ f9c482b

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

Upload new project files

  • Property mode set to 100644
File size: 8.3 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\ListSavedQueriesResponse;
21use Google\Service\Logging\LoggingEmpty;
22use Google\Service\Logging\SavedQuery;
23
24/**
25 * The "savedQueries" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $loggingService = new Google\Service\Logging(...);
29 * $savedQueries = $loggingService->organizations_locations_savedQueries;
30 * </code>
31 */
32class OrganizationsLocationsSavedQueries extends \Google\Service\Resource
33{
34 /**
35 * Creates a new SavedQuery for the user making the request.
36 * (savedQueries.create)
37 *
38 * @param string $parent Required. The parent resource in which to create the
39 * saved query: "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
40 * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
41 * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
42 * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-
43 * project/locations/global" "organizations/123456789/locations/us-central1"
44 * @param SavedQuery $postBody
45 * @param array $optParams Optional parameters.
46 *
47 * @opt_param string savedQueryId Optional. The ID to use for the saved query,
48 * which will become the final component of the saved query's resource name.If
49 * the saved_query_id is not provided, the system will generate an alphanumeric
50 * ID.The saved_query_id is limited to 100 characters and can include only the
51 * following characters: upper and lower-case alphanumeric characters,
52 * underscores, hyphens, periods.First character has to be alphanumeric.
53 * @return SavedQuery
54 * @throws \Google\Service\Exception
55 */
56 public function create($parent, SavedQuery $postBody, $optParams = [])
57 {
58 $params = ['parent' => $parent, 'postBody' => $postBody];
59 $params = array_merge($params, $optParams);
60 return $this->call('create', [$params], SavedQuery::class);
61 }
62 /**
63 * Deletes an existing SavedQuery that was created by the user making the
64 * request. (savedQueries.delete)
65 *
66 * @param string $name Required. The full resource name of the saved query to
67 * delete.
68 * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "orga
69 * nizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]"
70 * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/[Q
71 * UERY_ID]"
72 * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For
73 * example: "projects/my-project/locations/global/savedQueries/my-saved-query"
74 * @param array $optParams Optional parameters.
75 * @return LoggingEmpty
76 * @throws \Google\Service\Exception
77 */
78 public function delete($name, $optParams = [])
79 {
80 $params = ['name' => $name];
81 $params = array_merge($params, $optParams);
82 return $this->call('delete', [$params], LoggingEmpty::class);
83 }
84 /**
85 * Returns all data associated with the requested query. (savedQueries.get)
86 *
87 * @param string $name Required. The resource name of the saved query.
88 * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "orga
89 * nizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]"
90 * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/[Q
91 * UERY_ID]"
92 * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For
93 * example: "projects/my-project/locations/global/savedQueries/my-saved-query"
94 * @param array $optParams Optional parameters.
95 * @return SavedQuery
96 * @throws \Google\Service\Exception
97 */
98 public function get($name, $optParams = [])
99 {
100 $params = ['name' => $name];
101 $params = array_merge($params, $optParams);
102 return $this->call('get', [$params], SavedQuery::class);
103 }
104 /**
105 * Lists the SavedQueries that were created by the user making the request.
106 * (savedQueries.listOrganizationsLocationsSavedQueries)
107 *
108 * @param string $parent Required. The resource to which the listed queries
109 * belong. "projects/[PROJECT_ID]/locations/[LOCATION_ID]"
110 * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]"
111 * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]"
112 * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-
113 * project/locations/us-central1" Note: The locations portion of the resource
114 * must be specified. To get a list of all saved queries, a wildcard character -
115 * can be used for LOCATION_ID, for example: "projects/my-project/locations/-"
116 * @param array $optParams Optional parameters.
117 *
118 * @opt_param string filter Optional. Specifies the type ("Logging" or
119 * "OpsAnalytics") and the visibility (PRIVATE or SHARED) of the saved queries
120 * to list. If provided, the filter must contain either the type function or a
121 * visibility token, or both. If both are chosen, they can be placed in any
122 * order, but they must be joined by the AND operator or the empty character.The
123 * two supported type function calls are: type("Logging")
124 * type("OpsAnalytics")The two supported visibility tokens are: visibility =
125 * PRIVATE visibility = SHAREDFor example:type("Logging") AND visibility =
126 * PRIVATE visibility=SHARED type("OpsAnalytics") type("OpsAnalytics)"
127 * visibility = PRIVATE visibility = SHARED
128 * @opt_param int pageSize Optional. The maximum number of results to return
129 * from this request.Non-positive values are ignored. The presence of
130 * nextPageToken in the response indicates that more results might be available.
131 * @opt_param string pageToken Optional. If present, then retrieve the next
132 * batch of results from the preceding call to this method. pageToken must be
133 * the value of nextPageToken from the previous response. The values of other
134 * method parameters should be identical to those in the previous call.
135 * @return ListSavedQueriesResponse
136 * @throws \Google\Service\Exception
137 */
138 public function listOrganizationsLocationsSavedQueries($parent, $optParams = [])
139 {
140 $params = ['parent' => $parent];
141 $params = array_merge($params, $optParams);
142 return $this->call('list', [$params], ListSavedQueriesResponse::class);
143 }
144 /**
145 * Updates an existing SavedQuery. (savedQueries.patch)
146 *
147 * @param string $name Output only. Resource name of the saved query.In the
148 * format:
149 * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For a
150 * list of supported locations, see Supported Regions
151 * (https://cloud.google.com/logging/docs/region-support#bucket-regions)After
152 * the saved query is created, the location cannot be changed.If the user
153 * doesn't provide a QUERY_ID, the system will generate an alphanumeric ID.
154 * @param SavedQuery $postBody
155 * @param array $optParams Optional parameters.
156 *
157 * @opt_param string updateMask Required. A non-empty list of fields to change
158 * in the existing saved query. Fields are relative to the saved_query and new
159 * values for the fields are taken from the corresponding fields in the
160 * SavedQuery included in this request. Fields not mentioned in update_mask are
161 * not changed and are ignored in the request.To update all mutable fields,
162 * specify an update_mask of *.For example, to change the description and query
163 * filter text of a saved query, specify an update_mask of "description,
164 * query.filter".
165 * @return SavedQuery
166 * @throws \Google\Service\Exception
167 */
168 public function patch($name, SavedQuery $postBody, $optParams = [])
169 {
170 $params = ['name' => $name, 'postBody' => $postBody];
171 $params = array_merge($params, $optParams);
172 return $this->call('patch', [$params], SavedQuery::class);
173 }
174}
175
176// Adding a class alias for backwards compatibility with the previous class name.
177class_alias(OrganizationsLocationsSavedQueries::class, 'Google_Service_Logging_Resource_OrganizationsLocationsSavedQueries');
Note: See TracBrowser for help on using the repository browser.