diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md index f497052cabda2..57e03b98f4252 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md @@ -2,6 +2,14 @@ ## 4.0.0-beta.5 (Unreleased) +### Breaking Changes + +- Moved all classes from the `Azure.Security.KeyVault.Administration.Models` namespace to `Azure.Security.KeyVault.Administration`. +- Renamed `BackupOperation` to `KeyVaultBackupOperation`. +- Renamed `RestoreOperation` to `KeyVaultRestoreOperation`. +- Renamed `SelectiveKeyRestoreOperation` to `KeyVaultSelectiveRestoreOperation`. +- Renamed `SelectiveKeyRestoreResult` to `KeyVaultSelectiveRestoreResult`. + ## 4.0.0-beta.4 (2021-02-10) ### Added diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs index 514b7510b8a1a..184a9cd71b1b3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs @@ -1,50 +1,27 @@ namespace Azure.Security.KeyVault.Administration { - public partial class BackupOperation : Azure.Operation - { - protected BackupOperation() { } - public BackupOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } - public System.DateTimeOffset? EndTime { get { throw null; } } - public override bool HasCompleted { get { throw null; } } - public override bool HasValue { get { throw null; } } - public override string Id { get { throw null; } } - public System.DateTimeOffset? StartTime { get { throw null; } } - public override Azure.Security.KeyVault.Administration.BackupResult Value { get { throw null; } } - public override Azure.Response GetRawResponse() { throw null; } - public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } - } - public partial class BackupResult - { - internal BackupResult() { } - public System.DateTimeOffset EndTime { get { throw null; } } - public System.Uri FolderUri { get { throw null; } } - public System.DateTimeOffset StartTime { get { throw null; } } - } public partial class KeyVaultAccessControlClient { protected KeyVaultAccessControlClient() { } public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredential credential) { } public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredential credential, Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions options) { } public virtual System.Uri VaultUri { get { throw null; } } - public virtual Azure.Response CreateOrUpdateRoleDefinition(string roleDefinitionDescription, Azure.Security.KeyVault.Administration.KeyVaultPermission permissions, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope = default(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope), System.Guid? roleDefinitionName = default(System.Guid?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateRoleDefinitionAsync(string roleDefinitionDescription, Azure.Security.KeyVault.Administration.KeyVaultPermission permissions, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope = default(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope), System.Guid? roleDefinitionName = default(System.Guid?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateRoleAssignment(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, string roleDefinitionId, string principalId, System.Guid? roleAssignmentName = default(System.Guid?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateRoleAssignmentAsync(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, string roleDefinitionId, string principalId, System.Guid? roleAssignmentName = default(System.Guid?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteRoleAssignment(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteRoleAssignmentAsync(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteRoleDefinition(System.Guid roleDefinitionName, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteRoleDefinitionAsync(System.Guid roleDefinitionName, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRoleAssignment(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetRoleAssignmentAsync(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetRoleAssignments(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetRoleAssignmentsAsync(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRoleDefinition(System.Guid roleDefinitionName, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetRoleDefinitionAsync(System.Guid roleDefinitionName, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetRoleDefinitions(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetRoleDefinitionsAsync(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateRoleDefinition(string roleDefinitionDescription, Azure.Security.KeyVault.Administration.KeyVaultPermission permissions, Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope = default(Azure.Security.KeyVault.Administration.KeyVaultRoleScope), System.Guid? roleDefinitionName = default(System.Guid?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateRoleDefinitionAsync(string roleDefinitionDescription, Azure.Security.KeyVault.Administration.KeyVaultPermission permissions, Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope = default(Azure.Security.KeyVault.Administration.KeyVaultRoleScope), System.Guid? roleDefinitionName = default(System.Guid?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateRoleAssignment(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleDefinitionId, string principalId, System.Guid? roleAssignmentName = default(System.Guid?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateRoleAssignmentAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleDefinitionId, string principalId, System.Guid? roleAssignmentName = default(System.Guid?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteRoleAssignment(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteRoleAssignmentAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteRoleDefinition(System.Guid roleDefinitionName, Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteRoleDefinitionAsync(System.Guid roleDefinitionName, Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetRoleAssignment(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRoleAssignmentAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetRoleAssignments(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetRoleAssignmentsAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetRoleDefinition(System.Guid roleDefinitionName, Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRoleDefinitionAsync(System.Guid roleDefinitionName, Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetRoleDefinitions(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetRoleDefinitionsAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class KeyVaultAdministrationClientOptions : Azure.Core.ClientOptions { @@ -57,13 +34,13 @@ public enum ServiceVersion } public static partial class KeyVaultAdministrationModelFactory { - public static Azure.Security.KeyVault.Administration.BackupOperation BackupOperation(Azure.Response response, Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id, System.Uri blobContainerUri, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), string errorMessage = null) { throw null; } - public static Azure.Security.KeyVault.Administration.BackupResult BackupResult(System.Uri folderUri, System.DateTimeOffset startTime, System.DateTimeOffset endTime) { throw null; } - public static Azure.Security.KeyVault.Administration.RestoreOperation RestoreOperation(Azure.Response response, Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), string errorMessage = null) { throw null; } - public static Azure.Security.KeyVault.Administration.RestoreResult RestoreResult(System.DateTimeOffset startTime, System.DateTimeOffset endTime) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultBackupOperation BackupOperation(Azure.Response response, Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id, System.Uri blobContainerUri, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), string errorMessage = null) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultBackupResult BackupResult(System.Uri folderUri, System.DateTimeOffset startTime, System.DateTimeOffset endTime) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultRestoreOperation RestoreOperation(Azure.Response response, Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), string errorMessage = null) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultRestoreResult RestoreResult(System.DateTimeOffset startTime, System.DateTimeOffset endTime) { throw null; } public static Azure.Security.KeyVault.Administration.KeyVaultRoleAssignment RoleAssignment(string id, string name, string type, Azure.Security.KeyVault.Administration.KeyVaultRoleAssignmentPropertiesWithScope properties) { throw null; } - public static Azure.Security.KeyVault.Administration.KeyVaultRoleDefinition RoleDefinition(string id, string name, string type, string roleName, string description, string roleType, System.Collections.Generic.IList permissions, System.Collections.Generic.IList assignableScopes) { throw null; } - public static Azure.Security.KeyVault.Administration.RestoreResult SelectiveKeyRestoreResult(System.DateTimeOffset startTime, System.DateTimeOffset endTime) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultRoleDefinition RoleDefinition(string id, string name, string type, string roleName, string description, string roleType, System.Collections.Generic.IList permissions, System.Collections.Generic.IList assignableScopes) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultRestoreResult SelectiveKeyRestoreResult(System.DateTimeOffset startTime, System.DateTimeOffset endTime) { throw null; } } public partial class KeyVaultBackupClient { @@ -71,192 +48,212 @@ protected KeyVaultBackupClient() { } public KeyVaultBackupClient(System.Uri vaultUri, Azure.Core.TokenCredential credential) { } public KeyVaultBackupClient(System.Uri vaultUri, Azure.Core.TokenCredential credential, Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions options) { } public virtual System.Uri VaultUri { get { throw null; } } - public virtual Azure.Security.KeyVault.Administration.BackupOperation StartBackup(System.Uri blobStorageUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartBackupAsync(System.Uri blobStorageUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Security.KeyVault.Administration.RestoreOperation StartRestore(System.Uri folderUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartRestoreAsync(System.Uri folderUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Security.KeyVault.Administration.SelectiveKeyRestoreOperation StartSelectiveRestore(string keyName, System.Uri folderUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartSelectiveRestoreAsync(string keyName, System.Uri folderUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class KeyVaultPermission - { - public KeyVaultPermission() { } - public System.Collections.Generic.IList Actions { get { throw null; } } - public System.Collections.Generic.IList DataActions { get { throw null; } } - public System.Collections.Generic.IList NotActions { get { throw null; } } - public System.Collections.Generic.IList NotDataActions { get { throw null; } } - } - public partial class KeyVaultRoleAssignment - { - internal KeyVaultRoleAssignment() { } - public string Id { get { throw null; } } - public string Name { get { throw null; } } - public Azure.Security.KeyVault.Administration.KeyVaultRoleAssignmentPropertiesWithScope Properties { get { throw null; } } - public string Type { get { throw null; } } - } - public partial class KeyVaultRoleAssignmentPropertiesWithScope - { - internal KeyVaultRoleAssignmentPropertiesWithScope() { } - public string PrincipalId { get { throw null; } } - public string RoleDefinitionId { get { throw null; } } - public Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope? Scope { get { throw null; } } + public virtual Azure.Security.KeyVault.Administration.KeyVaultBackupOperation StartBackup(System.Uri blobStorageUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartBackupAsync(System.Uri blobStorageUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Security.KeyVault.Administration.KeyVaultRestoreOperation StartRestore(System.Uri folderUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartRestoreAsync(System.Uri folderUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Security.KeyVault.Administration.KeyVaultSelectiveRestoreOperation StartSelectiveRestore(string keyName, System.Uri folderUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartSelectiveRestoreAsync(string keyName, System.Uri folderUri, string sasToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class KeyVaultRoleDefinition + public partial class KeyVaultBackupOperation : Azure.Operation { - public KeyVaultRoleDefinition() { } - public System.Collections.Generic.IList AssignableScopes { get { throw null; } } - public string Description { get { throw null; } set { } } - public string Id { get { throw null; } } - public string Name { get { throw null; } } - public System.Collections.Generic.IList Permissions { get { throw null; } } - public string RoleName { get { throw null; } set { } } - public Azure.Security.KeyVault.Administration.Models.KeyVaultRoleType? RoleType { get { throw null; } set { } } - public Azure.Security.KeyVault.Administration.Models.KeyVaultRoleDefinitionType? Type { get { throw null; } } - } - public partial class RestoreOperation : Azure.Operation - { - protected RestoreOperation() { } - public RestoreOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } + protected KeyVaultBackupOperation() { } + public KeyVaultBackupOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } public System.DateTimeOffset? EndTime { get { throw null; } } public override bool HasCompleted { get { throw null; } } public override bool HasValue { get { throw null; } } public override string Id { get { throw null; } } public System.DateTimeOffset? StartTime { get { throw null; } } - public override Azure.Security.KeyVault.Administration.RestoreResult Value { get { throw null; } } + public override Azure.Security.KeyVault.Administration.KeyVaultBackupResult Value { get { throw null; } } public override Azure.Response GetRawResponse() { throw null; } public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } } - public partial class RestoreResult + public partial class KeyVaultBackupResult { - internal RestoreResult() { } + internal KeyVaultBackupResult() { } public System.DateTimeOffset EndTime { get { throw null; } } + public System.Uri FolderUri { get { throw null; } } public System.DateTimeOffset StartTime { get { throw null; } } } - public partial class SelectiveKeyRestoreOperation : Azure.Operation + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KeyVaultDataAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KeyVaultDataAction(string value) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction BackupHsmKeys { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction CreateHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction DecryptHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction DeleteHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction DeleteRoleAssignment { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction DownloadHsmSecurityDomain { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction EncryptHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction ExportHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction GetRoleAssignment { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction ImportHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction PurgeDeletedHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction ReadDeletedHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction ReadHsmBackupStatus { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction ReadHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction ReadHsmRestoreStatus { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction ReadHsmSecurityDomainStatus { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction ReadHsmSecurityDomainTransferKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction ReadRoleDefinition { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction RecoverDeletedHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction RestoreHsmKeys { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction SignHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction StartHsmBackup { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction StartHsmRestore { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction UnwrapHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction UploadHsmSecurityDomain { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction VerifyHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction WrapHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction WriteHsmKey { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultDataAction WriteRoleAssignment { get { throw null; } } + public bool Equals(Azure.Security.KeyVault.Administration.KeyVaultDataAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Security.KeyVault.Administration.KeyVaultDataAction left, Azure.Security.KeyVault.Administration.KeyVaultDataAction right) { throw null; } + public static implicit operator Azure.Security.KeyVault.Administration.KeyVaultDataAction (string value) { throw null; } + public static bool operator !=(Azure.Security.KeyVault.Administration.KeyVaultDataAction left, Azure.Security.KeyVault.Administration.KeyVaultDataAction right) { throw null; } + public override string ToString() { throw null; } + } + public partial class KeyVaultPermission + { + public KeyVaultPermission() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public System.Collections.Generic.IList DataActions { get { throw null; } } + public System.Collections.Generic.IList NotActions { get { throw null; } } + public System.Collections.Generic.IList NotDataActions { get { throw null; } } + } + public partial class KeyVaultRestoreOperation : Azure.Operation { - protected SelectiveKeyRestoreOperation() { } - public SelectiveKeyRestoreOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } + protected KeyVaultRestoreOperation() { } + public KeyVaultRestoreOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } public System.DateTimeOffset? EndTime { get { throw null; } } public override bool HasCompleted { get { throw null; } } public override bool HasValue { get { throw null; } } public override string Id { get { throw null; } } public System.DateTimeOffset? StartTime { get { throw null; } } - public override Azure.Security.KeyVault.Administration.SelectiveKeyRestoreResult Value { get { throw null; } } + public override Azure.Security.KeyVault.Administration.KeyVaultRestoreResult Value { get { throw null; } } public override Azure.Response GetRawResponse() { throw null; } public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } } - public partial class SelectiveKeyRestoreResult + public partial class KeyVaultRestoreResult { - internal SelectiveKeyRestoreResult() { } + internal KeyVaultRestoreResult() { } public System.DateTimeOffset EndTime { get { throw null; } } public System.DateTimeOffset StartTime { get { throw null; } } } -} -namespace Azure.Security.KeyVault.Administration.Models -{ - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct KeyVaultDataAction : System.IEquatable + public partial class KeyVaultRoleAssignment { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public KeyVaultDataAction(string value) { throw null; } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction BackupHsmKeys { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction CreateHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction DecryptHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction DeleteHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction DeleteRoleAssignment { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction DownloadHsmSecurityDomain { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction EncryptHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction ExportHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction GetRoleAssignment { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction ImportHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction PurgeDeletedHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction ReadDeletedHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction ReadHsmBackupStatus { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction ReadHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction ReadHsmRestoreStatus { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction ReadHsmSecurityDomainStatus { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction ReadHsmSecurityDomainTransferKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction ReadRoleDefinition { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction RecoverDeletedHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction RestoreHsmKeys { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction SignHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction StartHsmBackup { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction StartHsmRestore { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction UnwrapHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction UploadHsmSecurityDomain { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction VerifyHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction WrapHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction WriteHsmKey { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction WriteRoleAssignment { get { throw null; } } - public bool Equals(Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction left, Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction right) { throw null; } - public static implicit operator Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction (string value) { throw null; } - public static bool operator !=(Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction left, Azure.Security.KeyVault.Administration.Models.KeyVaultDataAction right) { throw null; } - public override string ToString() { throw null; } + internal KeyVaultRoleAssignment() { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Security.KeyVault.Administration.KeyVaultRoleAssignmentPropertiesWithScope Properties { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class KeyVaultRoleAssignmentPropertiesWithScope + { + internal KeyVaultRoleAssignmentPropertiesWithScope() { } + public string PrincipalId { get { throw null; } } + public string RoleDefinitionId { get { throw null; } } + public Azure.Security.KeyVault.Administration.KeyVaultRoleScope? Scope { get { throw null; } } + } + public partial class KeyVaultRoleDefinition + { + public KeyVaultRoleDefinition() { } + public System.Collections.Generic.IList AssignableScopes { get { throw null; } } + public string Description { get { throw null; } set { } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IList Permissions { get { throw null; } } + public string RoleName { get { throw null; } set { } } + public Azure.Security.KeyVault.Administration.KeyVaultRoleType? RoleType { get { throw null; } set { } } + public Azure.Security.KeyVault.Administration.KeyVaultRoleDefinitionType? Type { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct KeyVaultRoleDefinitionType : System.IEquatable + public readonly partial struct KeyVaultRoleDefinitionType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; public KeyVaultRoleDefinitionType(string value) { throw null; } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultRoleDefinitionType MicrosoftAuthorizationRoleDefinitions { get { throw null; } } - public bool Equals(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleDefinitionType other) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultRoleDefinitionType MicrosoftAuthorizationRoleDefinitions { get { throw null; } } + public bool Equals(Azure.Security.KeyVault.Administration.KeyVaultRoleDefinitionType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleDefinitionType left, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleDefinitionType right) { throw null; } - public static implicit operator Azure.Security.KeyVault.Administration.Models.KeyVaultRoleDefinitionType (string value) { throw null; } - public static bool operator !=(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleDefinitionType left, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleDefinitionType right) { throw null; } + public static bool operator ==(Azure.Security.KeyVault.Administration.KeyVaultRoleDefinitionType left, Azure.Security.KeyVault.Administration.KeyVaultRoleDefinitionType right) { throw null; } + public static implicit operator Azure.Security.KeyVault.Administration.KeyVaultRoleDefinitionType (string value) { throw null; } + public static bool operator !=(Azure.Security.KeyVault.Administration.KeyVaultRoleDefinitionType left, Azure.Security.KeyVault.Administration.KeyVaultRoleDefinitionType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct KeyVaultRoleScope : System.IEquatable + public readonly partial struct KeyVaultRoleScope : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; public KeyVaultRoleScope(string value) { throw null; } public KeyVaultRoleScope(System.Uri resourceId) { throw null; } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope Global { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope Keys { get { throw null; } } - public bool Equals(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope other) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultRoleScope Global { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultRoleScope Keys { get { throw null; } } + public bool Equals(Azure.Security.KeyVault.Administration.KeyVaultRoleScope other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope left, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope right) { throw null; } - public static implicit operator Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope (string value) { throw null; } - public static bool operator !=(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope left, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleScope right) { throw null; } + public static bool operator ==(Azure.Security.KeyVault.Administration.KeyVaultRoleScope left, Azure.Security.KeyVault.Administration.KeyVaultRoleScope right) { throw null; } + public static implicit operator Azure.Security.KeyVault.Administration.KeyVaultRoleScope (string value) { throw null; } + public static bool operator !=(Azure.Security.KeyVault.Administration.KeyVaultRoleScope left, Azure.Security.KeyVault.Administration.KeyVaultRoleScope right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct KeyVaultRoleType : System.IEquatable + public readonly partial struct KeyVaultRoleType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; public KeyVaultRoleType(string value) { throw null; } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultRoleType BuiltInRole { get { throw null; } } - public static Azure.Security.KeyVault.Administration.Models.KeyVaultRoleType CustomRole { get { throw null; } } - public bool Equals(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleType other) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultRoleType BuiltInRole { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultRoleType CustomRole { get { throw null; } } + public bool Equals(Azure.Security.KeyVault.Administration.KeyVaultRoleType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleType left, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleType right) { throw null; } - public static implicit operator Azure.Security.KeyVault.Administration.Models.KeyVaultRoleType (string value) { throw null; } - public static bool operator !=(Azure.Security.KeyVault.Administration.Models.KeyVaultRoleType left, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleType right) { throw null; } + public static bool operator ==(Azure.Security.KeyVault.Administration.KeyVaultRoleType left, Azure.Security.KeyVault.Administration.KeyVaultRoleType right) { throw null; } + public static implicit operator Azure.Security.KeyVault.Administration.KeyVaultRoleType (string value) { throw null; } + public static bool operator !=(Azure.Security.KeyVault.Administration.KeyVaultRoleType left, Azure.Security.KeyVault.Administration.KeyVaultRoleType right) { throw null; } public override string ToString() { throw null; } } + public partial class KeyVaultSelectiveRestoreOperation : Azure.Operation + { + protected KeyVaultSelectiveRestoreOperation() { } + public KeyVaultSelectiveRestoreOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } + public System.DateTimeOffset? EndTime { get { throw null; } } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public System.DateTimeOffset? StartTime { get { throw null; } } + public override Azure.Security.KeyVault.Administration.KeyVaultSelectiveRestoreResult Value { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } + } + public partial class KeyVaultSelectiveRestoreResult + { + internal KeyVaultSelectiveRestoreResult() { } + public System.DateTimeOffset EndTime { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultDataAction.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultDataAction.cs index 8b8a9beb5aaff..035090b4471f2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultDataAction.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultDataAction.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.Security.KeyVault.Administration.Models +namespace Azure.Security.KeyVault.Administration { /// Supported permissions for data actions. public readonly partial struct KeyVaultDataAction : IEquatable diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs index 1b367cd4e4070..7e903c8ce036b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs @@ -8,7 +8,6 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.Security.KeyVault.Administration.Models; namespace Azure.Security.KeyVault.Administration { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.cs index 530f2185cc911..37ee644e8d2c6 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using Azure.Core; -using Azure.Security.KeyVault.Administration.Models; namespace Azure.Security.KeyVault.Administration { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.Serialization.cs index be30f4f6a8d0c..a8a08123ea3c3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.Serialization.cs @@ -7,7 +7,6 @@ using System.Text.Json; using Azure.Core; -using Azure.Security.KeyVault.Administration.Models; namespace Azure.Security.KeyVault.Administration { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.cs index 7061ecf5b3361..13ce537b73d0b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.cs @@ -5,8 +5,6 @@ #nullable disable -using Azure.Security.KeyVault.Administration.Models; - namespace Azure.Security.KeyVault.Administration { /// Role assignment properties with scope. diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs index 0d5c64bfdc47b..6049dd42b4e1c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs @@ -8,7 +8,6 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.Security.KeyVault.Administration.Models; namespace Azure.Security.KeyVault.Administration { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.cs index 299a64a24f6a0..ab29b86846f98 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using Azure.Core; -using Azure.Security.KeyVault.Administration.Models; namespace Azure.Security.KeyVault.Administration { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinitionType.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinitionType.cs index 834db801aaf0f..e374f38213d4c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinitionType.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinitionType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.Security.KeyVault.Administration.Models +namespace Azure.Security.KeyVault.Administration { /// The role definition type. public readonly partial struct KeyVaultRoleDefinitionType : IEquatable diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleScope.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleScope.cs index fc1bd68713275..3793eac946c45 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleScope.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleScope.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.Security.KeyVault.Administration.Models +namespace Azure.Security.KeyVault.Administration { /// The role scope. public readonly partial struct KeyVaultRoleScope : IEquatable diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleType.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleType.cs index 33c467c0f8495..83893c200c444 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleType.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.Security.KeyVault.Administration.Models +namespace Azure.Security.KeyVault.Administration { /// The role type. public readonly partial struct KeyVaultRoleType : IEquatable diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationModelFactory.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationModelFactory.cs index 52184c8242b94..3a0d5b528409d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationModelFactory.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationModelFactory.cs @@ -39,14 +39,14 @@ public static KeyVaultRoleAssignment RoleAssignment(string id, string name, stri /// /// Initializes a new instance of a FullRestoreOperation for mocking purposes. /// - /// The that will be returned from . + /// The that will be returned from . /// An instance of . /// Identifier for the restore operation. /// The start time of the restore operation. /// The end time of the restore operation. /// The error message generated from the operation, if any. - public static RestoreOperation RestoreOperation(Response response, KeyVaultBackupClient client, string id, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, string errorMessage = null) => - new RestoreOperation(new RestoreDetailsInternal( + public static KeyVaultRestoreOperation RestoreOperation(Response response, KeyVaultBackupClient client, string id, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, string errorMessage = null) => + new KeyVaultRestoreOperation(new RestoreDetailsInternal( null, null, errorMessage == null ? null : new KeyVaultServiceError(string.Empty, errorMessage, null), @@ -57,15 +57,15 @@ public static RestoreOperation RestoreOperation(Response response, KeyVaultBacku /// /// Initializes a new instance of a FullBackupOperation for mocking purposes. /// - /// The that will be returned from . + /// The that will be returned from . /// An instance of . /// Identifier for the restore operation. /// The Blob Container Uri containing the backup. /// The start time of the restore operation. /// The end time of the restore operation. /// The error message generated from the operation, if any. - public static BackupOperation BackupOperation(Response response, KeyVaultBackupClient client, string id, Uri blobContainerUri, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, string errorMessage = null) => - new BackupOperation(new FullBackupDetailsInternal( + public static KeyVaultBackupOperation BackupOperation(Response response, KeyVaultBackupClient client, string id, Uri blobContainerUri, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, string errorMessage = null) => + new KeyVaultBackupOperation(new FullBackupDetailsInternal( null, null, errorMessage == null ? null : new KeyVaultServiceError(string.Empty, errorMessage, null), @@ -81,8 +81,8 @@ public static BackupOperation BackupOperation(Response response, KeyVaultBackupC /// The start time of the backup operation. /// The end time of the backup operation. /// A new instance. - public static BackupResult BackupResult(Uri folderUri, DateTimeOffset startTime, DateTimeOffset endTime) => - new BackupResult(folderUri, startTime, endTime); + public static KeyVaultBackupResult BackupResult(Uri folderUri, DateTimeOffset startTime, DateTimeOffset endTime) => + new KeyVaultBackupResult(folderUri, startTime, endTime); /// /// Initializes a new instance of a for mocking purposes. @@ -90,8 +90,8 @@ public static BackupResult BackupResult(Uri folderUri, DateTimeOffset startTime, /// The start time of the restore operation. /// The end time of the restore operation. /// A new instance. - public static RestoreResult RestoreResult(DateTimeOffset startTime, DateTimeOffset endTime) => - new RestoreResult(startTime, endTime); + public static KeyVaultRestoreResult RestoreResult(DateTimeOffset startTime, DateTimeOffset endTime) => + new KeyVaultRestoreResult(startTime, endTime); /// /// Initializes a new instance of a for mocking purposes. @@ -99,7 +99,7 @@ public static RestoreResult RestoreResult(DateTimeOffset startTime, DateTimeOffs /// The start time of the restore operation. /// The end time of the restore operation. /// A new instance. - public static RestoreResult SelectiveKeyRestoreResult(DateTimeOffset startTime, DateTimeOffset endTime) => - new RestoreResult(startTime, endTime); + public static KeyVaultRestoreResult SelectiveKeyRestoreResult(DateTimeOffset startTime, DateTimeOffset endTime) => + new KeyVaultRestoreResult(startTime, endTime); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs index 9d009107b0308..2eb9033109889 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs @@ -72,8 +72,8 @@ public KeyVaultBackupClient(Uri vaultUri, TokenCredential credential, KeyVaultAd /// A controlling the request lifetime. /// or is null. /// The server returned an error. See for details returned from the server. - /// A to wait on this long-running operation. - public virtual async Task StartBackupAsync(Uri blobStorageUri, string sasToken, CancellationToken cancellationToken = default) + /// A to wait on this long-running operation. + public virtual async Task StartBackupAsync(Uri blobStorageUri, string sasToken, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartBackup)}"); scope.Start(); @@ -85,7 +85,7 @@ public virtual async Task StartBackupAsync(Uri blobStorageUri, cancellationToken) .ConfigureAwait(false); - return new BackupOperation(this, response); + return new KeyVaultBackupOperation(this, response); } catch (Exception ex) { @@ -102,8 +102,8 @@ public virtual async Task StartBackupAsync(Uri blobStorageUri, /// A controlling the request lifetime. /// or is null. /// The server returned an error. See for details returned from the server. - /// A to wait on this long-running operation. - public virtual BackupOperation StartBackup(Uri blobStorageUri, string sasToken, CancellationToken cancellationToken = default) + /// A to wait on this long-running operation. + public virtual KeyVaultBackupOperation StartBackup(Uri blobStorageUri, string sasToken, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartBackup)}"); scope.Start(); @@ -114,7 +114,7 @@ public virtual BackupOperation StartBackup(Uri blobStorageUri, string sasToken, new SASTokenParameter(blobStorageUri.AbsoluteUri, sasToken), cancellationToken); - return new BackupOperation(this, response); + return new KeyVaultBackupOperation(this, response); } catch (Exception ex) { @@ -128,15 +128,15 @@ public virtual BackupOperation StartBackup(Uri blobStorageUri, string sasToken, /// /// /// The for the blob storage resource, including the path to the blob container where the backup resides. - /// This would be the exact value that is returned as the result of a . + /// This would be the exact value that is returned as the result of a . /// An example Uri may look like the following: https://contoso.blob.core.windows.net/backup/mhsm-contoso-2020090117323313. /// /// A Shared Access Signature (SAS) token to authorize access to the blob. /// A controlling the request lifetime. /// or is null. /// The server returned an error. See for details returned from the server. - /// A to wait on this long-running operation. - public virtual async Task StartRestoreAsync(Uri folderUri, string sasToken, CancellationToken cancellationToken = default) + /// A to wait on this long-running operation. + public virtual async Task StartRestoreAsync(Uri folderUri, string sasToken, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartRestore)}"); scope.Start(); @@ -153,7 +153,7 @@ public virtual async Task StartRestoreAsync(Uri folderUri, str folderName), cancellationToken).ConfigureAwait(false); - return new RestoreOperation(this, response); + return new KeyVaultRestoreOperation(this, response); } catch (Exception ex) { @@ -167,15 +167,15 @@ public virtual async Task StartRestoreAsync(Uri folderUri, str /// /// /// The for the blob storage resource, including the path to the blob container where the backup resides. - /// This would be the exact value that is returned as the result of a . + /// This would be the exact value that is returned as the result of a . /// An example Uri path may look like the following: https://contoso.blob.core.windows.net/backup/mhsm-contoso-2020090117323313. /// /// A Shared Access Signature (SAS) token to authorize access to the blob. /// A controlling the request lifetime. /// or is null. /// The server returned an error. See for details returned from the server. - /// A to wait on this long-running operation. - public virtual RestoreOperation StartRestore(Uri folderUri, string sasToken, CancellationToken cancellationToken = default) + /// A to wait on this long-running operation. + public virtual KeyVaultRestoreOperation StartRestore(Uri folderUri, string sasToken, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartRestore)}"); scope.Start(); @@ -192,7 +192,7 @@ public virtual RestoreOperation StartRestore(Uri folderUri, string sasToken, Can folderName), cancellationToken); - return new RestoreOperation(this, response); + return new KeyVaultRestoreOperation(this, response); } catch (Exception ex) { @@ -207,15 +207,15 @@ public virtual RestoreOperation StartRestore(Uri folderUri, string sasToken, Can /// The name of the key to be restored from the supplied backup. /// /// The for the blob storage resource, including the path to the blob container where the backup resides. - /// This would be the exact value that is returned as the result of a . + /// This would be the exact value that is returned as the result of a . /// An example Uri path may look like the following: https://contoso.blob.core.windows.net/backup/mhsm-contoso-2020090117323313. /// /// A Shared Access Signature (SAS) token to authorize access to the blob. /// A controlling the request lifetime. /// or is null. /// The server returned an error. See for details returned from the server. - /// A to wait on this long-running operation. - public virtual async Task StartSelectiveRestoreAsync(string keyName, Uri folderUri, string sasToken, CancellationToken cancellationToken = default) + /// A to wait on this long-running operation. + public virtual async Task StartSelectiveRestoreAsync(string keyName, Uri folderUri, string sasToken, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartSelectiveRestore)}"); scope.Start(); @@ -235,7 +235,7 @@ public virtual async Task StartSelectiveRestoreAsy folderName), cancellationToken).ConfigureAwait(false); - return new SelectiveKeyRestoreOperation(this, response); + return new KeyVaultSelectiveRestoreOperation(this, response); } catch (Exception ex) { @@ -250,15 +250,15 @@ public virtual async Task StartSelectiveRestoreAsy /// The name of the key to be restored from the supplied backup. /// /// The for the blob storage resource, including the path to the blob container where the backup resides. - /// This would be the exact value that is returned as the result of a . + /// This would be the exact value that is returned as the result of a . /// An example Uri path may look like the following: https://contoso.blob.core.windows.net/backup/mhsm-contoso-2020090117323313. /// /// A Shared Access Signature (SAS) token to authorize access to the blob. /// A controlling the request lifetime. /// or is null. /// The server returned an error. See for details returned from the server. - /// A to wait on this long-running operation. - public virtual SelectiveKeyRestoreOperation StartSelectiveRestore(string keyName, Uri folderUri, string sasToken, CancellationToken cancellationToken = default) + /// A to wait on this long-running operation. + public virtual KeyVaultSelectiveRestoreOperation StartSelectiveRestore(string keyName, Uri folderUri, string sasToken, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartSelectiveRestore)}"); scope.Start(); @@ -278,7 +278,7 @@ public virtual SelectiveKeyRestoreOperation StartSelectiveRestore(string keyName folderName), cancellationToken); - return new SelectiveKeyRestoreOperation(this, response); + return new KeyVaultSelectiveRestoreOperation(this, response); } catch (Exception ex) { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/BackupOperation.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupOperation.cs similarity index 86% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/BackupOperation.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupOperation.cs index 6bc3c0f0dc8ea..667c289926c4a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/BackupOperation.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupOperation.cs @@ -13,7 +13,7 @@ namespace Azure.Security.KeyVault.Administration /// /// A long-running operation for or . /// - public class BackupOperation : Operation + public class KeyVaultBackupOperation : Operation { /// /// The number of seconds recommended by the service to delay before checking on completion status. @@ -31,9 +31,9 @@ public class BackupOperation : Operation /// to re-populate the details of this operation. /// /// An instance of . - /// The from a previous . + /// The from a previous . /// or is null. - public BackupOperation(KeyVaultBackupClient client, string id) + public KeyVaultBackupOperation(KeyVaultBackupClient client, string id) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(client, nameof(client)); @@ -47,7 +47,7 @@ public BackupOperation(KeyVaultBackupClient client, string id) /// /// An instance of . /// The returned from or . - internal BackupOperation(KeyVaultBackupClient client, ResponseWithHeaders response) + internal KeyVaultBackupOperation(KeyVaultBackupClient client, ResponseWithHeaders response) { _client = client; _response = response; @@ -61,7 +61,7 @@ internal BackupOperation(KeyVaultBackupClient client, ResponseWithHeadersThe that will be returned from . /// The that will be returned from . /// An instance of . - internal BackupOperation(FullBackupDetailsInternal value, Response response, KeyVaultBackupClient client) + internal KeyVaultBackupOperation(FullBackupDetailsInternal value, Response response, KeyVaultBackupClient client) { Argument.AssertNotNull(value, nameof(value)); Argument.AssertNotNull(response, nameof(response)); @@ -73,8 +73,8 @@ internal BackupOperation(FullBackupDetailsInternal value, Response response, Key _client = client; } - /// Initializes a new instance of for mocking. - protected BackupOperation() {} + /// Initializes a new instance of for mocking. + protected KeyVaultBackupOperation() {} /// /// The start time of the backup operation. @@ -93,7 +93,7 @@ protected BackupOperation() {} /// Gets the of the backup operation. /// You should await before attempting to use a key in this pending state. /// - public override BackupResult Value + public override KeyVaultBackupResult Value { get { @@ -107,7 +107,7 @@ public override BackupResult Value throw _requestFailedException; } #pragma warning restore CA1065 // Do not raise exceptions in unexpected locations - return new BackupResult(new Uri(_value.AzureStorageBlobContainerUri), _value.StartTime.Value, _value.EndTime.Value); + return new KeyVaultBackupResult(new Uri(_value.AzureStorageBlobContainerUri), _value.StartTime.Value, _value.EndTime.Value); } } @@ -162,12 +162,12 @@ await _client.GetBackupDetailsAsync(Id, cancellationToken).ConfigureAwait(false) } /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _retryAfterSeconds.HasValue ? this.DefaultWaitForCompletionAsync(TimeSpan.FromSeconds(_retryAfterSeconds.Value), cancellationToken) : this.DefaultWaitForCompletionAsync(cancellationToken); /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => this.DefaultWaitForCompletionAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/BackupResult.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupResult.cs similarity index 86% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/BackupResult.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupResult.cs index 51c136629a16b..d3a873537ab54 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/BackupResult.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupResult.cs @@ -9,9 +9,9 @@ namespace Azure.Security.KeyVault.Administration /// /// The result of a backup operation. /// - public class BackupResult + public class KeyVaultBackupResult { - internal BackupResult(Uri folderUri, DateTimeOffset startTime, DateTimeOffset endTime) + internal KeyVaultBackupResult(Uri folderUri, DateTimeOffset startTime, DateTimeOffset endTime) { Argument.AssertNotNull(folderUri, nameof(folderUri)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/DataAction.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultDataAction.cs similarity index 82% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/DataAction.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultDataAction.cs index 1504487a7a550..3d0895c59dedd 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/DataAction.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultDataAction.cs @@ -4,7 +4,7 @@ using System; using Azure.Core; -namespace Azure.Security.KeyVault.Administration.Models +namespace Azure.Security.KeyVault.Administration { [CodeGenModel("DataAction")] public readonly partial struct KeyVaultDataAction : IEquatable diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperation.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRestoreOperation.cs similarity index 72% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperation.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRestoreOperation.cs index 15f62966eb270..3fca234a6f5ea 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperation.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRestoreOperation.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -13,9 +12,9 @@ namespace Azure.Security.KeyVault.Administration /// /// A long-running operation for or . /// - public class RestoreOperation : Operation + public class KeyVaultRestoreOperation : Operation { - internal readonly RestoreOperationInternal _operationInternal; + internal readonly RestoreOperationInternal _operationInternal; /// /// Creates an instance of a RestoreOperation from a previously started operation. , , @@ -23,11 +22,11 @@ public class RestoreOperation : Operation /// to re-populate the details of this operation. /// /// An instance of . - /// The from a previous . + /// The from a previous . /// or is null. - public RestoreOperation(KeyVaultBackupClient client, string id) + public KeyVaultRestoreOperation(KeyVaultBackupClient client, string id) { - _operationInternal = new RestoreOperationInternal(client, id); + _operationInternal = new RestoreOperationInternal(client, id); } /// @@ -36,9 +35,9 @@ public RestoreOperation(KeyVaultBackupClient client, string id) /// An instance of . /// The returned from or . /// or is null. - internal RestoreOperation(KeyVaultBackupClient client, ResponseWithHeaders response) + internal KeyVaultRestoreOperation(KeyVaultBackupClient client, ResponseWithHeaders response) { - _operationInternal = new RestoreOperationInternal(client, response); + _operationInternal = new RestoreOperationInternal(client, response); } /// @@ -48,13 +47,13 @@ internal RestoreOperation(KeyVaultBackupClient client, ResponseWithHeadersThe that will be returned from . /// An instance of . /// or or is null. - internal RestoreOperation(RestoreDetailsInternal value, Response response, KeyVaultBackupClient client) + internal KeyVaultRestoreOperation(RestoreDetailsInternal value, Response response, KeyVaultBackupClient client) { - _operationInternal = new RestoreOperationInternal(value, response, client); + _operationInternal = new RestoreOperationInternal(value, response, client); } - /// Initializes a new instance of for mocking. - protected RestoreOperation() {} + /// Initializes a new instance of for mocking. + protected KeyVaultRestoreOperation() {} /// /// The start time of the restore operation. @@ -70,7 +69,7 @@ protected RestoreOperation() {} public override string Id => _operationInternal.Id; /// - public override RestoreResult Value => _operationInternal.Value; + public override KeyVaultRestoreResult Value => _operationInternal.Value; /// public override bool HasCompleted => _operationInternal.HasCompleted; @@ -89,11 +88,11 @@ public override async ValueTask UpdateStatusAsync(CancellationToken ca await _operationInternal.UpdateStatusAsync(cancellationToken).ConfigureAwait(false); /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operationInternal.WaitForCompletionAsync(cancellationToken); /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => _operationInternal.WaitForCompletionAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreResult.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRestoreResult.cs similarity index 83% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreResult.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRestoreResult.cs index 32cc8057e8582..f737c9e4f0ab5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreResult.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRestoreResult.cs @@ -2,16 +2,15 @@ // Licensed under the MIT License. using System; -using Azure.Core; namespace Azure.Security.KeyVault.Administration { /// /// The result of a restore operation. /// - public class RestoreResult + public class KeyVaultRestoreResult { - internal RestoreResult(DateTimeOffset startTime, DateTimeOffset endTime) + internal KeyVaultRestoreResult(DateTimeOffset startTime, DateTimeOffset endTime) { StartTime = startTime; EndTime = endTime; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinitionType.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleDefinitionType.cs similarity index 76% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinitionType.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleDefinitionType.cs index a915b17942871..e0a1e71324454 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinitionType.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleDefinitionType.cs @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Azure.Core; -namespace Azure.Security.KeyVault.Administration.Models +namespace Azure.Security.KeyVault.Administration { [CodeGenModel("RoleDefinitionType")] public readonly partial struct KeyVaultRoleDefinitionType diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleScope.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleScope.cs index bc7a217a2dabe..6d8cbe5bbd67d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleScope.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleScope.cs @@ -4,7 +4,7 @@ using System; using Azure.Core; -namespace Azure.Security.KeyVault.Administration.Models +namespace Azure.Security.KeyVault.Administration { [CodeGenModel("RoleScope")] public readonly partial struct KeyVaultRoleScope diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreOperation.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultSelectiveRestoreOperation.cs similarity index 72% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreOperation.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultSelectiveRestoreOperation.cs index 4008d990bbc83..6a927772684a0 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreOperation.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultSelectiveRestoreOperation.cs @@ -10,11 +10,11 @@ namespace Azure.Security.KeyVault.Administration { /// - /// A long-running operation for or . + /// A long-running operation for or . /// - public class SelectiveKeyRestoreOperation : Operation + public class KeyVaultSelectiveRestoreOperation : Operation { - private readonly RestoreOperationInternal _operationInternal; + private readonly RestoreOperationInternal _operationInternal; /// /// Creates an instance of a SelectiveKeyRestoreOperation from a previously started operation. , , @@ -22,11 +22,11 @@ public class SelectiveKeyRestoreOperation : Operation /// to re-populate the details of this operation. /// /// An instance of . - /// The from a previous . + /// The from a previous . /// or is null. - public SelectiveKeyRestoreOperation(KeyVaultBackupClient client, string id) + public KeyVaultSelectiveRestoreOperation(KeyVaultBackupClient client, string id) { - _operationInternal = new RestoreOperationInternal(client, id); + _operationInternal = new RestoreOperationInternal(client, id); } /// @@ -35,9 +35,9 @@ public SelectiveKeyRestoreOperation(KeyVaultBackupClient client, string id) /// An instance of . /// The returned from or . /// or is null. - internal SelectiveKeyRestoreOperation(KeyVaultBackupClient client, ResponseWithHeaders response) + internal KeyVaultSelectiveRestoreOperation(KeyVaultBackupClient client, ResponseWithHeaders response) { - _operationInternal = new RestoreOperationInternal(client, response); + _operationInternal = new RestoreOperationInternal(client, response); } /// @@ -47,13 +47,13 @@ internal SelectiveKeyRestoreOperation(KeyVaultBackupClient client, ResponseWithH /// The that will be returned from . /// An instance of . /// or or is null. - internal SelectiveKeyRestoreOperation(SelectiveKeyRestoreDetailsInternal value, Response response, KeyVaultBackupClient client) + internal KeyVaultSelectiveRestoreOperation(SelectiveKeyRestoreDetailsInternal value, Response response, KeyVaultBackupClient client) { - _operationInternal = new RestoreOperationInternal(value, response, client); + _operationInternal = new RestoreOperationInternal(value, response, client); } - /// Initializes a new instance of for mocking. - protected SelectiveKeyRestoreOperation() {} + /// Initializes a new instance of for mocking. + protected KeyVaultSelectiveRestoreOperation() {} /// /// The start time of the restore operation. @@ -69,7 +69,7 @@ protected SelectiveKeyRestoreOperation() {} public override string Id => _operationInternal.Id; /// - public override SelectiveKeyRestoreResult Value => _operationInternal.Value; + public override KeyVaultSelectiveRestoreResult Value => _operationInternal.Value; /// public override bool HasCompleted => _operationInternal.HasCompleted; @@ -88,11 +88,11 @@ public override async ValueTask UpdateStatusAsync(CancellationToken ca await _operationInternal.UpdateStatusAsync(cancellationToken).ConfigureAwait(false); /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operationInternal.WaitForCompletionAsync(cancellationToken); /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => _operationInternal.WaitForCompletionAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreResult.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultSelectiveRestoreResult.cs similarity index 82% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreResult.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultSelectiveRestoreResult.cs index 440edd3031634..e57d2105580f4 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreResult.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultSelectiveRestoreResult.cs @@ -8,9 +8,9 @@ namespace Azure.Security.KeyVault.Administration /// /// The result of a selective key restore operation. /// - public class SelectiveKeyRestoreResult + public class KeyVaultSelectiveRestoreResult { - internal SelectiveKeyRestoreResult(DateTimeOffset startTime, DateTimeOffset endTime) + internal KeyVaultSelectiveRestoreResult(DateTimeOffset startTime, DateTimeOffset endTime) { StartTime = startTime; EndTime = endTime; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs index bad982aa191a3..761e6c84a1d65 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs @@ -30,7 +30,7 @@ internal class RestoreOperationInternal : Oper /// to re-populate the details of this operation. /// /// An instance of . - /// The from a previous . + /// The from a previous . /// or is null. public RestoreOperationInternal(KeyVaultBackupClient client, string id) { @@ -151,13 +151,13 @@ public override TResult Value TResult result = null; Type resultType = typeof(TResult); - if (resultType == typeof(RestoreResult)) + if (resultType == typeof(KeyVaultRestoreResult)) { - result = new RestoreResult(StartTime.Value, EndTime.Value) as TResult; + result = new KeyVaultRestoreResult(StartTime.Value, EndTime.Value) as TResult; } - else if (resultType == typeof(SelectiveKeyRestoreResult)) + else if (resultType == typeof(KeyVaultSelectiveRestoreResult)) { - result = new SelectiveKeyRestoreResult(StartTime.Value, EndTime.Value) as TResult; + result = new KeyVaultSelectiveRestoreResult(StartTime.Value, EndTime.Value) as TResult; } return result; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleType.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleType.cs index 57a6b47f673bc..2da7573776c98 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleType.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleType.cs @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using Azure.Core; -namespace Azure.Security.KeyVault.Administration.Models +namespace Azure.Security.KeyVault.Administration { [CodeGenModel("RoleType")] public readonly partial struct KeyVaultRoleType diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs index 0d4bc5fea64f5..d4bac3cf6ee14 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core.TestFramework; -using Azure.Security.KeyVault.Administration.Models; using NUnit.Framework; using System.Linq; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs index d3615f379a65b..c832574244d58 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs @@ -6,7 +6,6 @@ using System.Linq; using System.Threading.Tasks; using Azure.Core.TestFramework; -using Azure.Security.KeyVault.Administration.Models; using NUnit.Framework; namespace Azure.Security.KeyVault.Administration.Tests diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupOperationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupOperationTests.cs index d1d487da5ae0f..b2284a86b65ff 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupOperationTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupOperationTests.cs @@ -50,11 +50,11 @@ public void UpdateStatusThrowsOnError() .Setup(m => m.GetBackupDetailsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(failedResponse.Object); - var operation = new BackupOperation(mockClient.Object, JobId); + var operation = new KeyVaultBackupOperation(mockClient.Object, JobId); Assert.ThrowsAsync(async () => await operation.UpdateStatusAsync(default)); - operation = new BackupOperation(mockClient.Object, JobId); + operation = new KeyVaultBackupOperation(mockClient.Object, JobId); Assert.Throws(() => operation.UpdateStatus(default)); } @@ -78,11 +78,11 @@ public void UpdateStatusThrowsIfServiceCallThrows(Exception ex) .Setup(m => m.GetBackupDetails(It.IsAny(), It.IsAny())) .Throws(ex); - var operation = new BackupOperation(mockClient.Object, JobId); + var operation = new KeyVaultBackupOperation(mockClient.Object, JobId); Exception result = Assert.ThrowsAsync(async () => await operation.UpdateStatusAsync(default)); - operation = new BackupOperation(mockClient.Object, JobId); + operation = new KeyVaultBackupOperation(mockClient.Object, JobId); result = Assert.Throws(() => operation.UpdateStatus(default)); } @@ -96,11 +96,11 @@ public void ValueThrowsOnError() .Setup(m => m.GetBackupDetailsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(failedResponse.Object); - var operation = new BackupOperation(mockClient.Object, JobId); + var operation = new KeyVaultBackupOperation(mockClient.Object, JobId); var exception = Assert.ThrowsAsync(async () => await operation.UpdateStatusAsync(default)); - Assert.Throws(() => { BackupResult x = operation.Value; }); + Assert.Throws(() => { KeyVaultBackupResult x = operation.Value; }); Assert.That(operation.StartTime, Is.EqualTo(failedBackup.StartTime)); Assert.That(operation.EndTime, Is.EqualTo(failedBackup.EndTime)); } @@ -114,9 +114,9 @@ public void ValueThrowsWhenOperationIsNotComplete() .Setup(m => m.GetBackupDetailsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(failedResponse.Object); - var operation = new BackupOperation(incompleteBackup, Mock.Of(), Mock.Of()); + var operation = new KeyVaultBackupOperation(incompleteBackup, Mock.Of(), Mock.Of()); - Assert.Throws(() => { BackupResult x = operation.Value; }); + Assert.Throws(() => { KeyVaultBackupResult x = operation.Value; }); Assert.That(operation.StartTime, Is.EqualTo(incompleteBackup.StartTime)); Assert.That(operation.EndTime, Is.EqualTo(incompleteBackup.EndTime)); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs index 5cee2ad6c6e0e..8af329e96fbcf 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs @@ -27,10 +27,10 @@ public async Task BackupAndRestore() builder.Path = BlobContainerName; // Start the backup. - BackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, "?" + SasToken, source.Token); + KeyVaultBackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, "?" + SasToken, source.Token); // Wait for completion of the LRO. - BackupResult backupResult = await backupOperation.WaitForCompletionAsync(source.Token); + KeyVaultBackupResult backupResult = await backupOperation.WaitForCompletionAsync(source.Token); await WaitForOperationAsync(); @@ -39,7 +39,7 @@ public async Task BackupAndRestore() Assert.That(backupOperation.HasValue, Is.True); // Start the restore. - RestoreOperation restoreOperation = await Client.StartRestoreAsync(backupResult.FolderUri, "?" + SasToken, source.Token); + KeyVaultRestoreOperation restoreOperation = await Client.StartRestoreAsync(backupResult.FolderUri, "?" + SasToken, source.Token); // Wait for completion of the LRO var restoreResult = await restoreOperation.WaitForCompletionAsync(source.Token); @@ -61,10 +61,10 @@ public async Task BackupAndRestoreMultiPartFolderName() builder.Path = BlobContainerNameMultiPart; // Start the backup. - BackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, "?" + SasToken, source.Token); + KeyVaultBackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, "?" + SasToken, source.Token); // Wait for completion of the LRO. - BackupResult backupResult = await backupOperation.WaitForCompletionAsync(source.Token); + KeyVaultBackupResult backupResult = await backupOperation.WaitForCompletionAsync(source.Token); await WaitForOperationAsync(); @@ -73,7 +73,7 @@ public async Task BackupAndRestoreMultiPartFolderName() Assert.That(backupOperation.HasValue, Is.True); // Start the restore. - RestoreOperation restoreOperation = await Client.StartRestoreAsync(backupResult.FolderUri, "?" + SasToken, source.Token); + KeyVaultRestoreOperation restoreOperation = await Client.StartRestoreAsync(backupResult.FolderUri, "?" + SasToken, source.Token); // Wait for completion of the LRO var restoreResult = await restoreOperation.WaitForCompletionAsync(source.Token); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/KeyVaultBackupClientTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/KeyVaultBackupClientTests.cs index 04b64a99260c3..74f86eaec786b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/KeyVaultBackupClientTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/KeyVaultBackupClientTests.cs @@ -2,10 +2,6 @@ // Licensed under the MIT License. using System; -using System.Collections.Concurrent; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using Azure.Security.KeyVault.Administration.Models; using NUnit.Framework; namespace Azure.Security.KeyVault.Administration.Tests diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RestoreOperationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RestoreOperationTests.cs index bd08d9a554ac7..12ff12b891cd7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RestoreOperationTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RestoreOperationTests.cs @@ -51,11 +51,11 @@ public void UpdateStatusThrowsOnError() .Setup(m => m.GetRestoreDetailsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(failedResponse.Object); - var operation = new RestoreOperation(mockClient.Object, JobId); + var operation = new KeyVaultRestoreOperation(mockClient.Object, JobId); Assert.ThrowsAsync(async () => await operation.UpdateStatusAsync(default)); - operation = new RestoreOperation(mockClient.Object, JobId); + operation = new KeyVaultRestoreOperation(mockClient.Object, JobId); Assert.Throws(() => operation.UpdateStatus(default)); } @@ -79,11 +79,11 @@ public void UpdateStatusThrowsIfServiceCallThrows(Exception ex) .Setup(m => m.GetRestoreDetails(It.IsAny(), It.IsAny())) .Throws(ex); - var operation = new RestoreOperation(mockClient.Object, JobId); + var operation = new KeyVaultRestoreOperation(mockClient.Object, JobId); Exception result = Assert.ThrowsAsync(async () => await operation.UpdateStatusAsync(default)); - operation = new RestoreOperation(mockClient.Object, JobId); + operation = new KeyVaultRestoreOperation(mockClient.Object, JobId); result = Assert.Throws(() => operation.UpdateStatus(default)); } @@ -97,11 +97,11 @@ public void ValueThrowsOnError() .Setup(m => m.GetRestoreDetailsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(failedResponse.Object); - var operation = new RestoreOperation(mockClient.Object, JobId); + var operation = new KeyVaultRestoreOperation(mockClient.Object, JobId); var exception = Assert.ThrowsAsync(async () => await operation.UpdateStatusAsync(default)); - Assert.Throws(() => { RestoreResult x = operation.Value; }); + Assert.Throws(() => { KeyVaultRestoreResult x = operation.Value; }); Assert.That(operation.StartTime, Is.EqualTo(failedRestore.StartTime)); Assert.That(operation.EndTime, Is.EqualTo(failedRestore.EndTime)); } @@ -115,9 +115,9 @@ public void ValueThrowsWhenOperationIsNotComplete() .Setup(m => m.GetRestoreDetailsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(failedResponse.Object); - var operation = new RestoreOperation(incompleteRestore, Mock.Of(), Mock.Of()); + var operation = new KeyVaultRestoreOperation(incompleteRestore, Mock.Of(), Mock.Of()); - Assert.Throws(() => { RestoreResult x = operation.Value; }); + Assert.Throws(() => { KeyVaultRestoreResult x = operation.Value; }); Assert.That(operation.StartTime, Is.EqualTo(incompleteRestore.StartTime)); Assert.That(operation.EndTime, Is.EqualTo(incompleteRestore.EndTime)); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RoleAssignmentScopeTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RoleAssignmentScopeTests.cs index bcbd6996fc16c..f930e40472eb0 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RoleAssignmentScopeTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RoleAssignmentScopeTests.cs @@ -1,12 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System.Threading.Tasks; -using Azure.Core.TestFramework; using NUnit.Framework; using System; -using System.Threading; -using Azure.Security.KeyVault.Administration.Models; namespace Azure.Security.KeyVault.Administration.Tests { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SelectiveKeyRestoreOperationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SelectiveKeyRestoreOperationTests.cs index d620141cc2d3d..76736906f95b8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SelectiveKeyRestoreOperationTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SelectiveKeyRestoreOperationTests.cs @@ -51,11 +51,11 @@ public void UpdateStatusThrowsOnError() .Setup(m => m.GetSelectiveKeyRestoreDetailsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(failedResponse.Object); - var operation = new SelectiveKeyRestoreOperation(mockClient.Object, JobId); + var operation = new KeyVaultSelectiveRestoreOperation(mockClient.Object, JobId); Assert.ThrowsAsync(async () => await operation.UpdateStatusAsync(default)); - operation = new SelectiveKeyRestoreOperation(mockClient.Object, JobId); + operation = new KeyVaultSelectiveRestoreOperation(mockClient.Object, JobId); Assert.Throws(() => operation.UpdateStatus(default)); } @@ -79,11 +79,11 @@ public void UpdateStatusThrowsIfServiceCallThrows(Exception ex) .Setup(m => m.GetSelectiveKeyRestoreDetails(It.IsAny(), It.IsAny())) .Throws(ex); - var operation = new SelectiveKeyRestoreOperation(mockClient.Object, JobId); + var operation = new KeyVaultSelectiveRestoreOperation(mockClient.Object, JobId); Exception result = Assert.ThrowsAsync(async () => await operation.UpdateStatusAsync(default)); - operation = new SelectiveKeyRestoreOperation(mockClient.Object, JobId); + operation = new KeyVaultSelectiveRestoreOperation(mockClient.Object, JobId); result = Assert.Throws(() => operation.UpdateStatus(default)); } @@ -97,11 +97,11 @@ public void ValueThrowsOnError() .Setup(m => m.GetSelectiveKeyRestoreDetailsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(failedResponse.Object); - var operation = new SelectiveKeyRestoreOperation(mockClient.Object, JobId); + var operation = new KeyVaultSelectiveRestoreOperation(mockClient.Object, JobId); var exception = Assert.ThrowsAsync(async () => await operation.UpdateStatusAsync(default)); - Assert.Throws(() => { SelectiveKeyRestoreResult x = operation.Value; }); + Assert.Throws(() => { KeyVaultSelectiveRestoreResult x = operation.Value; }); Assert.That(operation.StartTime, Is.EqualTo(failedRestore.StartTime)); Assert.That(operation.EndTime, Is.EqualTo(failedRestore.EndTime)); } @@ -115,9 +115,9 @@ public void ValueThrowsWhenOperationIsNotComplete() .Setup(m => m.GetSelectiveKeyRestoreDetailsAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(failedResponse.Object); - var operation = new SelectiveKeyRestoreOperation(incompleteRestore, Mock.Of(), Mock.Of()); + var operation = new KeyVaultSelectiveRestoreOperation(incompleteRestore, Mock.Of(), Mock.Of()); - Assert.Throws(() => { SelectiveKeyRestoreResult x = operation.Value; }); + Assert.Throws(() => { KeyVaultSelectiveRestoreResult x = operation.Value; }); Assert.That(operation.StartTime, Is.EqualTo(incompleteRestore.StartTime)); Assert.That(operation.EndTime, Is.EqualTo(incompleteRestore.EndTime)); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs index 0efcd04905415..7ffc29a6f7c1e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs @@ -41,10 +41,10 @@ public async Task BackupAndRestoreSampleAsync() }; // Start the backup. - BackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); + KeyVaultBackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); // Wait for completion of the BackupOperation. - Response backupResult = await backupOperation.WaitForCompletionAsync(); + Response backupResult = await backupOperation.WaitForCompletionAsync(); // Get the Uri for the location of your backup blob. Uri folderUri = backupResult.Value.FolderUri; @@ -57,10 +57,10 @@ public async Task BackupAndRestoreSampleAsync() #region Snippet:HelloFullRestoreAsync // Start the restore using the backupBlobUri returned from a previous BackupOperation. - RestoreOperation restoreOperation = await Client.StartRestoreAsync(folderUri, sasToken); + KeyVaultRestoreOperation restoreOperation = await Client.StartRestoreAsync(folderUri, sasToken); // Wait for completion of the RestoreOperation. - Response restoreResult = await restoreOperation.WaitForCompletionAsync(); + Response restoreResult = await restoreOperation.WaitForCompletionAsync(); #endregion Assert.That(restoreOperation.HasValue, Is.True); @@ -86,7 +86,7 @@ public async Task BackupAndRestoreSampleSync() }; // Start the backup. - BackupOperation backupOperation = Client.StartBackup(builder.Uri, sasToken); + KeyVaultBackupOperation backupOperation = Client.StartBackup(builder.Uri, sasToken); // Wait for completion of the BackupOperation. while (!backupOperation.HasCompleted) @@ -110,7 +110,7 @@ public async Task BackupAndRestoreSampleSync() #region Snippet:HelloFullRestoreSync // Start the restore using the backupBlobUri returned from a previous BackupOperation. - RestoreOperation restoreOperation = Client.StartRestore(folderUri, sasToken); + KeyVaultRestoreOperation restoreOperation = Client.StartRestore(folderUri, sasToken); // Wait for completion of the RestoreOperation. while (!restoreOperation.HasCompleted) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_SelectiveRestore.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_SelectiveRestore.cs index d44941b08f5cb..2abd01f13791f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_SelectiveRestore.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_SelectiveRestore.cs @@ -36,10 +36,10 @@ public async Task BackupAndRestoreSampleAsync() RegisterKeyForCleanup(keyName); // Start the backup. - BackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); + KeyVaultBackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); // Wait for completion of the BackupOperation. - Response backupResult = await backupOperation.WaitForCompletionAsync(); + Response backupResult = await backupOperation.WaitForCompletionAsync(); await WaitForOperationAsync(); @@ -55,10 +55,10 @@ public async Task BackupAndRestoreSampleAsync() #endif // Start the restore for a specific key that was previously backed up using the backupBlobUri returned from a previous BackupOperation. - SelectiveKeyRestoreOperation restoreOperation = await Client.StartSelectiveRestoreAsync(keyName, folderUri, sasToken); + KeyVaultSelectiveRestoreOperation restoreOperation = await Client.StartSelectiveRestoreAsync(keyName, folderUri, sasToken); // Wait for completion of the RestoreOperation. - SelectiveKeyRestoreResult restoreResult = await restoreOperation.WaitForCompletionAsync(); + KeyVaultSelectiveRestoreResult restoreResult = await restoreOperation.WaitForCompletionAsync(); #endregion Assert.That(restoreOperation.HasValue, Is.True); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample3_BackRestoreResume.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample3_BackRestoreResume.cs index daa4d1948a0f6..e52f2b9edb467 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample3_BackRestoreResume.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample3_BackRestoreResume.cs @@ -28,7 +28,7 @@ public async Task ResumeBackupRestore() }; // Start the backup. - BackupOperation originalBackupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); + KeyVaultBackupOperation originalBackupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); var backupOperationId = originalBackupOperation.Id; #region Snippet:ResumeBackupAsync @@ -38,13 +38,13 @@ public async Task ResumeBackupRestore() #endif // Construct a BackupOperation using a KeyVaultBackupClient and the Id from a previously started operation. - BackupOperation backupOperation = new BackupOperation(client, backupOperationId); + KeyVaultBackupOperation backupOperation = new KeyVaultBackupOperation(client, backupOperationId); #if !SNIPPET backupOperation._retryAfterSeconds = (int)PollingInterval.TotalSeconds; #endif // Wait for completion of the BackupOperation. - Response backupResult = await backupOperation.WaitForCompletionAsync(); + Response backupResult = await backupOperation.WaitForCompletionAsync(); // Get the Uri for the location of you backup blob. Uri folderUri = backupResult.Value.FolderUri; @@ -56,7 +56,7 @@ public async Task ResumeBackupRestore() await WaitForOperationAsync(); // Start the restore using the backupBlobUri returned from a previous BackupOperation. - RestoreOperation originalRestoreOperation = await Client.StartRestoreAsync(folderUri, sasToken); + KeyVaultRestoreOperation originalRestoreOperation = await Client.StartRestoreAsync(folderUri, sasToken); var restoreOperationId = originalRestoreOperation.Id; #region Snippet:ResumeRestoreAsync @@ -66,13 +66,13 @@ public async Task ResumeBackupRestore() #endif // Construct a RestoreOperation using a KeyVaultBackupClient and the Id from a previously started operation. - RestoreOperation restoreOperation = new RestoreOperation(client, restoreOperationId); + KeyVaultRestoreOperation restoreOperation = new KeyVaultRestoreOperation(client, restoreOperationId); #if !SNIPPET restoreOperation._operationInternal._retryAfterSeconds = (int)PollingInterval.TotalSeconds; #endif // Wait for completion of the RestoreOperation. - RestoreResult restoreResult = await restoreOperation.WaitForCompletionAsync(); + KeyVaultRestoreResult restoreResult = await restoreOperation.WaitForCompletionAsync(); #endregion Assert.That(restoreOperation.HasValue, Is.True);