[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 |
|
---|
| 18 | namespace Google\Service\Logging\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Logging\CopyLogEntriesRequest;
|
---|
| 21 | use Google\Service\Logging\ListLogEntriesRequest;
|
---|
| 22 | use Google\Service\Logging\ListLogEntriesResponse;
|
---|
| 23 | use Google\Service\Logging\Operation;
|
---|
| 24 | use Google\Service\Logging\TailLogEntriesRequest;
|
---|
| 25 | use Google\Service\Logging\TailLogEntriesResponse;
|
---|
| 26 | use Google\Service\Logging\WriteLogEntriesRequest;
|
---|
| 27 | use Google\Service\Logging\WriteLogEntriesResponse;
|
---|
| 28 |
|
---|
| 29 | /**
|
---|
| 30 | * The "entries" collection of methods.
|
---|
| 31 | * Typical usage is:
|
---|
| 32 | * <code>
|
---|
| 33 | * $loggingService = new Google\Service\Logging(...);
|
---|
| 34 | * $entries = $loggingService->entries;
|
---|
| 35 | * </code>
|
---|
| 36 | */
|
---|
| 37 | class Entries extends \Google\Service\Resource
|
---|
| 38 | {
|
---|
| 39 | /**
|
---|
| 40 | * Copies a set of log entries from a log bucket to a Cloud Storage bucket.
|
---|
| 41 | * (entries.copy)
|
---|
| 42 | *
|
---|
| 43 | * @param CopyLogEntriesRequest $postBody
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | * @return Operation
|
---|
| 46 | * @throws \Google\Service\Exception
|
---|
| 47 | */
|
---|
| 48 | public function copy(CopyLogEntriesRequest $postBody, $optParams = [])
|
---|
| 49 | {
|
---|
| 50 | $params = ['postBody' => $postBody];
|
---|
| 51 | $params = array_merge($params, $optParams);
|
---|
| 52 | return $this->call('copy', [$params], Operation::class);
|
---|
| 53 | }
|
---|
| 54 | /**
|
---|
| 55 | * Lists log entries. Use this method to retrieve log entries that originated
|
---|
| 56 | * from a project/folder/organization/billing account. For ways to export log
|
---|
| 57 | * entries, see Exporting Logs (https://cloud.google.com/logging/docs/export).
|
---|
| 58 | * (entries.listEntries)
|
---|
| 59 | *
|
---|
| 60 | * @param ListLogEntriesRequest $postBody
|
---|
| 61 | * @param array $optParams Optional parameters.
|
---|
| 62 | * @return ListLogEntriesResponse
|
---|
| 63 | * @throws \Google\Service\Exception
|
---|
| 64 | */
|
---|
| 65 | public function listEntries(ListLogEntriesRequest $postBody, $optParams = [])
|
---|
| 66 | {
|
---|
| 67 | $params = ['postBody' => $postBody];
|
---|
| 68 | $params = array_merge($params, $optParams);
|
---|
| 69 | return $this->call('list', [$params], ListLogEntriesResponse::class);
|
---|
| 70 | }
|
---|
| 71 | /**
|
---|
| 72 | * Streaming read of log entries as they are received. Until the stream is
|
---|
| 73 | * terminated, it will continue reading logs. (entries.tail)
|
---|
| 74 | *
|
---|
| 75 | * @param TailLogEntriesRequest $postBody
|
---|
| 76 | * @param array $optParams Optional parameters.
|
---|
| 77 | * @return TailLogEntriesResponse
|
---|
| 78 | * @throws \Google\Service\Exception
|
---|
| 79 | */
|
---|
| 80 | public function tail(TailLogEntriesRequest $postBody, $optParams = [])
|
---|
| 81 | {
|
---|
| 82 | $params = ['postBody' => $postBody];
|
---|
| 83 | $params = array_merge($params, $optParams);
|
---|
| 84 | return $this->call('tail', [$params], TailLogEntriesResponse::class);
|
---|
| 85 | }
|
---|
| 86 | /**
|
---|
| 87 | * Writes log entries to Logging. This API method is the only way to send log
|
---|
| 88 | * entries to Logging. This method is used, directly or indirectly, by the
|
---|
| 89 | * Logging agent (fluentd) and all logging libraries configured to use Logging.
|
---|
| 90 | * A single request may contain log entries for a maximum of 1000 different
|
---|
| 91 | * resource names (projects, organizations, billing accounts or folders), where
|
---|
| 92 | * the resource name for a log entry is determined from its logName field.
|
---|
| 93 | * (entries.write)
|
---|
| 94 | *
|
---|
| 95 | * @param WriteLogEntriesRequest $postBody
|
---|
| 96 | * @param array $optParams Optional parameters.
|
---|
| 97 | * @return WriteLogEntriesResponse
|
---|
| 98 | * @throws \Google\Service\Exception
|
---|
| 99 | */
|
---|
| 100 | public function write(WriteLogEntriesRequest $postBody, $optParams = [])
|
---|
| 101 | {
|
---|
| 102 | $params = ['postBody' => $postBody];
|
---|
| 103 | $params = array_merge($params, $optParams);
|
---|
| 104 | return $this->call('write', [$params], WriteLogEntriesResponse::class);
|
---|
| 105 | }
|
---|
| 106 | }
|
---|
| 107 |
|
---|
| 108 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 109 | class_alias(Entries::class, 'Google_Service_Logging_Resource_Entries');
|
---|