Repository navigation
Expand file tree
/
Copy pathProductServiceGrpcClient.php
More file actions
244 lines (231 loc) · 10.7 KB
/
Copy pathProductServiceGrpcClient.php
File metadata and controls
244 lines (231 loc) · 10.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<?php
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
namespace Google\Cloud\Retail\V2;
/**
* Service for ingesting [Product][google.cloud.retail.v2.Product] information
* of the customer's website.
*/
class ProductServiceGrpcClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname
* @param array $opts channel options
* @param \Grpc\Channel $channel (optional) re-use channel object
*/
public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel);
}
/**
* Creates a [Product][google.cloud.retail.v2.Product].
* @param \Google\Cloud\Retail\V2\CreateProductRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function CreateProduct(\Google\Cloud\Retail\V2\CreateProductRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.retail.v2.ProductService/CreateProduct',
$argument,
['\Google\Cloud\Retail\V2\Product', 'decode'],
$metadata, $options);
}
/**
* Gets a [Product][google.cloud.retail.v2.Product].
* @param \Google\Cloud\Retail\V2\GetProductRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function GetProduct(\Google\Cloud\Retail\V2\GetProductRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.retail.v2.ProductService/GetProduct',
$argument,
['\Google\Cloud\Retail\V2\Product', 'decode'],
$metadata, $options);
}
/**
* Gets a list of [Product][google.cloud.retail.v2.Product]s.
* @param \Google\Cloud\Retail\V2\ListProductsRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function ListProducts(\Google\Cloud\Retail\V2\ListProductsRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.retail.v2.ProductService/ListProducts',
$argument,
['\Google\Cloud\Retail\V2\ListProductsResponse', 'decode'],
$metadata, $options);
}
/**
* Updates a [Product][google.cloud.retail.v2.Product].
* @param \Google\Cloud\Retail\V2\UpdateProductRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function UpdateProduct(\Google\Cloud\Retail\V2\UpdateProductRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.retail.v2.ProductService/UpdateProduct',
$argument,
['\Google\Cloud\Retail\V2\Product', 'decode'],
$metadata, $options);
}
/**
* Deletes a [Product][google.cloud.retail.v2.Product].
* @param \Google\Cloud\Retail\V2\DeleteProductRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function DeleteProduct(\Google\Cloud\Retail\V2\DeleteProductRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.retail.v2.ProductService/DeleteProduct',
$argument,
['\Google\Protobuf\GPBEmpty', 'decode'],
$metadata, $options);
}
/**
* Bulk import of multiple [Product][google.cloud.retail.v2.Product]s.
*
* Request processing may be synchronous. No partial updating is supported.
* Non-existing items are created.
*
* Note that it is possible for a subset of the
* [Product][google.cloud.retail.v2.Product]s to be successfully updated.
* @param \Google\Cloud\Retail\V2\ImportProductsRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function ImportProducts(\Google\Cloud\Retail\V2\ImportProductsRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.retail.v2.ProductService/ImportProducts',
$argument,
['\Google\LongRunning\Operation', 'decode'],
$metadata, $options);
}
/**
* Updates inventory information for a
* [Product][google.cloud.retail.v2.Product] while respecting the last update
* timestamps of each inventory field.
*
* This process is asynchronous and does not require the
* [Product][google.cloud.retail.v2.Product] to exist before updating
* fulfillment information. If the request is valid, the update will be
* enqueued and processed downstream. As a consequence, when a response is
* returned, updates are not immediately manifested in the
* [Product][google.cloud.retail.v2.Product] queried by
* [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or
* [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
*
* When inventory is updated with
* [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and
* [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the
* specified inventory field value(s) will overwrite any existing value(s)
* while ignoring the last update time for this field. Furthermore, the last
* update time for the specified inventory fields will be overwritten to the
* time of the
* [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or
* [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
* request.
*
* If no inventory fields are set in
* [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product],
* then any pre-existing inventory information for this product will be used.
*
* If no inventory fields are set in [UpdateProductRequest.set_mask][],
* then any existing inventory information will be preserved.
*
* Pre-existing inventory information can only be updated with
* [SetInventory][google.cloud.retail.v2.ProductService.SetInventory],
* [AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces],
* and
* [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
*
* This feature is only available for users who have Retail Search enabled.
* Please submit a form [here](https://cloud.google.com/contact) to contact
* cloud sales if you are interested in using Retail Search.
* @param \Google\Cloud\Retail\V2\SetInventoryRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function SetInventory(\Google\Cloud\Retail\V2\SetInventoryRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.retail.v2.ProductService/SetInventory',
$argument,
['\Google\LongRunning\Operation', 'decode'],
$metadata, $options);
}
/**
* Incrementally adds place IDs to
* [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].
*
* This process is asynchronous and does not require the
* [Product][google.cloud.retail.v2.Product] to exist before updating
* fulfillment information. If the request is valid, the update will be
* enqueued and processed downstream. As a consequence, when a response is
* returned, the added place IDs are not immediately manifested in the
* [Product][google.cloud.retail.v2.Product] queried by
* [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or
* [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
*
* This feature is only available for users who have Retail Search enabled.
* Please submit a form [here](https://cloud.google.com/contact) to contact
* cloud sales if you are interested in using Retail Search.
* @param \Google\Cloud\Retail\V2\AddFulfillmentPlacesRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function AddFulfillmentPlaces(\Google\Cloud\Retail\V2\AddFulfillmentPlacesRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.retail.v2.ProductService/AddFulfillmentPlaces',
$argument,
['\Google\LongRunning\Operation', 'decode'],
$metadata, $options);
}
/**
* Incrementally removes place IDs from a
* [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].
*
* This process is asynchronous and does not require the
* [Product][google.cloud.retail.v2.Product] to exist before updating
* fulfillment information. If the request is valid, the update will be
* enqueued and processed downstream. As a consequence, when a response is
* returned, the removed place IDs are not immediately manifested in the
* [Product][google.cloud.retail.v2.Product] queried by
* [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or
* [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
*
* This feature is only available for users who have Retail Search enabled.
* Please submit a form [here](https://cloud.google.com/contact) to contact
* cloud sales if you are interested in using Retail Search.
* @param \Google\Cloud\Retail\V2\RemoveFulfillmentPlacesRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function RemoveFulfillmentPlaces(\Google\Cloud\Retail\V2\RemoveFulfillmentPlacesRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.cloud.retail.v2.ProductService/RemoveFulfillmentPlaces',
$argument,
['\Google\LongRunning\Operation', 'decode'],
$metadata, $options);
}
}