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\Logging\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Logging\Link;
|
---|
21 | use Google\Service\Logging\ListLinksResponse;
|
---|
22 | use Google\Service\Logging\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "links" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $loggingService = new Google\Service\Logging(...);
|
---|
29 | * $links = $loggingService->billingAccounts_locations_buckets_links;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class BillingAccountsLocationsBucketsLinks extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Asynchronously creates a linked dataset in BigQuery which makes it possible
|
---|
36 | * to use BigQuery to read the logs stored in the log bucket. A log bucket may
|
---|
37 | * currently only contain one link. (links.create)
|
---|
38 | *
|
---|
39 | * @param string $parent Required. The full resource name of the bucket to
|
---|
40 | * create a link for.
|
---|
41 | * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
|
---|
42 | * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
|
---|
43 | * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET
|
---|
44 | * _ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
|
---|
45 | * @param Link $postBody
|
---|
46 | * @param array $optParams Optional parameters.
|
---|
47 | *
|
---|
48 | * @opt_param string linkId Required. The ID to use for the link. The link_id
|
---|
49 | * can have up to 100 characters. A valid link_id must only have alphanumeric
|
---|
50 | * characters and underscores within it.
|
---|
51 | * @return Operation
|
---|
52 | * @throws \Google\Service\Exception
|
---|
53 | */
|
---|
54 | public function create($parent, Link $postBody, $optParams = [])
|
---|
55 | {
|
---|
56 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
57 | $params = array_merge($params, $optParams);
|
---|
58 | return $this->call('create', [$params], Operation::class);
|
---|
59 | }
|
---|
60 | /**
|
---|
61 | * Deletes a link. This will also delete the corresponding BigQuery linked
|
---|
62 | * dataset. (links.delete)
|
---|
63 | *
|
---|
64 | * @param string $name Required. The full resource name of the link to delete. "
|
---|
65 | * projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK
|
---|
66 | * _ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKE
|
---|
67 | * T_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCAT
|
---|
68 | * ION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[
|
---|
69 | * LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]"
|
---|
70 | * @param array $optParams Optional parameters.
|
---|
71 | * @return Operation
|
---|
72 | * @throws \Google\Service\Exception
|
---|
73 | */
|
---|
74 | public function delete($name, $optParams = [])
|
---|
75 | {
|
---|
76 | $params = ['name' => $name];
|
---|
77 | $params = array_merge($params, $optParams);
|
---|
78 | return $this->call('delete', [$params], Operation::class);
|
---|
79 | }
|
---|
80 | /**
|
---|
81 | * Gets a link. (links.get)
|
---|
82 | *
|
---|
83 | * @param string $name Required. The resource name of the link: "projects/[PROJE
|
---|
84 | * CT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organiza
|
---|
85 | * tions/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LI
|
---|
86 | * NK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets
|
---|
87 | * /[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/bu
|
---|
88 | * ckets/[BUCKET_ID]/links/[LINK_ID]"
|
---|
89 | * @param array $optParams Optional parameters.
|
---|
90 | * @return Link
|
---|
91 | * @throws \Google\Service\Exception
|
---|
92 | */
|
---|
93 | public function get($name, $optParams = [])
|
---|
94 | {
|
---|
95 | $params = ['name' => $name];
|
---|
96 | $params = array_merge($params, $optParams);
|
---|
97 | return $this->call('get', [$params], Link::class);
|
---|
98 | }
|
---|
99 | /**
|
---|
100 | * Lists links. (links.listBillingAccountsLocationsBucketsLinks)
|
---|
101 | *
|
---|
102 | * @param string $parent Required. The parent resource whose links are to be
|
---|
103 | * listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
|
---|
104 | * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
|
---|
105 | * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET
|
---|
106 | * _ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"
|
---|
107 | * @param array $optParams Optional parameters.
|
---|
108 | *
|
---|
109 | * @opt_param int pageSize Optional. The maximum number of results to return
|
---|
110 | * from this request.
|
---|
111 | * @opt_param string pageToken Optional. If present, then retrieve the next
|
---|
112 | * batch of results from the preceding call to this method. pageToken must be
|
---|
113 | * the value of nextPageToken from the previous response.
|
---|
114 | * @return ListLinksResponse
|
---|
115 | * @throws \Google\Service\Exception
|
---|
116 | */
|
---|
117 | public function listBillingAccountsLocationsBucketsLinks($parent, $optParams = [])
|
---|
118 | {
|
---|
119 | $params = ['parent' => $parent];
|
---|
120 | $params = array_merge($params, $optParams);
|
---|
121 | return $this->call('list', [$params], ListLinksResponse::class);
|
---|
122 | }
|
---|
123 | }
|
---|
124 |
|
---|
125 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
126 | class_alias(BillingAccountsLocationsBucketsLinks::class, 'Google_Service_Logging_Resource_BillingAccountsLocationsBucketsLinks');
|
---|