amazon_spapi/models/shipping_v2/available_value_added_service_group.rs
1/*
2 * Amazon Shipping API
3 *
4 * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
5 *
6 * The version of the OpenAPI document: v2
7 * Contact: swa-api-core@amazon.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AvailableValueAddedServiceGroup : The value-added services available for purchase with a shipping service offering.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AvailableValueAddedServiceGroup {
17 /// The type of the value-added service group.
18 #[serde(rename = "groupId")]
19 pub group_id: String,
20 /// The name of the value-added service group.
21 #[serde(rename = "groupDescription")]
22 pub group_description: String,
23 /// When true, one or more of the value-added services listed must be specified.
24 #[serde(rename = "isRequired")]
25 pub is_required: bool,
26 /// A list of optional value-added services available for purchase with a shipping service offering.
27 #[serde(rename = "valueAddedServices", skip_serializing_if = "Option::is_none")]
28 pub value_added_services: Option<Vec<models::shipping_v2::ValueAddedService>>,
29}
30
31impl AvailableValueAddedServiceGroup {
32 /// The value-added services available for purchase with a shipping service offering.
33 pub fn new(group_id: String, group_description: String, is_required: bool) -> AvailableValueAddedServiceGroup {
34 AvailableValueAddedServiceGroup {
35 group_id,
36 group_description,
37 is_required,
38 value_added_services: None,
39 }
40 }
41}
42