amazon_spapi/models/vehicles_2024_11_01/pagination.rs
1/*
2 * The Selling Partner API for Automotive.
3 *
4 * The Selling Partner API for Automotive provides programmatic access to information needed by selling partners to provide compatibility information about their listed products.
5 *
6 * The version of the OpenAPI document: 2024-11-01
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Pagination : When a request produces a response that exceeds the `pageSize`, pagination occurs. This means the response is divided into individual pages. To retrieve the next page or the previous page, you must pass the `nextToken` value or the `previousToken` value as the `pageToken` parameter in the next request. When you receive the last page, there will be no `nextToken` key in the pagination object.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Pagination {
17 /// A token that can be used to fetch the next page.
18 #[serde(rename = "nextToken", skip_serializing_if = "Option::is_none")]
19 pub next_token: Option<String>,
20 /// A token that can be used to fetch the previous page.
21 #[serde(rename = "previousToken", skip_serializing_if = "Option::is_none")]
22 pub previous_token: Option<String>,
23}
24
25impl Pagination {
26 /// When a request produces a response that exceeds the `pageSize`, pagination occurs. This means the response is divided into individual pages. To retrieve the next page or the previous page, you must pass the `nextToken` value or the `previousToken` value as the `pageToken` parameter in the next request. When you receive the last page, there will be no `nextToken` key in the pagination object.
27 pub fn new() -> Pagination {
28 Pagination {
29 next_token: None,
30 previous_token: None,
31 }
32 }
33}
34