1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
/*
* Selling Partner API for Listings Restrictions
*
* The Selling Partner API for Listings Restrictions provides programmatic access to restrictions on Amazon catalog listings. For more information, see the [Listings Restrictions API Use Case Guide](doc:listings-restrictions-api-v2021-08-01-use-case-guide).
*
* The version of the OpenAPI document: 2021-08-01
*
* Generated by: https://openapi-generator.tech
*/
/// Link : A link to resources related to a listing restriction.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Link {
/// The URI of the related resource.
#[serde(default, rename = "resource")]
pub resource: String,
/// The HTTP verb used to interact with the related resource.
#[serde(default, rename = "verb")]
pub verb: Verb,
/// The title of the related resource.
#[serde(default, rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// The media type of the related resource.
#[serde(default, rename = "type", skip_serializing_if = "Option::is_none")]
pub _type: Option<String>,
}
impl Link {
/// A link to resources related to a listing restriction.
pub fn new(resource: String, verb: Verb) -> Link {
Link {
resource,
verb,
title: None,
_type: None,
}
}
}
/// The HTTP verb used to interact with the related resource.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Verb {
#[serde(rename = "GET")]
GET,
}
impl Default for Verb {
fn default() -> Verb {
Self::GET
}
}