source: vendor/google/apiclient-services/src/Apigee/Resource/OrganizationsHostQueries.php

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

Upload project files

  • Property mode set to 100644
File size: 5.9 KB
RevLine 
[e3d4e0a]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\Apigee\Resource;
19
20use Google\Service\Apigee\GoogleApiHttpBody;
21use Google\Service\Apigee\GoogleCloudApigeeV1AsyncQuery;
22use Google\Service\Apigee\GoogleCloudApigeeV1AsyncQueryResultView;
23use Google\Service\Apigee\GoogleCloudApigeeV1ListAsyncQueriesResponse;
24use Google\Service\Apigee\GoogleCloudApigeeV1Query;
25
26/**
27 * The "hostQueries" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $apigeeService = new Google\Service\Apigee(...);
31 * $hostQueries = $apigeeService->organizations_hostQueries;
32 * </code>
33 */
34class OrganizationsHostQueries extends \Google\Service\Resource
35{
36 /**
37 * Submit a query at host level to be processed in the background. If the
38 * submission of the query succeeds, the API returns a 201 status and an ID that
39 * refer to the query. In addition to the HTTP status 201, the `state` of
40 * "enqueued" means that the request succeeded. (hostQueries.create)
41 *
42 * @param string $parent Required. The parent resource name. Must be of the form
43 * `organizations/{org}`.
44 * @param GoogleCloudApigeeV1Query $postBody
45 * @param array $optParams Optional parameters.
46 * @return GoogleCloudApigeeV1AsyncQuery
47 * @throws \Google\Service\Exception
48 */
49 public function create($parent, GoogleCloudApigeeV1Query $postBody, $optParams = [])
50 {
51 $params = ['parent' => $parent, 'postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('create', [$params], GoogleCloudApigeeV1AsyncQuery::class);
54 }
55 /**
56 * Get status of a query submitted at host level. If the query is still in
57 * progress, the `state` is set to "running" After the query has completed
58 * successfully, `state` is set to "completed" (hostQueries.get)
59 *
60 * @param string $name Required. Name of the asynchronous query to get. Must be
61 * of the form `organizations/{org}/queries/{queryId}`.
62 * @param array $optParams Optional parameters.
63 * @return GoogleCloudApigeeV1AsyncQuery
64 * @throws \Google\Service\Exception
65 */
66 public function get($name, $optParams = [])
67 {
68 $params = ['name' => $name];
69 $params = array_merge($params, $optParams);
70 return $this->call('get', [$params], GoogleCloudApigeeV1AsyncQuery::class);
71 }
72 /**
73 * After the query is completed, use this API to retrieve the results. If the
74 * request succeeds, and there is a non-zero result set, the result is
75 * downloaded to the client as a zipped JSON file. The name of the downloaded
76 * file will be: OfflineQueryResult-.zip Example:
77 * `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`
78 * (hostQueries.getResult)
79 *
80 * @param string $name Required. Name of the asynchronous query result to get.
81 * Must be of the form `organizations/{org}/queries/{queryId}/result`.
82 * @param array $optParams Optional parameters.
83 * @return GoogleApiHttpBody
84 * @throws \Google\Service\Exception
85 */
86 public function getResult($name, $optParams = [])
87 {
88 $params = ['name' => $name];
89 $params = array_merge($params, $optParams);
90 return $this->call('getResult', [$params], GoogleApiHttpBody::class);
91 }
92 /**
93 * (hostQueries.getResultView)
94 *
95 * @param string $name Required. Name of the asynchronous query result view to
96 * get. Must be of the form `organizations/{org}/queries/{queryId}/resultView`.
97 * @param array $optParams Optional parameters.
98 * @return GoogleCloudApigeeV1AsyncQueryResultView
99 * @throws \Google\Service\Exception
100 */
101 public function getResultView($name, $optParams = [])
102 {
103 $params = ['name' => $name];
104 $params = array_merge($params, $optParams);
105 return $this->call('getResultView', [$params], GoogleCloudApigeeV1AsyncQueryResultView::class);
106 }
107 /**
108 * Return a list of Asynchronous Queries at host level.
109 * (hostQueries.listOrganizationsHostQueries)
110 *
111 * @param string $parent Required. The parent resource name. Must be of the form
112 * `organizations/{org}`.
113 * @param array $optParams Optional parameters.
114 *
115 * @opt_param string dataset Filter response list by dataset. Example: `api`,
116 * `mint`
117 * @opt_param string envgroupHostname Required. Filter response list by
118 * hostname.
119 * @opt_param string from Filter response list by returning asynchronous queries
120 * that created after this date time. Time must be in ISO date-time format like
121 * '2011-12-03T10:15:30Z'.
122 * @opt_param string inclQueriesWithoutReport Flag to include asynchronous
123 * queries that don't have a report denifition.
124 * @opt_param string status Filter response list by asynchronous query status.
125 * @opt_param string submittedBy Filter response list by user who submitted
126 * queries.
127 * @opt_param string to Filter response list by returning asynchronous queries
128 * that created before this date time. Time must be in ISO date-time format like
129 * '2011-12-03T10:16:30Z'.
130 * @return GoogleCloudApigeeV1ListAsyncQueriesResponse
131 * @throws \Google\Service\Exception
132 */
133 public function listOrganizationsHostQueries($parent, $optParams = [])
134 {
135 $params = ['parent' => $parent];
136 $params = array_merge($params, $optParams);
137 return $this->call('list', [$params], GoogleCloudApigeeV1ListAsyncQueriesResponse::class);
138 }
139}
140
141// Adding a class alias for backwards compatibility with the previous class name.
142class_alias(OrganizationsHostQueries::class, 'Google_Service_Apigee_Resource_OrganizationsHostQueries');
Note: See TracBrowser for help on using the repository browser.