Merged PR 63702: Add Sonar Client to update permissions and tags in Sonar Projects to new team structure

Add Sonar Client to update permissions and tags in Sonar Projects to new team structure

Related work items: #125680
This commit is contained in:
Johannes Oenema Effectory
2025-11-05 15:18:52 +00:00
parent e30af22220
commit 91980817e0
66 changed files with 1586 additions and 1296 deletions

View File

@@ -1,7 +1,6 @@
namespace AzureRestApi.Models.Api
namespace AzureRestApi.Models.Api;
public class ApiResponse<T>
{
public class ApiResponse<T>
{
public List<T>? value { get; set; }
}
}
public List<T>? value { get; set; }
}

View File

@@ -1,9 +1,8 @@
using AzureRestApi.Models.Resources;
namespace AzureRestApi.Models.Api
namespace AzureRestApi.Models.Api;
public class TagProperties
{
public class TagProperties
{
public TagTags properties { get; set; } = new TagTags();
}
}
public TagTags properties { get; set; } = new TagTags();
}

View File

@@ -1,11 +1,10 @@
namespace AzureRestApi.Models.Resources
namespace AzureRestApi.Models.Resources;
public class Deployment
{
public class Deployment
{
public string? id { get; set; }
public string? name { get; set; }
public string? type { get; set; }
public string? location { get; set; }
public DeploymentProperties? properties { get; set; }
}
}
public string? id { get; set; }
public string? name { get; set; }
public string? type { get; set; }
public string? location { get; set; }
public DeploymentProperties? properties { get; set; }
}

View File

@@ -1,17 +1,16 @@
namespace AzureRestApi.Models.Resources
namespace AzureRestApi.Models.Resources;
public class DeploymentProperties
{
public class DeploymentProperties
{
public string? templateHash { get; set; }
public string? mode { get; set; }
//public string? parameters { get; set; }
public string? provisioningState { get; set; }
public DateTimeOffset? timestamp { get; set; }
public string? duration { get; set; }
public string? correlationId { get; set; }
// public string? providers { get; set; }
//public string? dependencies { get; set; }
//public string? outputs { get; set; }
public List<Resource>? outputResources { get; set; }
}
}
public string? templateHash { get; set; }
public string? mode { get; set; }
//public string? parameters { get; set; }
public string? provisioningState { get; set; }
public DateTimeOffset? timestamp { get; set; }
public string? duration { get; set; }
public string? correlationId { get; set; }
// public string? providers { get; set; }
//public string? dependencies { get; set; }
//public string? outputs { get; set; }
public List<Resource>? outputResources { get; set; }
}

View File

@@ -1,28 +1,27 @@
namespace AzureRestApi.Models.Resources
{
public class Resource
{
public string? id { get; set; }
public string? name { get; set; }
public string? type { get; set; }
public string? location { get; set; }
public string? createdTime { get; set; }
public string? changedTime { get; set; }
public Dictionary<string, string> tags { get; set; } = new Dictionary<string, string>();
namespace AzureRestApi.Models.Resources;
public string? CreatedOn
public class Resource
{
public string? id { get; set; }
public string? name { get; set; }
public string? type { get; set; }
public string? location { get; set; }
public string? createdTime { get; set; }
public string? changedTime { get; set; }
public Dictionary<string, string> tags { get; set; } = new Dictionary<string, string>();
public string? CreatedOn
{
get
{
get
if (string.IsNullOrWhiteSpace(createdTime))
{
if (string.IsNullOrWhiteSpace(createdTime))
{
return changedTime;
}
else
{
return createdTime;
}
return changedTime;
}
else
{
return createdTime;
}
}
}
}
}

View File

@@ -1,12 +1,11 @@
namespace AzureRestApi.Models.Resources
namespace AzureRestApi.Models.Resources;
public class ResourceGroup
{
public class ResourceGroup
{
public string? id { get; set; }
public string? name { get; set; }
public string? managedBy { get; set; }
public string? location { get; set; }
public Dictionary<string, string> tags { get; set; } = new Dictionary<string, string>();
public DeploymentProperties? properties { get; set; }
}
}
public string? id { get; set; }
public string? name { get; set; }
public string? managedBy { get; set; }
public string? location { get; set; }
public Dictionary<string, string> tags { get; set; } = new Dictionary<string, string>();
public DeploymentProperties? properties { get; set; }
}

View File

@@ -1,7 +1,6 @@
namespace AzureRestApi.Models.Resources
namespace AzureRestApi.Models.Resources;
public class ResourceGroupProperties
{
public class ResourceGroupProperties
{
public string? provisioningState { get; set; }
}
}
public string? provisioningState { get; set; }
}

View File

@@ -1,20 +1,19 @@
namespace AzureRestApi.Models.Resources
{
public class Subscription
{
public string? id { get; set; }
public string? authorizationSource { get; set; }
public string? subscriptionId { get; set; }
public string? tenantId { get; set; }
public string? displayName { get; set; }
public string? state { get; set; }
namespace AzureRestApi.Models.Resources;
public bool Enabled
public class Subscription
{
public string? id { get; set; }
public string? authorizationSource { get; set; }
public string? subscriptionId { get; set; }
public string? tenantId { get; set; }
public string? displayName { get; set; }
public string? state { get; set; }
public bool Enabled
{
get
{
get
{
return state == "Enabled";
}
return state == "Enabled";
}
}
}
}

View File

@@ -1,7 +1,6 @@
namespace AzureRestApi.Models.Resources
namespace AzureRestApi.Models.Resources;
public class TagTags
{
public class TagTags
{
public Dictionary<string, string> tags { get; set; } = new Dictionary<string, string>();
}
}
public Dictionary<string, string> tags { get; set; } = new Dictionary<string, string>();
}

View File

@@ -1,8 +1,7 @@
namespace AzureRestApi.Models
namespace AzureRestApi.Models;
public class Settings
{
public class Settings
{
public string KeyVaultName { get; set; } = string.Empty;
public string AzureTenantId { get; set; } = string.Empty;
}
}
public string KeyVaultName { get; set; } = string.Empty;
public string AzureTenantId { get; set; } = string.Empty;
}