[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\Datastream\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Datastream\ListStreamObjectsResponse;
|
---|
| 21 | use Google\Service\Datastream\LookupStreamObjectRequest;
|
---|
| 22 | use Google\Service\Datastream\StartBackfillJobRequest;
|
---|
| 23 | use Google\Service\Datastream\StartBackfillJobResponse;
|
---|
| 24 | use Google\Service\Datastream\StopBackfillJobRequest;
|
---|
| 25 | use Google\Service\Datastream\StopBackfillJobResponse;
|
---|
| 26 | use Google\Service\Datastream\StreamObject;
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * The "objects" collection of methods.
|
---|
| 30 | * Typical usage is:
|
---|
| 31 | * <code>
|
---|
| 32 | * $datastreamService = new Google\Service\Datastream(...);
|
---|
| 33 | * $objects = $datastreamService->projects_locations_streams_objects;
|
---|
| 34 | * </code>
|
---|
| 35 | */
|
---|
| 36 | class ProjectsLocationsStreamsObjects extends \Google\Service\Resource
|
---|
| 37 | {
|
---|
| 38 | /**
|
---|
| 39 | * Use this method to get details about a stream object. (objects.get)
|
---|
| 40 | *
|
---|
| 41 | * @param string $name Required. The name of the stream object resource to get.
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | * @return StreamObject
|
---|
| 44 | * @throws \Google\Service\Exception
|
---|
| 45 | */
|
---|
| 46 | public function get($name, $optParams = [])
|
---|
| 47 | {
|
---|
| 48 | $params = ['name' => $name];
|
---|
| 49 | $params = array_merge($params, $optParams);
|
---|
| 50 | return $this->call('get', [$params], StreamObject::class);
|
---|
| 51 | }
|
---|
| 52 | /**
|
---|
| 53 | * Use this method to list the objects of a specific stream.
|
---|
| 54 | * (objects.listProjectsLocationsStreamsObjects)
|
---|
| 55 | *
|
---|
| 56 | * @param string $parent Required. The parent stream that owns the collection of
|
---|
| 57 | * objects.
|
---|
| 58 | * @param array $optParams Optional parameters.
|
---|
| 59 | *
|
---|
| 60 | * @opt_param int pageSize Maximum number of objects to return. Default is 50.
|
---|
| 61 | * The maximum value is 1000; values above 1000 will be coerced to 1000.
|
---|
| 62 | * @opt_param string pageToken Page token received from a previous
|
---|
| 63 | * `ListStreamObjectsRequest` call. Provide this to retrieve the subsequent
|
---|
| 64 | * page. When paginating, all other parameters provided to
|
---|
| 65 | * `ListStreamObjectsRequest` must match the call that provided the page token.
|
---|
| 66 | * @return ListStreamObjectsResponse
|
---|
| 67 | * @throws \Google\Service\Exception
|
---|
| 68 | */
|
---|
| 69 | public function listProjectsLocationsStreamsObjects($parent, $optParams = [])
|
---|
| 70 | {
|
---|
| 71 | $params = ['parent' => $parent];
|
---|
| 72 | $params = array_merge($params, $optParams);
|
---|
| 73 | return $this->call('list', [$params], ListStreamObjectsResponse::class);
|
---|
| 74 | }
|
---|
| 75 | /**
|
---|
| 76 | * Use this method to look up a stream object by its source object identifier.
|
---|
| 77 | * (objects.lookup)
|
---|
| 78 | *
|
---|
| 79 | * @param string $parent Required. The parent stream that owns the collection of
|
---|
| 80 | * objects.
|
---|
| 81 | * @param LookupStreamObjectRequest $postBody
|
---|
| 82 | * @param array $optParams Optional parameters.
|
---|
| 83 | * @return StreamObject
|
---|
| 84 | * @throws \Google\Service\Exception
|
---|
| 85 | */
|
---|
| 86 | public function lookup($parent, LookupStreamObjectRequest $postBody, $optParams = [])
|
---|
| 87 | {
|
---|
| 88 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 89 | $params = array_merge($params, $optParams);
|
---|
| 90 | return $this->call('lookup', [$params], StreamObject::class);
|
---|
| 91 | }
|
---|
| 92 | /**
|
---|
| 93 | * Use this method to start a backfill job for the specified stream object.
|
---|
| 94 | * (objects.startBackfillJob)
|
---|
| 95 | *
|
---|
| 96 | * @param string $object Required. The name of the stream object resource to
|
---|
| 97 | * start a backfill job for.
|
---|
| 98 | * @param StartBackfillJobRequest $postBody
|
---|
| 99 | * @param array $optParams Optional parameters.
|
---|
| 100 | * @return StartBackfillJobResponse
|
---|
| 101 | * @throws \Google\Service\Exception
|
---|
| 102 | */
|
---|
| 103 | public function startBackfillJob($object, StartBackfillJobRequest $postBody, $optParams = [])
|
---|
| 104 | {
|
---|
| 105 | $params = ['object' => $object, 'postBody' => $postBody];
|
---|
| 106 | $params = array_merge($params, $optParams);
|
---|
| 107 | return $this->call('startBackfillJob', [$params], StartBackfillJobResponse::class);
|
---|
| 108 | }
|
---|
| 109 | /**
|
---|
| 110 | * Use this method to stop a backfill job for the specified stream object.
|
---|
| 111 | * (objects.stopBackfillJob)
|
---|
| 112 | *
|
---|
| 113 | * @param string $object Required. The name of the stream object resource to
|
---|
| 114 | * stop the backfill job for.
|
---|
| 115 | * @param StopBackfillJobRequest $postBody
|
---|
| 116 | * @param array $optParams Optional parameters.
|
---|
| 117 | * @return StopBackfillJobResponse
|
---|
| 118 | * @throws \Google\Service\Exception
|
---|
| 119 | */
|
---|
| 120 | public function stopBackfillJob($object, StopBackfillJobRequest $postBody, $optParams = [])
|
---|
| 121 | {
|
---|
| 122 | $params = ['object' => $object, 'postBody' => $postBody];
|
---|
| 123 | $params = array_merge($params, $optParams);
|
---|
| 124 | return $this->call('stopBackfillJob', [$params], StopBackfillJobResponse::class);
|
---|
| 125 | }
|
---|
| 126 | }
|
---|
| 127 |
|
---|
| 128 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 129 | class_alias(ProjectsLocationsStreamsObjects::class, 'Google_Service_Datastream_Resource_ProjectsLocationsStreamsObjects');
|
---|