hermes_ebay_sell_metadata/models/specification_request.rs
1/*
2 * Metadata API
3 *
4 * The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces. In addition to marketplace information, the API also has operations that get information that helps sellers list items on eBay.
5 *
6 * The version of the OpenAPI document: v1.11.1
7 * Contact: your-email@example.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SpecificationRequest : This type provides the properties and specifications to use to search for compatibilities.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SpecificationRequest {
17 /// The unique identifier of the eBay leaf category for which compatibility details are being retrieved. This category must be a valid eBay category on the specified eBay marketplace, and the category must support parts compatibility for cars, trucks, or motorcycles.<br><br>Use the <a href=\"/api-docs/sell/metadata/resources/marketplace/methods/getAutomotivePartsCompatibilityPolicies\" target=\"_blank \">getAutomotivePartsCompatibilityPolicies</a> method to retrieve a list of categories that support parts compatibility by specification. For the categories in the response that support compatibility by specification, you’ll see <code>SPECIFICATIONS</code> as the value for the <b>compatibilityBasedOn</b> field
18 #[serde(rename = "categoryId", skip_serializing_if = "Option::is_none")]
19 pub category_id: Option<String>,
20 /// This comma-delimited array can be used to restrict the number of compatible application name-value pairs returned in the response by specifying the properties that the seller wishes to be included in the response.<br><br>Only compatible applications with the specified properties will be returned. Properties that can be specified here include make, model, year, and trim.
21 #[serde(rename = "compatibilityPropertyFilters", skip_serializing_if = "Option::is_none")]
22 pub compatibility_property_filters: Option<Vec<models::PropertyFilterInner>>,
23 /// This field can be used to define the type of properties that will be returned in the response.<br><br> For example, if you specify <code>Searchable</code>, the compatibility details will contain properties that can be used to search for products, such as make or model.<br><br><span class=\"tablenote\"><b>Note:</b> This field cannot be used alongside <b>dataPropertyName</b>. If both are used, an error will occur.</span><br><b>Valid values:</b><ul><li><code>DisplayableProductDetails</code>: Properties for use in a user interface to describe products.</li><li><code>DisplayableSearchResults</code>: Properties for use in results for product searches.</li><li><code>Searchable</code>: Properties for use in searches.</li><li><code>Sortable</code>: Properties that are suitable for sorting.</li></ul><b>Default value:</b> <code>DisplayableSearchResults</code>
24 #[serde(rename = "dataset", skip_serializing_if = "Option::is_none")]
25 pub dataset: Option<String>,
26 /// This comma-delimited array can be used to define the specific property name(s) that will be returned in the response.<br><br>For example, if you specify <code>Engine</code>, the result set will only contain engines that are compatible with the input criteria.<br><br><span class=\"tablenote\"><b>Note:</b> This array cannot be used alongside <b>dataset</b>. If both are used, an error will occur.</span>
27 #[serde(rename = "datasetPropertyName", skip_serializing_if = "Option::is_none")]
28 pub dataset_property_name: Option<Vec<String>>,
29 /// This boolean can be used to specify that the compatibilities returned in the response are to be defined by an exact match on the input value of specification properties.<br><br>By default, an expanded compatibility match is done when it applies, such as for Load Index, where a compatible vehicle is one that has a load index requirement that is less than or equal to the input. By specifying this field as <code>true</code>, only exact matches are returned.
30 #[serde(rename = "exactMatch", skip_serializing_if = "Option::is_none")]
31 pub exact_match: Option<bool>,
32 #[serde(rename = "paginationInput", skip_serializing_if = "Option::is_none")]
33 pub pagination_input: Option<Box<models::PaginationInput>>,
34 /// This array specifies the sorting order of the compatibility properties. Any of the searchable properties can be used to specify search order. Up to 5 levels of sort order may be specified.<br><br><span class=\"tablenote\"><b>Note:</b> If no sort order is specified through this field, the default sort order of <b>popularity descending</b> is applied.</span>
35 #[serde(rename = "sortOrders", skip_serializing_if = "Option::is_none")]
36 pub sort_orders: Option<Vec<models::SortOrderInner>>,
37 /// This array defines the specifications of the part, in the form of name-value pairs, for which compatible applications will be retrieved.
38 #[serde(rename = "specifications", skip_serializing_if = "Option::is_none")]
39 pub specifications: Option<Vec<models::PropertyFilterInner>>,
40}
41
42impl SpecificationRequest {
43 /// This type provides the properties and specifications to use to search for compatibilities.
44 pub fn new() -> SpecificationRequest {
45 SpecificationRequest {
46 category_id: None,
47 compatibility_property_filters: None,
48 dataset: None,
49 dataset_property_name: None,
50 exact_match: None,
51 pagination_input: None,
52 sort_orders: None,
53 specifications: None,
54 }
55 }
56}
57