diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/Advisor.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/Advisor.tsp index 39cb74f49b72..113b9d8f13b9 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/Advisor.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/Advisor.tsp @@ -63,7 +63,8 @@ alias AdvisorOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("advisors") @key advisorName: string; - } + }, + ResourceName = "SqlDatabaseAdvisor" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -118,7 +119,8 @@ alias ServerAdvisorOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("advisors") @key advisorName: string; - } + }, + ResourceName = "SqlServerAdvisor" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseColumn.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseColumn.tsp index d2d787043d02..1038efc14e6e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseColumn.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseColumn.tsp @@ -62,7 +62,8 @@ alias DatabaseColumnOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("columns") @key columnName: string; - } + }, + ResourceName = "SqlDatabaseColumn" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -125,7 +126,8 @@ alias ManagedDatabaseColumnOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("columns") @key columnName: string; - } + }, + ResourceName = "ManagedDatabaseColumn" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSchema.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSchema.tsp index 2074e1fb090d..5ba847936c08 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSchema.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSchema.tsp @@ -50,7 +50,8 @@ alias DatabaseSchemaOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("schemas") @key schemaName: string; - } + }, + ResourceName = "SqlDatabaseSchema" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -101,7 +102,8 @@ alias ManagedDatabaseSchemaOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("schemas") @key schemaName: string; - } + }, + ResourceName = "ManagedDatabaseSchema" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSqlVulnerabilityAssessmentBaselineSet.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSqlVulnerabilityAssessmentBaselineSet.tsp index 49b0a0071487..5a2467d668e7 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSqlVulnerabilityAssessmentBaselineSet.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSqlVulnerabilityAssessmentBaselineSet.tsp @@ -57,7 +57,8 @@ alias DatabaseSqlVulnerabilityAssessmentBaselineSetOps = Azure.ResourceManager.L @segment("baselines") @key baselineName: BaselineName; - } + }, + ResourceName = "SqlDatabaseSqlVulnerabilityAssessmentBaseline" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -114,7 +115,8 @@ alias SqlVulnerabilityAssessmentBaselineOps = Azure.ResourceManager.Legacy.Legac @segment("baselines") @key baselineName: BaselineName; - } + }, + ResourceName = "SqlServerSqlVulnerabilityAssessmentBaseline" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSqlVulnerabilityAssessmentRuleBaseline.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSqlVulnerabilityAssessmentRuleBaseline.tsp index 79f6dca19cbd..1efaf3c0f2c6 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSqlVulnerabilityAssessmentRuleBaseline.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseSqlVulnerabilityAssessmentRuleBaseline.tsp @@ -62,7 +62,8 @@ alias DatabaseSqlVulnerabilityAssessmentRuleBaselineOps = Azure.ResourceManager. @segment("rules") @key ruleId: string; - } + }, + ResourceName = "SqlDatabaseSqlVulnerabilityAssessmentBaselineRule" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -127,7 +128,8 @@ alias SqlVulnerabilityAssessmentRuleBaselineOps = Azure.ResourceManager.Legacy.L @segment("rules") @key ruleId: string; - } + }, + ResourceName = "SqlServerSqlVulnerabilityAssessmentBaselineRule" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseTable.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseTable.tsp index 3d6c653949ea..72b689bdc111 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseTable.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseTable.tsp @@ -56,7 +56,8 @@ alias DatabaseTableOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("tables") @key tableName: string; - } + }, + ResourceName = "SqlDatabaseTable" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -113,7 +114,8 @@ alias ManagedDatabaseTableOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("tables") @key tableName: string; - } + }, + ResourceName = "ManagedDatabaseTable" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseVulnerabilityAssessment.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseVulnerabilityAssessment.tsp index c80bb15b6486..6392ed641053 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseVulnerabilityAssessment.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseVulnerabilityAssessment.tsp @@ -51,7 +51,8 @@ alias DatabaseVulnerabilityAssessmentOps = Azure.ResourceManager.Legacy.LegacyOp @segment("vulnerabilityAssessments") @key vulnerabilityAssessmentName: VulnerabilityAssessmentName; - } + }, + ResourceName = "SqlDatabaseVulnerabilityAssessment" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -107,7 +108,8 @@ alias ManagedDatabaseVulnerabilityAssessmentOps = Azure.ResourceManager.Legacy.L @segment("vulnerabilityAssessments") @key vulnerabilityAssessmentName: VulnerabilityAssessmentName; - } + }, + ResourceName = "ManagedDatabaseVulnerabilityAssessment" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseVulnerabilityAssessmentRuleBaseline.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseVulnerabilityAssessmentRuleBaseline.tsp index 5513d8f9686a..219e27c2457e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseVulnerabilityAssessmentRuleBaseline.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/DatabaseVulnerabilityAssessmentRuleBaseline.tsp @@ -62,7 +62,8 @@ alias DatabaseVulnerabilityAssessmentRuleBaselineOps = Azure.ResourceManager.Leg @segment("baselines") @key baselineName: VulnerabilityAssessmentPolicyBaselineName; - } + }, + ResourceName = "SqlDatabaseVulnerabilityAssessmentRuleBaseline" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -131,7 +132,8 @@ alias ManagedDatabaseVulnerabilityAssessmentRuleBaselineOps = Azure.ResourceMana @segment("baselines") @key baselineName: VulnerabilityAssessmentPolicyBaselineName; - } + }, + ResourceName = "ManagedDatabaseVulnerabilityAssessmentRuleBaseline" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/DeletedServer.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/DeletedServer.tsp index e712032d7f42..a38d39894a6a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/DeletedServer.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/DeletedServer.tsp @@ -36,7 +36,7 @@ alias DeletedServersOps = Azure.ResourceManager.Legacy.LegacyOperations< @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; }, { /** The name of the deleted server. */ diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/InstanceFailoverGroup.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/InstanceFailoverGroup.tsp index 46ae44010272..ebdd2d894f35 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/InstanceFailoverGroup.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/InstanceFailoverGroup.tsp @@ -37,7 +37,7 @@ alias InstanceFailoverGroupsOps = Azure.ResourceManager.Legacy.LegacyOperations< @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; }, { /** The name of the failover group. */ diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/JobExecution.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/JobExecution.tsp index 5fd1b2f0d999..e625bf693f5f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/JobExecution.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/JobExecution.tsp @@ -56,7 +56,8 @@ alias JobExecutionOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("executions") @key jobExecutionId: Azure.Core.uuid; - } + }, + ResourceName = "SqlServerJobExecution" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -182,7 +183,8 @@ alias JobStepExecutionOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("steps") @key stepName: string; - } + }, + ResourceName = "SqlServerJobExecutionStep" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -289,7 +291,8 @@ alias JobTargetExecutionOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("targets") @key targetId: Azure.Core.uuid; - } + }, + ResourceName = "SqlServerJobExecutionStepTarget" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/JobStep.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/JobStep.tsp index acdf2a901d33..b9b4763f0702 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/JobStep.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/JobStep.tsp @@ -57,7 +57,8 @@ alias JobStepOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("steps") @key stepName: string; - } + }, + ResourceName = "SqlServerJobStep" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -117,6 +118,7 @@ alias JobStepOperationGroupOps = Azure.ResourceManager.Legacy.LegacyOperations< @path @segment("versions") @key + @Azure.ClientGenerator.Core.alternateType(string, "csharp") // The jobVersion is name of the resource JobVersion which must be a string, but the swagger defines it as int32, so we need to use alternateType to make it backwards compatible with the swagger definition. Make this csharp only because it's the only language that forces the type of the resource name to be string. jobVersion: int32; }, { @@ -125,7 +127,8 @@ alias JobStepOperationGroupOps = Azure.ResourceManager.Legacy.LegacyOperations< @segment("steps") @key stepName: string; - } + }, + ResourceName = "SqlServerJobVersionStep" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/JobVersion.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/JobVersion.tsp index 21af6cae58e9..88f7c7922e8f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/JobVersion.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/JobVersion.tsp @@ -57,6 +57,7 @@ alias JobVersionOps = Azure.ResourceManager.Legacy.LegacyOperations< @path @segment("versions") @key + @Azure.ClientGenerator.Core.alternateType(string, "csharp") // The jobVersion is name of the resource JobVersion which must be a string, but the swagger defines it as int32, so we need to use alternateType to make it backwards compatible with the swagger definition. Make this csharp only because it's the only language that forces the type of the resource name to be string. jobVersion: int32; } >; diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/LongTermRetentionBackup.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/LongTermRetentionBackup.tsp index 34f9ca4a588b..4900652c27f7 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/LongTermRetentionBackup.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/LongTermRetentionBackup.tsp @@ -41,7 +41,7 @@ alias LongTermRetentionBackupOps = Azure.ResourceManager.Legacy.LegacyOperations @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; /** The name of the server */ @path @@ -61,7 +61,8 @@ alias LongTermRetentionBackupOps = Azure.ResourceManager.Legacy.LegacyOperations @segment("longTermRetentionBackups") @key backupName: string; - } + }, + ResourceName = "SubscriptionLongTermRetentionBackup" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -198,7 +199,7 @@ alias LongTermRetentionBackupOperationGroupOps = Azure.ResourceManager.Legacy.Le @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; /** The name of the server */ @path @@ -218,7 +219,8 @@ alias LongTermRetentionBackupOperationGroupOps = Azure.ResourceManager.Legacy.Le @segment("longTermRetentionBackups") @key backupName: string; - } + }, + ResourceName = "ResourceGroupLongTermRetentionBackup" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedBackupShortTermRetentionPolicy.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedBackupShortTermRetentionPolicy.tsp index 85616ee044f4..9e1ce4839353 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedBackupShortTermRetentionPolicy.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedBackupShortTermRetentionPolicy.tsp @@ -51,7 +51,8 @@ alias ManagedBackupShortTermRetentionPolicyOps = Azure.ResourceManager.Legacy.Le @segment("backupShortTermRetentionPolicies") @key policyName: ManagedShortTermRetentionPolicyName; - } + }, + ResourceName = "ManagedBackupShortTermRetentionPolicy" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -117,7 +118,8 @@ alias ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicyOps = Azure. @segment("backupShortTermRetentionPolicies") @key policyName: ManagedShortTermRetentionPolicyName; - } + }, + ResourceName = "ManagedRestorableDroppedDbBackupShortTermRetentionPolicy" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedDatabaseMoveOperationResult.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedDatabaseMoveOperationResult.tsp index 7fa0d1553053..aeea9eb20faf 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedDatabaseMoveOperationResult.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedDatabaseMoveOperationResult.tsp @@ -37,7 +37,7 @@ alias ManagedDatabaseMoveOperationResultsOps = Azure.ResourceManager.Legacy.Lega @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; }, { /** The ID of the managed database move operation. */ diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedInstanceLongTermRetentionBackup.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedInstanceLongTermRetentionBackup.tsp index c374e9c9e586..c3d0bd32db9f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedInstanceLongTermRetentionBackup.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/ManagedInstanceLongTermRetentionBackup.tsp @@ -43,7 +43,7 @@ alias ManagedInstanceLongTermRetentionBackupOps = Azure.ResourceManager.Legacy.L @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; /** The name of the managed instance. */ @path @@ -63,7 +63,8 @@ alias ManagedInstanceLongTermRetentionBackupOps = Azure.ResourceManager.Legacy.L @segment("longTermRetentionManagedInstanceBackups") @key backupName: string; - } + }, + ResourceName = "SubscriptionLongTermRetentionManagedInstanceBackup" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -120,7 +121,7 @@ alias LongTermRetentionManagedInstanceBackupOps = Azure.ResourceManager.Legacy.L @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; /** The name of the managed instance. */ @path @@ -140,7 +141,8 @@ alias LongTermRetentionManagedInstanceBackupOps = Azure.ResourceManager.Legacy.L @segment("longTermRetentionManagedInstanceBackups") @key backupName: string; - } + }, + ResourceName = "ResourceGroupLongTermRetentionManagedInstanceBackup" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/SensitivityLabel.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/SensitivityLabel.tsp index 6b8e18b9480f..0ef79567ab45 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/SensitivityLabel.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/SensitivityLabel.tsp @@ -69,7 +69,8 @@ alias SensitivityLabelOps = Azure.ResourceManager.Legacy.LegacyOperations< @key columnName: string; }, - {} + {}, + ResourceName = "ManagedDatabaseSensitivityLabel" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -172,7 +173,8 @@ alias SensitivityLabelOperationGroupOps = Azure.ResourceManager.Legacy.LegacyOpe @key columnName: string; }, - {} + {}, + ResourceName = "SqlDatabaseSensitivityLabel" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerBlobAuditingPolicy.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerBlobAuditingPolicy.tsp index 7d8256fc493f..a27ee1120737 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerBlobAuditingPolicy.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerBlobAuditingPolicy.tsp @@ -40,7 +40,8 @@ alias ServerBlobAuditingPoliciesOps = Azure.ResourceManager.Legacy.LegacyOperati @key serverName: string; }, - ServerBlobAuditingPolicyNameAlias + ServerBlobAuditingPolicyNameAlias, + ResourceName = "SqlServerBlobAuditingPolicy" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerTrustCertificate.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerTrustCertificate.tsp index 9ca78a6695df..1f2fa515df75 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerTrustCertificate.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerTrustCertificate.tsp @@ -27,6 +27,23 @@ model ServerTrustCertificate >; } +alias ServerTrustCertificatesOps = Azure.ResourceManager.Legacy.LegacyOperations< + { + ...ApiVersionParameter; + ...SubscriptionIdParameter; + ...ResourceGroupParameter; + ...Azure.ResourceManager.Legacy.Provider; + + /** The name of the managed instance. */ + @path + @segment("managedInstances") + @key + managedInstanceName: string; + }, + {}, + ResourceName = "ManagedInstanceServerTrustCertificate" +>; + #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @armResourceOperations @Azure.ResourceManager.Legacy.feature(Features.ServerTrustCertificates) @@ -34,14 +51,30 @@ interface ServerTrustCertificates { /** * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. */ - get is ArmResourceRead; + get is ServerTrustCertificatesOps.Read< + ServerTrustCertificate, + Parameters = { + /** Name of of the certificate to get. */ + @path + @segment("serverTrustCertificates") + @key + certificateName: string; + } + >; /** * Uploads a server trust certificate from SQL Server to SQL Managed Instance. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - createOrUpdate is ArmResourceCreateOrReplaceAsync< + createOrUpdate is ServerTrustCertificatesOps.CreateOrUpdateSync< ServerTrustCertificate, + Parameters = { + /** Name of of the certificate to get. */ + @path + @segment("serverTrustCertificates") + @key + certificateName: string; + }, Response = | ArmResourceUpdatedResponse | ArmResourceCreatedResponse< @@ -56,8 +89,15 @@ interface ServerTrustCertificates { * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - delete is ArmResourceDeleteWithoutOkAsync< + delete is ServerTrustCertificatesOps.DeleteSync< ServerTrustCertificate, + Parameters = { + /** Name of of the certificate to get. */ + @path + @segment("serverTrustCertificates") + @key + certificateName: string; + }, Response = | ArmDeletedResponse | ArmDeleteAcceptedLroResponse @@ -67,7 +107,7 @@ interface ServerTrustCertificates { /** * Gets a list of the server trust certificates used to secure communication between SQL Server and the specified SQL Managed Instance */ - listByInstance is ArmResourceListByParent< + listByInstance is ServerTrustCertificatesOps.List< ServerTrustCertificate, Response = ServerTrustCertificatesListResult >; diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerTrustGroup.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerTrustGroup.tsp index 0b05cb0de7e1..2bf348ed9472 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerTrustGroup.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/ServerTrustGroup.tsp @@ -37,7 +37,7 @@ alias ServerTrustGroupsOps = Azure.ResourceManager.Legacy.LegacyOperations< @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; }, { /** The name of the server trust group. */ diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessment.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessment.tsp index 3009609097d7..589ddc747dd6 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessment.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessment.tsp @@ -21,8 +21,7 @@ model SqlVulnerabilityAssessment Resource = SqlVulnerabilityAssessment, KeyName = "vulnerabilityAssessmentName", SegmentName = "sqlVulnerabilityAssessments", - NamePattern = "", - Type = SqlVulnerabilityAssessmentName + NamePattern = "" >; } @@ -45,7 +44,8 @@ alias SqlVulnerabilityAssessmentOps = Azure.ResourceManager.Legacy.LegacyOperati @key databaseName: string; }, - {} + {}, + ResourceName = "SqlDatabaseSqlVulnerabilityAssessment" >; @armResourceOperations(#{ omitTags: true }) @@ -98,6 +98,7 @@ interface SqlVulnerabilityAssessments { @path @segment("sqlVulnerabilityAssessments") @key + @Azure.ClientGenerator.Core.alternateType(string, "csharp") // The vulnerabilityAssessmentName is name of the resource SqlVulnerabilityAssessment which must be a string for C#. vulnerabilityAssessmentName: VulnerabilityAssessmentName; } >; @@ -115,7 +116,8 @@ alias SqlVulnerabilityAssessmentsSettingOps = Azure.ResourceManager.Legacy.Legac @key serverName: string; }, - {} + {}, + ResourceName = "SqlServerSqlVulnerabilityAssessment" >; @armResourceOperations(#{ omitTags: true }) @@ -135,6 +137,7 @@ interface SqlVulnerabilityAssessmentsSettings { @path @segment("sqlVulnerabilityAssessments") @key + @Azure.ClientGenerator.Core.alternateType(string, "csharp") // The vulnerabilityAssessmentName is name of the resource SqlVulnerabilityAssessment which must be a string for C#. vulnerabilityAssessmentName: SqlVulnerabilityAssessmentName; } >; @@ -154,6 +157,7 @@ interface SqlVulnerabilityAssessmentsSettings { @path @segment("sqlVulnerabilityAssessments") @key + @Azure.ClientGenerator.Core.alternateType(string, "csharp") // The vulnerabilityAssessmentName is name of the resource SqlVulnerabilityAssessment which must be a string for C#. vulnerabilityAssessmentName: VulnerabilityAssessmentName; } >; @@ -173,6 +177,7 @@ interface SqlVulnerabilityAssessmentsSettings { @path @segment("sqlVulnerabilityAssessments") @key + @Azure.ClientGenerator.Core.alternateType(string, "csharp") // The vulnerabilityAssessmentName is name of the resource SqlVulnerabilityAssessment which must be a string for C#. vulnerabilityAssessmentName: VulnerabilityAssessmentName; } >; @@ -206,6 +211,7 @@ interface SqlVulnerabilityAssessmentsSettings { @path @segment("sqlVulnerabilityAssessments") @key + @Azure.ClientGenerator.Core.alternateType(string, "csharp") // The vulnerabilityAssessmentName is name of the resource SqlVulnerabilityAssessment which must be a string for C#. vulnerabilityAssessmentName: VulnerabilityAssessmentName; /** diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessmentScanRecord.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessmentScanRecord.tsp index 7b969299f9ce..964d3c5d8a08 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessmentScanRecord.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessmentScanRecord.tsp @@ -56,7 +56,8 @@ alias SqlVulnerabilityAssessmentScanRecordOps = Azure.ResourceManager.Legacy.Leg @segment("scans") @key scanId: string; - } + }, + ResourceName = "SqlDatabaseSqlVulnerabilityAssessmentScan" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -106,7 +107,8 @@ alias SqlVulnerabilityAssessmentScanOps = Azure.ResourceManager.Legacy.LegacyOpe @segment("scans") @key scanId: string; - } + }, + ResourceName = "SqlServerSqlVulnerabilityAssessmentScan" >; model SqlVulnerabilityAssessmentScanRecordListResult is ResourceListResult; diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessmentScanResults.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessmentScanResults.tsp index 51a62cc58b8a..9100e2b723cf 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessmentScanResults.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/SqlVulnerabilityAssessmentScanResults.tsp @@ -60,7 +60,8 @@ alias DatabaseSqlVulnerabilityAssessmentScanResultOps = Azure.ResourceManager.Le @segment("scanResults") @key scanResultId: string; - } + }, + ResourceName = "SqlDatabaseSqlVulnerabilityAssessmentScanResult" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -113,7 +114,8 @@ alias SqlVulnerabilityAssessmentScanResultOps = Azure.ResourceManager.Legacy.Leg @segment("scanResults") @key scanResultId: string; - } + }, + ResourceName = "SqlServerSqlVulnerabilityAssessmentScanResult" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/SubscriptionUsage.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/SubscriptionUsage.tsp index 25dc8dbd1a14..69c5a7f94494 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/SubscriptionUsage.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/SubscriptionUsage.tsp @@ -36,7 +36,7 @@ alias SubscriptionUsagesOps = Azure.ResourceManager.Legacy.LegacyOperations< @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; }, { /** Name of usage metric to return. */ diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/TimeZone.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/TimeZone.tsp index 2b4360ac4290..9ebe9d8d332a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/TimeZone.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/TimeZone.tsp @@ -35,7 +35,7 @@ alias TimeZonesOps = Azure.ResourceManager.Legacy.LegacyOperations< @path @segment("locations") @key - locationName: string; + locationName: Azure.Core.azureLocation; }, { /** The time zone ID. */ diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/VulnerabilityAssessmentScanRecord.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/VulnerabilityAssessmentScanRecord.tsp index 9a757971aa1d..ac98d5f42e14 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/VulnerabilityAssessmentScanRecord.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/VulnerabilityAssessmentScanRecord.tsp @@ -56,7 +56,8 @@ alias VulnerabilityAssessmentScanRecordOps = Azure.ResourceManager.Legacy.Legacy @segment("scans") @key scanId: string; - } + }, + ResourceName = "SqlDatabaseVulnerabilityAssessmentScan" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@ -131,7 +132,8 @@ alias ManagedDatabaseVulnerabilityAssessmentScanOps = Azure.ResourceManager.Lega @segment("scans") @key scanId: string; - } + }, + ResourceName = "ManagedDatabaseVulnerabilityAssessmentScan" >; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/client.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/client.tsp index b3ace7fec974..6c0e4fcb169a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/client.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/client.tsp @@ -2,6 +2,8 @@ import "@azure-tools/typespec-client-generator-core"; import "./main.tsp"; using Azure.ClientGenerator.Core; +using Azure.ClientGenerator.Core.Legacy; +using Azure.Core; using Microsoft.Sql; // TODO: remove this when breaking change is allowed @@ -116,3 +118,1756 @@ using Microsoft.Sql; "VulnerabilityAssessmentScanRecordForSQLListResult ", "go" ); + +// C# resource and type mappings migrated from autorest.md.bak prepend-rp-prefix +@@clientName(DatabaseAutomaticTuning, "SqlDatabaseAutomaticTuning", "csharp"); +@@clientName( + DatabaseBlobAuditingPolicy, + "SqlDatabaseBlobAuditingPolicy", + "csharp" +); +@@clientName( + DatabaseSecurityAlertPolicy, + "SqlDatabaseSecurityAlertPolicy", + "csharp" +); +@@clientName(TimeZone, "SqlTimeZone", "csharp"); +@@clientName(Server, "SqlServer", "csharp"); +@@clientName(ServerCreateMode, "SqlServerCreateMode", "csharp"); +@@clientName(Database, "SqlDatabase", "csharp"); +@@clientName(DayOfWeek, "SqlDayOfWeek", "csharp"); +@@clientName(MetricType, "SqlMetricType", "csharp"); +@@clientName(ServerAutomaticTuning, "SqlServerAutomaticTuning", "csharp"); +@@clientName( + ServerAzureADAdministrator, + "SqlServerAzureADAdministrator", + "csharp" +); +@@clientName( + ServerAzureADOnlyAuthentication, + "SqlServerAzureADOnlyAuthentication", + "csharp" +); +@@clientName(ServerBlobAuditingPolicy, "SqlServerBlobAuditingPolicy", "csharp"); +@@clientName(ServerConnectionPolicy, "SqlServerConnectionPolicy", "csharp"); +@@clientName(ServerDnsAlias, "SqlServerDnsAlias", "csharp"); +@@clientName(ServerKey, "SqlServerKey", "csharp"); +@@clientName( + ServerSecurityAlertPolicy, + "SqlServerSecurityAlertPolicy", + "csharp" +); +@@clientName(ServerTrustGroup, "SqlServerTrustGroup", "csharp"); +@@clientName( + ServerVulnerabilityAssessment, + "SqlServerVulnerabilityAssessment", + "csharp" +); +@@clientName(ServicePrincipal, "SqlServicePrincipal", "csharp"); +@@clientName(ServicePrincipalType, "SqlServicePrincipalType", "csharp"); +@@clientName(FirewallRule, "SqlFirewallRule", "csharp"); +@@clientName(AdministratorName, "SqlAdministratorName", "csharp"); +@@clientName(AdministratorType, "SqlAdministratorType", "csharp"); +@@clientName(CapabilityGroup, "SqlCapabilityGroup", "csharp"); +@@clientName(CapabilityStatus, "SqlCapabilityStatus", "csharp"); +@@clientName(LocationCapabilities, "SqlLocationCapabilities", "csharp"); +@@clientName(ColumnDataType, "SqlColumnDataType", "csharp"); +@@clientName(DatabaseState, "SqlDatabaseState", "csharp"); +@@clientName(DatabaseStatus, "SqlDatabaseStatus", "csharp"); +@@clientName(ResourceMoveDefinition, "SqlResourceMoveDefinition", "csharp"); +@@clientName(ServerUsage, "SqlServerUsage", "csharp"); +@@clientName(AdvisorStatus, "SqlAdvisorStatus", "csharp"); +@@clientName(Advisor, "SqlAdvisor", "csharp"); + +// C# model and enum mappings migrated from autorest.md.bak rename-mapping +@@clientName( + CopyLongTermRetentionBackupParameters, + "CopyLongTermRetentionBackupContent", + "csharp" +); +@@clientName( + UpdateLongTermRetentionBackupParameters, + "UpdateLongTermRetentionBackupContent", + "csharp" +); +@@clientName(Name, "InstancePoolUsageName", "csharp"); +@@Azure.ClientGenerator.Core.clientName( + global.Microsoft.Sql.Usage, + "InstancePoolUsage", + "csharp" +); +@@Azure.ClientGenerator.Core.clientName( + global.Microsoft.Sql.Usage.type, + "ResourceType", + "csharp" +); +@@clientName(UsageListResult, "InstancePoolUsageListResult", "csharp"); +@@clientName(SampleName, "SampleSchemaName", "csharp"); +@@clientName(Job, "SqlServerJob", "csharp"); +@@clientName(JobAgent, "SqlServerJobAgent", "csharp"); +@@clientName(JobVersion, "SqlServerJobVersion", "csharp"); +@@clientName(JobCredential, "SqlServerJobCredential", "csharp"); +@@clientName(JobTargetGroup, "SqlServerJobTargetGroup", "csharp"); +@@clientName(JobSchedule, "SqlServerJobSchedule", "csharp"); +@@clientName(JobScheduleType, "SqlServerJobScheduleType", "csharp"); +@@clientName(JobExecution, "SqlServerJobExecution", "csharp"); +@@clientName(JobStep, "SqlServerJobStep", "csharp"); +@@clientName(LedgerDigestUploads, "LedgerDigestUpload", "csharp"); +@@clientName( + ServerDevOpsAuditingSettings, + "SqlServerDevOpsAuditingSetting", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsResult, + "ManagedDatabaseRestoreDetail", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsBackupSetProperties, + "ManagedDatabaseRestoreDetailBackupSetProperties", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsUnrestorableFileProperties, + "ManagedDatabaseRestoreDetailUnrestorableFileProperties", + "csharp" +); +@@clientName(CheckNameAvailabilityReason, "SqlNameUnavailableReason", "csharp"); +@@clientName( + CheckNameAvailabilityRequest, + "SqlNameAvailabilityContent", + "csharp" +); +@@clientName(CreateMode, "SqlDatabaseCreateMode", "csharp"); +@@clientName(OperationMode, "DatabaseExtensionOperationMode", "csharp"); +@@clientName(ProvisioningState, "JobExecutionProvisioningState", "csharp"); +@@clientName(PrincipalType, "SqlServerPrincipalType", "csharp"); +@@clientName(IsRetryable, "ActionRetryableState", "csharp"); +@@clientName(ExportDatabaseDefinition, "DatabaseExportDefinition", "csharp"); +@@clientName(ImportNewDatabaseDefinition, "DatabaseImportDefinition", "csharp"); +@@clientName(PartnerInfo, "PartnerServerInfo", "csharp"); +@@clientName(ReplicationState, "ReplicationLinkState", "csharp"); +@@clientName(ServerInfo, "ServerTrustGroupServerInfo", "csharp"); +@@clientName(DatabaseExtensions, "SqlDatabaseExtension", "csharp"); +@@clientName(DatabaseOperation, "DatabaseOperationData", "csharp"); +@@clientName(ServerOperation, "ServerOperationData", "csharp"); +@@clientName(ElasticPoolOperation, "ElasticPoolOperationData", "csharp"); +@@clientName( + UpdateVirtualClusterDnsServersOperation, + "ManagedInstanceUpdateDnsServersOperationData", + "csharp" +); +@@clientName(VirtualNetworkRule, "SqlServerVirtualNetworkRule", "csharp"); +@@clientName( + VirtualNetworkRuleState, + "SqlServerVirtualNetworkRuleState", + "csharp" +); +@@clientName( + PrivateEndpointConnectionProperties, + "ServerPrivateEndpointConnectionProperties", + "csharp" +); +@@clientName( + PrivateEndpointProvisioningState, + "SqlPrivateEndpointProvisioningState", + "csharp" +); +@@clientName( + PrivateLinkServiceConnectionStateActionsRequire, + "SqlPrivateLinkServiceConnectionActionsRequired", + "csharp" +); +@@clientName( + PrivateLinkServiceConnectionStateStatus, + "SqlPrivateLinkServiceConnectionStatus", + "csharp" +); +@@clientName(SecurityAlertPolicyName, "SqlSecurityAlertPolicyName", "csharp"); +@@clientName(ServerKeyType, "SqlServerKeyType", "csharp"); +@@clientName( + ServerPrivateEndpointConnection, + "SqlServerPrivateEndpointConnection", + "csharp" +); +@@clientName(ReplicationLink, "SqlServerDatabaseReplicationLink", "csharp"); +@@clientName(ReplicationRole, "SqlServerDatabaseReplicationRole", "csharp"); +@@clientName(ServerVersionCapability, "SqlServerVersionCapability", "csharp"); +@@clientName(RestorePoint, "SqlServerDatabaseRestorePoint", "csharp"); +@@clientName(BackupStorageRedundancy, "SqlBackupStorageRedundancy", "csharp"); +@@clientName( + DNSRefreshOperationStatus, + "DnsRefreshConfigurationPropertiesStatus", + "csharp" +); +@@clientName( + DatabaseSqlVulnerabilityAssessmentBaselineSet, + "SqlVulnerabilityAssessmentBaseline", + "csharp" +); +@@clientName(BaselineName, "SqlVulnerabilityAssessmentBaselineName", "csharp"); +@@clientName( + DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + "SqlVulnerabilityAssessmentBaselineCreateOrUpdateContent", + "csharp" +); +@@clientName( + DatabaseSqlVulnerabilityAssessmentRuleBaseline, + "SqlVulnerabilityAssessmentBaselineRule", + "csharp" +); +@@clientName( + DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + "SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent", + "csharp" +); +@@clientName( + SqlVulnerabilityAssessmentScanRecord, + "SqlVulnerabilityAssessmentScan", + "csharp" +); +@@clientName( + AlwaysEncryptedEnclaveType, + "SqlAlwaysEncryptedEnclaveType", + "csharp" +); +@@clientName(SynapseLinkWorkspace, "SqlSynapseLinkWorkspace", "csharp"); +@@clientName( + BaselineAdjustedResult, + "SqlVulnerabilityAssessmentBaselineAdjustedResult", + "csharp" +); +@@clientName(Remediation, "SqlVulnerabilityAssessmentRemediation", "csharp"); +@@clientName(VaRule, "SqlVulnerabilityAssessmentRuleMetadata", "csharp"); +@@clientName(RuleStatus, "SqlVulnerabilityAssessmentRuleStatus", "csharp"); +@@clientName(Baseline, "SqlVulnerabilityAssessmentBaselineDetails", "csharp"); +@@clientName( + BenchmarkReference, + "SqlVulnerabilityAssessmentBenchmarkReference", + "csharp" +); +@@clientName(MoveOperationMode, "ManagedDatabaseMoveOperationMode", "csharp"); +@@clientName(QueryCheck, "SqlVulnerabilityAssessmentQueryCheck", "csharp"); +@@clientName(RuleSeverity, "SqlVulnerabilityAssessmentRuleSeverity", "csharp"); +@@clientName(RuleType, "SqlVulnerabilityAssessmentRuleType", "csharp"); +@@clientName( + SynapseLinkWorkspaceInfoProperties, + "SqlSynapseLinkWorkspaceInfo", + "csharp" +); +@@clientName(SecondaryInstanceType, "GeoSecondaryInstanceType", "csharp"); +@@clientName( + StartStopManagedInstanceSchedule, + "ManagedInstanceStartStopSchedule", + "csharp" +); +@@clientName( + StartStopScheduleName, + "ManagedInstanceStartStopScheduleName", + "csharp" +); +@@clientName(DatabaseKey, "SqlDatabaseKey", "csharp"); +@@clientName(DatabaseKeyType, "SqlDatabaseKeyType", "csharp"); +@@clientName(AvailabilityZoneType, "SqlAvailabilityZoneType", "csharp"); +@@clientName(EndpointDependency, "ManagedInstanceEndpointDependency", "csharp"); +@@clientName(EndpointDetail, "ManagedInstanceEndpointDetail", "csharp"); +@@clientName(ScheduleItem, "SqlScheduleItem", "csharp"); +@@clientName( + ServerConfigurationOptionName, + "ManagedInstanceServerConfigurationOptionName", + "csharp" +); +@@clientName( + ServerConfigurationOption, + "ManagedInstanceServerConfigurationOption", + "csharp" +); +@@clientName( + OutboundEnvironmentEndpoint, + "SqlOutboundEnvironmentEndpoint", + "csharp" +); +@@clientName( + OutboundEnvironmentEndpointCollection, + "SqlOutboundEnvironmentEndpointCollection", + "csharp" +); +@@clientName(MinimalTlsVersion, "SqlMinimalTlsVersion", "csharp"); +@@clientName(MinimalTlsVersion.None, "TlsNone", "csharp"); +@@clientName( + MinimalTlsVersion.`1.0`, + Azure.ClientGenerator.Core.exact("Tls1_0"), + "csharp" +); +@@clientName( + MinimalTlsVersion.`1.1`, + Azure.ClientGenerator.Core.exact("Tls1_1"), + "csharp" +); +@@clientName( + MinimalTlsVersion.`1.2`, + Azure.ClientGenerator.Core.exact("Tls1_2"), + "csharp" +); +@@clientName( + MinimalTlsVersion.`1.3`, + Azure.ClientGenerator.Core.exact("Tls1_3"), + "csharp" +); +@@clientName(BackupStorageAccessTier, "SqlBackupStorageAccessTier", "csharp"); +@@clientName(Phase, "DatabaseOperationPhase", "csharp"); +@@clientName(PhaseDetails, "DatabaseOperationPhaseDetails", "csharp"); +@@clientName( + UpsertManagedServerOperationStepWithEstimatesAndDuration, + "UpsertManagedServerOperationStep", + "csharp" +); +@@clientName( + DistributedAvailabilityGroup, + "SqlDistributedAvailabilityGroup", + "csharp" +); +@@clientName( + NetworkSecurityPerimeterConfiguration, + "SqlNetworkSecurityPerimeterConfiguration", + "csharp" +); +@@clientName(CertificateInfo, "SqlServerCertificateInfo", "csharp"); +@@clientName(FailoverModeType, "SqlServerFailoverModeType", "csharp"); +@@clientName(FailoverType, "SqlServerFailoverType", "csharp"); +@@clientName( + InstanceRole, + "DistributedAvailabilityGroupManagedInstanceRole", + "csharp" +); +@@clientName(LinkRole, "SqlServerSideLinkRole", "csharp"); +@@clientName( + NSPConfigAccessRule, + "SqlNetworkSecurityPerimeterConfigAccessRule", + "csharp" +); +@@clientName( + NSPConfigAccessRuleProperties, + "SqlNetworkSecurityPerimeterConfigAccessRuleProperties", + "csharp" +); +@@clientName( + NSPConfigAssociation, + "SqlNetworkSecurityPerimeterConfigAssociation", + "csharp" +); +@@clientName( + NSPConfigNetworkSecurityPerimeterRule, + "SqlNetworkSecurityPerimeterConfigRule", + "csharp" +); +@@clientName( + NSPConfigPerimeter, + "SqlNetworkSecurityPerimeterConfigPerimeter", + "csharp" +); +@@clientName( + NSPConfigProfile, + "SqlNetworkSecurityPerimeterConfigProfile", + "csharp" +); +@@clientName( + NSPProvisioningIssue, + "SqlNetworkSecurityPerimeterProvisioningIssue", + "csharp" +); +@@clientName( + NSPProvisioningIssueProperties, + "SqlNetworkSecurityPerimeterProvisioningIssueProperties", + "csharp" +); +@@clientName(PricingModel, "SqlManagedInstancePricingModel", "csharp"); +@@clientName( + RefreshExternalGovernanceStatusOperationResultMI, + "SqlManagedInstanceRefreshExternalGovernanceStatusOperationResult", + "csharp" +); +@@clientName(ReplicaConnectedState, "SqlReplicaConnectedState", "csharp"); +@@clientName( + ReplicaSynchronizationHealth, + "SqlReplicaSynchronizationHealth", + "csharp" +); +@@clientName(ReplicationModeType, "SqlReplicationModeType", "csharp"); +@@clientName( + RoleChangeType, + "DistributedAvailabilityGroupRoleChangeType", + "csharp" +); +@@clientName(InstancePoolOperation, "SqlInstancePoolOperation", "csharp"); +@@clientName(ErrorType, "SqlInstancePoolOperationErrorType", "csharp"); +@@clientName( + InaccessibilityReason, + "ManagedDatabaseInaccessibilityReason", + "csharp" +); + +@@alternateType( + CopyLongTermRetentionBackupParametersProperties.targetServerResourceId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + DeletedServerProperties.originalId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ElasticPoolProperties.maintenanceConfigurationId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ElasticPoolUpdateProperties.maintenanceConfigurationId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + InstancePoolProperties.subnetId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + LongTermRetentionOperationResultProperties.fromBackupResourceId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + LongTermRetentionOperationResultProperties.toBackupResourceId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedDatabaseProperties.crossSubscriptionTargetManagedInstanceId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedDatabaseProperties.crossSubscriptionSourceDatabaseId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedDatabaseProperties.crossSubscriptionRestorableDroppedDatabaseId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedDatabaseProperties.failoverGroupId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedDatabaseProperties.longTermRetentionBackupResourceId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedDatabaseProperties.recoverableDatabaseId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedDatabaseProperties.sourceDatabaseId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedInstanceProperties.instancePoolId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedInstanceProperties.maintenanceConfigurationId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedInstanceProperties.virtualClusterId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedInstancePrivateEndpointProperty.id, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedDatabaseMoveDefinition.destinationManagedDatabaseId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + ManagedDatabaseStartMoveDefinition.destinationManagedDatabaseId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + SynapseLinkWorkspaceInfoProperties.workspaceId, + armResourceIdentifier, + "csharp" +); +@@alternateType(PrivateEndpointProperty.id, armResourceIdentifier, "csharp"); +@@alternateType( + ServerProperties.primaryUserAssignedIdentityId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + VirtualNetworkRuleProperties.virtualNetworkSubnetId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + SyncAgentProperties.syncDatabaseId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + SyncGroupProperties.syncDatabaseId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + SyncMemberProperties.syncAgentId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + SyncMemberProperties.syncMemberAzureDatabaseResourceId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + VirtualClusterProperties.subnetId, + armResourceIdentifier, + "csharp" +); + +@@alternateType(Advisor.location, azureLocation, "csharp"); +@@alternateType(EncryptionProtector.location, azureLocation, "csharp"); +@@alternateType( + ManagedDatabaseProperties.defaultSecondaryLocation, + azureLocation, + "csharp" +); +@@alternateType(ServerConnectionPolicy.location, azureLocation, "csharp"); +@@alternateType( + ReplicationLinkProperties.partnerLocation, + azureLocation, + "csharp" +); +@@alternateType(RestorePoint.location, azureLocation, "csharp"); +@@alternateType(ServerKey.location, azureLocation, "csharp"); + +@@alternateType(DatabaseExtensionsProperties.storageUri, url, "csharp"); +@@alternateType(EncryptionProtectorProperties.uri, url, "csharp"); +@@alternateType( + ImportExportExtensionsOperationResultProperties.blobUri, + url, + "csharp" +); +@@alternateType(ImportExportOperationResultProperties.blobUri, url, "csharp"); +@@alternateType(ManagedDatabaseProperties.storageContainerUri, url, "csharp"); +@@alternateType( + ManagedInstanceEncryptionProtectorProperties.uri, + url, + "csharp" +); +@@alternateType(ManagedInstanceKeyProperties.uri, url, "csharp"); +@@alternateType(ManagedInstanceProperties.keyId, url, "csharp"); +@@alternateType(ServerKeyProperties.uri, url, "csharp"); +@@alternateType(ServerProperties.keyId, url, "csharp"); + +@@alternateType(SecurityEventProperties.clientIp, ipV4Address, "csharp"); +@@alternateType(SyncAgentLinkedDatabaseProperties.databaseId, uuid, "csharp"); +@@alternateType( + ServerProperties.publicNetworkAccess, + ServerNetworkAccessFlag, + "csharp" +); + +@@clientName(DatabaseIdentity.type, "IdentityType", "csharp"); +@@clientName(JobAgentIdentity.type, "IdentityType", "csharp"); +@@clientName(JobExecutionTarget.type, "TargetType", "csharp"); +@@clientName(JobSchedule.type, "ScheduleType", "csharp"); +@@clientName(JobStepAction.type, "ActionType", "csharp"); +@@clientName(JobStepOutput.type, "OutputType", "csharp"); +@@clientName(JobTarget.type, "TargetType", "csharp"); +@@clientName(DatabaseKey.type, "KeyType", "csharp"); +@@clientName(CheckNameAvailabilityRequest.type, "ResourceType", "csharp"); +@@clientName( + PrivateEndpointConnectionProperties.privateLinkServiceConnectionState, + "ConnectionState", + "csharp" +); +@@clientName(ServicePrincipal.type, "PrincipalType", "csharp"); +@@clientName(SyncGroupLogProperties.type, "LogType", "csharp"); +@@usage(QueryStatistics, Azure.ClientGenerator.Core.Usage.input, "csharp"); + +// C# alternate type mappings migrated from autorest.md.bak directive format transforms +@@alternateType(global.Microsoft.Sql.Usage.id, armResourceIdentifier, "csharp"); +@@alternateType(global.Microsoft.Sql.Usage.type, armResourceType, "csharp"); +@@alternateType(ResourceWithWritableName.id, armResourceIdentifier, "csharp"); +@@alternateType(ManagedInstancePecProperty.id, armResourceIdentifier, "csharp"); +@@alternateType(ResourceMoveDefinition.id, armResourceIdentifier, "csharp"); +@@alternateType(PartnerInfo.id, armResourceIdentifier, "csharp"); +@@alternateType( + ServerPrivateEndpointConnection.id, + armResourceIdentifier, + "csharp" +); +@@alternateType(ServerInfo.serverId, armResourceIdentifier, "csharp"); +@@alternateType(ServicePrincipal.principalId, uuid, "csharp"); +@@alternateType(ServicePrincipal.clientId, uuid, "csharp"); +@@alternateType( + ManagedDatabaseProperties.restorableDroppedDatabaseId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + RecommendedActionProperties.executeActionDuration, + duration, + "csharp" +); +@@alternateType( + RecommendedActionProperties.revertActionDuration, + duration, + "csharp" +); +@@alternateType(MaintenanceWindowTimeRange.duration, duration, "csharp"); +@@alternateType(JobSchedule.interval, duration, "csharp"); + +@@clientName( + ManagedDatabaseProperties.autoCompleteRestore, + "AllowAutoCompleteRestore", + "csharp" +); +@@clientName( + DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.latestScan, + "IsLatestScan", + "csharp" +); +@@clientName( + DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.latestScan, + "IsLatestScan", + "csharp" +); +@@clientName(FailoverGroupProperties.databases, "FailoverDatabases", "csharp"); +@@clientName( + FailoverGroupUpdateProperties.databases, + "FailoverDatabases", + "csharp" +); +@@clientName(GeoBackupPolicyProperties.state, "GeoBackupPolicyState", "csharp"); +@@clientName( + ManagedDatabaseRestoreDetailsProperties.currentRestoredSizeMB, + "CurrentRestoredSizeInMB", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsProperties.currentRestorePlanSizeMB, + "CurrentRestorePlanSizeInMB", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsProperties.type, + "RestoreType", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsProperties.percentCompleted, + "CompletedPercent", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsProperties.numberOfFilesDetected, + "NumberOfFilesFound", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsProperties.unrestorableFiles, + "UnrestorableFileList", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsBackupSetProperties.backupSizeMB, + "BackupSizeInMB", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsBackupSetProperties.restoreStartedTimestampUtc, + "RestoreStartedOn", + "csharp" +); +@@clientName( + ManagedDatabaseRestoreDetailsBackupSetProperties.restoreFinishedTimestampUtc, + "RestoreFinishedOn", + "csharp" +); +@@clientName( + ManagedInstanceProperties.dnsZonePartner, + "ManagedDnsZonePartner", + "csharp" +); +@@clientName( + ManagedInstanceExternalAdministrator.azureADOnlyAuthentication, + "IsAzureADOnlyAuthenticationEnabled", + "csharp" +); +@@clientName( + ServerExternalAdministrator.azureADOnlyAuthentication, + "IsAzureADOnlyAuthenticationEnabled", + "csharp" +); +@@clientName( + ManagedInstanceAzureADOnlyAuthProperties.azureADOnlyAuthentication, + "IsAzureADOnlyAuthenticationEnabled", + "csharp" +); +@@clientName( + ManagedInstancePrivateEndpointConnectionProperties.privateLinkServiceConnectionState, + "PrivateLinkServiceConnectionState", + "csharp" +); +@@clientName(RecommendedActionProperties.details, "ActionDetails", "csharp"); +@@clientName( + RestorePointProperties.restorePointCreationDate, + "restorePointCreatedOn", + "csharp" +); +@@clientName(ServerProperties.minimalTlsVersion, "minTlsVersion", "csharp"); +@@clientName( + AdministratorProperties.azureADOnlyAuthentication, + "IsAzureADOnlyAuthenticationEnabled", + "csharp" +); +@@clientName( + AzureADOnlyAuthProperties.azureADOnlyAuthentication, + "IsAzureADOnlyAuthenticationEnabled", + "csharp" +); +@@clientName( + SyncGroupProperties.enableConflictLogging, + "IsConflictLoggingEnabled", + "csharp" +); +@@clientName(AlwaysEncryptedEnclaveType.VBS, "Vbs", "csharp"); +@@clientName(Remediation.automated, "IsAutomated", "csharp"); +@@clientName( + ManagedInstanceDtcSecuritySettings.xaTransactionsDefaultTimeout, + "XATransactionsDefaultTimeoutInSeconds", + "csharp" +); +@@clientName( + ManagedInstanceDtcSecuritySettings.xaTransactionsMaximumTimeout, + "XATransactionsMaximumTimeoutInSeconds", + "csharp" +); +@@clientName( + ManagedInstanceDtcSecuritySettings.xaTransactionsEnabled, + "IsXATransactionsEnabled", + "csharp" +); +@@clientName(AuthMetadataLookupModes, "AuthMetadataLookupMode", "csharp"); +@@clientName(AuthMetadataLookupModes.AzureAD, "Aad", "csharp"); +@@clientName(ClientClassificationSource.MIP, "Mip", "csharp"); +@@clientName(DataMaskingRuleProperties.id, "RuleId", "csharp"); +@@clientName( + DataMaskingRuleProperties.ruleState, + "DataMaskingRuleState", + "csharp" +); +@@clientName( + DataMaskingRuleProperties.maskingFunction, + "DataMaskingFunction", + "csharp" +); +@@clientName(ReplicaSynchronizationHealth.NOT_HEALTHY, "NotHealthy", "csharp"); +@@clientName( + ManagedInstanceVcoresCapability.supportedMemoryLimitsMB, + "SupportedMemoryLimitsInMB", + "csharp" +); + +// C# client name mappings migrated from autorest.md.bak directive x-ms-client-name transforms +@@clientName( + LongTermRetentionBackupProperties.backupExpirationTime, + "backupExpireOn", + "csharp" +); +@@clientName( + ManagedInstanceLongTermRetentionBackupProperties.backupExpirationTime, + "backupExpireOn", + "csharp" +); +@@clientName( + LongTermRetentionBackupProperties.databaseDeletionTime, + "databaseDeletedOn", + "csharp" +); +@@clientName( + ManagedInstanceLongTermRetentionBackupProperties.databaseDeletionTime, + "databaseDeletedOn", + "csharp" +); +@@clientName(SyncAgentProperties.expiryTime, "ExpireOn", "csharp"); +@@clientName( + DatabaseProperties.sourceDatabaseDeletionDate, + "sourceDatabaseDeletedOn", + "csharp" +); +@@clientName( + DatabaseUpdateProperties.sourceDatabaseDeletionDate, + "sourceDatabaseDeletedOn", + "csharp" +); +@@clientName( + DatabaseOperationProperties.estimatedCompletionTime, + "estimatedCompleteOn", + "csharp" +); +@@clientName( + ElasticPoolOperationProperties.estimatedCompletionTime, + "estimatedCompleteOn", + "csharp" +); +@@clientName( + InstancePoolOperationProperties.estimatedCompletionTime, + "estimatedCompleteOn", + "csharp" +); +@@clientName( + ManagedInstanceOperationProperties.estimatedCompletionTime, + "estimatedCompleteOn", + "csharp" +); +@@clientName( + ServerOperationProperties.estimatedCompletionTime, + "estimatedCompleteOn", + "csharp" +); +@@clientName( + SecurityAlertPolicyProperties.emailAccountAdmins, + "SendToEmailAccountAdmins", + "csharp" +); +@@clientName( + SecurityAlertsPolicyProperties.emailAccountAdmins, + "SendToEmailAccountAdmins", + "csharp" +); +@@clientName(AdvisorProperties.lastChecked, "LastCheckedOn", "csharp"); +@@clientName( + DatabaseColumnProperties.memoryOptimized, + "IsMemoryOptimized", + "csharp" +); +@@clientName( + DatabaseTableProperties.memoryOptimized, + "IsMemoryOptimized", + "csharp" +); +@@clientName(DatabaseProperties.zoneRedundant, "IsZoneRedundant", "csharp"); +@@clientName( + DatabaseUpdateProperties.zoneRedundant, + "IsZoneRedundant", + "csharp" +); +@@clientName(EditionCapability.zoneRedundant, "IsZoneRedundant", "csharp"); +@@clientName( + ElasticPoolEditionCapability.zoneRedundant, + "IsZoneRedundant", + "csharp" +); +@@clientName( + ElasticPoolPerformanceLevelCapability.zoneRedundant, + "IsZoneRedundant", + "csharp" +); +@@clientName(ElasticPoolProperties.zoneRedundant, "IsZoneRedundant", "csharp"); +@@clientName( + ElasticPoolUpdateProperties.zoneRedundant, + "IsZoneRedundant", + "csharp" +); +@@clientName( + MaintenanceConfigurationCapability.zoneRedundant, + "IsZoneRedundant", + "csharp" +); +@@clientName( + ManagedInstanceFamilyCapability.zoneRedundant, + "IsZoneRedundant", + "csharp" +); +@@clientName( + ManagedInstanceProperties.zoneRedundant, + "IsZoneRedundant", + "csharp" +); +@@clientName( + ServiceObjectiveCapability.zoneRedundant, + "IsZoneRedundant", + "csharp" +); +@@clientName( + EncryptionProtectorProperties.autoRotationEnabled, + "IsAutoRotationEnabled", + "csharp" +); +@@clientName( + ManagedInstanceEncryptionProtectorProperties.autoRotationEnabled, + "IsAutoRotationEnabled", + "csharp" +); +@@clientName( + ManagedInstanceKeyProperties.autoRotationEnabled, + "IsAutoRotationEnabled", + "csharp" +); +@@clientName( + ServerKeyProperties.autoRotationEnabled, + "IsAutoRotationEnabled", + "csharp" +); +@@clientName( + ManagedInstanceProperties.publicDataEndpointEnabled, + "IsPublicDataEndpointEnabled", + "csharp" +); +@@clientName( + ManagedInstanceVcoresCapability.instancePoolSupported, + "IsInstancePoolSupported", + "csharp" +); +@@clientName( + ManagedInstanceVcoresCapability.standaloneSupported, + "IsStandaloneSupported", + "csharp" +); +@@clientName(JobSchedule.enabled, "IsEnabled", "csharp"); +@@clientName(CheckNameAvailabilityResponse.available, "IsAvailable", "csharp"); + +// C# operation name mappings migrated from autorest.md.bak override-operation-name +@@clientName( + Microsoft.Sql.ManagedInstances.listByInstance, + "GetSqlServerTrustGroups", + "csharp" +); +@@clientName(ManagedInstances.listByManagedInstance, "GetTopQueries", "csharp"); +@@clientName( + ManagedInstances.listInaccessibleByInstance, + "GetInaccessibleManagedDatabases", + "csharp" +); +@@clientName( + ManagedInstances.listOutboundNetworkDependenciesByManagedInstance, + "GetOutboundNetworkDependencies", + "csharp" +); +@@clientName( + ManagedInstanceQueries.listByQuery, + "GetQueryStatistics", + "csharp" +); +@@clientName( + CapabilitiesOperationGroup.listByLocation, + "GetCapabilitiesByLocation", + "csharp" +); +@@clientName( + ServersOperationGroup.checkNameAvailability, + "CheckSqlServerNameAvailability", + "csharp" +); +@@clientName( + LongTermRetentionBackupsOperationGroup.listByLocation, + "GetLongTermRetentionBackupsWithLocation", + "csharp" +); +@@clientName( + LongTermRetentionBackupsOperationGroup.listByResourceGroupLocation, + "GetLongTermRetentionBackupsWithResourceGroupLocation", + "csharp" +); +@@clientName( + LongTermRetentionBackupsOperationGroup.listByServer, + "GetLongTermRetentionBackupsWithServer", + "csharp" +); +@@clientName( + LongTermRetentionBackupsOperationGroup.listByResourceGroupServer, + "GetLongTermRetentionBackupsWithResourceGroupServer", + "csharp" +); +@@clientName( + LongTermRetentionManagedInstanceBackupsOperationGroup.listByInstance, + "GetLongTermRetentionManagedInstanceBackupsWithInstance", + "csharp" +); +@@clientName( + LongTermRetentionManagedInstanceBackupsOperationGroup.listByResourceGroupInstance, + "GetLongTermRetentionManagedInstanceBackupsWithResourceGroupInstance", + "csharp" +); +@@clientName( + LongTermRetentionManagedInstanceBackupsOperationGroup.listByLocation, + "GetLongTermRetentionManagedInstanceBackupsWithLocation", + "csharp" +); +@@clientName( + LongTermRetentionManagedInstanceBackupsOperationGroup.listByResourceGroupLocation, + "GetLongTermRetentionManagedInstanceBackupsWithResourceGroupLocation", + "csharp" +); +@@clientName(SqlVulnerabilityAssessments.execute, "ExecuteScan", "csharp"); +@@clientName( + SqlVulnerabilityAssessmentsSettings.execute, + "ExecuteScanSettings", + "csharp" +); +@@clientName( + SqlVulnerabilityAssessmentScanResults, + "SqlVulnerabilityAssessmentScanResult", + "csharp" +); +@@clientName(PrivateLinkResource, "SqlPrivateLinkResource", "csharp"); +@@clientName( + PrivateEndpointConnection, + "SqlPrivateEndpointConnection", + "csharp" +); +@@clientName(ManagedLedgerDigestUploads, "ManagedLedgerDigestUpload", "csharp"); +@@clientName(MaintenanceWindowOptions, "MaintenanceWindowOption", "csharp"); +@@clientName( + DataWarehouseUserActivities, + "DataWarehouseUserActivity", + "csharp" +); +@@clientName( + UpsertManagedServerOperationStepWithEstimatesAndDurationStatus, + "UpsertManagedServerOperationStepStatus", + "csharp" +); +@@clientName( + CheckNameAvailabilityResponse, + "SqlNameAvailabilityResponse", + "csharp" +); +@@clientName( + ManagedServerDnsAliasCreation, + "ManagedServerDnsAliasCreateOrUpdateContent", + "csharp" +); +@@clientName( + ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest, + "ManagedInstanceValidateAzureKeyVaultEncryptionKeyContent", + "csharp" +); +@@clientName( + ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest, + "ManagedInstanceValidateAzureKeyVaultEncryptionKeyContent", + "csharp" +); +@@clientName( + DistributedAvailabilityGroupsFailoverRequest, + "DistributedAvailabilityGroupsFailoverContent", + "csharp" +); +@@clientName(SyncAgentProperties.name, "SyncAgentName", "csharp"); +@@clientName( + ManagedDatabases.managedDatabaseRecommendedSensitivityLabelsUpdate, + "UpdateRecommendedManagedDatabaseSensitivityLabel", + "csharp" +); +@@clientName( + ManagedDatabases.listCurrentByDatabase, + "GetCurrentManagedDatabaseSensitivityLabels", + "csharp" +); +@@clientName( + ManagedDatabases.listRecommendedByDatabase, + "GetRecommendedManagedDatabaseSensitivityLabels", + "csharp" +); +@@clientName( + Databases.recommendedSensitivityLabelsUpdate, + "UpdateRecommendedSensitivityLabel", + "csharp" +); +@@clientName( + DataMaskingPolicies.listByDatabase, + "GetDataMaskingRules", + "csharp" +); +@@clientName( + Databases.databaseUsagesListByDatabase, + "GetDatabaseUsages", + "csharp" +); +@@clientName( + Databases.synapseLinkWorkspacesListByDatabase, + "GetSynapseLinkWorkspaces", + "csharp" +); +@@clientName( + ImportExportExtensionsOperationResults.listByDatabase, + "GetDatabaseExtensions", + "csharp" +); +@@clientName(ElasticPools.listByElasticPool, "GetDatabases", "csharp"); +@@clientName( + ElasticPools.elasticPoolOperationsListByElasticPool, + "GetElasticPoolOperations", + "csharp" +); +@@clientName( + Servers.serverOperationsListByServer, + "GetServerOperations", + "csharp" +); +@@clientName(Servers.serverUsagesListByServer, "GetServerUsages", "csharp"); + +// Scope out any operation methods for csharp as they have been implemented in core lib +@@scope(ManagedDatabaseMoveOperationResults.get, "!csharp"); +@@scope(ManagedDatabaseMoveOperationResults.listByLocation, "!csharp"); +// This is temporary, to be removed when we find the owner of this feature +@@scope(JobPrivateEndpoints.get, "!csharp"); +@@scope(JobPrivateEndpoints.createOrUpdate, "!csharp"); +@@scope(JobPrivateEndpoints.delete, "!csharp"); +@@scope(JobPrivateEndpoints.listByAgent, "!csharp"); +// This operation is not supported +@@scope(ImportExportExtensionsOperationResults.get, "!csharp"); +// This operation sends a list of rules but got a single rule in response, which is abnormal. Besides, using FirewallRules_CreateOrUpdate/FirewallRules_Delete multiple times could achieve the same goal. +@@scope(Servers.replace, "!csharp"); + +/** + * Provisioning state of managed instance. + */ +union ManagedInstancePropertiesProvisioningState { + string, + + /** + * Created + */ + Created: "Created", + + /** + * InProgress + */ + InProgress: "InProgress", + + /** + * Succeeded + */ + Succeeded: "Succeeded", + + /** + * Failed + */ + Failed: "Failed", + + /** + * Canceled + */ + Canceled: "Canceled", + + /** + * Creating + */ + Creating: "Creating", + + /** + * Deleting + */ + Deleting: "Deleting", + + /** + * Updating + */ + Updating: "Updating", + + /** + * Unknown + */ + Unknown: "Unknown", + + /** + * Accepted + */ + Accepted: "Accepted", + + /** + * Deleted + */ + Deleted: "Deleted", + + /** + * Unrecognized + */ + Unrecognized: "Unrecognized", + + /** + * Running + */ + Running: "Running", + + /** + * NotSpecified + */ + NotSpecified: "NotSpecified", + + /** + * Registering + */ + Registering: "Registering", + + /** + * TimedOut + */ + TimedOut: "TimedOut", +} +// Inherited from the original autorest.md settings. +@@alternateType( + ManagedInstanceProperties.provisioningState, + ManagedInstancePropertiesProvisioningState, + "csharp" +); + +/** + * Availability resource type. + */ +union SqlNameAvailabilityResourceType { + string, + + /** + * Microsoft.Sql/servers + */ + MicrosoftSqlServers: "Microsoft.Sql/servers", +} +// Inherited from the original autorest.md settings. Change fixed enum to extensible enum. +@@alternateType( + CheckNameAvailabilityRequest.type, + SqlNameAvailabilityResourceType, + "csharp" +); +@@usage( + RecommendedSensitivityLabelUpdateProperties, + + | Azure.ClientGenerator.Core.Usage.input + | Azure.ClientGenerator.Core.Usage.output, + "csharp" +); +@@usage( + RecommendedSensitivityLabelUpdate, + + | Azure.ClientGenerator.Core.Usage.input + | Azure.ClientGenerator.Core.Usage.output, + "csharp" +); +@@usage(EndpointCertificate, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(DatabaseColumn, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@clientName( + DatabaseColumnProperties.memoryOptimized, + "IsMemoryOptimized", + "csharp" +); +@@usage(DatabaseTable, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@clientName( + DatabaseTableProperties.memoryOptimized, + "IsMemoryOptimized", + "csharp" +); +@@alternateType(DataMaskingPolicy.location, azureLocation, "csharp"); +@@clientName( + DataMaskingPolicies.dataMaskingRulesCreateOrUpdate, + "CreateOrUpdateDataMaskingRule", + "csharp" +); +@@clientName(InstancePools.listByInstancePool, "GetManagedInstances", "csharp"); +@@clientName(InstancePools.usagesListByInstancePool, "GetUsages", "csharp"); +@@usage( + LongTermRetentionBackup, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + MaintenanceWindowOptions, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@clientName( + SensitivityLabels.disableRecommendation, + "DisableRecommendationManagedDatabaseSensitivityLabel", + "csharp" +); +@@clientName( + SensitivityLabels.enableRecommendation, + "EnableRecommendationManagedDatabaseSensitivityLabel", + "csharp" +); +@@clientName( + ManagedDatabases.listCurrentByDatabase, + "GetCurrentManagedDatabaseSensitivityLabels", + "csharp" +); +@@clientName( + ManagedDatabases.listRecommendedByDatabase, + "GetRecommendedManagedDatabaseSensitivityLabels", + "csharp" +); +@@clientName( + ManagedDatabases.managedDatabaseSensitivityLabelsListByDatabase, + "GetManagedDatabaseSensitivityLabelsByDatabase", + "csharp" +); +@@clientName( + ManagedDatabases.listByDatabase, + "GetManagedDatabaseColumnsByDatabase", + "csharp" +); +@@clientName(ManagedInstanceQueries.get, "GetManagedDatabaseQuery", "csharp"); +@@clientName( + ManagedDatabases.managedDatabaseSecurityEventsListByDatabase, + "GetManagedDatabaseSecurityEventsByDatabase", + "csharp" +); +@@clientName( + ManagedInstanceQueries.listByQuery, + "GetQueryStatistics", + "csharp" +); +@@clientName( + ManagedDatabases.managedDatabaseSensitivityLabelsUpdate, + "UpdateManagedDatabaseSensitivityLabel", + "csharp" +); +@@alternateType(ManagedInstanceOperation.name, uuid, "csharp"); +@@alternateType(InstancePoolOperation.name, uuid, "csharp"); +@@clientName(ElasticPools.cancel, "CancelElasticPoolOperation", "csharp"); + +@@clientName( + ManagedInstances.create, + "CreateManagedInstanceTdeCertificate", + "csharp" +); + +@@clientName(ServerUsageProperties.nextResetTime, "NextResetOn", "csharp"); +@@clientName(ResourceWithWritableName.type, "ResourceType", "csharp"); +@@alternateType(ResourceWithWritableName.type, armResourceType, "csharp"); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Back compatibility" +@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding( + RestorableDroppedDatabase, + Azure.ResourceManager.Foundations.TrackedResource, + "csharp" +); + +// --- Property type alternates (string -> ResourceIdentifier / AzureLocation) --- +@@alternateType( + DatabaseProperties.failoverGroupId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + DatabaseProperties.maintenanceConfigurationId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + DatabaseProperties.defaultSecondaryLocation, + azureLocation, + "csharp" +); +@@alternateType( + DatabaseUpdateProperties.failoverGroupId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + DatabaseUpdateProperties.maintenanceConfigurationId, + armResourceIdentifier, + "csharp" +); +@@alternateType( + DatabaseUpdateProperties.defaultSecondaryLocation, + azureLocation, + "csharp" +); +@@clientName( + CatalogCollationType.DATABASE_DEFAULT, + "DatabaseDefault", + "csharp" +); +@@clientName( + CatalogCollationType.SQL_Latin1_General_CP1_CI_AS, + "SqlLatin1GeneralCp1CiAs", + "csharp" +); + +@@clientName(DiffBackupIntervalInHours.`12`, "Twelve", "csharp"); +@@clientName(DiffBackupIntervalInHours.`24`, "TwentyFour", "csharp"); + +@@usage(DatabaseOperation, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(DatabaseUsage, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + DatabaseVulnerabilityAssessmentScansExport, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(ElasticPoolOperation, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + ImportExportExtensionsOperationResult, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + ImportExportOperationResult, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + LongTermRetentionBackupOperationResult, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + UpdateVirtualClusterDnsServersOperation, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + RefreshExternalGovernanceStatusOperationResult, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(SecurityEvent, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(ServerOperation, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + InstancePoolOperation, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + RefreshExternalGovernanceStatusOperationResultMI, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(NSPConfigAccessRule, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + NSPConfigAccessRuleProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(NSPConfigAssociation, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(NSPConfigPerimeter, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(NSPConfigProfile, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + NSPConfigNetworkSecurityPerimeterRule, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + NetworkSecurityPerimeterConfiguration, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(NSPProvisioningIssue, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + NSPProvisioningIssueProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(PrivateLinkResource, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(RestorePoint, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(ServerDnsAlias, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(JobExecution, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(JobVersion, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(ServerUsage, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(SynapseLinkWorkspace, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + SynapseLinkWorkspaceInfoProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(TimeZone, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + DatabaseSqlVulnerabilityAssessmentBaselineSet, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + DatabaseSqlVulnerabilityAssessmentRuleBaseline, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + SqlVulnerabilityAssessmentScanRecord, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + SqlVulnerabilityAssessmentScanResults, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(SubscriptionUsage, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + SyncAgentLinkedDatabase, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + VulnerabilityAssessmentScanRecord, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + RestorableDroppedDatabase, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(DatabaseExtensions, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage(TdeCertificate, Azure.ClientGenerator.Core.Usage.input, "csharp"); +@@usage( + DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); + +@@usage( + RecommendedSensitivityLabelUpdate, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + RecommendedSensitivityLabelUpdateProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + SensitivityLabelUpdate, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + SensitivityLabelUpdateProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + DatabaseExtensionsProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + TdeCertificateProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage( + QueryStatisticsProperties, + Azure.ClientGenerator.Core.Usage.input, + "csharp" +); +@@usage(QueryMetricInterval, Azure.ClientGenerator.Core.Usage.input, "csharp"); + +@@clientName(AvailabilityZoneType.`1`, "One", "csharp"); +@@clientName(AvailabilityZoneType.`2`, "Two", "csharp"); +@@clientName(AvailabilityZoneType.`3`, "Three", "csharp"); + +@@clientName(ManagedDatabaseStatus.DbCopying, "DBCopying", "csharp"); +@@clientName(ManagedDatabaseStatus.DbMoving, "DBMoving", "csharp"); + +@@clientName( + ManagedInstanceDatabaseFormat.SQLServer2022, + "SqlServer2022", + "csharp" +); +@@clientName( + ManagedInstanceDatabaseFormat.SQLServer2025, + "SqlServer2025", + "csharp" +); +@@clientName( + ManagedInstanceDtcProperties.fqdnEnabled, + "IsFqdnEnabled", + "csharp" +); +@@alternateType(SyncGroupsType, SyncGroupLogType, "csharp"); +@@clientName(PerformanceLevelUnit.DTU, "Dtu", "csharp"); + +@@clientName(ReplicationState.PENDING, "Pending", "csharp"); +@@clientName(ReplicationState.SEEDING, "Seeding", "csharp"); +@@clientName(ReplicationState.CATCH_UP, "CatchUp", "csharp"); +@@clientName(ReplicationState.SUSPENDED, "Suspended", "csharp"); + +@@clientName(ReplicationLinkType.GEO, "Geo", "csharp"); +@@clientName(ReplicationLinkType.NAMED, "Named", "csharp"); +@@clientName(ReplicationLinkType.STANDBY, "Standby", "csharp"); + +@@clientName(ColumnDataType.hierarchyid, "HierarchyId", "csharp"); + +@@clientName(ReplicaConnectedState.CONNECTED, "Connected", "csharp"); +@@clientName(ReplicaConnectedState.DISCONNECTED, "Disconnected", "csharp"); + +@@clientName(ReplicaSynchronizationHealth.HEALTHY, "Healthy", "csharp"); +@@clientName( + ReplicaSynchronizationHealth.PARTIALLY_HEALTHY, + "PartiallyHealthy", + "csharp" +); + +@@clientName(StorageCapabilityStorageAccountType.GRS, "Grs", "csharp"); +@@clientName(StorageCapabilityStorageAccountType.LRS, "Lrs", "csharp"); +@@clientName(StorageCapabilityStorageAccountType.ZRS, "Zrs", "csharp"); +@@clientName(StorageCapabilityStorageAccountType.GZRS, "Gzrs", "csharp"); + +@@clientName( + ServerFirewallRuleProperties.startIpAddress, + "StartIPAddress", + "csharp" +); +@@clientName( + ServerFirewallRuleProperties.endIpAddress, + "EndIPAddress", + "csharp" +); +@@clientName(SecurityEventProperties.clientIp, "ClientIP", "csharp"); +@@clientName( + ManagedInstanceDtcSecuritySettings.snaLu6point2TransactionsEnabled, + "SnaLu6Point2TransactionsEnabled", + "csharp" +); +@@clientName(DeletedServersOperationGroup.list, "GetDeletedServers", "csharp"); +@@clientName( + SyncGroupsOperationGroup.listSyncDatabaseIds, + "GetSyncDatabaseIdsSyncGroups", + "csharp" +); + +@@clientName(Databases.create, "CreateRestorePoint", "csharp"); +@@clientName( + Databases.listCurrentByDatabase, + "GetCurrentSensitivityLabels", + "csharp" +); +@@clientName( + Databases.listRecommendedByDatabase, + "GetRecommendedSensitivityLabels", + "csharp" +); +@@clientName( + Databases.sensitivityLabelsListByDatabase, + "GetSensitivityLabels", + "csharp" +); +@@clientName( + Databases.sensitivityLabelsUpdate, + "UpdateSensitivityLabel", + "csharp" +); +@@clientName(Databases.cancel, "CancelDatabaseOperation", "csharp"); +@@clientName( + ImportExportExtensionsOperationResults.createOrUpdate, + "CreateOrUpdateDatabaseExtension", + "csharp" +); +@@clientName(Databases.listByDatabase, "GetDatabaseColumns", "csharp"); +@@clientName( + Databases.databaseOperationsListByDatabase, + "GetDatabaseOperations", + "csharp" +); +@@clientName( + Databases.revalidate, + "RevalidateDatabaseEncryptionProtector", + "csharp" +); +@@clientName(Databases.revert, "RevertDatabaseEncryptionProtector", "csharp"); +@@clientName(Jobs.create, "StartJobExecution", "csharp"); +@@alternateType( + SqlVulnerabilityAssessmentName, + VulnerabilityAssessmentName, + "csharp" +); +@@clientName(LegacyDataMaskingFunction.CCN, "Ccn", "csharp"); +@@clientName(LegacyDataMaskingFunction.SSN, "Ssn", "csharp"); +// Rename the extensible `DataMaskingFunction` union and `DataMaskingRuleState` union to distinct names so the legacy fixed-enum types `DataMaskingFunction` and `DataMaskingRuleState` can be preserved in custom code for binary back-compat. +@@clientName(DataMaskingFunction, "SqlDataMaskingFunction", "csharp"); +@@clientName(DataMaskingFunction.CCN, "Ccn", "csharp"); +@@clientName(DataMaskingFunction.SSN, "Ssn", "csharp"); +@@clientName(DataMaskingRuleState, "SqlDataMaskingRuleState", "csharp"); +@@usage( + DataMaskingFunction, + + | Azure.ClientGenerator.Core.Usage.input + | Azure.ClientGenerator.Core.Usage.output, + "csharp" +); +@@usage( + DataMaskingRuleState, + + | Azure.ClientGenerator.Core.Usage.input + | Azure.ClientGenerator.Core.Usage.output, + "csharp" +); +@@access( + DataMaskingFunction, + Azure.ClientGenerator.Core.Access.public, + "csharp" +); +@@access( + DataMaskingRuleState, + Azure.ClientGenerator.Core.Access.public, + "csharp" +); +@@clientName(RestorePointType.CONTINUOUS, "Continuous", "csharp"); +@@clientName(RestorePointType.DISCRETE, "Discrete", "csharp"); + +// we add this model in this namespace in order to replace some models with this model via alternateType decorator +namespace Azure.ResourceManager.Models { + /** represents a reference to an existing resource by its id */ + model SubResource { + /** the id */ + id?: armResourceIdentifier; + } +} +@@alternateType( + SyncDatabaseIdProperties, + Azure.ResourceManager.Models.SubResource, + "csharp" +); + +// Change the BlobAuditingPolicyName from fixed enum to extensible enum +/** + * The name of the blob auditing policy. + */ +union BlobAuditingPolicyNameType { + BlobAuditingPolicyName, + string, +} +@@alternateType(BlobAuditingPolicyName, BlobAuditingPolicyNameType, "csharp"); +@@clientName(BlobAuditingPolicyNameType, "BlobAuditingPolicyName", "csharp"); diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/models.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/models.tsp index ce598ee45a3a..bd5bcb784dd9 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/models.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/models.tsp @@ -2,12 +2,13 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-resource-manager"; import "@azure-tools/typespec-azure-core"; +import "./client.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; -using TypeSpec.Versioning; namespace Microsoft.Sql; @@ -2959,6 +2960,11 @@ union ServerNetworkAccessFlag { * Disabled */ Disabled: "Disabled", + + /** + * SecuredByPerimeter + */ + SecuredByPerimeter: "SecuredByPerimeter", } /** @@ -14663,6 +14669,18 @@ model ServerUsageProperties { */ @visibility(Lifecycle.Read) unit?: string; + + /** + * The name of the resource. + */ + @visibility(Lifecycle.Read) + resourceName?: string; + + /** + * The next reset time for the metric (ISO8601 format). + */ + @visibility(Lifecycle.Read) + nextResetTime?: utcDateTime; } /** diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/preview/2025-02-01-preview/common.json b/specification/sql/resource-manager/Microsoft.Sql/SQL/preview/2025-02-01-preview/common.json index b820fb47897f..250689319333 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/preview/2025-02-01-preview/common.json +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/preview/2025-02-01-preview/common.json @@ -6814,7 +6814,8 @@ "description": "Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'", "enum": [ "Enabled", - "Disabled" + "Disabled", + "SecuredByPerimeter" ], "x-ms-enum": { "name": "ServerNetworkAccessFlag", @@ -6829,6 +6830,11 @@ "name": "Disabled", "value": "Disabled", "description": "Disabled" + }, + { + "name": "SecuredByPerimeter", + "value": "SecuredByPerimeter", + "description": "SecuredByPerimeter" } ] } diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/preview/2025-02-01-preview/serverUsages.json b/specification/sql/resource-manager/Microsoft.Sql/SQL/preview/2025-02-01-preview/serverUsages.json index aa16771ada53..cefe4756b220 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/preview/2025-02-01-preview/serverUsages.json +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/preview/2025-02-01-preview/serverUsages.json @@ -157,6 +157,17 @@ "type": "string", "description": "Unit of the metric.", "readOnly": true + }, + "resourceName": { + "type": "string", + "description": "The name of the resource.", + "readOnly": true + }, + "nextResetTime": { + "type": "string", + "format": "date-time", + "description": "The next reset time for the metric (ISO8601 format).", + "readOnly": true } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/routes.tsp b/specification/sql/resource-manager/Microsoft.Sql/SQL/routes.tsp index 0885a6652337..d2e509500fe7 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/routes.tsp +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/routes.tsp @@ -53,7 +53,7 @@ interface CapabilitiesOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; /** * If specified, restricts the response to only include the selected item. @@ -86,7 +86,7 @@ interface LongTermRetentionBackupsOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; /** * Whether or not to only get the latest backup for each database. @@ -118,7 +118,7 @@ interface LongTermRetentionBackupsOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; /** * The name of the server @@ -157,7 +157,7 @@ interface LongTermRetentionBackupsOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; /** * Whether or not to only get the latest backup for each database. @@ -189,7 +189,7 @@ interface LongTermRetentionBackupsOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; /** * The name of the server @@ -237,7 +237,7 @@ interface LongTermRetentionManagedInstanceBackupsOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; /** * Whether or not to only get the latest backup for each database. @@ -287,7 +287,7 @@ interface LongTermRetentionManagedInstanceBackupsOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; /** * The name of the managed instance. @@ -326,7 +326,7 @@ interface LongTermRetentionManagedInstanceBackupsOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; /** * Whether or not to only get the latest backup for each database. @@ -376,7 +376,7 @@ interface LongTermRetentionManagedInstanceBackupsOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; /** * The name of the managed instance. @@ -439,7 +439,7 @@ interface SyncGroupsOperationGroup { */ @path @segment("locations") - locationName: string; + locationName: Azure.Core.azureLocation; } >; } diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/common.json b/specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/common.json index 30ca3b83457e..5b3c50d0685a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/common.json +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/common.json @@ -6774,7 +6774,8 @@ "description": "Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'", "enum": [ "Enabled", - "Disabled" + "Disabled", + "SecuredByPerimeter" ], "x-ms-enum": { "name": "ServerNetworkAccessFlag", @@ -6789,6 +6790,11 @@ "name": "Disabled", "value": "Disabled", "description": "Disabled" + }, + { + "name": "SecuredByPerimeter", + "value": "SecuredByPerimeter", + "description": "SecuredByPerimeter" } ] } diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/serverUsages.json b/specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/serverUsages.json index e3038ffce2ad..6530167113b2 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/serverUsages.json +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/serverUsages.json @@ -157,6 +157,17 @@ "type": "string", "description": "Unit of the metric.", "readOnly": true + }, + "resourceName": { + "type": "string", + "description": "The name of the resource.", + "readOnly": true + }, + "nextResetTime": { + "type": "string", + "format": "date-time", + "description": "The next reset time for the metric (ISO8601 format).", + "readOnly": true } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/SQL/tspconfig.yaml b/specification/sql/resource-manager/Microsoft.Sql/SQL/tspconfig.yaml index b17fe9df59f8..f634797c6b3f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/SQL/tspconfig.yaml +++ b/specification/sql/resource-manager/Microsoft.Sql/SQL/tspconfig.yaml @@ -12,6 +12,10 @@ options: emit-lro-options: "all" examples-dir: "{project-root}/examples" output-splitting: "legacy-feature-files" + "@azure-typespec/http-client-csharp-mgmt": + namespace: "Azure.ResourceManager.Sql" + emitter-output-dir: "{output-dir}/sdk/sqlmanagement/{namespace}" + enable-wire-path-attribute: true "@azure-tools/typespec-java": emitter-output-dir: "{output-dir}/{service-dir}/azure-resourcemanager-sql" namespace: "com.azure.resourcemanager.sql"