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 |
|
---|
18 | namespace Google\Service\AnalyticsHub\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\AnalyticsHub\AnalyticshubEmpty;
|
---|
21 | use Google\Service\AnalyticsHub\GetIamPolicyRequest;
|
---|
22 | use Google\Service\AnalyticsHub\ListListingsResponse;
|
---|
23 | use Google\Service\AnalyticsHub\ListSharedResourceSubscriptionsResponse;
|
---|
24 | use Google\Service\AnalyticsHub\Listing;
|
---|
25 | use Google\Service\AnalyticsHub\Policy;
|
---|
26 | use Google\Service\AnalyticsHub\SetIamPolicyRequest;
|
---|
27 | use Google\Service\AnalyticsHub\SubscribeListingRequest;
|
---|
28 | use Google\Service\AnalyticsHub\SubscribeListingResponse;
|
---|
29 | use Google\Service\AnalyticsHub\TestIamPermissionsRequest;
|
---|
30 | use Google\Service\AnalyticsHub\TestIamPermissionsResponse;
|
---|
31 |
|
---|
32 | /**
|
---|
33 | * The "listings" collection of methods.
|
---|
34 | * Typical usage is:
|
---|
35 | * <code>
|
---|
36 | * $analyticshubService = new Google\Service\AnalyticsHub(...);
|
---|
37 | * $listings = $analyticshubService->projects_locations_dataExchanges_listings;
|
---|
38 | * </code>
|
---|
39 | */
|
---|
40 | class ProjectsLocationsDataExchangesListings extends \Google\Service\Resource
|
---|
41 | {
|
---|
42 | /**
|
---|
43 | * Creates a new listing. (listings.create)
|
---|
44 | *
|
---|
45 | * @param string $parent Required. The parent resource path of the listing. e.g.
|
---|
46 | * `projects/myproject/locations/US/dataExchanges/123`.
|
---|
47 | * @param Listing $postBody
|
---|
48 | * @param array $optParams Optional parameters.
|
---|
49 | *
|
---|
50 | * @opt_param string listingId Required. The ID of the listing to create. Must
|
---|
51 | * contain only Unicode letters, numbers (0-9), underscores (_). Should not use
|
---|
52 | * characters that require URL-escaping, or characters outside of ASCII, spaces.
|
---|
53 | * Max length: 100 bytes.
|
---|
54 | * @return Listing
|
---|
55 | * @throws \Google\Service\Exception
|
---|
56 | */
|
---|
57 | public function create($parent, Listing $postBody, $optParams = [])
|
---|
58 | {
|
---|
59 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
60 | $params = array_merge($params, $optParams);
|
---|
61 | return $this->call('create', [$params], Listing::class);
|
---|
62 | }
|
---|
63 | /**
|
---|
64 | * Deletes a listing. (listings.delete)
|
---|
65 | *
|
---|
66 | * @param string $name Required. Resource name of the listing to delete. e.g.
|
---|
67 | * `projects/myproject/locations/US/dataExchanges/123/listings/456`.
|
---|
68 | * @param array $optParams Optional parameters.
|
---|
69 | * @return AnalyticshubEmpty
|
---|
70 | * @throws \Google\Service\Exception
|
---|
71 | */
|
---|
72 | public function delete($name, $optParams = [])
|
---|
73 | {
|
---|
74 | $params = ['name' => $name];
|
---|
75 | $params = array_merge($params, $optParams);
|
---|
76 | return $this->call('delete', [$params], AnalyticshubEmpty::class);
|
---|
77 | }
|
---|
78 | /**
|
---|
79 | * Gets the details of a listing. (listings.get)
|
---|
80 | *
|
---|
81 | * @param string $name Required. The resource name of the listing. e.g.
|
---|
82 | * `projects/myproject/locations/US/dataExchanges/123/listings/456`.
|
---|
83 | * @param array $optParams Optional parameters.
|
---|
84 | * @return Listing
|
---|
85 | * @throws \Google\Service\Exception
|
---|
86 | */
|
---|
87 | public function get($name, $optParams = [])
|
---|
88 | {
|
---|
89 | $params = ['name' => $name];
|
---|
90 | $params = array_merge($params, $optParams);
|
---|
91 | return $this->call('get', [$params], Listing::class);
|
---|
92 | }
|
---|
93 | /**
|
---|
94 | * Gets the IAM policy. (listings.getIamPolicy)
|
---|
95 | *
|
---|
96 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
97 | * requested. See [Resource
|
---|
98 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
99 | * appropriate value for this field.
|
---|
100 | * @param GetIamPolicyRequest $postBody
|
---|
101 | * @param array $optParams Optional parameters.
|
---|
102 | * @return Policy
|
---|
103 | * @throws \Google\Service\Exception
|
---|
104 | */
|
---|
105 | public function getIamPolicy($resource, GetIamPolicyRequest $postBody, $optParams = [])
|
---|
106 | {
|
---|
107 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
108 | $params = array_merge($params, $optParams);
|
---|
109 | return $this->call('getIamPolicy', [$params], Policy::class);
|
---|
110 | }
|
---|
111 | /**
|
---|
112 | * Lists all listings in a given project and location.
|
---|
113 | * (listings.listProjectsLocationsDataExchangesListings)
|
---|
114 | *
|
---|
115 | * @param string $parent Required. The parent resource path of the listing. e.g.
|
---|
116 | * `projects/myproject/locations/US/dataExchanges/123`.
|
---|
117 | * @param array $optParams Optional parameters.
|
---|
118 | *
|
---|
119 | * @opt_param int pageSize The maximum number of results to return in a single
|
---|
120 | * response page. Leverage the page tokens to iterate through the entire
|
---|
121 | * collection.
|
---|
122 | * @opt_param string pageToken Page token, returned by a previous call, to
|
---|
123 | * request the next page of results.
|
---|
124 | * @return ListListingsResponse
|
---|
125 | * @throws \Google\Service\Exception
|
---|
126 | */
|
---|
127 | public function listProjectsLocationsDataExchangesListings($parent, $optParams = [])
|
---|
128 | {
|
---|
129 | $params = ['parent' => $parent];
|
---|
130 | $params = array_merge($params, $optParams);
|
---|
131 | return $this->call('list', [$params], ListListingsResponse::class);
|
---|
132 | }
|
---|
133 | /**
|
---|
134 | * Lists all subscriptions on a given Data Exchange or Listing.
|
---|
135 | * (listings.listSubscriptions)
|
---|
136 | *
|
---|
137 | * @param string $resource Required. Resource name of the requested target. This
|
---|
138 | * resource may be either a Listing or a DataExchange. e.g.
|
---|
139 | * projects/123/locations/US/dataExchanges/456 OR e.g.
|
---|
140 | * projects/123/locations/US/dataExchanges/456/listings/789
|
---|
141 | * @param array $optParams Optional parameters.
|
---|
142 | *
|
---|
143 | * @opt_param bool includeDeletedSubscriptions If selected, includes deleted
|
---|
144 | * subscriptions in the response (up to 63 days after deletion).
|
---|
145 | * @opt_param int pageSize The maximum number of results to return in a single
|
---|
146 | * response page.
|
---|
147 | * @opt_param string pageToken Page token, returned by a previous call.
|
---|
148 | * @return ListSharedResourceSubscriptionsResponse
|
---|
149 | * @throws \Google\Service\Exception
|
---|
150 | */
|
---|
151 | public function listSubscriptions($resource, $optParams = [])
|
---|
152 | {
|
---|
153 | $params = ['resource' => $resource];
|
---|
154 | $params = array_merge($params, $optParams);
|
---|
155 | return $this->call('listSubscriptions', [$params], ListSharedResourceSubscriptionsResponse::class);
|
---|
156 | }
|
---|
157 | /**
|
---|
158 | * Updates an existing listing. (listings.patch)
|
---|
159 | *
|
---|
160 | * @param string $name Output only. The resource name of the listing. e.g.
|
---|
161 | * `projects/myproject/locations/US/dataExchanges/123/listings/456`
|
---|
162 | * @param Listing $postBody
|
---|
163 | * @param array $optParams Optional parameters.
|
---|
164 | *
|
---|
165 | * @opt_param string updateMask Required. Field mask specifies the fields to
|
---|
166 | * update in the listing resource. The fields specified in the `updateMask` are
|
---|
167 | * relative to the resource and are not a full request.
|
---|
168 | * @return Listing
|
---|
169 | * @throws \Google\Service\Exception
|
---|
170 | */
|
---|
171 | public function patch($name, Listing $postBody, $optParams = [])
|
---|
172 | {
|
---|
173 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
174 | $params = array_merge($params, $optParams);
|
---|
175 | return $this->call('patch', [$params], Listing::class);
|
---|
176 | }
|
---|
177 | /**
|
---|
178 | * Sets the IAM policy. (listings.setIamPolicy)
|
---|
179 | *
|
---|
180 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
181 | * specified. See [Resource
|
---|
182 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
183 | * appropriate value for this field.
|
---|
184 | * @param SetIamPolicyRequest $postBody
|
---|
185 | * @param array $optParams Optional parameters.
|
---|
186 | * @return Policy
|
---|
187 | * @throws \Google\Service\Exception
|
---|
188 | */
|
---|
189 | public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
|
---|
190 | {
|
---|
191 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
192 | $params = array_merge($params, $optParams);
|
---|
193 | return $this->call('setIamPolicy', [$params], Policy::class);
|
---|
194 | }
|
---|
195 | /**
|
---|
196 | * Subscribes to a listing. Currently, with Analytics Hub, you can create
|
---|
197 | * listings that reference only BigQuery datasets. Upon subscription to a
|
---|
198 | * listing for a BigQuery dataset, Analytics Hub creates a linked dataset in the
|
---|
199 | * subscriber's project. (listings.subscribe)
|
---|
200 | *
|
---|
201 | * @param string $name Required. Resource name of the listing that you want to
|
---|
202 | * subscribe to. e.g.
|
---|
203 | * `projects/myproject/locations/US/dataExchanges/123/listings/456`.
|
---|
204 | * @param SubscribeListingRequest $postBody
|
---|
205 | * @param array $optParams Optional parameters.
|
---|
206 | * @return SubscribeListingResponse
|
---|
207 | * @throws \Google\Service\Exception
|
---|
208 | */
|
---|
209 | public function subscribe($name, SubscribeListingRequest $postBody, $optParams = [])
|
---|
210 | {
|
---|
211 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
212 | $params = array_merge($params, $optParams);
|
---|
213 | return $this->call('subscribe', [$params], SubscribeListingResponse::class);
|
---|
214 | }
|
---|
215 | /**
|
---|
216 | * Returns the permissions that a caller has. (listings.testIamPermissions)
|
---|
217 | *
|
---|
218 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
219 | * being requested. See [Resource
|
---|
220 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
221 | * appropriate value for this field.
|
---|
222 | * @param TestIamPermissionsRequest $postBody
|
---|
223 | * @param array $optParams Optional parameters.
|
---|
224 | * @return TestIamPermissionsResponse
|
---|
225 | * @throws \Google\Service\Exception
|
---|
226 | */
|
---|
227 | public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
228 | {
|
---|
229 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
230 | $params = array_merge($params, $optParams);
|
---|
231 | return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
|
---|
232 | }
|
---|
233 | }
|
---|
234 |
|
---|
235 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
236 | class_alias(ProjectsLocationsDataExchangesListings::class, 'Google_Service_AnalyticsHub_Resource_ProjectsLocationsDataExchangesListings');
|
---|