diff --git a/src/definitions/device_engagement.rs b/src/definitions/device_engagement.rs index f656815..c8a713d 100644 --- a/src/definitions/device_engagement.rs +++ b/src/definitions/device_engagement.rs @@ -38,12 +38,15 @@ pub struct DeviceEngagement { pub security: Security, /// The optional device retrieval methods for the device engagement. + #[serde(skip_serializing_if = "Option::is_none")] pub device_retrieval_methods: Option, /// The optional server retrieval methods for the device engagement. + #[serde(skip_serializing_if = "Option::is_none")] pub server_retrieval_methods: Option, /// The optional protocol information for the device engagement. + #[serde(skip_serializing_if = "Option::is_none")] pub protocol_info: Option, } @@ -72,9 +75,11 @@ pub struct Security(pub u64, pub EDeviceKeyBytes); #[serde(rename_all = "camelCase")] pub struct ServerRetrievalMethods { /// The `web API retrieval method. This field is optional and will be skipped during serialization if it is [None]. + #[serde(skip_serializing_if = "Option::is_none")] web_api: Option, /// The `OIDC`` retrieval method. This field is optional and will be skipped during serialization if it is [None]. + #[serde(skip_serializing_if = "Option::is_none")] oidc: Option, } @@ -112,15 +117,19 @@ pub struct CentralClientMode { #[serde(try_from = "CborValue", into = "CborValue")] pub struct WifiOptions { /// The passphrase for the `WiFi connection. If [None], no passphrase is required. + #[serde(skip_serializing_if = "Option::is_none")] pass_phrase: Option, /// The operating class of the `WiFi` channel. If [None], the operating class is not specified. + #[serde(skip_serializing_if = "Option::is_none")] channel_info_operating_class: Option, /// The channel number of the `WiFi` channel. If [None], the channel number is not specified. + #[serde(skip_serializing_if = "Option::is_none")] channel_info_channel_number: Option, /// The band information of the `WiFi channel. If [None], the band information is not specified. + #[serde(skip_serializing_if = "Option::is_none")] band_info: Option, } diff --git a/src/definitions/device_key/mod.rs b/src/definitions/device_key/mod.rs index a77b068..af08bca 100644 --- a/src/definitions/device_key/mod.rs +++ b/src/definitions/device_key/mod.rs @@ -76,6 +76,7 @@ pub struct KeyAuthorizations { /// The data elements associated with the key. This field is optional and will /// be skipped during serialization if it is [None]. + #[serde(skip_serializing_if = "Option::is_none")] pub data_elements: Option>>, }