source: vendor/google/apiclient-services/src/Datastream/Resource/ProjectsLocationsStreams.php

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

Upload project files

  • Property mode set to 100644
File size: 8.3 KB
Line 
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\Datastream\Resource;
19
20use Google\Service\Datastream\ListStreamsResponse;
21use Google\Service\Datastream\Operation;
22use Google\Service\Datastream\RunStreamRequest;
23use Google\Service\Datastream\Stream;
24
25/**
26 * The "streams" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $datastreamService = new Google\Service\Datastream(...);
30 * $streams = $datastreamService->projects_locations_streams;
31 * </code>
32 */
33class ProjectsLocationsStreams extends \Google\Service\Resource
34{
35 /**
36 * Use this method to create a stream. (streams.create)
37 *
38 * @param string $parent Required. The parent that owns the collection of
39 * streams.
40 * @param Stream $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param bool force Optional. Create the stream without validating it.
44 * @opt_param string requestId Optional. A request ID to identify requests.
45 * Specify a unique request ID so that if you must retry your request, the
46 * server will know to ignore the request if it has already been completed. The
47 * server will guarantee that for at least 60 minutes since the first request.
48 * For example, consider a situation where you make an initial request and the
49 * request times out. If you make the request again with the same request ID,
50 * the server can check if original operation with the same request ID was
51 * received, and if so, will ignore the second request. This prevents clients
52 * from accidentally creating duplicate commitments. The request ID must be a
53 * valid UUID with the exception that zero UUID is not supported
54 * (00000000-0000-0000-0000-000000000000).
55 * @opt_param string streamId Required. The stream identifier.
56 * @opt_param bool validateOnly Optional. Only validate the stream, but don't
57 * create any resources. The default is false.
58 * @return Operation
59 * @throws \Google\Service\Exception
60 */
61 public function create($parent, Stream $postBody, $optParams = [])
62 {
63 $params = ['parent' => $parent, 'postBody' => $postBody];
64 $params = array_merge($params, $optParams);
65 return $this->call('create', [$params], Operation::class);
66 }
67 /**
68 * Use this method to delete a stream. (streams.delete)
69 *
70 * @param string $name Required. The name of the stream resource to delete.
71 * @param array $optParams Optional parameters.
72 *
73 * @opt_param string requestId Optional. A request ID to identify requests.
74 * Specify a unique request ID so that if you must retry your request, the
75 * server will know to ignore the request if it has already been completed. The
76 * server will guarantee that for at least 60 minutes after the first request.
77 * For example, consider a situation where you make an initial request and the
78 * request times out. If you make the request again with the same request ID,
79 * the server can check if original operation with the same request ID was
80 * received, and if so, will ignore the second request. This prevents clients
81 * from accidentally creating duplicate commitments. The request ID must be a
82 * valid UUID with the exception that zero UUID is not supported
83 * (00000000-0000-0000-0000-000000000000).
84 * @return Operation
85 * @throws \Google\Service\Exception
86 */
87 public function delete($name, $optParams = [])
88 {
89 $params = ['name' => $name];
90 $params = array_merge($params, $optParams);
91 return $this->call('delete', [$params], Operation::class);
92 }
93 /**
94 * Use this method to get details about a stream. (streams.get)
95 *
96 * @param string $name Required. The name of the stream resource to get.
97 * @param array $optParams Optional parameters.
98 * @return Stream
99 * @throws \Google\Service\Exception
100 */
101 public function get($name, $optParams = [])
102 {
103 $params = ['name' => $name];
104 $params = array_merge($params, $optParams);
105 return $this->call('get', [$params], Stream::class);
106 }
107 /**
108 * Use this method to list streams in a project and location.
109 * (streams.listProjectsLocationsStreams)
110 *
111 * @param string $parent Required. The parent that owns the collection of
112 * streams.
113 * @param array $optParams Optional parameters.
114 *
115 * @opt_param string filter Filter request.
116 * @opt_param string orderBy Order by fields for the result.
117 * @opt_param int pageSize Maximum number of streams to return. If unspecified,
118 * at most 50 streams will be returned. The maximum value is 1000; values above
119 * 1000 will be coerced to 1000.
120 * @opt_param string pageToken Page token received from a previous `ListStreams`
121 * call. Provide this to retrieve the subsequent page. When paginating, all
122 * other parameters provided to `ListStreams` must match the call that provided
123 * the page token.
124 * @return ListStreamsResponse
125 * @throws \Google\Service\Exception
126 */
127 public function listProjectsLocationsStreams($parent, $optParams = [])
128 {
129 $params = ['parent' => $parent];
130 $params = array_merge($params, $optParams);
131 return $this->call('list', [$params], ListStreamsResponse::class);
132 }
133 /**
134 * Use this method to update the configuration of a stream. (streams.patch)
135 *
136 * @param string $name Output only. The stream's name.
137 * @param Stream $postBody
138 * @param array $optParams Optional parameters.
139 *
140 * @opt_param bool force Optional. Update the stream without validating it.
141 * @opt_param string requestId Optional. A request ID to identify requests.
142 * Specify a unique request ID so that if you must retry your request, the
143 * server will know to ignore the request if it has already been completed. The
144 * server will guarantee that for at least 60 minutes since the first request.
145 * For example, consider a situation where you make an initial request and the
146 * request times out. If you make the request again with the same request ID,
147 * the server can check if original operation with the same request ID was
148 * received, and if so, will ignore the second request. This prevents clients
149 * from accidentally creating duplicate commitments. The request ID must be a
150 * valid UUID with the exception that zero UUID is not supported
151 * (00000000-0000-0000-0000-000000000000).
152 * @opt_param string updateMask Optional. Field mask is used to specify the
153 * fields to be overwritten in the stream resource by the update. The fields
154 * specified in the update_mask are relative to the resource, not the full
155 * request. A field will be overwritten if it is in the mask. If the user does
156 * not provide a mask then all fields will be overwritten.
157 * @opt_param bool validateOnly Optional. Only validate the stream with the
158 * changes, without actually updating it. The default is false.
159 * @return Operation
160 * @throws \Google\Service\Exception
161 */
162 public function patch($name, Stream $postBody, $optParams = [])
163 {
164 $params = ['name' => $name, 'postBody' => $postBody];
165 $params = array_merge($params, $optParams);
166 return $this->call('patch', [$params], Operation::class);
167 }
168 /**
169 * Use this method to start, resume or recover a stream with a non default CDC
170 * strategy. (streams.run)
171 *
172 * @param string $name Required. Name of the stream resource to start, in the
173 * format: projects/{project_id}/locations/{location}/streams/{stream_name}
174 * @param RunStreamRequest $postBody
175 * @param array $optParams Optional parameters.
176 * @return Operation
177 * @throws \Google\Service\Exception
178 */
179 public function run($name, RunStreamRequest $postBody, $optParams = [])
180 {
181 $params = ['name' => $name, 'postBody' => $postBody];
182 $params = array_merge($params, $optParams);
183 return $this->call('run', [$params], Operation::class);
184 }
185}
186
187// Adding a class alias for backwards compatibility with the previous class name.
188class_alias(ProjectsLocationsStreams::class, 'Google_Service_Datastream_Resource_ProjectsLocationsStreams');
Note: See TracBrowser for help on using the repository browser.