amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Data Kiosk
 *
 * The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling partners manage their businesses.
 *
 * The version of the OpenAPI document: 2023-11-15
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// CreateQuerySpecification : Information required to create the query.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateQuerySpecification {
    /// The GraphQL query to submit. A query must be at most 8000 characters after unnecessary whitespace is removed.
    #[serde(rename = "query")]
    pub query: String,
    /// A token to fetch a certain page of query results when there are multiple pages of query results available. The value of this token must be fetched from the `pagination.nextToken` field of the `Query` object, and the `query` field for this object must also be set to the `query` field of the same `Query` object. A `Query` object can be retrieved from either the `getQueries` or `getQuery` operation. In the absence of this token value, the first page of query results will be requested.
    #[serde(rename = "paginationToken", skip_serializing_if = "Option::is_none")]
    pub pagination_token: Option<String>,
}

impl CreateQuerySpecification {
    /// Information required to create the query.
    pub fn new(query: String) -> CreateQuerySpecification {
        CreateQuerySpecification {
            query,
            pagination_token: None,
        }
    }
}