@@ -1707,6 +1707,14 @@ json sai_serialize_nat_entry_data(
1707
1707
return j;
1708
1708
}
1709
1709
1710
+ std::string sai_serialize_nat_entry_type (
1711
+ _In_ const sai_nat_type_t type)
1712
+ {
1713
+ SWSS_LOG_ENTER ();
1714
+
1715
+ return sai_serialize_enum (type, &sai_metadata_enum_sai_nat_type_t );
1716
+ }
1717
+
1710
1718
std::string sai_serialize_nat_entry (
1711
1719
_In_ const sai_nat_entry_t & nat_entry)
1712
1720
{
@@ -1716,6 +1724,7 @@ std::string sai_serialize_nat_entry(
1716
1724
1717
1725
j[" switch_id" ] = sai_serialize_object_id (nat_entry.switch_id );
1718
1726
j[" vr" ] = sai_serialize_object_id (nat_entry.vr_id );
1727
+ j[" nat_type" ] = sai_serialize_nat_entry_type (nat_entry.nat_type );
1719
1728
j[" nat_data" ] = sai_serialize_nat_entry_data (nat_entry.data );
1720
1729
1721
1730
return j.dump ();
@@ -2835,6 +2844,15 @@ void sai_deserialize_nat_entry_data(
2835
2844
sai_deserialize_nat_entry_mask (j[" mask" ], nat_entry_data.mask );
2836
2845
}
2837
2846
2847
+ void sai_deserialize_nat_entry_type (
2848
+ _In_ const std::string& s,
2849
+ _Out_ sai_nat_type_t & type)
2850
+ {
2851
+ SWSS_LOG_ENTER ();
2852
+
2853
+ sai_deserialize_enum (s, &sai_metadata_enum_sai_nat_type_t , (int32_t &)type);
2854
+ }
2855
+
2838
2856
void sai_deserialize_nat_entry (
2839
2857
_In_ const std::string &s,
2840
2858
_Out_ sai_nat_entry_t & nat_entry)
@@ -2845,6 +2863,7 @@ void sai_deserialize_nat_entry(
2845
2863
2846
2864
sai_deserialize_object_id (j[" switch_id" ], nat_entry.switch_id );
2847
2865
sai_deserialize_object_id (j[" vr" ], nat_entry.vr_id );
2866
+ sai_deserialize_nat_entry_type (j[" nat_type" ], nat_entry.nat_type );
2848
2867
sai_deserialize_nat_entry_data (j[" nat_data" ], nat_entry.data );
2849
2868
}
2850
2869
0 commit comments