@@ -176,6 +176,8 @@ func statementToJSON(stmt ast.Statement) jsonNode {
176176 return dropSearchPropertyListStatementToJSON (s )
177177 case * ast.DropServerRoleStatement :
178178 return dropServerRoleStatementToJSON (s )
179+ case * ast.DropServerAuditStatement :
180+ return dropServerAuditStatementToJSON (s )
179181 case * ast.DropAvailabilityGroupStatement :
180182 return dropAvailabilityGroupStatementToJSON (s )
181183 case * ast.DropFederationStatement :
@@ -6761,6 +6763,9 @@ func alterServerAuditStatementToJSON(s *ast.AlterServerAuditStatement) jsonNode
67616763 "$type" : "AlterServerAuditStatement" ,
67626764 "RemoveWhere" : s .RemoveWhere ,
67636765 }
6766+ if s .NewName != nil {
6767+ node ["NewName" ] = identifierToJSON (s .NewName )
6768+ }
67646769 if s .AuditName != nil {
67656770 node ["AuditName" ] = identifierToJSON (s .AuditName )
67666771 }
@@ -6780,6 +6785,17 @@ func alterServerAuditStatementToJSON(s *ast.AlterServerAuditStatement) jsonNode
67806785 return node
67816786}
67826787
6788+ func dropServerAuditStatementToJSON (s * ast.DropServerAuditStatement ) jsonNode {
6789+ node := jsonNode {
6790+ "$type" : "DropServerAuditStatement" ,
6791+ "IsIfExists" : s .IsIfExists ,
6792+ }
6793+ if s .Name != nil {
6794+ node ["Name" ] = identifierToJSON (s .Name )
6795+ }
6796+ return node
6797+ }
6798+
67836799func auditTargetToJSON (t * ast.AuditTarget ) jsonNode {
67846800 node := jsonNode {
67856801 "$type" : "AuditTarget" ,
@@ -6806,6 +6822,33 @@ func auditTargetOptionToJSON(o ast.AuditTargetOption) jsonNode {
68066822 node ["Value" ] = scalarExpressionToJSON (opt .Value )
68076823 }
68086824 return node
6825+ case * ast.MaxSizeAuditTargetOption :
6826+ node := jsonNode {
6827+ "$type" : "MaxSizeAuditTargetOption" ,
6828+ "IsUnlimited" : opt .IsUnlimited ,
6829+ "Unit" : opt .Unit ,
6830+ "OptionKind" : opt .OptionKind ,
6831+ }
6832+ if opt .Size != nil {
6833+ node ["Size" ] = scalarExpressionToJSON (opt .Size )
6834+ }
6835+ return node
6836+ case * ast.MaxRolloverFilesAuditTargetOption :
6837+ node := jsonNode {
6838+ "$type" : "MaxRolloverFilesAuditTargetOption" ,
6839+ "IsUnlimited" : opt .IsUnlimited ,
6840+ "OptionKind" : opt .OptionKind ,
6841+ }
6842+ if opt .Value != nil {
6843+ node ["Value" ] = scalarExpressionToJSON (opt .Value )
6844+ }
6845+ return node
6846+ case * ast.OnOffAuditTargetOption :
6847+ return jsonNode {
6848+ "$type" : "OnOffAuditTargetOption" ,
6849+ "Value" : opt .Value ,
6850+ "OptionKind" : opt .OptionKind ,
6851+ }
68096852 default :
68106853 return jsonNode {"$type" : "UnknownAuditTargetOption" }
68116854 }
0 commit comments