@@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
1111#[ skip_serializing_none]
1212#[ derive( Clone , Debug , PartialEq , Serialize ) ]
1313pub struct SecurityMonitoringRuleConvertResponse {
14+ /// the ID of the rule.
15+ #[ serde( rename = "ruleId" ) ]
16+ pub rule_id : Option < String > ,
1417 /// Terraform string as a result of converting the rule from JSON.
1518 #[ serde( rename = "terraformContent" ) ]
1619 pub terraform_content : Option < String > ,
@@ -24,12 +27,18 @@ pub struct SecurityMonitoringRuleConvertResponse {
2427impl SecurityMonitoringRuleConvertResponse {
2528 pub fn new ( ) -> SecurityMonitoringRuleConvertResponse {
2629 SecurityMonitoringRuleConvertResponse {
30+ rule_id : None ,
2731 terraform_content : None ,
2832 additional_properties : std:: collections:: BTreeMap :: new ( ) ,
2933 _unparsed : false ,
3034 }
3135 }
3236
37+ pub fn rule_id ( mut self , value : String ) -> Self {
38+ self . rule_id = Some ( value) ;
39+ self
40+ }
41+
3342 pub fn terraform_content ( mut self , value : String ) -> Self {
3443 self . terraform_content = Some ( value) ;
3544 self
@@ -67,6 +76,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringRuleConvertResponse {
6776 where
6877 M : MapAccess < ' a > ,
6978 {
79+ let mut rule_id: Option < String > = None ;
7080 let mut terraform_content: Option < String > = None ;
7181 let mut additional_properties: std:: collections:: BTreeMap <
7282 String ,
@@ -76,6 +86,12 @@ impl<'de> Deserialize<'de> for SecurityMonitoringRuleConvertResponse {
7686
7787 while let Some ( ( k, v) ) = map. next_entry :: < String , serde_json:: Value > ( ) ? {
7888 match k. as_str ( ) {
89+ "ruleId" => {
90+ if v. is_null ( ) {
91+ continue ;
92+ }
93+ rule_id = Some ( serde_json:: from_value ( v) . map_err ( M :: Error :: custom) ?) ;
94+ }
7995 "terraformContent" => {
8096 if v. is_null ( ) {
8197 continue ;
@@ -92,6 +108,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringRuleConvertResponse {
92108 }
93109
94110 let content = SecurityMonitoringRuleConvertResponse {
111+ rule_id,
95112 terraform_content,
96113 additional_properties,
97114 _unparsed,
0 commit comments