amazon_spapi/models/data_kiosk_2023_11_15/create_query_specification.rs
1/*
2 * Selling Partner API for Data Kiosk
3 *
4 * The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling partners manage their businesses.
5 *
6 * The version of the OpenAPI document: 2023-11-15
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CreateQuerySpecification : Information required to create the query.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateQuerySpecification {
17 /// The GraphQL query to submit. A query must be at most 8000 characters after unnecessary whitespace is removed.
18 #[serde(rename = "query")]
19 pub query: String,
20 /// 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.
21 #[serde(rename = "paginationToken", skip_serializing_if = "Option::is_none")]
22 pub pagination_token: Option<String>,
23}
24
25impl CreateQuerySpecification {
26 /// Information required to create the query.
27 pub fn new(query: String) -> CreateQuerySpecification {
28 CreateQuerySpecification {
29 query,
30 pagination_token: None,
31 }
32 }
33}
34