amazon_spapi/apis/
fulfillment_inbound_2024_03_20.rs

1/*
2 * The Selling Partner API for FBA inbound operations.
3 *
4 * The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.
5 *
6 * The version of the OpenAPI document: 2024-03-20
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17
18/// struct for typed errors of method [`cancel_inbound_plan`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum CancelInboundPlanError {
22    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
23    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
24    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
25    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
26    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
27    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
28    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
29    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
30    UnknownValue(serde_json::Value),
31}
32
33/// struct for typed errors of method [`cancel_self_ship_appointment`]
34#[derive(Debug, Clone, Serialize, Deserialize)]
35#[serde(untagged)]
36pub enum CancelSelfShipAppointmentError {
37    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
38    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
39    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
40    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
41    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
42    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
43    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
44    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
45    UnknownValue(serde_json::Value),
46}
47
48/// struct for typed errors of method [`confirm_delivery_window_options`]
49#[derive(Debug, Clone, Serialize, Deserialize)]
50#[serde(untagged)]
51pub enum ConfirmDeliveryWindowOptionsError {
52    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
53    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
54    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
55    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
56    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
57    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
58    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
59    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
60    UnknownValue(serde_json::Value),
61}
62
63/// struct for typed errors of method [`confirm_packing_option`]
64#[derive(Debug, Clone, Serialize, Deserialize)]
65#[serde(untagged)]
66pub enum ConfirmPackingOptionError {
67    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
68    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
69    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
70    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
71    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
72    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
73    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
74    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
75    UnknownValue(serde_json::Value),
76}
77
78/// struct for typed errors of method [`confirm_placement_option`]
79#[derive(Debug, Clone, Serialize, Deserialize)]
80#[serde(untagged)]
81pub enum ConfirmPlacementOptionError {
82    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
83    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
84    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
85    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
86    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
87    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
88    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
89    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
90    UnknownValue(serde_json::Value),
91}
92
93/// struct for typed errors of method [`confirm_shipment_content_update_preview`]
94#[derive(Debug, Clone, Serialize, Deserialize)]
95#[serde(untagged)]
96pub enum ConfirmShipmentContentUpdatePreviewError {
97    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
98    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
99    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
100    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
101    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
102    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
103    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
104    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
105    UnknownValue(serde_json::Value),
106}
107
108/// struct for typed errors of method [`confirm_transportation_options`]
109#[derive(Debug, Clone, Serialize, Deserialize)]
110#[serde(untagged)]
111pub enum ConfirmTransportationOptionsError {
112    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
113    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
114    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
115    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
116    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
117    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
118    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
119    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
120    UnknownValue(serde_json::Value),
121}
122
123/// struct for typed errors of method [`create_inbound_plan`]
124#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum CreateInboundPlanError {
127    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
128    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
129    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
130    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
131    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
132    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
133    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
134    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
135    UnknownValue(serde_json::Value),
136}
137
138/// struct for typed errors of method [`create_marketplace_item_labels`]
139#[derive(Debug, Clone, Serialize, Deserialize)]
140#[serde(untagged)]
141pub enum CreateMarketplaceItemLabelsError {
142    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
143    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
144    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
145    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
146    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
147    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
148    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
149    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
150    UnknownValue(serde_json::Value),
151}
152
153/// struct for typed errors of method [`generate_delivery_window_options`]
154#[derive(Debug, Clone, Serialize, Deserialize)]
155#[serde(untagged)]
156pub enum GenerateDeliveryWindowOptionsError {
157    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
158    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
159    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
160    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
161    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
162    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
163    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
164    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
165    UnknownValue(serde_json::Value),
166}
167
168/// struct for typed errors of method [`generate_packing_options`]
169#[derive(Debug, Clone, Serialize, Deserialize)]
170#[serde(untagged)]
171pub enum GeneratePackingOptionsError {
172    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
173    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
174    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
175    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
176    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
177    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
178    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
179    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
180    UnknownValue(serde_json::Value),
181}
182
183/// struct for typed errors of method [`generate_placement_options`]
184#[derive(Debug, Clone, Serialize, Deserialize)]
185#[serde(untagged)]
186pub enum GeneratePlacementOptionsError {
187    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
188    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
189    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
190    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
191    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
192    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
193    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
194    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
195    UnknownValue(serde_json::Value),
196}
197
198/// struct for typed errors of method [`generate_self_ship_appointment_slots`]
199#[derive(Debug, Clone, Serialize, Deserialize)]
200#[serde(untagged)]
201pub enum GenerateSelfShipAppointmentSlotsError {
202    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
203    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
204    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
205    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
206    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
207    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
208    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
209    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
210    UnknownValue(serde_json::Value),
211}
212
213/// struct for typed errors of method [`generate_shipment_content_update_previews`]
214#[derive(Debug, Clone, Serialize, Deserialize)]
215#[serde(untagged)]
216pub enum GenerateShipmentContentUpdatePreviewsError {
217    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
218    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
219    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
220    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
221    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
222    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
223    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
224    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
225    UnknownValue(serde_json::Value),
226}
227
228/// struct for typed errors of method [`generate_transportation_options`]
229#[derive(Debug, Clone, Serialize, Deserialize)]
230#[serde(untagged)]
231pub enum GenerateTransportationOptionsError {
232    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
233    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
234    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
235    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
236    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
237    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
238    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
239    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
240    UnknownValue(serde_json::Value),
241}
242
243/// struct for typed errors of method [`get_delivery_challan_document`]
244#[derive(Debug, Clone, Serialize, Deserialize)]
245#[serde(untagged)]
246pub enum GetDeliveryChallanDocumentError {
247    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
248    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
249    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
250    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
251    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
252    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
253    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
254    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
255    UnknownValue(serde_json::Value),
256}
257
258/// struct for typed errors of method [`get_inbound_operation_status`]
259#[derive(Debug, Clone, Serialize, Deserialize)]
260#[serde(untagged)]
261pub enum GetInboundOperationStatusError {
262    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
263    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
264    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
265    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
266    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
267    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
268    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
269    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
270    UnknownValue(serde_json::Value),
271}
272
273/// struct for typed errors of method [`get_inbound_plan`]
274#[derive(Debug, Clone, Serialize, Deserialize)]
275#[serde(untagged)]
276pub enum GetInboundPlanError {
277    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
278    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
279    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
280    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
281    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
282    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
283    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
284    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
285    UnknownValue(serde_json::Value),
286}
287
288/// struct for typed errors of method [`get_self_ship_appointment_slots`]
289#[derive(Debug, Clone, Serialize, Deserialize)]
290#[serde(untagged)]
291pub enum GetSelfShipAppointmentSlotsError {
292    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
293    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
294    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
295    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
296    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
297    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
298    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
299    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
300    UnknownValue(serde_json::Value),
301}
302
303/// struct for typed errors of method [`get_shipment`]
304#[derive(Debug, Clone, Serialize, Deserialize)]
305#[serde(untagged)]
306pub enum GetShipmentError {
307    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
308    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
309    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
310    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
311    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
312    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
313    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
314    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
315    UnknownValue(serde_json::Value),
316}
317
318/// struct for typed errors of method [`get_shipment_content_update_preview`]
319#[derive(Debug, Clone, Serialize, Deserialize)]
320#[serde(untagged)]
321pub enum GetShipmentContentUpdatePreviewError {
322    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
323    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
324    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
325    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
326    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
327    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
328    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
329    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
330    UnknownValue(serde_json::Value),
331}
332
333/// struct for typed errors of method [`list_delivery_window_options`]
334#[derive(Debug, Clone, Serialize, Deserialize)]
335#[serde(untagged)]
336pub enum ListDeliveryWindowOptionsError {
337    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
338    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
339    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
340    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
341    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
342    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
343    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
344    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
345    UnknownValue(serde_json::Value),
346}
347
348/// struct for typed errors of method [`list_inbound_plan_boxes`]
349#[derive(Debug, Clone, Serialize, Deserialize)]
350#[serde(untagged)]
351pub enum ListInboundPlanBoxesError {
352    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
353    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
354    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
355    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
356    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
357    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
358    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
359    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
360    UnknownValue(serde_json::Value),
361}
362
363/// struct for typed errors of method [`list_inbound_plan_items`]
364#[derive(Debug, Clone, Serialize, Deserialize)]
365#[serde(untagged)]
366pub enum ListInboundPlanItemsError {
367    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
368    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
369    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
370    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
371    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
372    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
373    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
374    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
375    UnknownValue(serde_json::Value),
376}
377
378/// struct for typed errors of method [`list_inbound_plan_pallets`]
379#[derive(Debug, Clone, Serialize, Deserialize)]
380#[serde(untagged)]
381pub enum ListInboundPlanPalletsError {
382    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
383    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
384    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
385    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
386    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
387    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
388    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
389    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
390    UnknownValue(serde_json::Value),
391}
392
393/// struct for typed errors of method [`list_inbound_plans`]
394#[derive(Debug, Clone, Serialize, Deserialize)]
395#[serde(untagged)]
396pub enum ListInboundPlansError {
397    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
398    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
399    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
400    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
401    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
402    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
403    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
404    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
405    UnknownValue(serde_json::Value),
406}
407
408/// struct for typed errors of method [`list_item_compliance_details`]
409#[derive(Debug, Clone, Serialize, Deserialize)]
410#[serde(untagged)]
411pub enum ListItemComplianceDetailsError {
412    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
413    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
414    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
415    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
416    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
417    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
418    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
419    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
420    UnknownValue(serde_json::Value),
421}
422
423/// struct for typed errors of method [`list_packing_group_boxes`]
424#[derive(Debug, Clone, Serialize, Deserialize)]
425#[serde(untagged)]
426pub enum ListPackingGroupBoxesError {
427    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
428    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
429    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
430    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
431    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
432    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
433    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
434    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
435    UnknownValue(serde_json::Value),
436}
437
438/// struct for typed errors of method [`list_packing_group_items`]
439#[derive(Debug, Clone, Serialize, Deserialize)]
440#[serde(untagged)]
441pub enum ListPackingGroupItemsError {
442    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
443    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
444    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
445    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
446    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
447    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
448    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
449    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
450    UnknownValue(serde_json::Value),
451}
452
453/// struct for typed errors of method [`list_packing_options`]
454#[derive(Debug, Clone, Serialize, Deserialize)]
455#[serde(untagged)]
456pub enum ListPackingOptionsError {
457    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
458    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
459    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
460    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
461    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
462    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
463    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
464    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
465    UnknownValue(serde_json::Value),
466}
467
468/// struct for typed errors of method [`list_placement_options`]
469#[derive(Debug, Clone, Serialize, Deserialize)]
470#[serde(untagged)]
471pub enum ListPlacementOptionsError {
472    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
473    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
474    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
475    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
476    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
477    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
478    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
479    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
480    UnknownValue(serde_json::Value),
481}
482
483/// struct for typed errors of method [`list_prep_details`]
484#[derive(Debug, Clone, Serialize, Deserialize)]
485#[serde(untagged)]
486pub enum ListPrepDetailsError {
487    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
488    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
489    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
490    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
491    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
492    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
493    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
494    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
495    UnknownValue(serde_json::Value),
496}
497
498/// struct for typed errors of method [`list_shipment_boxes`]
499#[derive(Debug, Clone, Serialize, Deserialize)]
500#[serde(untagged)]
501pub enum ListShipmentBoxesError {
502    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
503    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
504    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
505    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
506    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
507    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
508    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
509    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
510    UnknownValue(serde_json::Value),
511}
512
513/// struct for typed errors of method [`list_shipment_content_update_previews`]
514#[derive(Debug, Clone, Serialize, Deserialize)]
515#[serde(untagged)]
516pub enum ListShipmentContentUpdatePreviewsError {
517    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
518    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
519    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
520    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
521    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
522    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
523    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
524    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
525    UnknownValue(serde_json::Value),
526}
527
528/// struct for typed errors of method [`list_shipment_items`]
529#[derive(Debug, Clone, Serialize, Deserialize)]
530#[serde(untagged)]
531pub enum ListShipmentItemsError {
532    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
533    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
534    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
535    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
536    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
537    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
538    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
539    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
540    UnknownValue(serde_json::Value),
541}
542
543/// struct for typed errors of method [`list_shipment_pallets`]
544#[derive(Debug, Clone, Serialize, Deserialize)]
545#[serde(untagged)]
546pub enum ListShipmentPalletsError {
547    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
548    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
549    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
550    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
551    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
552    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
553    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
554    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
555    UnknownValue(serde_json::Value),
556}
557
558/// struct for typed errors of method [`list_transportation_options`]
559#[derive(Debug, Clone, Serialize, Deserialize)]
560#[serde(untagged)]
561pub enum ListTransportationOptionsError {
562    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
563    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
564    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
565    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
566    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
567    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
568    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
569    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
570    UnknownValue(serde_json::Value),
571}
572
573/// struct for typed errors of method [`schedule_self_ship_appointment`]
574#[derive(Debug, Clone, Serialize, Deserialize)]
575#[serde(untagged)]
576pub enum ScheduleSelfShipAppointmentError {
577    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
578    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
579    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
580    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
581    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
582    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
583    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
584    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
585    UnknownValue(serde_json::Value),
586}
587
588/// struct for typed errors of method [`set_packing_information`]
589#[derive(Debug, Clone, Serialize, Deserialize)]
590#[serde(untagged)]
591pub enum SetPackingInformationError {
592    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
593    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
594    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
595    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
596    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
597    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
598    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
599    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
600    UnknownValue(serde_json::Value),
601}
602
603/// struct for typed errors of method [`set_prep_details`]
604#[derive(Debug, Clone, Serialize, Deserialize)]
605#[serde(untagged)]
606pub enum SetPrepDetailsError {
607    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
608    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
609    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
610    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
611    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
612    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
613    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
614    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
615    UnknownValue(serde_json::Value),
616}
617
618/// struct for typed errors of method [`update_inbound_plan_name`]
619#[derive(Debug, Clone, Serialize, Deserialize)]
620#[serde(untagged)]
621pub enum UpdateInboundPlanNameError {
622    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
623    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
624    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
625    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
626    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
627    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
628    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
629    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
630    UnknownValue(serde_json::Value),
631}
632
633/// struct for typed errors of method [`update_item_compliance_details`]
634#[derive(Debug, Clone, Serialize, Deserialize)]
635#[serde(untagged)]
636pub enum UpdateItemComplianceDetailsError {
637    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
638    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
639    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
640    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
641    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
642    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
643    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
644    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
645    UnknownValue(serde_json::Value),
646}
647
648/// struct for typed errors of method [`update_shipment_name`]
649#[derive(Debug, Clone, Serialize, Deserialize)]
650#[serde(untagged)]
651pub enum UpdateShipmentNameError {
652    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
653    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
654    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
655    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
656    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
657    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
658    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
659    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
660    UnknownValue(serde_json::Value),
661}
662
663/// struct for typed errors of method [`update_shipment_source_address`]
664#[derive(Debug, Clone, Serialize, Deserialize)]
665#[serde(untagged)]
666pub enum UpdateShipmentSourceAddressError {
667    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
668    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
669    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
670    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
671    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
672    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
673    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
674    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
675    UnknownValue(serde_json::Value),
676}
677
678/// struct for typed errors of method [`update_shipment_tracking_details`]
679#[derive(Debug, Clone, Serialize, Deserialize)]
680#[serde(untagged)]
681pub enum UpdateShipmentTrackingDetailsError {
682    Status400(models::fulfillment_inbound_2024_03_20::ErrorList),
683    Status404(models::fulfillment_inbound_2024_03_20::ErrorList),
684    Status500(models::fulfillment_inbound_2024_03_20::ErrorList),
685    Status403(models::fulfillment_inbound_2024_03_20::ErrorList),
686    Status413(models::fulfillment_inbound_2024_03_20::ErrorList),
687    Status415(models::fulfillment_inbound_2024_03_20::ErrorList),
688    Status429(models::fulfillment_inbound_2024_03_20::ErrorList),
689    Status503(models::fulfillment_inbound_2024_03_20::ErrorList),
690    UnknownValue(serde_json::Value),
691}
692
693
694/// Cancels an Inbound Plan. Charges may apply if the cancellation is performed outside of a void window. The window for Amazon Partnered Carriers is 24 hours for Small Parcel Delivery (SPD) and one hour for Less-Than-Truckload (LTL) carrier shipments.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
695pub async fn cancel_inbound_plan(configuration: &configuration::Configuration, inbound_plan_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::CancelInboundPlanResponse, Error<CancelInboundPlanError>> {
696    // add a prefix to parameters to efficiently prevent name collisions
697    let p_inbound_plan_id = inbound_plan_id;
698
699    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/cancellation", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
700    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
701
702    if let Some(ref user_agent) = configuration.user_agent {
703        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
704    }
705
706    let req = req_builder.build()?;
707    let resp = configuration.client.execute(req).await?;
708
709    let status = resp.status();
710    let content_type = resp
711        .headers()
712        .get("content-type")
713        .and_then(|v| v.to_str().ok())
714        .unwrap_or("application/octet-stream");
715    let content_type = super::ContentType::from(content_type);
716
717    if !status.is_client_error() && !status.is_server_error() {
718        let content = resp.text().await?;
719        match content_type {
720            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
721            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::CancelInboundPlanResponse`"))),
722            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::CancelInboundPlanResponse`")))),
723        }
724    } else {
725        let content = resp.text().await?;
726        let entity: Option<CancelInboundPlanError> = serde_json::from_str(&content).ok();
727        Err(Error::ResponseError(ResponseContent { status, content, entity }))
728    }
729}
730
731/// Cancels a self-ship appointment slot against a shipment. Only available in the following [marketplaces](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids): MX, BR, EG, SA, AE, IN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). 
732pub async fn cancel_self_ship_appointment(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, body: models::fulfillment_inbound_2024_03_20::CancelSelfShipAppointmentRequest) -> Result<models::fulfillment_inbound_2024_03_20::CancelSelfShipAppointmentResponse, Error<CancelSelfShipAppointmentError>> {
733    // add a prefix to parameters to efficiently prevent name collisions
734    let p_inbound_plan_id = inbound_plan_id;
735    let p_shipment_id = shipment_id;
736    let p_body = body;
737
738    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/selfShipAppointmentCancellation", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
739    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
740
741    if let Some(ref user_agent) = configuration.user_agent {
742        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
743    }
744    req_builder = req_builder.json(&p_body);
745
746    let req = req_builder.build()?;
747    let resp = configuration.client.execute(req).await?;
748
749    let status = resp.status();
750    let content_type = resp
751        .headers()
752        .get("content-type")
753        .and_then(|v| v.to_str().ok())
754        .unwrap_or("application/octet-stream");
755    let content_type = super::ContentType::from(content_type);
756
757    if !status.is_client_error() && !status.is_server_error() {
758        let content = resp.text().await?;
759        match content_type {
760            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
761            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::CancelSelfShipAppointmentResponse`"))),
762            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::CancelSelfShipAppointmentResponse`")))),
763        }
764    } else {
765        let content = resp.text().await?;
766        let entity: Option<CancelSelfShipAppointmentError> = serde_json::from_str(&content).ok();
767        Err(Error::ResponseError(ResponseContent { status, content, entity }))
768    }
769}
770
771/// Confirms the delivery window option for chosen shipment within an inbound plan. A placement option must be confirmed prior to use of this API. Once confirmed, new delivery window options cannot be generated, but the chosen delivery window option can be updated before shipment closure. The window is used to provide the expected time when a shipment will arrive at the warehouse. All transportation options which have the program `CONFIRMED_DELIVERY_WINDOW` require a delivery window to be confirmed prior to transportation option confirmation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
772pub async fn confirm_delivery_window_options(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, delivery_window_option_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::ConfirmDeliveryWindowOptionsResponse, Error<ConfirmDeliveryWindowOptionsError>> {
773    // add a prefix to parameters to efficiently prevent name collisions
774    let p_inbound_plan_id = inbound_plan_id;
775    let p_shipment_id = shipment_id;
776    let p_delivery_window_option_id = delivery_window_option_id;
777
778    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/deliveryWindowOptions/{deliveryWindowOptionId}/confirmation", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id), deliveryWindowOptionId=crate::apis::urlencode(p_delivery_window_option_id));
779    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
780
781    if let Some(ref user_agent) = configuration.user_agent {
782        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
783    }
784
785    let req = req_builder.build()?;
786    let resp = configuration.client.execute(req).await?;
787
788    let status = resp.status();
789    let content_type = resp
790        .headers()
791        .get("content-type")
792        .and_then(|v| v.to_str().ok())
793        .unwrap_or("application/octet-stream");
794    let content_type = super::ContentType::from(content_type);
795
796    if !status.is_client_error() && !status.is_server_error() {
797        let content = resp.text().await?;
798        match content_type {
799            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
800            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmDeliveryWindowOptionsResponse`"))),
801            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmDeliveryWindowOptionsResponse`")))),
802        }
803    } else {
804        let content = resp.text().await?;
805        let entity: Option<ConfirmDeliveryWindowOptionsError> = serde_json::from_str(&content).ok();
806        Err(Error::ResponseError(ResponseContent { status, content, entity }))
807    }
808}
809
810/// Confirms the packing option for an inbound plan.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
811pub async fn confirm_packing_option(configuration: &configuration::Configuration, inbound_plan_id: &str, packing_option_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::ConfirmPackingOptionResponse, Error<ConfirmPackingOptionError>> {
812    // add a prefix to parameters to efficiently prevent name collisions
813    let p_inbound_plan_id = inbound_plan_id;
814    let p_packing_option_id = packing_option_id;
815
816    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/packingOptions/{packingOptionId}/confirmation", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), packingOptionId=crate::apis::urlencode(p_packing_option_id));
817    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
818
819    if let Some(ref user_agent) = configuration.user_agent {
820        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
821    }
822
823    let req = req_builder.build()?;
824    let resp = configuration.client.execute(req).await?;
825
826    let status = resp.status();
827    let content_type = resp
828        .headers()
829        .get("content-type")
830        .and_then(|v| v.to_str().ok())
831        .unwrap_or("application/octet-stream");
832    let content_type = super::ContentType::from(content_type);
833
834    if !status.is_client_error() && !status.is_server_error() {
835        let content = resp.text().await?;
836        match content_type {
837            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
838            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmPackingOptionResponse`"))),
839            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmPackingOptionResponse`")))),
840        }
841    } else {
842        let content = resp.text().await?;
843        let entity: Option<ConfirmPackingOptionError> = serde_json::from_str(&content).ok();
844        Err(Error::ResponseError(ResponseContent { status, content, entity }))
845    }
846}
847
848/// Confirms the placement option for an inbound plan. Once confirmed, it cannot be changed for the Inbound Plan.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
849pub async fn confirm_placement_option(configuration: &configuration::Configuration, inbound_plan_id: &str, placement_option_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::ConfirmPlacementOptionResponse, Error<ConfirmPlacementOptionError>> {
850    // add a prefix to parameters to efficiently prevent name collisions
851    let p_inbound_plan_id = inbound_plan_id;
852    let p_placement_option_id = placement_option_id;
853
854    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/placementOptions/{placementOptionId}/confirmation", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), placementOptionId=crate::apis::urlencode(p_placement_option_id));
855    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
856
857    if let Some(ref user_agent) = configuration.user_agent {
858        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
859    }
860
861    let req = req_builder.build()?;
862    let resp = configuration.client.execute(req).await?;
863
864    let status = resp.status();
865    let content_type = resp
866        .headers()
867        .get("content-type")
868        .and_then(|v| v.to_str().ok())
869        .unwrap_or("application/octet-stream");
870    let content_type = super::ContentType::from(content_type);
871
872    if !status.is_client_error() && !status.is_server_error() {
873        let content = resp.text().await?;
874        match content_type {
875            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
876            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmPlacementOptionResponse`"))),
877            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmPlacementOptionResponse`")))),
878        }
879    } else {
880        let content = resp.text().await?;
881        let entity: Option<ConfirmPlacementOptionError> = serde_json::from_str(&content).ok();
882        Err(Error::ResponseError(ResponseContent { status, content, entity }))
883    }
884}
885
886/// Confirm a shipment content update preview and accept the changes in transportation cost.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
887pub async fn confirm_shipment_content_update_preview(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, content_update_preview_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::ConfirmShipmentContentUpdatePreviewResponse, Error<ConfirmShipmentContentUpdatePreviewError>> {
888    // add a prefix to parameters to efficiently prevent name collisions
889    let p_inbound_plan_id = inbound_plan_id;
890    let p_shipment_id = shipment_id;
891    let p_content_update_preview_id = content_update_preview_id;
892
893    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/contentUpdatePreviews/{contentUpdatePreviewId}/confirmation", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id), contentUpdatePreviewId=crate::apis::urlencode(p_content_update_preview_id));
894    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
895
896    if let Some(ref user_agent) = configuration.user_agent {
897        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
898    }
899
900    let req = req_builder.build()?;
901    let resp = configuration.client.execute(req).await?;
902
903    let status = resp.status();
904    let content_type = resp
905        .headers()
906        .get("content-type")
907        .and_then(|v| v.to_str().ok())
908        .unwrap_or("application/octet-stream");
909    let content_type = super::ContentType::from(content_type);
910
911    if !status.is_client_error() && !status.is_server_error() {
912        let content = resp.text().await?;
913        match content_type {
914            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
915            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmShipmentContentUpdatePreviewResponse`"))),
916            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmShipmentContentUpdatePreviewResponse`")))),
917        }
918    } else {
919        let content = resp.text().await?;
920        let entity: Option<ConfirmShipmentContentUpdatePreviewError> = serde_json::from_str(&content).ok();
921        Err(Error::ResponseError(ResponseContent { status, content, entity }))
922    }
923}
924
925/// Confirms all the transportation options for an inbound plan. A placement option must be confirmed prior to use of this API. Once confirmed, new transportation options can not be generated or confirmed for the Inbound Plan.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
926pub async fn confirm_transportation_options(configuration: &configuration::Configuration, inbound_plan_id: &str, body: models::fulfillment_inbound_2024_03_20::ConfirmTransportationOptionsRequest) -> Result<models::fulfillment_inbound_2024_03_20::ConfirmTransportationOptionsResponse, Error<ConfirmTransportationOptionsError>> {
927    // add a prefix to parameters to efficiently prevent name collisions
928    let p_inbound_plan_id = inbound_plan_id;
929    let p_body = body;
930
931    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/transportationOptions/confirmation", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
932    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
933
934    if let Some(ref user_agent) = configuration.user_agent {
935        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
936    }
937    req_builder = req_builder.json(&p_body);
938
939    let req = req_builder.build()?;
940    let resp = configuration.client.execute(req).await?;
941
942    let status = resp.status();
943    let content_type = resp
944        .headers()
945        .get("content-type")
946        .and_then(|v| v.to_str().ok())
947        .unwrap_or("application/octet-stream");
948    let content_type = super::ContentType::from(content_type);
949
950    if !status.is_client_error() && !status.is_server_error() {
951        let content = resp.text().await?;
952        match content_type {
953            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
954            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmTransportationOptionsResponse`"))),
955            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ConfirmTransportationOptionsResponse`")))),
956        }
957    } else {
958        let content = resp.text().await?;
959        let entity: Option<ConfirmTransportationOptionsError> = serde_json::from_str(&content).ok();
960        Err(Error::ResponseError(ResponseContent { status, content, entity }))
961    }
962}
963
964/// Creates an inbound plan. An inbound plan contains all the necessary information to send shipments into Amazon's fufillment network.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
965pub async fn create_inbound_plan(configuration: &configuration::Configuration, body: models::fulfillment_inbound_2024_03_20::CreateInboundPlanRequest) -> Result<models::fulfillment_inbound_2024_03_20::CreateInboundPlanResponse, Error<CreateInboundPlanError>> {
966    // add a prefix to parameters to efficiently prevent name collisions
967    let p_body = body;
968
969    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans", configuration.base_path);
970    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
971
972    if let Some(ref user_agent) = configuration.user_agent {
973        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
974    }
975    req_builder = req_builder.json(&p_body);
976
977    let req = req_builder.build()?;
978    let resp = configuration.client.execute(req).await?;
979
980    let status = resp.status();
981    let content_type = resp
982        .headers()
983        .get("content-type")
984        .and_then(|v| v.to_str().ok())
985        .unwrap_or("application/octet-stream");
986    let content_type = super::ContentType::from(content_type);
987
988    if !status.is_client_error() && !status.is_server_error() {
989        let content = resp.text().await?;
990        match content_type {
991            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
992            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::CreateInboundPlanResponse`"))),
993            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::CreateInboundPlanResponse`")))),
994        }
995    } else {
996        let content = resp.text().await?;
997        let entity: Option<CreateInboundPlanError> = serde_json::from_str(&content).ok();
998        Err(Error::ResponseError(ResponseContent { status, content, entity }))
999    }
1000}
1001
1002/// For a given marketplace - creates labels for a list of MSKUs.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1003pub async fn create_marketplace_item_labels(configuration: &configuration::Configuration, body: models::fulfillment_inbound_2024_03_20::CreateMarketplaceItemLabelsRequest) -> Result<models::fulfillment_inbound_2024_03_20::CreateMarketplaceItemLabelsResponse, Error<CreateMarketplaceItemLabelsError>> {
1004    // add a prefix to parameters to efficiently prevent name collisions
1005    let p_body = body;
1006
1007    let uri_str = format!("{}/inbound/fba/2024-03-20/items/labels", configuration.base_path);
1008    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1009
1010    if let Some(ref user_agent) = configuration.user_agent {
1011        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1012    }
1013    req_builder = req_builder.json(&p_body);
1014
1015    let req = req_builder.build()?;
1016    let resp = configuration.client.execute(req).await?;
1017
1018    let status = resp.status();
1019    let content_type = resp
1020        .headers()
1021        .get("content-type")
1022        .and_then(|v| v.to_str().ok())
1023        .unwrap_or("application/octet-stream");
1024    let content_type = super::ContentType::from(content_type);
1025
1026    if !status.is_client_error() && !status.is_server_error() {
1027        let content = resp.text().await?;
1028        match content_type {
1029            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1030            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::CreateMarketplaceItemLabelsResponse`"))),
1031            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::CreateMarketplaceItemLabelsResponse`")))),
1032        }
1033    } else {
1034        let content = resp.text().await?;
1035        let entity: Option<CreateMarketplaceItemLabelsError> = serde_json::from_str(&content).ok();
1036        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1037    }
1038}
1039
1040/// Generates available delivery window options for a given shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1041pub async fn generate_delivery_window_options(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::GenerateDeliveryWindowOptionsResponse, Error<GenerateDeliveryWindowOptionsError>> {
1042    // add a prefix to parameters to efficiently prevent name collisions
1043    let p_inbound_plan_id = inbound_plan_id;
1044    let p_shipment_id = shipment_id;
1045
1046    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/deliveryWindowOptions", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
1047    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1048
1049    if let Some(ref user_agent) = configuration.user_agent {
1050        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1051    }
1052
1053    let req = req_builder.build()?;
1054    let resp = configuration.client.execute(req).await?;
1055
1056    let status = resp.status();
1057    let content_type = resp
1058        .headers()
1059        .get("content-type")
1060        .and_then(|v| v.to_str().ok())
1061        .unwrap_or("application/octet-stream");
1062    let content_type = super::ContentType::from(content_type);
1063
1064    if !status.is_client_error() && !status.is_server_error() {
1065        let content = resp.text().await?;
1066        match content_type {
1067            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1068            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GenerateDeliveryWindowOptionsResponse`"))),
1069            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GenerateDeliveryWindowOptionsResponse`")))),
1070        }
1071    } else {
1072        let content = resp.text().await?;
1073        let entity: Option<GenerateDeliveryWindowOptionsError> = serde_json::from_str(&content).ok();
1074        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1075    }
1076}
1077
1078/// Generates available packing options for the inbound plan.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1079pub async fn generate_packing_options(configuration: &configuration::Configuration, inbound_plan_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::GeneratePackingOptionsResponse, Error<GeneratePackingOptionsError>> {
1080    // add a prefix to parameters to efficiently prevent name collisions
1081    let p_inbound_plan_id = inbound_plan_id;
1082
1083    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/packingOptions", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
1084    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1085
1086    if let Some(ref user_agent) = configuration.user_agent {
1087        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1088    }
1089
1090    let req = req_builder.build()?;
1091    let resp = configuration.client.execute(req).await?;
1092
1093    let status = resp.status();
1094    let content_type = resp
1095        .headers()
1096        .get("content-type")
1097        .and_then(|v| v.to_str().ok())
1098        .unwrap_or("application/octet-stream");
1099    let content_type = super::ContentType::from(content_type);
1100
1101    if !status.is_client_error() && !status.is_server_error() {
1102        let content = resp.text().await?;
1103        match content_type {
1104            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1105            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GeneratePackingOptionsResponse`"))),
1106            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GeneratePackingOptionsResponse`")))),
1107        }
1108    } else {
1109        let content = resp.text().await?;
1110        let entity: Option<GeneratePackingOptionsError> = serde_json::from_str(&content).ok();
1111        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1112    }
1113}
1114
1115/// Generates placement options for the inbound plan.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1116pub async fn generate_placement_options(configuration: &configuration::Configuration, inbound_plan_id: &str, body: models::fulfillment_inbound_2024_03_20::GeneratePlacementOptionsRequest) -> Result<models::fulfillment_inbound_2024_03_20::GeneratePlacementOptionsResponse, Error<GeneratePlacementOptionsError>> {
1117    // add a prefix to parameters to efficiently prevent name collisions
1118    let p_inbound_plan_id = inbound_plan_id;
1119    let p_body = body;
1120
1121    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/placementOptions", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
1122    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1123
1124    if let Some(ref user_agent) = configuration.user_agent {
1125        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1126    }
1127    req_builder = req_builder.json(&p_body);
1128
1129    let req = req_builder.build()?;
1130    let resp = configuration.client.execute(req).await?;
1131
1132    let status = resp.status();
1133    let content_type = resp
1134        .headers()
1135        .get("content-type")
1136        .and_then(|v| v.to_str().ok())
1137        .unwrap_or("application/octet-stream");
1138    let content_type = super::ContentType::from(content_type);
1139
1140    if !status.is_client_error() && !status.is_server_error() {
1141        let content = resp.text().await?;
1142        match content_type {
1143            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1144            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GeneratePlacementOptionsResponse`"))),
1145            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GeneratePlacementOptionsResponse`")))),
1146        }
1147    } else {
1148        let content = resp.text().await?;
1149        let entity: Option<GeneratePlacementOptionsError> = serde_json::from_str(&content).ok();
1150        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1151    }
1152}
1153
1154/// Initiates the process of generating the appointment slots list. Only available in the following [marketplaces](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids): MX, BR, EG, SA, AE, IN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). 
1155pub async fn generate_self_ship_appointment_slots(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, body: models::fulfillment_inbound_2024_03_20::GenerateSelfShipAppointmentSlotsRequest) -> Result<models::fulfillment_inbound_2024_03_20::GenerateSelfShipAppointmentSlotsResponse, Error<GenerateSelfShipAppointmentSlotsError>> {
1156    // add a prefix to parameters to efficiently prevent name collisions
1157    let p_inbound_plan_id = inbound_plan_id;
1158    let p_shipment_id = shipment_id;
1159    let p_body = body;
1160
1161    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/selfShipAppointmentSlots", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
1162    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1163
1164    if let Some(ref user_agent) = configuration.user_agent {
1165        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1166    }
1167    req_builder = req_builder.json(&p_body);
1168
1169    let req = req_builder.build()?;
1170    let resp = configuration.client.execute(req).await?;
1171
1172    let status = resp.status();
1173    let content_type = resp
1174        .headers()
1175        .get("content-type")
1176        .and_then(|v| v.to_str().ok())
1177        .unwrap_or("application/octet-stream");
1178    let content_type = super::ContentType::from(content_type);
1179
1180    if !status.is_client_error() && !status.is_server_error() {
1181        let content = resp.text().await?;
1182        match content_type {
1183            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1184            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GenerateSelfShipAppointmentSlotsResponse`"))),
1185            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GenerateSelfShipAppointmentSlotsResponse`")))),
1186        }
1187    } else {
1188        let content = resp.text().await?;
1189        let entity: Option<GenerateSelfShipAppointmentSlotsError> = serde_json::from_str(&content).ok();
1190        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1191    }
1192}
1193
1194/// Generate a shipment content update preview given a set of intended boxes and/or items for a shipment with a confirmed carrier. The shipment content update preview will be viewable with the updated costs and contents prior to confirmation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1195pub async fn generate_shipment_content_update_previews(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, body: models::fulfillment_inbound_2024_03_20::GenerateShipmentContentUpdatePreviewsRequest) -> Result<models::fulfillment_inbound_2024_03_20::GenerateShipmentContentUpdatePreviewsResponse, Error<GenerateShipmentContentUpdatePreviewsError>> {
1196    // add a prefix to parameters to efficiently prevent name collisions
1197    let p_inbound_plan_id = inbound_plan_id;
1198    let p_shipment_id = shipment_id;
1199    let p_body = body;
1200
1201    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/contentUpdatePreviews", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
1202    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1203
1204    if let Some(ref user_agent) = configuration.user_agent {
1205        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1206    }
1207    req_builder = req_builder.json(&p_body);
1208
1209    let req = req_builder.build()?;
1210    let resp = configuration.client.execute(req).await?;
1211
1212    let status = resp.status();
1213    let content_type = resp
1214        .headers()
1215        .get("content-type")
1216        .and_then(|v| v.to_str().ok())
1217        .unwrap_or("application/octet-stream");
1218    let content_type = super::ContentType::from(content_type);
1219
1220    if !status.is_client_error() && !status.is_server_error() {
1221        let content = resp.text().await?;
1222        match content_type {
1223            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1224            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GenerateShipmentContentUpdatePreviewsResponse`"))),
1225            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GenerateShipmentContentUpdatePreviewsResponse`")))),
1226        }
1227    } else {
1228        let content = resp.text().await?;
1229        let entity: Option<GenerateShipmentContentUpdatePreviewsError> = serde_json::from_str(&content).ok();
1230        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1231    }
1232}
1233
1234/// Generates available transportation options for a given placement option.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1235pub async fn generate_transportation_options(configuration: &configuration::Configuration, inbound_plan_id: &str, body: models::fulfillment_inbound_2024_03_20::GenerateTransportationOptionsRequest) -> Result<models::fulfillment_inbound_2024_03_20::GenerateTransportationOptionsResponse, Error<GenerateTransportationOptionsError>> {
1236    // add a prefix to parameters to efficiently prevent name collisions
1237    let p_inbound_plan_id = inbound_plan_id;
1238    let p_body = body;
1239
1240    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/transportationOptions", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
1241    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1242
1243    if let Some(ref user_agent) = configuration.user_agent {
1244        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1245    }
1246    req_builder = req_builder.json(&p_body);
1247
1248    let req = req_builder.build()?;
1249    let resp = configuration.client.execute(req).await?;
1250
1251    let status = resp.status();
1252    let content_type = resp
1253        .headers()
1254        .get("content-type")
1255        .and_then(|v| v.to_str().ok())
1256        .unwrap_or("application/octet-stream");
1257    let content_type = super::ContentType::from(content_type);
1258
1259    if !status.is_client_error() && !status.is_server_error() {
1260        let content = resp.text().await?;
1261        match content_type {
1262            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1263            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GenerateTransportationOptionsResponse`"))),
1264            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GenerateTransportationOptionsResponse`")))),
1265        }
1266    } else {
1267        let content = resp.text().await?;
1268        let entity: Option<GenerateTransportationOptionsError> = serde_json::from_str(&content).ok();
1269        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1270    }
1271}
1272
1273/// Provide delivery challan document for PCP transportation in IN marketplace.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1274pub async fn get_delivery_challan_document(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::GetDeliveryChallanDocumentResponse, Error<GetDeliveryChallanDocumentError>> {
1275    // add a prefix to parameters to efficiently prevent name collisions
1276    let p_inbound_plan_id = inbound_plan_id;
1277    let p_shipment_id = shipment_id;
1278
1279    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/deliveryChallanDocument", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
1280    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1281
1282    if let Some(ref user_agent) = configuration.user_agent {
1283        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1284    }
1285
1286    let req = req_builder.build()?;
1287    let resp = configuration.client.execute(req).await?;
1288
1289    let status = resp.status();
1290    let content_type = resp
1291        .headers()
1292        .get("content-type")
1293        .and_then(|v| v.to_str().ok())
1294        .unwrap_or("application/octet-stream");
1295    let content_type = super::ContentType::from(content_type);
1296
1297    if !status.is_client_error() && !status.is_server_error() {
1298        let content = resp.text().await?;
1299        match content_type {
1300            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1301            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GetDeliveryChallanDocumentResponse`"))),
1302            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GetDeliveryChallanDocumentResponse`")))),
1303        }
1304    } else {
1305        let content = resp.text().await?;
1306        let entity: Option<GetDeliveryChallanDocumentError> = serde_json::from_str(&content).ok();
1307        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1308    }
1309}
1310
1311/// Gets the status of the processing of an asynchronous API call.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1312pub async fn get_inbound_operation_status(configuration: &configuration::Configuration, operation_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::InboundOperationStatus, Error<GetInboundOperationStatusError>> {
1313    // add a prefix to parameters to efficiently prevent name collisions
1314    let p_operation_id = operation_id;
1315
1316    let uri_str = format!("{}/inbound/fba/2024-03-20/operations/{operationId}", configuration.base_path, operationId=crate::apis::urlencode(p_operation_id));
1317    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1318
1319    if let Some(ref user_agent) = configuration.user_agent {
1320        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1321    }
1322
1323    let req = req_builder.build()?;
1324    let resp = configuration.client.execute(req).await?;
1325
1326    let status = resp.status();
1327    let content_type = resp
1328        .headers()
1329        .get("content-type")
1330        .and_then(|v| v.to_str().ok())
1331        .unwrap_or("application/octet-stream");
1332    let content_type = super::ContentType::from(content_type);
1333
1334    if !status.is_client_error() && !status.is_server_error() {
1335        let content = resp.text().await?;
1336        match content_type {
1337            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1338            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::InboundOperationStatus`"))),
1339            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::InboundOperationStatus`")))),
1340        }
1341    } else {
1342        let content = resp.text().await?;
1343        let entity: Option<GetInboundOperationStatusError> = serde_json::from_str(&content).ok();
1344        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1345    }
1346}
1347
1348/// Fetches the top level information about an inbound plan.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1349pub async fn get_inbound_plan(configuration: &configuration::Configuration, inbound_plan_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::InboundPlan, Error<GetInboundPlanError>> {
1350    // add a prefix to parameters to efficiently prevent name collisions
1351    let p_inbound_plan_id = inbound_plan_id;
1352
1353    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
1354    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1355
1356    if let Some(ref user_agent) = configuration.user_agent {
1357        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1358    }
1359
1360    let req = req_builder.build()?;
1361    let resp = configuration.client.execute(req).await?;
1362
1363    let status = resp.status();
1364    let content_type = resp
1365        .headers()
1366        .get("content-type")
1367        .and_then(|v| v.to_str().ok())
1368        .unwrap_or("application/octet-stream");
1369    let content_type = super::ContentType::from(content_type);
1370
1371    if !status.is_client_error() && !status.is_server_error() {
1372        let content = resp.text().await?;
1373        match content_type {
1374            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1375            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::InboundPlan`"))),
1376            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::InboundPlan`")))),
1377        }
1378    } else {
1379        let content = resp.text().await?;
1380        let entity: Option<GetInboundPlanError> = serde_json::from_str(&content).ok();
1381        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1382    }
1383}
1384
1385/// Retrieves a list of available self-ship appointment slots used to drop off a shipment at a warehouse. Only available in the following [marketplaces](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids): MX, BR, EG, SA, AE, IN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). 
1386pub async fn get_self_ship_appointment_slots(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::GetSelfShipAppointmentSlotsResponse, Error<GetSelfShipAppointmentSlotsError>> {
1387    // add a prefix to parameters to efficiently prevent name collisions
1388    let p_inbound_plan_id = inbound_plan_id;
1389    let p_shipment_id = shipment_id;
1390    let p_page_size = page_size;
1391    let p_pagination_token = pagination_token;
1392
1393    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/selfShipAppointmentSlots", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
1394    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1395
1396    if let Some(ref param_value) = p_page_size {
1397        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1398    }
1399    if let Some(ref param_value) = p_pagination_token {
1400        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1401    }
1402    if let Some(ref user_agent) = configuration.user_agent {
1403        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1404    }
1405
1406    let req = req_builder.build()?;
1407    let resp = configuration.client.execute(req).await?;
1408
1409    let status = resp.status();
1410    let content_type = resp
1411        .headers()
1412        .get("content-type")
1413        .and_then(|v| v.to_str().ok())
1414        .unwrap_or("application/octet-stream");
1415    let content_type = super::ContentType::from(content_type);
1416
1417    if !status.is_client_error() && !status.is_server_error() {
1418        let content = resp.text().await?;
1419        match content_type {
1420            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1421            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GetSelfShipAppointmentSlotsResponse`"))),
1422            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::GetSelfShipAppointmentSlotsResponse`")))),
1423        }
1424    } else {
1425        let content = resp.text().await?;
1426        let entity: Option<GetSelfShipAppointmentSlotsError> = serde_json::from_str(&content).ok();
1427        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1428    }
1429}
1430
1431/// Provides the full details for a specific shipment within an inbound plan. The `transportationOptionId` inside `acceptedTransportationSelection` can be used to retrieve the transportation details for the shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1432pub async fn get_shipment(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::Shipment, Error<GetShipmentError>> {
1433    // add a prefix to parameters to efficiently prevent name collisions
1434    let p_inbound_plan_id = inbound_plan_id;
1435    let p_shipment_id = shipment_id;
1436
1437    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
1438    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1439
1440    if let Some(ref user_agent) = configuration.user_agent {
1441        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1442    }
1443
1444    let req = req_builder.build()?;
1445    let resp = configuration.client.execute(req).await?;
1446
1447    let status = resp.status();
1448    let content_type = resp
1449        .headers()
1450        .get("content-type")
1451        .and_then(|v| v.to_str().ok())
1452        .unwrap_or("application/octet-stream");
1453    let content_type = super::ContentType::from(content_type);
1454
1455    if !status.is_client_error() && !status.is_server_error() {
1456        let content = resp.text().await?;
1457        match content_type {
1458            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1459            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::Shipment`"))),
1460            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::Shipment`")))),
1461        }
1462    } else {
1463        let content = resp.text().await?;
1464        let entity: Option<GetShipmentError> = serde_json::from_str(&content).ok();
1465        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1466    }
1467}
1468
1469/// Retrieve a shipment content update preview which provides a summary of the requested shipment content changes along with the transportation cost implications of the change that can only be confirmed prior to the expiry date specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1470pub async fn get_shipment_content_update_preview(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, content_update_preview_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::ContentUpdatePreview, Error<GetShipmentContentUpdatePreviewError>> {
1471    // add a prefix to parameters to efficiently prevent name collisions
1472    let p_inbound_plan_id = inbound_plan_id;
1473    let p_shipment_id = shipment_id;
1474    let p_content_update_preview_id = content_update_preview_id;
1475
1476    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/contentUpdatePreviews/{contentUpdatePreviewId}", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id), contentUpdatePreviewId=crate::apis::urlencode(p_content_update_preview_id));
1477    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1478
1479    if let Some(ref user_agent) = configuration.user_agent {
1480        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1481    }
1482
1483    let req = req_builder.build()?;
1484    let resp = configuration.client.execute(req).await?;
1485
1486    let status = resp.status();
1487    let content_type = resp
1488        .headers()
1489        .get("content-type")
1490        .and_then(|v| v.to_str().ok())
1491        .unwrap_or("application/octet-stream");
1492    let content_type = super::ContentType::from(content_type);
1493
1494    if !status.is_client_error() && !status.is_server_error() {
1495        let content = resp.text().await?;
1496        match content_type {
1497            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1498            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ContentUpdatePreview`"))),
1499            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ContentUpdatePreview`")))),
1500        }
1501    } else {
1502        let content = resp.text().await?;
1503        let entity: Option<GetShipmentContentUpdatePreviewError> = serde_json::from_str(&content).ok();
1504        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1505    }
1506}
1507
1508/// Retrieves all delivery window options for a shipment. Delivery window options must first be generated by the `generateDeliveryWindowOptions` operation before becoming available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1509pub async fn list_delivery_window_options(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListDeliveryWindowOptionsResponse, Error<ListDeliveryWindowOptionsError>> {
1510    // add a prefix to parameters to efficiently prevent name collisions
1511    let p_inbound_plan_id = inbound_plan_id;
1512    let p_shipment_id = shipment_id;
1513    let p_page_size = page_size;
1514    let p_pagination_token = pagination_token;
1515
1516    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/deliveryWindowOptions", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
1517    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1518
1519    if let Some(ref param_value) = p_page_size {
1520        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1521    }
1522    if let Some(ref param_value) = p_pagination_token {
1523        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1524    }
1525    if let Some(ref user_agent) = configuration.user_agent {
1526        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1527    }
1528
1529    let req = req_builder.build()?;
1530    let resp = configuration.client.execute(req).await?;
1531
1532    let status = resp.status();
1533    let content_type = resp
1534        .headers()
1535        .get("content-type")
1536        .and_then(|v| v.to_str().ok())
1537        .unwrap_or("application/octet-stream");
1538    let content_type = super::ContentType::from(content_type);
1539
1540    if !status.is_client_error() && !status.is_server_error() {
1541        let content = resp.text().await?;
1542        match content_type {
1543            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1544            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListDeliveryWindowOptionsResponse`"))),
1545            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListDeliveryWindowOptionsResponse`")))),
1546        }
1547    } else {
1548        let content = resp.text().await?;
1549        let entity: Option<ListDeliveryWindowOptionsError> = serde_json::from_str(&content).ok();
1550        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1551    }
1552}
1553
1554/// Provides a paginated list of box packages in an inbound plan.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1555pub async fn list_inbound_plan_boxes(configuration: &configuration::Configuration, inbound_plan_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListInboundPlanBoxesResponse, Error<ListInboundPlanBoxesError>> {
1556    // add a prefix to parameters to efficiently prevent name collisions
1557    let p_inbound_plan_id = inbound_plan_id;
1558    let p_page_size = page_size;
1559    let p_pagination_token = pagination_token;
1560
1561    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/boxes", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
1562    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1563
1564    if let Some(ref param_value) = p_page_size {
1565        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1566    }
1567    if let Some(ref param_value) = p_pagination_token {
1568        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1569    }
1570    if let Some(ref user_agent) = configuration.user_agent {
1571        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1572    }
1573
1574    let req = req_builder.build()?;
1575    let resp = configuration.client.execute(req).await?;
1576
1577    let status = resp.status();
1578    let content_type = resp
1579        .headers()
1580        .get("content-type")
1581        .and_then(|v| v.to_str().ok())
1582        .unwrap_or("application/octet-stream");
1583    let content_type = super::ContentType::from(content_type);
1584
1585    if !status.is_client_error() && !status.is_server_error() {
1586        let content = resp.text().await?;
1587        match content_type {
1588            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1589            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListInboundPlanBoxesResponse`"))),
1590            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListInboundPlanBoxesResponse`")))),
1591        }
1592    } else {
1593        let content = resp.text().await?;
1594        let entity: Option<ListInboundPlanBoxesError> = serde_json::from_str(&content).ok();
1595        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1596    }
1597}
1598
1599/// Provides a paginated list of item packages in an inbound plan.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1600pub async fn list_inbound_plan_items(configuration: &configuration::Configuration, inbound_plan_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListInboundPlanItemsResponse, Error<ListInboundPlanItemsError>> {
1601    // add a prefix to parameters to efficiently prevent name collisions
1602    let p_inbound_plan_id = inbound_plan_id;
1603    let p_page_size = page_size;
1604    let p_pagination_token = pagination_token;
1605
1606    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/items", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
1607    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1608
1609    if let Some(ref param_value) = p_page_size {
1610        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1611    }
1612    if let Some(ref param_value) = p_pagination_token {
1613        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1614    }
1615    if let Some(ref user_agent) = configuration.user_agent {
1616        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1617    }
1618
1619    let req = req_builder.build()?;
1620    let resp = configuration.client.execute(req).await?;
1621
1622    let status = resp.status();
1623    let content_type = resp
1624        .headers()
1625        .get("content-type")
1626        .and_then(|v| v.to_str().ok())
1627        .unwrap_or("application/octet-stream");
1628    let content_type = super::ContentType::from(content_type);
1629
1630    if !status.is_client_error() && !status.is_server_error() {
1631        let content = resp.text().await?;
1632        match content_type {
1633            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1634            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListInboundPlanItemsResponse`"))),
1635            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListInboundPlanItemsResponse`")))),
1636        }
1637    } else {
1638        let content = resp.text().await?;
1639        let entity: Option<ListInboundPlanItemsError> = serde_json::from_str(&content).ok();
1640        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1641    }
1642}
1643
1644/// Provides a paginated list of pallet packages in an inbound plan. An inbound plan will have pallets when the related details are provided after generating Less-Than-Truckload (LTL) carrier shipments.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1645pub async fn list_inbound_plan_pallets(configuration: &configuration::Configuration, inbound_plan_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListInboundPlanPalletsResponse, Error<ListInboundPlanPalletsError>> {
1646    // add a prefix to parameters to efficiently prevent name collisions
1647    let p_inbound_plan_id = inbound_plan_id;
1648    let p_page_size = page_size;
1649    let p_pagination_token = pagination_token;
1650
1651    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/pallets", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
1652    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1653
1654    if let Some(ref param_value) = p_page_size {
1655        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1656    }
1657    if let Some(ref param_value) = p_pagination_token {
1658        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1659    }
1660    if let Some(ref user_agent) = configuration.user_agent {
1661        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1662    }
1663
1664    let req = req_builder.build()?;
1665    let resp = configuration.client.execute(req).await?;
1666
1667    let status = resp.status();
1668    let content_type = resp
1669        .headers()
1670        .get("content-type")
1671        .and_then(|v| v.to_str().ok())
1672        .unwrap_or("application/octet-stream");
1673    let content_type = super::ContentType::from(content_type);
1674
1675    if !status.is_client_error() && !status.is_server_error() {
1676        let content = resp.text().await?;
1677        match content_type {
1678            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1679            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListInboundPlanPalletsResponse`"))),
1680            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListInboundPlanPalletsResponse`")))),
1681        }
1682    } else {
1683        let content = resp.text().await?;
1684        let entity: Option<ListInboundPlanPalletsError> = serde_json::from_str(&content).ok();
1685        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1686    }
1687}
1688
1689/// Provides a list of inbound plans with minimal information.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1690pub async fn list_inbound_plans(configuration: &configuration::Configuration, page_size: Option<i32>, pagination_token: Option<&str>, status: Option<&str>, sort_by: Option<&str>, sort_order: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListInboundPlansResponse, Error<ListInboundPlansError>> {
1691    // add a prefix to parameters to efficiently prevent name collisions
1692    let p_page_size = page_size;
1693    let p_pagination_token = pagination_token;
1694    let p_status = status;
1695    let p_sort_by = sort_by;
1696    let p_sort_order = sort_order;
1697
1698    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans", configuration.base_path);
1699    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1700
1701    if let Some(ref param_value) = p_page_size {
1702        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1703    }
1704    if let Some(ref param_value) = p_pagination_token {
1705        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1706    }
1707    if let Some(ref param_value) = p_status {
1708        req_builder = req_builder.query(&[("status", &param_value.to_string())]);
1709    }
1710    if let Some(ref param_value) = p_sort_by {
1711        req_builder = req_builder.query(&[("sortBy", &param_value.to_string())]);
1712    }
1713    if let Some(ref param_value) = p_sort_order {
1714        req_builder = req_builder.query(&[("sortOrder", &param_value.to_string())]);
1715    }
1716    if let Some(ref user_agent) = configuration.user_agent {
1717        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1718    }
1719
1720    let req = req_builder.build()?;
1721    let resp = configuration.client.execute(req).await?;
1722
1723    let status = resp.status();
1724    let content_type = resp
1725        .headers()
1726        .get("content-type")
1727        .and_then(|v| v.to_str().ok())
1728        .unwrap_or("application/octet-stream");
1729    let content_type = super::ContentType::from(content_type);
1730
1731    if !status.is_client_error() && !status.is_server_error() {
1732        let content = resp.text().await?;
1733        match content_type {
1734            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1735            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListInboundPlansResponse`"))),
1736            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListInboundPlansResponse`")))),
1737        }
1738    } else {
1739        let content = resp.text().await?;
1740        let entity: Option<ListInboundPlansError> = serde_json::from_str(&content).ok();
1741        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1742    }
1743}
1744
1745/// List the inbound compliance details for MSKUs in a given marketplace.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1746pub async fn list_item_compliance_details(configuration: &configuration::Configuration, mskus: Vec<String>, marketplace_id: &str) -> Result<models::fulfillment_inbound_2024_03_20::ListItemComplianceDetailsResponse, Error<ListItemComplianceDetailsError>> {
1747    // add a prefix to parameters to efficiently prevent name collisions
1748    let p_mskus = mskus;
1749    let p_marketplace_id = marketplace_id;
1750
1751    let uri_str = format!("{}/inbound/fba/2024-03-20/items/compliance", configuration.base_path);
1752    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1753
1754    req_builder = match "multi" {
1755        "multi" => req_builder.query(&p_mskus.into_iter().map(|p| ("mskus".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
1756        _ => req_builder.query(&[("mskus", &p_mskus.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
1757    };
1758    req_builder = req_builder.query(&[("marketplaceId", &p_marketplace_id.to_string())]);
1759    if let Some(ref user_agent) = configuration.user_agent {
1760        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1761    }
1762
1763    let req = req_builder.build()?;
1764    let resp = configuration.client.execute(req).await?;
1765
1766    let status = resp.status();
1767    let content_type = resp
1768        .headers()
1769        .get("content-type")
1770        .and_then(|v| v.to_str().ok())
1771        .unwrap_or("application/octet-stream");
1772    let content_type = super::ContentType::from(content_type);
1773
1774    if !status.is_client_error() && !status.is_server_error() {
1775        let content = resp.text().await?;
1776        match content_type {
1777            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1778            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListItemComplianceDetailsResponse`"))),
1779            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListItemComplianceDetailsResponse`")))),
1780        }
1781    } else {
1782        let content = resp.text().await?;
1783        let entity: Option<ListItemComplianceDetailsError> = serde_json::from_str(&content).ok();
1784        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1785    }
1786}
1787
1788/// Retrieves a page of boxes from a given packing group. These boxes were previously provided through the `setPackingInformation` operation. This API is used for workflows where boxes are packed before Amazon determines shipment splits.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1789pub async fn list_packing_group_boxes(configuration: &configuration::Configuration, inbound_plan_id: &str, packing_group_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListPackingGroupBoxesResponse, Error<ListPackingGroupBoxesError>> {
1790    // add a prefix to parameters to efficiently prevent name collisions
1791    let p_inbound_plan_id = inbound_plan_id;
1792    let p_packing_group_id = packing_group_id;
1793    let p_page_size = page_size;
1794    let p_pagination_token = pagination_token;
1795
1796    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/packingGroups/{packingGroupId}/boxes", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), packingGroupId=crate::apis::urlencode(p_packing_group_id));
1797    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1798
1799    if let Some(ref param_value) = p_page_size {
1800        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1801    }
1802    if let Some(ref param_value) = p_pagination_token {
1803        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1804    }
1805    if let Some(ref user_agent) = configuration.user_agent {
1806        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1807    }
1808
1809    let req = req_builder.build()?;
1810    let resp = configuration.client.execute(req).await?;
1811
1812    let status = resp.status();
1813    let content_type = resp
1814        .headers()
1815        .get("content-type")
1816        .and_then(|v| v.to_str().ok())
1817        .unwrap_or("application/octet-stream");
1818    let content_type = super::ContentType::from(content_type);
1819
1820    if !status.is_client_error() && !status.is_server_error() {
1821        let content = resp.text().await?;
1822        match content_type {
1823            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1824            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPackingGroupBoxesResponse`"))),
1825            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPackingGroupBoxesResponse`")))),
1826        }
1827    } else {
1828        let content = resp.text().await?;
1829        let entity: Option<ListPackingGroupBoxesError> = serde_json::from_str(&content).ok();
1830        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1831    }
1832}
1833
1834/// Retrieves a page of items in a given packing group. Packing options must first be generated by the corresponding operation before packing group items can be listed.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1835pub async fn list_packing_group_items(configuration: &configuration::Configuration, inbound_plan_id: &str, packing_group_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListPackingGroupItemsResponse, Error<ListPackingGroupItemsError>> {
1836    // add a prefix to parameters to efficiently prevent name collisions
1837    let p_inbound_plan_id = inbound_plan_id;
1838    let p_packing_group_id = packing_group_id;
1839    let p_page_size = page_size;
1840    let p_pagination_token = pagination_token;
1841
1842    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/packingGroups/{packingGroupId}/items", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), packingGroupId=crate::apis::urlencode(p_packing_group_id));
1843    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1844
1845    if let Some(ref param_value) = p_page_size {
1846        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1847    }
1848    if let Some(ref param_value) = p_pagination_token {
1849        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1850    }
1851    if let Some(ref user_agent) = configuration.user_agent {
1852        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1853    }
1854
1855    let req = req_builder.build()?;
1856    let resp = configuration.client.execute(req).await?;
1857
1858    let status = resp.status();
1859    let content_type = resp
1860        .headers()
1861        .get("content-type")
1862        .and_then(|v| v.to_str().ok())
1863        .unwrap_or("application/octet-stream");
1864    let content_type = super::ContentType::from(content_type);
1865
1866    if !status.is_client_error() && !status.is_server_error() {
1867        let content = resp.text().await?;
1868        match content_type {
1869            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1870            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPackingGroupItemsResponse`"))),
1871            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPackingGroupItemsResponse`")))),
1872        }
1873    } else {
1874        let content = resp.text().await?;
1875        let entity: Option<ListPackingGroupItemsError> = serde_json::from_str(&content).ok();
1876        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1877    }
1878}
1879
1880/// Retrieves a list of all packing options for an inbound plan. Packing options must first be generated by the corresponding operation before becoming available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1881pub async fn list_packing_options(configuration: &configuration::Configuration, inbound_plan_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListPackingOptionsResponse, Error<ListPackingOptionsError>> {
1882    // add a prefix to parameters to efficiently prevent name collisions
1883    let p_inbound_plan_id = inbound_plan_id;
1884    let p_page_size = page_size;
1885    let p_pagination_token = pagination_token;
1886
1887    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/packingOptions", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
1888    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1889
1890    if let Some(ref param_value) = p_page_size {
1891        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1892    }
1893    if let Some(ref param_value) = p_pagination_token {
1894        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1895    }
1896    if let Some(ref user_agent) = configuration.user_agent {
1897        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1898    }
1899
1900    let req = req_builder.build()?;
1901    let resp = configuration.client.execute(req).await?;
1902
1903    let status = resp.status();
1904    let content_type = resp
1905        .headers()
1906        .get("content-type")
1907        .and_then(|v| v.to_str().ok())
1908        .unwrap_or("application/octet-stream");
1909    let content_type = super::ContentType::from(content_type);
1910
1911    if !status.is_client_error() && !status.is_server_error() {
1912        let content = resp.text().await?;
1913        match content_type {
1914            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1915            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPackingOptionsResponse`"))),
1916            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPackingOptionsResponse`")))),
1917        }
1918    } else {
1919        let content = resp.text().await?;
1920        let entity: Option<ListPackingOptionsError> = serde_json::from_str(&content).ok();
1921        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1922    }
1923}
1924
1925/// Provides a list of all placement options for an inbound plan. Placement options must first be generated by the corresponding operation before becoming available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1926pub async fn list_placement_options(configuration: &configuration::Configuration, inbound_plan_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListPlacementOptionsResponse, Error<ListPlacementOptionsError>> {
1927    // add a prefix to parameters to efficiently prevent name collisions
1928    let p_inbound_plan_id = inbound_plan_id;
1929    let p_page_size = page_size;
1930    let p_pagination_token = pagination_token;
1931
1932    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/placementOptions", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
1933    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1934
1935    if let Some(ref param_value) = p_page_size {
1936        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
1937    }
1938    if let Some(ref param_value) = p_pagination_token {
1939        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
1940    }
1941    if let Some(ref user_agent) = configuration.user_agent {
1942        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1943    }
1944
1945    let req = req_builder.build()?;
1946    let resp = configuration.client.execute(req).await?;
1947
1948    let status = resp.status();
1949    let content_type = resp
1950        .headers()
1951        .get("content-type")
1952        .and_then(|v| v.to_str().ok())
1953        .unwrap_or("application/octet-stream");
1954    let content_type = super::ContentType::from(content_type);
1955
1956    if !status.is_client_error() && !status.is_server_error() {
1957        let content = resp.text().await?;
1958        match content_type {
1959            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1960            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPlacementOptionsResponse`"))),
1961            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPlacementOptionsResponse`")))),
1962        }
1963    } else {
1964        let content = resp.text().await?;
1965        let entity: Option<ListPlacementOptionsError> = serde_json::from_str(&content).ok();
1966        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1967    }
1968}
1969
1970/// Get preparation details for a list of MSKUs in a specified marketplace.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
1971pub async fn list_prep_details(configuration: &configuration::Configuration, marketplace_id: &str, mskus: Vec<String>) -> Result<models::fulfillment_inbound_2024_03_20::ListPrepDetailsResponse, Error<ListPrepDetailsError>> {
1972    // add a prefix to parameters to efficiently prevent name collisions
1973    let p_marketplace_id = marketplace_id;
1974    let p_mskus = mskus;
1975
1976    let uri_str = format!("{}/inbound/fba/2024-03-20/items/prepDetails", configuration.base_path);
1977    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1978
1979    req_builder = req_builder.query(&[("marketplaceId", &p_marketplace_id.to_string())]);
1980    req_builder = match "multi" {
1981        "multi" => req_builder.query(&p_mskus.into_iter().map(|p| ("mskus".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
1982        _ => req_builder.query(&[("mskus", &p_mskus.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
1983    };
1984    if let Some(ref user_agent) = configuration.user_agent {
1985        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1986    }
1987
1988    let req = req_builder.build()?;
1989    let resp = configuration.client.execute(req).await?;
1990
1991    let status = resp.status();
1992    let content_type = resp
1993        .headers()
1994        .get("content-type")
1995        .and_then(|v| v.to_str().ok())
1996        .unwrap_or("application/octet-stream");
1997    let content_type = super::ContentType::from(content_type);
1998
1999    if !status.is_client_error() && !status.is_server_error() {
2000        let content = resp.text().await?;
2001        match content_type {
2002            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2003            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPrepDetailsResponse`"))),
2004            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListPrepDetailsResponse`")))),
2005        }
2006    } else {
2007        let content = resp.text().await?;
2008        let entity: Option<ListPrepDetailsError> = serde_json::from_str(&content).ok();
2009        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2010    }
2011}
2012
2013/// Provides a paginated list of box packages in a shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2014pub async fn list_shipment_boxes(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListShipmentBoxesResponse, Error<ListShipmentBoxesError>> {
2015    // add a prefix to parameters to efficiently prevent name collisions
2016    let p_inbound_plan_id = inbound_plan_id;
2017    let p_shipment_id = shipment_id;
2018    let p_page_size = page_size;
2019    let p_pagination_token = pagination_token;
2020
2021    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/boxes", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
2022    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2023
2024    if let Some(ref param_value) = p_page_size {
2025        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
2026    }
2027    if let Some(ref param_value) = p_pagination_token {
2028        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
2029    }
2030    if let Some(ref user_agent) = configuration.user_agent {
2031        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2032    }
2033
2034    let req = req_builder.build()?;
2035    let resp = configuration.client.execute(req).await?;
2036
2037    let status = resp.status();
2038    let content_type = resp
2039        .headers()
2040        .get("content-type")
2041        .and_then(|v| v.to_str().ok())
2042        .unwrap_or("application/octet-stream");
2043    let content_type = super::ContentType::from(content_type);
2044
2045    if !status.is_client_error() && !status.is_server_error() {
2046        let content = resp.text().await?;
2047        match content_type {
2048            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2049            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListShipmentBoxesResponse`"))),
2050            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListShipmentBoxesResponse`")))),
2051        }
2052    } else {
2053        let content = resp.text().await?;
2054        let entity: Option<ListShipmentBoxesError> = serde_json::from_str(&content).ok();
2055        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2056    }
2057}
2058
2059/// Retrieve a paginated list of shipment content update previews for a given shipment. The shipment content update preview is a summary of the requested shipment content changes along with the transportation cost implications of the change that can only be confirmed prior to the expiry date specified.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2060pub async fn list_shipment_content_update_previews(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListShipmentContentUpdatePreviewsResponse, Error<ListShipmentContentUpdatePreviewsError>> {
2061    // add a prefix to parameters to efficiently prevent name collisions
2062    let p_inbound_plan_id = inbound_plan_id;
2063    let p_shipment_id = shipment_id;
2064    let p_page_size = page_size;
2065    let p_pagination_token = pagination_token;
2066
2067    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/contentUpdatePreviews", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
2068    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2069
2070    if let Some(ref param_value) = p_page_size {
2071        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
2072    }
2073    if let Some(ref param_value) = p_pagination_token {
2074        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
2075    }
2076    if let Some(ref user_agent) = configuration.user_agent {
2077        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2078    }
2079
2080    let req = req_builder.build()?;
2081    let resp = configuration.client.execute(req).await?;
2082
2083    let status = resp.status();
2084    let content_type = resp
2085        .headers()
2086        .get("content-type")
2087        .and_then(|v| v.to_str().ok())
2088        .unwrap_or("application/octet-stream");
2089    let content_type = super::ContentType::from(content_type);
2090
2091    if !status.is_client_error() && !status.is_server_error() {
2092        let content = resp.text().await?;
2093        match content_type {
2094            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2095            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListShipmentContentUpdatePreviewsResponse`"))),
2096            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListShipmentContentUpdatePreviewsResponse`")))),
2097        }
2098    } else {
2099        let content = resp.text().await?;
2100        let entity: Option<ListShipmentContentUpdatePreviewsError> = serde_json::from_str(&content).ok();
2101        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2102    }
2103}
2104
2105/// Provides a paginated list of item packages in a shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2106pub async fn list_shipment_items(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListShipmentItemsResponse, Error<ListShipmentItemsError>> {
2107    // add a prefix to parameters to efficiently prevent name collisions
2108    let p_inbound_plan_id = inbound_plan_id;
2109    let p_shipment_id = shipment_id;
2110    let p_page_size = page_size;
2111    let p_pagination_token = pagination_token;
2112
2113    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/items", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
2114    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2115
2116    if let Some(ref param_value) = p_page_size {
2117        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
2118    }
2119    if let Some(ref param_value) = p_pagination_token {
2120        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
2121    }
2122    if let Some(ref user_agent) = configuration.user_agent {
2123        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2124    }
2125
2126    let req = req_builder.build()?;
2127    let resp = configuration.client.execute(req).await?;
2128
2129    let status = resp.status();
2130    let content_type = resp
2131        .headers()
2132        .get("content-type")
2133        .and_then(|v| v.to_str().ok())
2134        .unwrap_or("application/octet-stream");
2135    let content_type = super::ContentType::from(content_type);
2136
2137    if !status.is_client_error() && !status.is_server_error() {
2138        let content = resp.text().await?;
2139        match content_type {
2140            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2141            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListShipmentItemsResponse`"))),
2142            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListShipmentItemsResponse`")))),
2143        }
2144    } else {
2145        let content = resp.text().await?;
2146        let entity: Option<ListShipmentItemsError> = serde_json::from_str(&content).ok();
2147        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2148    }
2149}
2150
2151/// Provides a paginated list of pallet packages in a shipment. A palletized shipment will have pallets when the related details are provided after generating Less-Than-Truckload (LTL) carrier shipments.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2152pub async fn list_shipment_pallets(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, page_size: Option<i32>, pagination_token: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListShipmentPalletsResponse, Error<ListShipmentPalletsError>> {
2153    // add a prefix to parameters to efficiently prevent name collisions
2154    let p_inbound_plan_id = inbound_plan_id;
2155    let p_shipment_id = shipment_id;
2156    let p_page_size = page_size;
2157    let p_pagination_token = pagination_token;
2158
2159    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/pallets", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
2160    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2161
2162    if let Some(ref param_value) = p_page_size {
2163        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
2164    }
2165    if let Some(ref param_value) = p_pagination_token {
2166        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
2167    }
2168    if let Some(ref user_agent) = configuration.user_agent {
2169        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2170    }
2171
2172    let req = req_builder.build()?;
2173    let resp = configuration.client.execute(req).await?;
2174
2175    let status = resp.status();
2176    let content_type = resp
2177        .headers()
2178        .get("content-type")
2179        .and_then(|v| v.to_str().ok())
2180        .unwrap_or("application/octet-stream");
2181    let content_type = super::ContentType::from(content_type);
2182
2183    if !status.is_client_error() && !status.is_server_error() {
2184        let content = resp.text().await?;
2185        match content_type {
2186            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2187            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListShipmentPalletsResponse`"))),
2188            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListShipmentPalletsResponse`")))),
2189        }
2190    } else {
2191        let content = resp.text().await?;
2192        let entity: Option<ListShipmentPalletsError> = serde_json::from_str(&content).ok();
2193        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2194    }
2195}
2196
2197/// Retrieves all transportation options for a shipment. Transportation options must first be generated by the `generateTransportationOptions` operation before becoming available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2198pub async fn list_transportation_options(configuration: &configuration::Configuration, inbound_plan_id: &str, page_size: Option<i32>, pagination_token: Option<&str>, placement_option_id: Option<&str>, shipment_id: Option<&str>) -> Result<models::fulfillment_inbound_2024_03_20::ListTransportationOptionsResponse, Error<ListTransportationOptionsError>> {
2199    // add a prefix to parameters to efficiently prevent name collisions
2200    let p_inbound_plan_id = inbound_plan_id;
2201    let p_page_size = page_size;
2202    let p_pagination_token = pagination_token;
2203    let p_placement_option_id = placement_option_id;
2204    let p_shipment_id = shipment_id;
2205
2206    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/transportationOptions", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
2207    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2208
2209    if let Some(ref param_value) = p_page_size {
2210        req_builder = req_builder.query(&[("pageSize", &param_value.to_string())]);
2211    }
2212    if let Some(ref param_value) = p_pagination_token {
2213        req_builder = req_builder.query(&[("paginationToken", &param_value.to_string())]);
2214    }
2215    if let Some(ref param_value) = p_placement_option_id {
2216        req_builder = req_builder.query(&[("placementOptionId", &param_value.to_string())]);
2217    }
2218    if let Some(ref param_value) = p_shipment_id {
2219        req_builder = req_builder.query(&[("shipmentId", &param_value.to_string())]);
2220    }
2221    if let Some(ref user_agent) = configuration.user_agent {
2222        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2223    }
2224
2225    let req = req_builder.build()?;
2226    let resp = configuration.client.execute(req).await?;
2227
2228    let status = resp.status();
2229    let content_type = resp
2230        .headers()
2231        .get("content-type")
2232        .and_then(|v| v.to_str().ok())
2233        .unwrap_or("application/octet-stream");
2234    let content_type = super::ContentType::from(content_type);
2235
2236    if !status.is_client_error() && !status.is_server_error() {
2237        let content = resp.text().await?;
2238        match content_type {
2239            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2240            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListTransportationOptionsResponse`"))),
2241            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ListTransportationOptionsResponse`")))),
2242        }
2243    } else {
2244        let content = resp.text().await?;
2245        let entity: Option<ListTransportationOptionsError> = serde_json::from_str(&content).ok();
2246        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2247    }
2248}
2249
2250/// Confirms or reschedules a self-ship appointment slot against a shipment. Only available in the following [marketplaces](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids): MX, BR, EG, SA, AE, IN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). 
2251pub async fn schedule_self_ship_appointment(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, slot_id: &str, body: models::fulfillment_inbound_2024_03_20::ScheduleSelfShipAppointmentRequest) -> Result<models::fulfillment_inbound_2024_03_20::ScheduleSelfShipAppointmentResponse, Error<ScheduleSelfShipAppointmentError>> {
2252    // add a prefix to parameters to efficiently prevent name collisions
2253    let p_inbound_plan_id = inbound_plan_id;
2254    let p_shipment_id = shipment_id;
2255    let p_slot_id = slot_id;
2256    let p_body = body;
2257
2258    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/selfShipAppointmentSlots/{slotId}/schedule", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id), slotId=crate::apis::urlencode(p_slot_id));
2259    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2260
2261    if let Some(ref user_agent) = configuration.user_agent {
2262        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2263    }
2264    req_builder = req_builder.json(&p_body);
2265
2266    let req = req_builder.build()?;
2267    let resp = configuration.client.execute(req).await?;
2268
2269    let status = resp.status();
2270    let content_type = resp
2271        .headers()
2272        .get("content-type")
2273        .and_then(|v| v.to_str().ok())
2274        .unwrap_or("application/octet-stream");
2275    let content_type = super::ContentType::from(content_type);
2276
2277    if !status.is_client_error() && !status.is_server_error() {
2278        let content = resp.text().await?;
2279        match content_type {
2280            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2281            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ScheduleSelfShipAppointmentResponse`"))),
2282            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::ScheduleSelfShipAppointmentResponse`")))),
2283        }
2284    } else {
2285        let content = resp.text().await?;
2286        let entity: Option<ScheduleSelfShipAppointmentError> = serde_json::from_str(&content).ok();
2287        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2288    }
2289}
2290
2291/// Sets packing information for an inbound plan. This should be called after an inbound plan is created to populate the box level information required for planning and transportation estimates.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2292pub async fn set_packing_information(configuration: &configuration::Configuration, inbound_plan_id: &str, body: models::fulfillment_inbound_2024_03_20::SetPackingInformationRequest) -> Result<models::fulfillment_inbound_2024_03_20::SetPackingInformationResponse, Error<SetPackingInformationError>> {
2293    // add a prefix to parameters to efficiently prevent name collisions
2294    let p_inbound_plan_id = inbound_plan_id;
2295    let p_body = body;
2296
2297    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/packingInformation", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
2298    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2299
2300    if let Some(ref user_agent) = configuration.user_agent {
2301        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2302    }
2303    req_builder = req_builder.json(&p_body);
2304
2305    let req = req_builder.build()?;
2306    let resp = configuration.client.execute(req).await?;
2307
2308    let status = resp.status();
2309    let content_type = resp
2310        .headers()
2311        .get("content-type")
2312        .and_then(|v| v.to_str().ok())
2313        .unwrap_or("application/octet-stream");
2314    let content_type = super::ContentType::from(content_type);
2315
2316    if !status.is_client_error() && !status.is_server_error() {
2317        let content = resp.text().await?;
2318        match content_type {
2319            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2320            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::SetPackingInformationResponse`"))),
2321            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::SetPackingInformationResponse`")))),
2322        }
2323    } else {
2324        let content = resp.text().await?;
2325        let entity: Option<SetPackingInformationError> = serde_json::from_str(&content).ok();
2326        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2327    }
2328}
2329
2330/// Set the preparation details for a list of MSKUs in a specified marketplace.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2331pub async fn set_prep_details(configuration: &configuration::Configuration, body: models::fulfillment_inbound_2024_03_20::SetPrepDetailsRequest) -> Result<models::fulfillment_inbound_2024_03_20::SetPrepDetailsResponse, Error<SetPrepDetailsError>> {
2332    // add a prefix to parameters to efficiently prevent name collisions
2333    let p_body = body;
2334
2335    let uri_str = format!("{}/inbound/fba/2024-03-20/items/prepDetails", configuration.base_path);
2336    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2337
2338    if let Some(ref user_agent) = configuration.user_agent {
2339        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2340    }
2341    req_builder = req_builder.json(&p_body);
2342
2343    let req = req_builder.build()?;
2344    let resp = configuration.client.execute(req).await?;
2345
2346    let status = resp.status();
2347    let content_type = resp
2348        .headers()
2349        .get("content-type")
2350        .and_then(|v| v.to_str().ok())
2351        .unwrap_or("application/octet-stream");
2352    let content_type = super::ContentType::from(content_type);
2353
2354    if !status.is_client_error() && !status.is_server_error() {
2355        let content = resp.text().await?;
2356        match content_type {
2357            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2358            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::SetPrepDetailsResponse`"))),
2359            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::SetPrepDetailsResponse`")))),
2360        }
2361    } else {
2362        let content = resp.text().await?;
2363        let entity: Option<SetPrepDetailsError> = serde_json::from_str(&content).ok();
2364        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2365    }
2366}
2367
2368/// Updates the name of an existing inbound plan.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2369pub async fn update_inbound_plan_name(configuration: &configuration::Configuration, inbound_plan_id: &str, body: models::fulfillment_inbound_2024_03_20::UpdateInboundPlanNameRequest) -> Result<(), Error<UpdateInboundPlanNameError>> {
2370    // add a prefix to parameters to efficiently prevent name collisions
2371    let p_inbound_plan_id = inbound_plan_id;
2372    let p_body = body;
2373
2374    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/name", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id));
2375    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
2376
2377    if let Some(ref user_agent) = configuration.user_agent {
2378        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2379    }
2380    req_builder = req_builder.json(&p_body);
2381
2382    let req = req_builder.build()?;
2383    let resp = configuration.client.execute(req).await?;
2384
2385    let status = resp.status();
2386
2387    if !status.is_client_error() && !status.is_server_error() {
2388        Ok(())
2389    } else {
2390        let content = resp.text().await?;
2391        let entity: Option<UpdateInboundPlanNameError> = serde_json::from_str(&content).ok();
2392        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2393    }
2394}
2395
2396/// Update compliance details for a list of MSKUs. The details provided here are only used for the India (IN - A21TJRUUN4KGV) marketplace compliance validation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 6 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2397pub async fn update_item_compliance_details(configuration: &configuration::Configuration, marketplace_id: &str, body: models::fulfillment_inbound_2024_03_20::UpdateItemComplianceDetailsRequest) -> Result<models::fulfillment_inbound_2024_03_20::UpdateItemComplianceDetailsResponse, Error<UpdateItemComplianceDetailsError>> {
2398    // add a prefix to parameters to efficiently prevent name collisions
2399    let p_marketplace_id = marketplace_id;
2400    let p_body = body;
2401
2402    let uri_str = format!("{}/inbound/fba/2024-03-20/items/compliance", configuration.base_path);
2403    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
2404
2405    req_builder = req_builder.query(&[("marketplaceId", &p_marketplace_id.to_string())]);
2406    if let Some(ref user_agent) = configuration.user_agent {
2407        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2408    }
2409    req_builder = req_builder.json(&p_body);
2410
2411    let req = req_builder.build()?;
2412    let resp = configuration.client.execute(req).await?;
2413
2414    let status = resp.status();
2415    let content_type = resp
2416        .headers()
2417        .get("content-type")
2418        .and_then(|v| v.to_str().ok())
2419        .unwrap_or("application/octet-stream");
2420    let content_type = super::ContentType::from(content_type);
2421
2422    if !status.is_client_error() && !status.is_server_error() {
2423        let content = resp.text().await?;
2424        match content_type {
2425            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2426            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::UpdateItemComplianceDetailsResponse`"))),
2427            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::UpdateItemComplianceDetailsResponse`")))),
2428        }
2429    } else {
2430        let content = resp.text().await?;
2431        let entity: Option<UpdateItemComplianceDetailsError> = serde_json::from_str(&content).ok();
2432        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2433    }
2434}
2435
2436/// Updates the name of an existing shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2437pub async fn update_shipment_name(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, body: models::fulfillment_inbound_2024_03_20::UpdateShipmentNameRequest) -> Result<(), Error<UpdateShipmentNameError>> {
2438    // add a prefix to parameters to efficiently prevent name collisions
2439    let p_inbound_plan_id = inbound_plan_id;
2440    let p_shipment_id = shipment_id;
2441    let p_body = body;
2442
2443    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/name", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
2444    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
2445
2446    if let Some(ref user_agent) = configuration.user_agent {
2447        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2448    }
2449    req_builder = req_builder.json(&p_body);
2450
2451    let req = req_builder.build()?;
2452    let resp = configuration.client.execute(req).await?;
2453
2454    let status = resp.status();
2455
2456    if !status.is_client_error() && !status.is_server_error() {
2457        Ok(())
2458    } else {
2459        let content = resp.text().await?;
2460        let entity: Option<UpdateShipmentNameError> = serde_json::from_str(&content).ok();
2461        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2462    }
2463}
2464
2465/// Updates the source address of an existing shipment. The shipment source address can only be updated prior to the confirmation of the shipment carriers. As a result of the updated source address, existing transportation options will be invalidated and will need to be regenerated to capture the potential difference in transportation options and quotes due to the new source address.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 30 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2466pub async fn update_shipment_source_address(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, body: models::fulfillment_inbound_2024_03_20::UpdateShipmentSourceAddressRequest) -> Result<models::fulfillment_inbound_2024_03_20::UpdateShipmentSourceAddressResponse, Error<UpdateShipmentSourceAddressError>> {
2467    // add a prefix to parameters to efficiently prevent name collisions
2468    let p_inbound_plan_id = inbound_plan_id;
2469    let p_shipment_id = shipment_id;
2470    let p_body = body;
2471
2472    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/sourceAddress", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
2473    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
2474
2475    if let Some(ref user_agent) = configuration.user_agent {
2476        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2477    }
2478    req_builder = req_builder.json(&p_body);
2479
2480    let req = req_builder.build()?;
2481    let resp = configuration.client.execute(req).await?;
2482
2483    let status = resp.status();
2484    let content_type = resp
2485        .headers()
2486        .get("content-type")
2487        .and_then(|v| v.to_str().ok())
2488        .unwrap_or("application/octet-stream");
2489    let content_type = super::ContentType::from(content_type);
2490
2491    if !status.is_client_error() && !status.is_server_error() {
2492        let content = resp.text().await?;
2493        match content_type {
2494            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2495            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::UpdateShipmentSourceAddressResponse`"))),
2496            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::UpdateShipmentSourceAddressResponse`")))),
2497        }
2498    } else {
2499        let content = resp.text().await?;
2500        let entity: Option<UpdateShipmentSourceAddressError> = serde_json::from_str(&content).ok();
2501        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2502    }
2503}
2504
2505/// Updates a shipment's tracking details.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 2 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
2506pub async fn update_shipment_tracking_details(configuration: &configuration::Configuration, inbound_plan_id: &str, shipment_id: &str, body: models::fulfillment_inbound_2024_03_20::UpdateShipmentTrackingDetailsRequest) -> Result<models::fulfillment_inbound_2024_03_20::UpdateShipmentTrackingDetailsResponse, Error<UpdateShipmentTrackingDetailsError>> {
2507    // add a prefix to parameters to efficiently prevent name collisions
2508    let p_inbound_plan_id = inbound_plan_id;
2509    let p_shipment_id = shipment_id;
2510    let p_body = body;
2511
2512    let uri_str = format!("{}/inbound/fba/2024-03-20/inboundPlans/{inboundPlanId}/shipments/{shipmentId}/trackingDetails", configuration.base_path, inboundPlanId=crate::apis::urlencode(p_inbound_plan_id), shipmentId=crate::apis::urlencode(p_shipment_id));
2513    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
2514
2515    if let Some(ref user_agent) = configuration.user_agent {
2516        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2517    }
2518    req_builder = req_builder.json(&p_body);
2519
2520    let req = req_builder.build()?;
2521    let resp = configuration.client.execute(req).await?;
2522
2523    let status = resp.status();
2524    let content_type = resp
2525        .headers()
2526        .get("content-type")
2527        .and_then(|v| v.to_str().ok())
2528        .unwrap_or("application/octet-stream");
2529    let content_type = super::ContentType::from(content_type);
2530
2531    if !status.is_client_error() && !status.is_server_error() {
2532        let content = resp.text().await?;
2533        match content_type {
2534            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2535            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::UpdateShipmentTrackingDetailsResponse`"))),
2536            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::fulfillment_inbound_2024_03_20::UpdateShipmentTrackingDetailsResponse`")))),
2537        }
2538    } else {
2539        let content = resp.text().await?;
2540        let entity: Option<UpdateShipmentTrackingDetailsError> = serde_json::from_str(&content).ok();
2541        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2542    }
2543}
2544